Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

PhaseListener not injecting EJB  RSS feed

 
Marcus Black
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

Couldn't find anything about this anywhere;

Can I use ejb injection in PhaseListeners ?

for instance



I seem to get a null pointer exception each time I try this.

All help most appreciated.

Warm Regards
Marcus
 
Zack Marrapese
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not sure about using it in a PhaseListener, but if you are trying to use it in the constructor, that won't work because the injection doesn't happen until after construction of the object. If you try to use it in the constructor, you will get a null pointer exception
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!