Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

@EJB injection with JBoss 5 CR1: working or not ?

 
Celinio Fernandes
Ranch Hand
Posts: 549
Eclipse IDE Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
has anyone tried an EJB injection through the @EJB annotation using JBOSS CR1 ?
I read everywhere that it's bugged, I have not tried yet but would like to know if JBoss fixed that or not in the latest version of JBoss.

Thanks.
[ August 21, 2008: Message edited by: Celinio Fernandes ]
 
Mirko Bonasorte
Ranch Hand
Posts: 244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm afraid you are off topic here.
Try at 'EJB and Other Java EE Technologies' forum or 'JBoss' forum.
Anyway, I've used JBoss 4.x for my preparation and it works very well.
 
Garlapati Ravi
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've used JBoss 4.x for my preparation and it works very well.
In JBoss-4.2.x, the @EJB injection does not work in servlets. It works only in EJBs. JBoss-5 (which is still in a CR version) is a JavaEE5 server and the @EJB injection in servlets is going to work in JBoss-5 versions.

for more info, please check my previous post, not exactly regarding this problem, but this has been covered
http://www.coderanch.com/t/163959/java-EJB-SCBCD/certification/EJB-application-deployment
[ August 19, 2008: Message edited by: Garla Ravi ]
 
Chaminda Amarasinghe
Ranch Hand
Posts: 413
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mirko Bonasorte,

Are you sure? EJB Injection to a servlet in jboss 4.x is working?
 
Chaminda Amarasinghe
Ranch Hand
Posts: 413
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mirko Bonasorte,


Other thing to point out is I dont see any wrong with this post (parent), Why did you ask thread owner to post this problem in other forum? Do you think container is not related to this forum? Do you think we can practice without a container?

Thanks
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

has anyone tried an EJB injection through the @EJB annotation using JBOSS RC1 ?
I read everywhere that it's bugged, I have not tried yet but would like to know if JBoss fixed that or not in the latest version of JBoss.



With JBoss-5.0 CR1, the @EJB injection works for both within servlets (read further) and within other EJBs. However, within servlets, there's a bug which mandates that you use the mappedName attribute with @EJB while injecting. Something like this:

 
Celinio Fernandes
Ranch Hand
Posts: 549
Eclipse IDE Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jaikiran Pai, that's interesting.
where did you get that info ?
I will try that soon.
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Celinio Fernandes:
Jaikiran Pai, that's interesting.
where did you get that info ?


From here
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic