-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Mark,

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.

Agreed.

> 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">

Yup.

> 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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkwFg7IACgkQ9CaO5/Lv0PD/HQCgu1ydfF98NszrWLW+6Jiz1BSE
SkIAn0uL2sINWTYlXhJklYaqcryYf3gD
=7FTL
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to