tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Harrison <peter.harri...@nothingbutnet.co.nz>
Subject JNDI Issue with GlobalNamingResources & DefaultContext Solved
Date Sun, 14 Dec 2003 21:22:01 GMT
Earlier I had posted messages and bug reports about a change of behaviour 
between 4.0.4 and 4.1. Previously I had defined a resource and resource 
parameters in the default context. This stopped working in 4.1, and I 
couldn't find a way that would allow me to both Autodeploy while keeping the 
datasource.

Resources defined in the DefaultContext do not work, while if the same entries 
are put into a specific Context they do work.

So what is the fix? Here is what I have done to get things working, including 
Autodeploy. Note that this is a fix for V5 - I havn't tried this yet on 4.1.

1. Move the resource and resourceparams to GlobalNamingResources.

2. Create a xml file under $tomcat_home/conf/Catalina/localhost in the name of 
the context:

<Context path="/boo" docBase="boo" debug="0" privileged="true">
<ResourceLink name="jdbc/boo" 
global="jdbc/boo" type="javax.sql.DataSource" />
</Context>

The context entry will not block the deployment of the application, and the 
database will init correctly. Hope this helps people.

Regards,

Peter



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message