congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
RemoteViewInjectionSource
Code IndexAdd Tabnine to your IDE (free)

How to use
RemoteViewInjectionSource
in
org.jboss.as.ejb3.remote

Best Java code snippets using org.jboss.as.ejb3.remote.RemoteViewInjectionSource (Showing top 6 results out of 315)

origin: wildfly/wildfly

private void registerRemoteBinding(final EJBComponentDescription componentDescription, final ViewDescription viewDescription, final String jndiName) {
  final EEModuleDescription moduleDescription = componentDescription.getModuleDescription();
  final InjectedValue<ClassLoader> viewClassLoader = new InjectedValue<ClassLoader>();
  moduleDescription.getBindingConfigurations().add(new BindingConfiguration(jndiName, new RemoteViewInjectionSource(null, moduleDescription.getEarApplicationName(), moduleDescription.getModuleName(), moduleDescription.getDistinctName(), componentDescription.getComponentName(), viewDescription.getViewClassName(), componentDescription.isStateful(), viewClassLoader, appclient)));
  componentDescription.getConfigurators().add(new ComponentConfigurator() {
    public void configure(DeploymentPhaseContext context, ComponentDescription description, ComponentConfiguration configuration) throws DeploymentUnitProcessingException {
      viewClassLoader.setValue(Values.immediateValue(configuration.getModuleClassLoader()));
    }
  });
}
private void registerControlPointBinding(final EJBComponentDescription componentDescription, final ViewDescription viewDescription, final String jndiName, final DeploymentUnit deploymentUnit) {
origin: wildfly/wildfly

  @Override
  public void getResourceValue(ResolutionContext resolutionContext, ServiceBuilder<?> serviceBuilder, DeploymentPhaseContext phaseContext, Injector<ManagedReferenceFactory> injector) throws DeploymentUnitProcessingException {
    final InjectedValue<ManagedReferenceFactory> delegateInjection = new InjectedValue<>();
    delegate.getResourceValue(resolutionContext, serviceBuilder, phaseContext, delegateInjection);
    injector.inject(new ManagedReferenceFactory() {
      @Override
      public ManagedReference getReference() {
        ControlPoint cp = controlPointInjectedValue.getValue();
        try {
          RunResult res = cp.beginRequest();
          if(res != RunResult.RUN) {
            throw EjbLogger.ROOT_LOGGER.containerSuspended();
          }
          try {
            return delegateInjection.getValue().getReference();
          } finally {
            cp.requestComplete();
          }
        } catch (Exception e) {
          throw new RuntimeException(e);
        }
      }
    });
  }
};
origin: wildfly/wildfly

@Override
protected InjectionSource createInjectionSource(final ServiceName serviceName, Value<ClassLoader> viewClassLoader, boolean appclient) {
  if(methodIntf != MethodIntf.REMOTE && methodIntf != MethodIntf.HOME) {
    return super.createInjectionSource(serviceName, viewClassLoader, appclient);
  } else {
    final EJBComponentDescription componentDescription = getComponentDescription();
    final EEModuleDescription desc = componentDescription.getModuleDescription();
    final String earApplicationName = desc.getEarApplicationName();
    return new RemoteViewInjectionSource(serviceName, earApplicationName, desc.getModuleName(), desc.getDistinctName(), componentDescription.getComponentName(), getViewClassName() , componentDescription.isStateful(),viewClassLoader, appclient);
  }
}
origin: wildfly/wildfly

final InjectedValue<ClassLoader> viewClassLoader = new InjectedValue<ClassLoader>();
final InjectedValue<ControlPoint> controlPointInjectedValue = new InjectedValue<>();
final RemoteViewInjectionSource delegate = new RemoteViewInjectionSource(null, moduleDescription.getEarApplicationName(), moduleDescription.getModuleName(), moduleDescription.getDistinctName(), componentDescription.getComponentName(), viewDescription.getViewClassName(), componentDescription.isStateful(), viewClassLoader, appclient);
final ServiceName depName = ControlPointService.serviceName(deploymentUnit.getParent() == null ? deploymentUnit.getName() : deploymentUnit.getParent().getName(), EJBComponentSuspendDeploymentUnitProcessor.ENTRY_POINT_NAME + deploymentUnit.getName() + "." + componentDescription.getComponentName());
componentDescription.getConfigurators().add((context, description, configuration) -> {
origin: org.jboss.as/jboss-as-ejb3

private void registerRemoteBinding(final EJBComponentDescription componentDescription, final ViewDescription viewDescription, final String jndiName) {
  final EEModuleDescription moduleDescription = componentDescription.getModuleDescription();
  final InjectedValue<ClassLoader> viewClassLoader = new InjectedValue<ClassLoader>();
  moduleDescription.getBindingConfigurations().add(new BindingConfiguration(jndiName, new RemoteViewInjectionSource(null, moduleDescription.getEarApplicationName(), moduleDescription.getModuleName(), moduleDescription.getDistinctName(), componentDescription.getComponentName(), viewDescription.getViewClassName(), componentDescription.isStateful(), viewClassLoader)));
  componentDescription.getConfigurators().add(new ComponentConfigurator() {
    public void configure(DeploymentPhaseContext context, ComponentDescription description, ComponentConfiguration configuration) throws DeploymentUnitProcessingException {
      viewClassLoader.setValue(Values.immediateValue(configuration.getModuleClassLoader()));
    }
  });
}
origin: org.jboss.as/jboss-as-ejb3

@Override
protected InjectionSource createInjectionSource(final ServiceName serviceName, Value<ClassLoader> viewClassLoader) {
  if(methodIntf != MethodIntf.REMOTE && methodIntf != MethodIntf.HOME) {
    return super.createInjectionSource(serviceName, viewClassLoader);
  } else {
    final EJBComponentDescription componentDescription = getComponentDescription();
    final EEModuleDescription desc = componentDescription.getModuleDescription();
    final String earApplicationName = desc.getEarApplicationName();
    return new RemoteViewInjectionSource(serviceName, earApplicationName, desc.getModuleName(), desc.getDistinctName(), componentDescription.getComponentName(), getViewClassName() , componentDescription.isStateful(),viewClassLoader);
  }
}
org.jboss.as.ejb3.remoteRemoteViewInjectionSource

Javadoc

Injection source for EJB remote views.

Most used methods

  • <init>
  • getResourceValue

Popular in Java

  • Creating JSON documents from java classes using gson
  • putExtra (Intent)
  • runOnUiThread (Activity)
  • setScale (BigDecimal)
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • Top 12 Jupyter Notebook Extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now