tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pid <...@pidster.com>
Subject Re: Virtual host deployment
Date Tue, 14 Sep 2010 22:13:58 GMT
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


Mime
View raw message