Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Cannot access simple bean using JBOSS-JNDI  RSS feed

 
Srinivas Kothuri
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not able to access my bean class (not an EJB) using a given JNDI name in JBoss 5.0.1, where the same is working in Tommcat 7.0.

META-INF/context.xml

WEB_INF/web.xml

servlet Java Client (in the same web app)

And additionally for JBoss,
WEB_INF/jboss-web.xml

I've been getting exception


Please let me know if I'm missing anything and suggest me the right way of doing it in JBoss.
 
Rob Spoor
Sheriff
Posts: 21092
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The right way is to upgrade. JBoss 5.0.1 is ancient. EAP is already at 6.3, and AS (now Wildfly) is at version 8. An additional bonus is that you'll be able to use @Inject to inject your bean, so no more need for explicit lookups.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!