• 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 annotation from a servlet

 
Ranch Hand
Posts: 117
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,

I have deployed a EJB 3.0 bean in JBoss 5.0 and am trying to access it from a servlet deployed in Apache Tomcat 6.0 server. The code is
@EJB private NewHello hello; // NewHello is the business interface

The client jar of the EJB is in the classpath of the servlet and so is the jndi.properties file. However, the bean reference is not getting injected, the variable is null. Does @EJB annotation work if the client and the bean are on different servers? If it would, then what are the possible reasons why this isn't working for me?

Thanks,
Devi
 
author
Posts: 100
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think spec does not mandate it. It's completely based on whether the server supports that

-Debu
 
reply
    Bookmark Topic Watch Topic
  • New Topic