Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

DataSource Realms

 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is anyone out there using DataSource Realms in Tomcat 5? I could use some help setting it up.

I understand Tomcat's instructions for database layout, how to add the realm element to the server.xml and how to set up the realm element in the server.xml file.

I don't understand how to configure a JNDI named JDBC DataSource. There is a link to instructions, but even after reading, they make no sense to me.

Lisa
 
Ranch Hand
Posts: 326
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are 3 pieces to setting up the Realm. Using the server.xml file as an example:
1- Resource tag, this declares the name and type of the resource.

2- ResourceParams tag, this defines what Tomcat should do to initialize the Resource

3- Realm tag, this attaches to the Resource named in the resourceName attribute.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!