@Override public String getLocalJndiName() { if (localJndiName == null) { return super.getLocalJndiName(); } else { return localJndiName; } }
@Override public String getLocalJndiName() { if (localJndiName == null) { return super.getLocalJndiName(); } else { return localJndiName; } }
public JBossSessionObjectReference(EjbDescriptor<?> descriptor, Context context) throws NamingException { if (!(descriptor instanceof JBossSessionBeanDescriptorAdaptor<?>)) { throw new IllegalArgumentException("Can only operate on JBoss EJB3"); } else { this.jndiName = ((JBossSessionBeanDescriptorAdaptor<?>) descriptor).getLocalJndiName(); reference = context.lookup(jndiName); final SessionProxyInvocationHandler handler = (SessionProxyInvocationHandler) Proxy.getInvocationHandler(reference); id = (Serializable) handler.getTarget(); } this.deploymentUnit = ((JBossSessionBeanDescriptorAdaptor<?>) descriptor).getDeploymentUnit(); this.ejbClassName = descriptor.getBeanClass().getSimpleName(); this.stateful = descriptor.isStateful(); }
public JBossSessionObjectReference(EjbDescriptor<?> descriptor, DeploymentUnit deploymentUnit, Context context) throws NamingException { if (!(descriptor instanceof JBossSessionBeanDescriptorAdaptor<?>)) { throw new IllegalArgumentException("Can only operate on JBoss EJB3"); } this.jndiName = ((JBossSessionBeanDescriptorAdaptor<?>) descriptor).getLocalJndiName(); reference = context.lookup(jndiName); if (descriptor instanceof JBossSessionBean31DescriptorAdaptor<?> && ((JBossSessionBean31DescriptorAdaptor<?>) descriptor).isNoInterfaceView()) { this.id = null; } else { SessionProxyInvocationHandler handler = (SessionProxyInvocationHandler) Proxy.getInvocationHandler(reference); id = (Serializable) handler.getTarget(); } @Deprecated Ejb3Registrar registrar = Ejb3RegistrarLocator.locateRegistrar(); // Get the resolver EndpointResolver resolver = registrar.lookup(MC_BIND_NAME_ENDPOINT_RESOLVER, EndpointResolver.class); this.ejbClassName = descriptor.getBeanClass().getSimpleName(); endpointMcBindName = resolver.resolve(deploymentUnit, ejbClassName); this.stateful = descriptor.isStateful(); }