• 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
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Bear Bibeault
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh

Calling EJB from servlet

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I am a newbie in web applications and I am trying to develop all by myself an enterprise application using Eclipse helios and jboss 6. I am having problems injecting my ejb class which is in my EJB module into my servlet which is in my Web module. In other words the are in separate locations. I feel my servlet cannot see my ejb when I use @EJB annotations to inject it. I would like to know what I am doing wrong, please. My codes are as followed...






And following is my code for my servlet...



In the doGet() of my servlet I have the SignOnRemote underlined in my eclipse to be an error which says SignOnRemote cannot be resolved to a type.
As I said earlier on, they are all in different modules. Any help will be very appreciated

Thanks
 
Ranch Hand
Posts: 71
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think you should use mapped-name in the look up code instead of "InstituteEAR/SignOnBean/remote" use "SignOnBean/remote" only.
 
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm a bit of a beginner myself on EJB3, but I find myself thinking why your bean is abstract?
 
Sudhakar Sharma
Ranch Hand
Posts: 71
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Nico Van Belle wrote:I'm a bit of a beginner myself on EJB3, but I find myself thinking why your bean is abstract?



thanks nico van belle for remembering me the programming restriction of EJB. that's true bean class cannot be abstract or final.
 
Would you like to try a free sample? Today we are featuring tiny ads:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic