Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Call EJB from Application Client  RSS feed

 
adrian salajan
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

application.xml


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



I am deploying on Glasshfish 3.

server.log


 
Anand Kumar Singh
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!