[jboss-user] [Beginners Corner] - Re: application clients in JBOSS 4.2.2
do-not-reply at jboss.com
Thu Mar 6 15:16:02 EST 2008
You can only use @Local if you call the ejb from a web application or another ejb. You are not doing that, you are calling it from a standalone client. And the IDE is hiding that fact from you, including setting the classpath. (This is one reason why every time I have to break in a new developer I have him, or her, do everything by hand with a basic text editor. Only after I am convinced that they know what they are doing and how things work and why they work that way will I let them use an IDE.)
The @EJB annotation is used to inject an EJB reference into the code. It is designed to work in both standalone clients and clients deployed to an app server. But as I pointed out earlier, it might not work in standalone clients in 4.2.x.
What tutorial or book are you using to learn EJB3?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4134671#4134671
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4134671
More information about the jboss-user