• 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

How can I create jboss jndi resource in TomCat 5.x

 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, there:

We are going to switch our web server from jetty to TomCat. We will run tomcat and jboss separately. I used tomcat 3.x long long time ago, and to use tomcat 3.x to lookup jboss jndi: a. copied jndi.properties to common\classes directory; b. run it with -nonaming option.
However, we are going to use TomCat 5.x, I tried the same above steps, I got exception about UserDatabase like:
2005-12-01 15:14:15 UserDatabaseRealm[Catalina]: Exception looking up UserDatabase under key UserDatabase java.lang.NullPointerException........
Checked internet there are some options to get TomCat 5.0 talk to JBoss without changing any source code:
a. someone suggest removing UserDatabaseRealm from server.xml before using -nonaming option;
b. modified catalina.bat JAVA_OPTS= Djava.naming.factory.initial=org.jnp.interfaces.NamingContextFact
ory -........
I tried option b above, and it works fine for me. However, just wonder if any other options to set up jboss jndi resource for my web application to talk to jboss without changing my source code? Any sample example about how to create such kind of jndi resource in <Context>?

Thanks a lot in advance, highly appreciated any suggestion.

David
reply
    Bookmark Topic Watch Topic
  • New Topic