tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Wentzel <>
Subject RE: JDBC Realm Questions Tomcat 3.2.2
Date Wed, 04 Jul 2001 22:19:04 GMT
> Someone please respond to these questions so I know whether 
> JDBC Realms are a
> supported feature of Tomcat3.2.2. I posted the question a few 
> days ago and have
> gotten no responses. 

Of course JDBC Realms are supported in 3.2.2.

> Has anyone been successful in referencing a jdbc datasource 
> configured in the
> server.xml of Tomcat 3.2.2? If so, how?

The real question is are you just wanting jdbc datasources
or are you wanting a JDBC user authentication modality?  Because
that's what JDBCRealm is for, not for general JDBC connections.

> This may be a stupid question but I've found hundreds of 
> messages from confused
> users on the subject of JDBC Realms and Tomcat and no good 
> explanation or
> example. There is a documentation file JDBCRealm.howto but it 
> doesn't describe
> how to instantiate the datasource with a code example or what 
> additional
> property files need to be included to configure jndi properties.

The whole point is you do not have to instantiate/code ANYTHING!
That's the reason for Realms, they take care of all the work.

> Like lots of other people, I'm trying to use the release 
> Tomcat 3.2.2, configure
> multiple jdbc datasources in the server.xml file, and 
> reference it in my
> servlet. 

Once, again I've got to say I think you are misunderstanding Realms.
You do not need to directly access JDBC Realms.  What exactly are
you trying to do.  I think what you're really looking for is a
DB Connection pool(s).

> I am only interested in using a shared database ID 
> to connect to the
> database for all users of my servlet. The database connect 
> info needs to be in
> Tomcat conf files since the passwords need to be reconfigured 
> at deployment time
> outside my war file.
> 1. Is this behavior supported by Tomcat 3.2.2? How do I 
> configure multiple
> database datasources and instantiate them in my code?

JDBCRealm is for security authentication(i.e. when user accesses a
page with IE a username/password dialog box pops up if user has not
already been authenticated, if using BASIC AUTH).

Michael Wentzel
Software Developer
Software As We Think -

View raw message