Search in sources :

Example 1 with HandleDelegateImpl

use of org.jboss.as.ejb3.iiop.handle.HandleDelegateImpl in project wildfly by wildfly.

the class IIOPJndiBindingProcessor method bindService.

/**
     * Binds java:comp/ORB
     *
     * @param serviceTarget      The service target
     * @param contextServiceName The service name of the context to bind to
     */
private void bindService(final ServiceTarget serviceTarget, final ServiceName contextServiceName, final Module module) {
    final ServiceName orbServiceName = contextServiceName.append("ORB");
    final BinderService orbService = new BinderService("ORB");
    serviceTarget.addService(orbServiceName, orbService).addDependency(CorbaORBService.SERVICE_NAME, ORB.class, new ManagedReferenceInjector<ORB>(orbService.getManagedObjectInjector())).addDependency(contextServiceName, ServiceBasedNamingStore.class, orbService.getNamingStoreInjector()).install();
    final ServiceName handleDelegateServiceName = contextServiceName.append("HandleDelegate");
    final BinderService handleDelegateBindingService = new BinderService("HandleDelegate");
    handleDelegateBindingService.getManagedObjectInjector().inject(new ValueManagedReferenceFactory(new ImmediateValue(new HandleDelegateImpl(module.getClassLoader()))));
    serviceTarget.addService(handleDelegateServiceName, handleDelegateBindingService).addDependency(contextServiceName, ServiceBasedNamingStore.class, handleDelegateBindingService.getNamingStoreInjector()).install();
}
Also used : BinderService(org.jboss.as.naming.service.BinderService) HandleDelegateImpl(org.jboss.as.ejb3.iiop.handle.HandleDelegateImpl) ServiceName(org.jboss.msc.service.ServiceName) ServiceBasedNamingStore(org.jboss.as.naming.ServiceBasedNamingStore) ValueManagedReferenceFactory(org.jboss.as.naming.ValueManagedReferenceFactory) ORB(org.omg.CORBA.ORB) ImmediateValue(org.jboss.msc.value.ImmediateValue)

Aggregations

HandleDelegateImpl (org.jboss.as.ejb3.iiop.handle.HandleDelegateImpl)1 ServiceBasedNamingStore (org.jboss.as.naming.ServiceBasedNamingStore)1 ValueManagedReferenceFactory (org.jboss.as.naming.ValueManagedReferenceFactory)1 BinderService (org.jboss.as.naming.service.BinderService)1 ServiceName (org.jboss.msc.service.ServiceName)1 ImmediateValue (org.jboss.msc.value.ImmediateValue)1 ORB (org.omg.CORBA.ORB)1