[jboss-user] [EJB 3.0] - simple question

taras1984 do-not-reply at jboss.com
Fri Jul 14 08:17:39 EDT 2006


Hi,
I have one simple question.
When writing simple HelloWord application with EJB3, the @EJB annotation is used in application client to get reference to bean's interface -probably.
My client for this application uses this annotation and it works fine but only when deployed and ran on Sun Server Application not on JBoss.
In Jboss I have to use this code: 
InitialContext ctx = new InitialContext();  
       soldierRemote soldierOne = (soldierRemote)ctx.lookup("jbossSoldier/soldierBean/remote");
in SunAS
"@EJB soldierRemote soldierOne" is fine.

My assumption is that my client app. for SSA works because I execute it with appclient ( is this client container? ) and one for JBoss must have the additional code because it is a standalone application.
Is that true??
If so:
When writing standalone client for SSA, do I need a different code from that for JBoss ?
How to execute application client with @EJB annotation for Jboss, how to run its client container ?

Thx for help.

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

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



More information about the jboss-user mailing list