You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by me...@assetmanagement.natexis.fr on 2003/05/20 17:00:28 UTC

using jndi DataSource

I used to declare DataSource in tomcat server.xml file

like below within a DefaulContext

          <Resource name="jdbc/infoperf" auth="Container"
                    type="javax.sql.DataSource"/>   
 
            <ResourceParams name="jdbc/intranetMail">
 <parameter><name>username</name><value>mailer</value></parameter>
 <parameter><name>password</name><value>mail2002</value></parameter>
            <parameter><name>driverClassName</name>
              <value>com.sybase.jdbc2.jdbc.SybDriver</value></parameter>
            <parameter><name>url</name>
              <value>jdbc:sybase:TdsXXXXXXXXX</value></parameter>  
          </ResourceParams>


for security reason, I would like to Declare those Config parameter in a 
property file
and create progamatically my DataSource object before putting them in the 
Context
that will be accessed within JNDI.

I use common DBCP

has someon tried this.

thankx to help

Meissa

L'integrite de ce message n'etant pas assuree sur internet, Natexis
Banques Populaires ne peut etre tenu responsable de
son contenu. Toute utilisation ou diffusion non autorisee est
interdite. Si vous n'etes pas destinataire de ce message, merci de le
detruire et d'avertir l'expediteur.

The integrity of this message cannot be guaranteed
on the Internet. Natexis Banques Populaires can not therefore be
considered responsible for the contents.Any unauthorized use or dissemination is prohibited.
If you are not the intended recipient of this message, then please delete it and 
notify the sender.