[jboss-user] [Beginners Corner] - Re: application clients in JBOSS 4.2.2

PeterJ do-not-reply at jboss.com
Fri Mar 7 14:26:49 EST 2008


I already answered these questions in my previous posts. In those posts I explained why @Local and @EJB are not working the way you want them to. But I will try to answer the questions again, though a little differently.

I would not expect @EJB to work until JBossAS 5.0. That version is fully Java EE 5 compliant.

Regrading @Local, you did *not* deploy your client to JBossAS. Copying a jar file that contains standalone client code to the serer/default/deploy directory (or pushing a button in an IDE which does this) does not  mean that the application is deployed to the app server. By "standalone client", I mean a Java program that has a class with a main() method, which can only be run by starting up another JVM and running that Java program. And that is what your client is - it has a main() method, the only way to run the client is to start a JVM and tell the JVM to execute Main.main(). This means that your cannot use @Local because the client is not running in the same JVM as the app server. And all of this is being hidden from you by the IDE. (See my earlier discussion on why I don't let new developers use IDEs. )  

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

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



More information about the jboss-user mailing list