This content has been marked as final.
Show 3 replies
-
1. Re: How can i access ejb3.0 from backing bean in jboss 4.0.5
waynebaylor May 31, 2007 4:55 PM (in response to ruchi123456)With JBoss 4.0.5 you have to use a JNDI lookup from the web layer.
Suppose you have:@Local public interface MyLocalIfc { ... }
and@Stateless public class MyLocalBean implements MyLocalIfc { ... }
Then try:MyLocalIfc bean = (new InitialContext()).lookup("myEAR/MyLocalBean/local");
-
2. Re: How can i access ejb3.0 from backing bean in jboss 4.0.5
jnorris10 May 31, 2007 5:09 PM (in response to ruchi123456)If you use Seam, you can make your backing beans EJB session beans themselves (ie: @Stateless), thus standard @EJB injection can be used.
-
3. Re: How can i access ejb3.0 from backing bean in jboss 4.0.5
ruchi123456 Jun 1, 2007 1:59 PM (in response to ruchi123456)Thank u Thank u so much :). It was a great help.
I used what you suggested and it worked
MyLocalIfc bean = (new InitialContext()).lookup("myEAR/MyremoteBean/remote");
replace myEAR with the name of my ear.
Thanks again.
Regards,
Ruchika