• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

@EJB injection from different jar

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
I'm having a problem with EJB injection, hopefully someone here will be able to help me.

I've got a jar with an EJB in there; this is its code:



From other classes in the same jar I can inject it simply like this:


Here comes the problems: I'm actually deploying this jar in an ear, and in this ear I've also got a war with some JSF pages and related java backing beans.
What I want to do is to inject my TravelAgentBean in a page's backing bean (e.g. CreateCabinBackingBean), but the same code as above doesn't work:


However, this code works:


I'm deploying on Jboss 4.2.2. I'm quite new both with JSF and EJB, so probably there's something I'm missing...can someone please give me an advice on how to make the dependency injection work?

Thank you very much
Mattia

 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
See this JavaRanch post for why it doesn't work in JBoss for JSF.
 
Mattia Battiston
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ok, that's clear now, thank you very much. Mattia
 
I promise I will be the best, most loyal friend ever! All for this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic