tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <ma...@apache.org>
Subject Re: JDBCRealm.getRoles causes NullPointerException
Date Tue, 16 Sep 2008 21:11:36 GMT
Christopher Schultz wrote:
> Lloyd,
> 
> DIGLLOYD INC wrote:
>> I am using  <Realm className="org.apache.catalina.realm.JDBCRealm" ... >
> 
>> I don't know what's required to use a DataSourceRealm (yet), but if it's
>> a simple switch I'll try it.
> 
> 
> Ooh, using DataSourceRealm is much better, because you can share the
> JDBC Connection objects with the rest of your application. It apparently
> also doesn't suffer from this bug. If you are already using a DataSource
> in your application, just switch the className and then remove all the
> connection information from your <Realm> and replace it with the
> required DataSource name (see the docs for specifics).
> 
>> I am not sharing anything; the database is used for authentication
>> only.  I've declared the realm, but I don't think there's any pool
>> involved.
> 
> Right: JDBCRealm does not do any connection pooling AFAIK.

It is better than that. It uses a single connection and lots of syncs :)

Mark


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message