aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes Call EJB from Application Client Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Call EJB from Application Client" Watch "Call EJB from Application Client" New topic

Call EJB from Application Client

adrian salajan

Joined: Apr 13, 2011
Posts: 1
I want to make an Java Enterprise Application containing an EJB Module and an Application Client. (school project)

Problem is: the main() method from the application client is not executed


Also, is it ok to use @EJB to inject an EJB in Main in my application client?

I am deploying on Glasshfish 3.


Anand Kumar Singh

Joined: Oct 18, 2007
Posts: 22
You can not use @EJB annotation outside of EJB container, it will work only inside container in deplorable classes (Like Other EJB class , Servlet if deployed in same container)

If you want to call EJB from outside container , you need to lookup EJB, Try below code

OCUP Fundamental,
OCUP Intermediate,
OCUP Advanced,
IBM Certified Solution Designer - Object Oriented Analysis and Design, vUML 2
I agree. Here's the link:
subject: Call EJB from Application Client
Similar Threads
cant load the admin console in glassfish v3
a blank glassFish admin console @ netbeans 6.8
GlassFish wouldn't start on Red Hat Linux server
GlassFish v3 and localhost in Windows7
The module has not been deployed. BUILD FAILED error problem