tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alec Swan <alecs...@gmail.com>
Subject Re: Virtual host deployment
Date Tue, 14 Sep 2010 22:33:22 GMT
Thanks, I'll give it a try.

Still kind of curious if GlobalResources override resources in
META-INF/context.xml, but I guess I will find that out soon.

On Tue, Sep 14, 2010 at 4:13 PM, Pid <pid@pidster.com> wrote:

> 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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message