• Post Reply Bookmark Topic Watch Topic
  • New Topic

EJB can be accessed by InitialContext but bot @EJB

 
Ally Cavs
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys

Im using JBoss 6. Ive a ear file which is made up of a:

WAR
EJB JAR (Message Driven Beans)
and in lib folder:
a number of custom jars some of which have annotated beans

All the annotated beans can be access for example by


but in my MDB classes if i try

is always null



What can the issue be?
the ejb jar
has ejb-jar.xml
jboss-ejb3.xml
 
Jaikiran Pai
Sheriff
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When/where in the code are you trying to access that injected bean instance? Can you post the NullPointerException or whatever exception stacktrace you are seeing?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!