tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gurumoorthy" <>
Subject Re: Host level JNDI Variable
Date Wed, 06 Apr 2005 19:39:54 GMT
            Many thanks for your reply ... I have set the Global database
JNDI, No problem about this.

            The way we deploy the code is just drop the .war files in the
webapps directory. ( The administrator does not allow us to change the
server.xml file )

            So what I suggested is that I declare a JNDI variable for each
the virtual host ( one time change to server.xml )

            So that when I add new .war files to the webapps directory  the
war files will get the common JNDI name for that virtual host and hence
            corresponding database connection.

            Hope that i am clear

----- Original Message -----
From: "Parsons Technical Services" <>
To: "Tomcat Users List" <>
Sent: Wednesday, April 06, 2005 4:06 AM
Subject: Re: Host level JNDI Variable

> To use pooling provided by Tomcat, one way to do it is to set up four
> Globalresources in the server.xml
> Then from your apps call the one you want. You will need the resource link
> in the context for each app for the matching Globalresource.
> So set up four globals: dataDev, dataSit, dataUat and dataProd
> Place links in the context for apps in the DEV to dataDev
> for apps in SIT to dataSit and so on.
> Since the connections are established to the database and not the engine,
> each pool is dedicated to that database. So in effect you will be creating
> pool for each database and then connecting to the appropriate pool. And in
> order to create the pool the database must be specified, so it cannot be
> selected at any point later in the process.
> Doug
> ----- Original Message -----
> From: "Gurumoorthy" <>
> To: "tomcat-user@jakarta.apa" <>
> Sent: Tuesday, April 05, 2005 8:28 PM
> Subject: Host level JNDI Variable
> Hi,
>         The senario
>         I have 4 VIRTUAL HOST on tomcat dev / sit / uat / prod
>         Based on host information i need to access different database
> instance
>         jdbc:..../DEV : for dev
>         jdbc:..../SIT : for sit
>         and so on...
> Can anyone let me know how to set the JNDI variable at host level or
> level ?
> Many thanks
> Guru
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

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

View raw message