This content has been marked as final.
Show 3 replies
-
1. Re: Writting ejb3 session bean + howto session bean lookup?
atamur Nov 8, 2006 7:39 AM (in response to fbadt)If your SessionBean2 implements (for example) remote interface SessionBean2Remote, than in SessionBean1 you can write:
@EJB SessionBean2Remote bean2; public void doSmth() { bean2.soSmth2(); }
it will be injected automatically.
Take a look at the tutorial: http://docs.jboss.org/ejb3/app-server/tutorial/injection/injection.html -
2. Re: Writting ejb3 session bean + howto session bean lookup?
fbadt Nov 8, 2006 9:14 AM (in response to fbadt)
Hmm what role does code like below play? I do not see anywhere that JBoss is reporting something with these names (specifically the '/local' and '/remote') Also, in the case of injecting a remote, how can the specific host, server etc... be specified?
http://www.laliluna.de/ejb-3-tutorial-jboss.htmlpublic static final String RemoteJNDIName = BookTestBean.class.getSimpleName() + "/remote"; public static final String LocalJNDIName = BookTestBean.class.getSimpleName() + "/local";
-
3. Re: Writting ejb3 session bean + howto session bean lookup?
fbadt Nov 9, 2006 3:02 PM (in response to fbadt)So when is the name BookTestBean.class.getSimpleName() + "/remote" vs "BookTestBean" vs "com......BookTestBean"?
I have seen docs that refer to all of these ways.