[jboss-user] [EJB 3.0] - [Bug?] @EJB versus JNDI lookup problems within SLSBs

asack do-not-reply at jboss.com
Mon Mar 19 18:46:56 EDT 2007


I have 4.0.4.GA isolation/call by value on.

Let me start simple, I have an EAR with a simple servlet WAR and a JAR containing one SLSB and its local implementation.  The SLSB is bound to some place in JNDI space:

@Stateless
@LocalBinding ( jndiBinding="blah")
public class HelpMe implements IHelpMe {
...
}

Can someone please tell me why the JNDI viewer off the JMX console claims that they are NO CLASSLOADERS for this bean?  It seems like within my EAR, the deployer should certainly pick up my local interface classfile?  What's even more distrubing is that now if I try to INJECT this bean via @EJB in another bean (within the same JAR file within the same EAR) I get a runtime exception claiming that it can't find the interface (which is again all in the same JAR file in the same package).  However, if I look it up via a context lookup, no problem (in fact I lookup this interface via the WAR file to get access to it with no issue).

What the heck is going on here?  I don't understand why the local client interface that a bean implements has to be outside the EAR for injection to occur.  This seems like a bug to me.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4029534#4029534

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4029534



More information about the jboss-user mailing list