[jboss-user] [EJB 3.0] - Possible Bug?

green_bean_1 do-not-reply at jboss.com
Thu Dec 18 18:45:51 EST 2008


So, I have two different SLSB mapped to two different locations in JNDI:

javaEEApplication/HelloWorldStatelessBean/remote-com.di.examples.HelloWorld - EJB3.x Remote Business Interface

javaEEApplication/StatelessLifecycle/remote-com.di.examples.HelloWorld - EJB3.x Remote Business Interface

As you can see, they share the same "Business Interface", yet the implementation classes are different. 

When I do a DI within a JSP using: 
<%!
@EJB(name="javaEEApplication/HelloWorldStatelessBean/remote-com.di.examples.HelloWorld") HelloWorld helloWorld;
    @EJB(name="javaEEApplication/StatelessLifecycle/remote-com.di.examples.HelloWorld") HelloWorld lifecycle;
%>

The two references point to the same object.. I would assume each reference would point the correct implementation ... 

So, it seems to me like if two impls share the same interface, JBoss doesn't differentiate them? 




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

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



More information about the jboss-user mailing list