• 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

@EJB injection question  RSS feed

Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello again.

I recently viewed duke' bank application which was developed using @EJB annotation.
Also, As i know @EJB injection can be done only in main class.

What if i don't want to write all the bussiness logic and components , events discription/ initializations in one class?

I mean, i want to separate them into 3 different classes like here:


graphics.java , dataHandler, eventHandler and so on..

and not to do like here:


QUESTION : how i can call remote session bean methods with @EJB from class different from main if it is not allowed? I tryed to make references to main class but failed with NullPointerException... ))

Should i use EJB 2.1 insted of 3.0 then?i am really confused.
Posts: 9643
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use a JNDI lookup if injection isn't working...
ice is for people that are not already cool. Chill with this tiny ad:
ScroogeXHTML - small and flexible RTF to HTML converter library
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!