tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: problems at
Date Tue, 01 Jun 2010 22:03:30 GMT
Hash: SHA1


On 6/1/2010 3:58 PM, Mark Eggers wrote:
> Chris, based on what you're saying and the server.xml posted earlier
> in this thread, the following should be done?
> 1. Remove the JDBCRelm from the Engine node
> 2. Create a GlobalNamingResources Resource entry with the following:

Yes, but honestly, I'd put the <Resource> and <Realm. configuration into
my webapp's META-INF/context.xml file (which requires that
localDataSource="true" be set on the <Realm>, btw).

> This is basically what I would normally put in the context.xml file
> of a web application for an application-specific database
> connection.


> 3. Then create a DataSource Realm under the Engine node to replace
>    JDBCRealm.
> <Realm className="org.apache.catalina.realm.DataSourceRealm"
>        userTable="users"
>        userNameCol="user_name"
>        userCredCol="user_pass"
>        userRoleTable="user_roles"
>        roleNameCol="role_name"
>        dataSourceName="jdbc/auth">


> It was a little unclear to me from the documentation that I could put
> all of the resource attributes in a GlobalNamingResources Resource
> entry. It was also a little unclear to me that I could just refer to
> a global resource name with dataSourceName in the Realm.

Unfortunately, the documentation on the Tomcat website is a bit
disorganized and the best places to look are often in the examples and
not in the configuration reference (which itself has examples, etc.).
Also, the examples are often very outdated.

Patches are always welcome (I tell myself, here, mostly) :)

- -chris
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla -


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message