This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

@EJB annotation Injection

 
Amit Suresh Pawar
Ranch Hand
Posts: 30
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

can we inject the Session bean into POJO using @EJB annotation?
 
lalit upadheyay
Ranch Hand
Posts: 110
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Provided the POJO is deployed in EJB server and has EJB classes packages in same jar containing the POJO. Yes, EJB injection into a POJO is possible via Application Client Container(ACC) provided by the EJB server. Not all EJB servers support ACC. But GlassFish and JBoss serevrs provide ACC.
 
Jaikiran Pai
Marshal
Pie
Posts: 10444
227
IntelliJ IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
lalit upadheyay wrote:Provided the POJO is deployed in EJB server and has EJB classes packages in same jar containing the POJO. Yes, EJB injection into a POJO is possible via Application Client Container(ACC) provided by the EJB server. Not all EJB servers support ACC.


I think i'll disagree with that Application client containers only help with injecting resources like EJB only within the class having the main method (i.e. the class which acts as the starting point of the application).
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic