A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Refactoring for Software Design Smells: Managing Technical Debt
this week in the
OO, Patterns, UML and Refactoring
Joined: Oct 28, 2003
Jul 06, 2006 15:16:00
Is anyone out there using DataSource Realms in
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
DataSource. There is a link to instructions, but even after reading, they make no sense to me.
Joined: Aug 08, 2003
Jul 07, 2006 15:21:00
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.
<Resource name="UserDatabase" auth="Container" type="org.apache.catalina.UserDatabase" description="User database that can be updated and saved"> </Resource>
2- ResourceParams tag, this defines what Tomcat should do to initialize the Resource
<ResourceParams name="UserDatabase"> <parameter> <name>factory</name> <value>org.apache.catalina.users.MemoryUserDatabaseFactory</value> </parameter> <parameter> <name>pathname</name> <value>conf/tomcat-users.xml</value> </parameter> </ResourceParams>
3- Realm tag, this attaches to the Resource named in the resourceName attribute.
<Realm className="org.apache.catalina.realm.UserDatabaseRealm" debug="0" resourceName="UserDatabase"/>
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: DataSource Realms
question about tomcat JDBC realm.
can WebLogic 6.0 use a JDBC realm?
A couple of questions
Tomcat with more than one Applications in WEBAPPS folder
What's the realm really mean?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015