On 14/09/2010 23:10, Alec Swan wrote:
> GlobalResources sounds like what I am looking for. According this page (
> http://tomcat.apache.org/tomcat-6.0-doc/config/globalresources.html) it
> seems like I need to just add the following configuration in server.xml:
> 
> <GlobalNamingResources ...>
>   ...
>   <Resource name="jdbc/EmployeeDB" auth="Container"
>             type="javax.sql.DataSource"
>      description="Employees Database for HR Applications"/>
>   ...
> </GlobalNamingResources>
> 
> 
> If I understand correctly, this will make jdbc/EmployeeDB JNDI resource
> available to every web application deployed in the container, correct?
> Will it override the JNDI resource definition packaged in
> META-INF/context.xml inside of the WAR file?

You can then remove that resource def.

You'll need a ResourceLink in the Context definition to make the global
resource available to webapps - but this can be standard, regardless of
dev/prod.


p

Attachment: 0x62590808.asc
Description: application/pgp-keys

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to