tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Dunbar <>
Subject DataSourceRealm and virtual hosts confusion
Date Fri, 17 Jan 2003 22:55:01 GMT
I'm attempting to set up a DataSourceRealm within a virtual host.  What 
I would like to do is have every virtual host have it's own DataSource 
and have a "private" realm within the virtual host.  In this way each 
virtual host owner can manage their own users in a set of DB tables that 
they control.  I'm using the DataSourceRealm as opposed to the JDBCRealm 
because I had already set up the JNDI DataSource so I figured it would 
be easier to use it.

What I have discovered is that the realm within the virtual host *must* 
use a globally defined JNDI datasource.  If I try to use the  JNDI 
resource defined within the virtual host section I get a message telling 
me that "java" is not defined in the global namespace (a problem some 
other folks seem to have had).

My question is, am I misunderstanding something?  My JNDI based 
DataSource within the virtual host can be used within my code with no 
problem.  But either the DataSourceRealm is getting loaded before the 
JNDI resource and so it can't find the DataSource or it isn't using the 
correct scoping when looking up the JNDI DataSource.  I notice that the 
code in the doesn't lookup the datasource the 
same way I do in my code.

Any help would be greatly appreciated.

scott dunbar                                    xigole systems, inc.                                superior, co

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

View raw message