• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Call EJB from Application Client

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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


 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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

 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic