• 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

Do Web and App servers both provide JNDI Registries ?

 
Ranch Hand
Posts: 127
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Bartender
Posts: 3648
16
Android Mac OS X Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic