protected SessionProxyFactory getProxyFactory(RemoteBinding binding) { assert binding!=null : RemoteBinding.class.getSimpleName() + " must be specified"; // Get the Registry name String proxyFactoryRegistryBindName = this.getJndiRegistrar().getProxyFactoryRegistryKey(binding.jndiBinding(), this.getMetaData(), true); // Return return this.getProxyFactory(proxyFactoryRegistryBindName); }
protected SessionProxyFactory getProxyFactory(LocalBinding binding) { assert binding!=null : LocalBinding.class.getSimpleName() + " must be specified"; // Find the jndiName String jndiName = this.getMetaData().getLocalJndiName(); if(binding!=null) { jndiName = binding.jndiBinding(); } // Get the Registry name String proxyFactoryRegistryBindName = this.getJndiRegistrar().getProxyFactoryRegistryKey(jndiName, this.getMetaData(), true); // Return return this.getProxyFactory(proxyFactoryRegistryBindName); }
protected void lockedStop() throws Exception { try { Dispatcher.singleton.unregisterTarget(getObjectName().getCanonicalName()); } catch (Exception ignore) { log.debug("Dispatcher unregister target failed", ignore); } // Deregister with Remoting Dispatcher.singleton.unregisterTarget(this.getName()); // Unbind applicable JNDI Entries JndiSessionRegistrarBase jndiRegistrar = this.getJndiRegistrar(); if (jndiRegistrar != null) { jndiRegistrar.unbindEjb(this.getInitialContext(), this.getMetaData()); } super.lockedStop(); }
protected void lockedStart() throws Exception { super.lockedStart(); this.registerWithAopDispatcher(); // Obtain registrar JndiSessionRegistrarBase registrar = this.getJndiRegistrar(); // Bind all appropriate references/factories to Global JNDI for Client access, if a JNDI Registrar is present if (registrar != null) { String guid = Ejb3Registry.guid(this); registrar.bindEjb(this.getInitialContext(), this.getMetaData(), this.getClassloader(), this.getObjectName() .getCanonicalName(), guid, this.getAdvisor()); } else { log.debug("No " + JndiSessionRegistrarBase.class.getSimpleName() + " was found; bypassing binding of Proxies to " + this.getName() + " in Global JNDI."); } }