[jboss-cvs] JBossAS SVN: r89874 - projects/webbeans-ri-int/trunk/ejb/src/main/java/org/jboss/webbeans/integration/ejb.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Jun 5 08:38:18 EDT 2009


Author: petemuir
Date: 2009-06-05 08:38:18 -0400 (Fri, 05 Jun 2009)
New Revision: 89874

Modified:
   projects/webbeans-ri-int/trunk/ejb/src/main/java/org/jboss/webbeans/integration/ejb/JBossSessionObjectReference.java
Log:
WBRI-253

Modified: projects/webbeans-ri-int/trunk/ejb/src/main/java/org/jboss/webbeans/integration/ejb/JBossSessionObjectReference.java
===================================================================
--- projects/webbeans-ri-int/trunk/ejb/src/main/java/org/jboss/webbeans/integration/ejb/JBossSessionObjectReference.java	2009-06-05 11:52:32 UTC (rev 89873)
+++ projects/webbeans-ri-int/trunk/ejb/src/main/java/org/jboss/webbeans/integration/ejb/JBossSessionObjectReference.java	2009-06-05 12:38:18 UTC (rev 89874)
@@ -26,6 +26,7 @@
    private final Serializable id; 
    private final DeploymentUnit deploymentUnit;
    private final String ejbClassName;
+   private final String jndiName;
     
    public JBossSessionObjectReference(EjbDescriptor<?> descriptor, Context context) throws NamingException
    {
@@ -35,12 +36,14 @@
       }
       else
       {
-         reference = context.lookup(((JBossSessionBeanDescriptorAdaptor<?>) descriptor).getLocalJndiName());
+         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.getType().getSimpleName();
+     
    }
    
    @SuppressWarnings("unchecked")
@@ -65,4 +68,10 @@
       return registrar.lookup(endpointMcBindName, Endpoint.class);
    }
    
+   @Override
+   public String toString()
+   {
+      return "Session bean reference: " + jndiName + " with id: " + id; 
+   }
+   
 }




More information about the jboss-cvs-commits mailing list