[webbeans-commits] Webbeans SVN: r569 - ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ejb.

webbeans-commits at lists.jboss.org webbeans-commits at lists.jboss.org
Fri Dec 19 07:57:22 EST 2008


Author: pete.muir at jboss.org
Date: 2008-12-19 07:57:22 -0500 (Fri, 19 Dec 2008)
New Revision: 569

Modified:
   ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ejb/DefaultEnterpriseBeanLookup.java
Log:
fix jndi lookup weirdness

Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ejb/DefaultEnterpriseBeanLookup.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ejb/DefaultEnterpriseBeanLookup.java	2008-12-19 07:52:10 UTC (rev 568)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ejb/DefaultEnterpriseBeanLookup.java	2008-12-19 12:57:22 UTC (rev 569)
@@ -75,15 +75,14 @@
          throw new RuntimeException("EJB must have local interface " + ejbDescriptor);
       }
       String jndiName = ejbDescriptor.getLocalBusinessInterfaces().iterator().next().getJndiName();
-      String s = jndiName.substring(0, jndiName.lastIndexOf("-"));
       try
       {
          // TODO Implement enterprise proxies and select the correct jndiName
-         return (T) JNDI.lookup(s);
+         return (T) JNDI.lookup(jndiName);
       }
       catch (Exception e)
       {
-         throw new CreationException("could not find the name in JNDI " + s, e);
+         throw new CreationException("could not find the name in JNDI " + jndiName, e);
       }
    }
 




More information about the weld-commits mailing list