• 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

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
 
Yes, my master! Here is the tiny ad you asked for:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic