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
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3984112#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...