Win a copy of Murach's Java Programming this week in the Beginning Java forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Do Web and App servers both provide JNDI Registries ?  RSS feed

 
Raghavendra Desoju
Ranch Hand
Posts: 109
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ranchers,

Do Web Servers and Application Servers provide JNDI lookup registries(containers) so that non Java EE components like Java SE applications etc, can lookup for resources?

Thanks, Raghu
 
K. Tsang
Bartender
Posts: 3648
16
Firefox Browser Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All I know regarding JNDI lookup is that JNDI API needs a Java EE (servlet/EJB) container to work.

So if you try to use JNDI API in Java SE apps, it will not work. One way to get this to work is to call some API in your container to retrieve the JNDI information if that's what you need. However, this isn't a best practice.

Setting up JNDI registry like DB connection or whatever is done through XML configuration in Tomcat or JBoss/Glassfish etc
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!