[jboss-user] [EJB 3.0] - How to inject sessionbean from sessionbean

NSchweig do-not-reply at jboss.com
Fri Jan 2 06:35:38 EST 2009


for injecting my sessionBean "groupHandler" from my jsf-managedBeans I use:

  | @EJB(mappedName="GroupHandler/remote")
  | private GroupHandlerRemote groupHandler;

(with this code in GroupHandler:
public static final String RemoteJNDIName = GroupHandler.class.getSimpleName() + "/remote";)

That works. 
If I now want to inject a sessionbean from another sessionbean it does not work:

<UNKNOWN jboss.j2ee:ear=CMT_ejb.jar,jar=CMT_ejb.jar,name=CourseHandler,service=EJB3> -> 
  | ** UNRESOLVED Demands 'jndi:GroupHandler/remote' **

I also tried 
@EJB() private GroupHandlerRemote groupHandler;
without success.

Can anyone tell me please how to inject my sessionbean?

Thanks, NSchweig

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

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

More information about the jboss-user mailing list