• 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

Best way to inject a Container Managed bean into a Java Class

 
Ranch Hand
Posts: 273
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So I have a project that I am working on and was wondering how to inject a container managed bean into a java class.....some things I have looked at is JNDI lookup using context which is pretty straight forward but what are the alternatives? Is JNDI Lookup the preferred way? I tried @Inject but I couldn't get it to work, seems like it only works for classes maintained by the container.....




This is the CategoryFacade Bean

reply
    Bookmark Topic Watch Topic
  • New Topic