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

Bean not found

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm studying EJB3.0 using JBoss5. I encounter a jndi error. When I access a bean in jsp it says 'InjectionBean not bound'. But I developed another EJB using jnid of the same rule it worked.

below is the code:

Injection:


InjectionBean:


invoker, a jsp:


I don't define a ejb-jar.xml, for EJB3.0 it's not a must.According jboss docs, default ejb jndi should be ejb-name/remote, anybody with any ideas? thanks.





 
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Injection injection = (Injection) ctx.lookup("InjectionBean/remote");

If you don't define the mappedName of the ejb, jboss defaults the JNDIName to application/implementation bean name/type of ejb

meaning, if your app gets deployed as foshanshop, your ejb name is foshanshop/InjectionBean/remote
 
The glass is neither half full or half empty. It is too big. But this tiny ad is just right:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic