tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Propes, Barry L " <barry.l.pro...@citi.com>
Subject RE: Create New Data Source
Date Wed, 28 Nov 2007 21:19:27 GMT
you bet.

Barry is fine,thanks! : )

-----Original Message-----
From: Shekhar.Dhotre@CobbEnergy.com
[mailto:Shekhar.Dhotre@CobbEnergy.com]
Sent: Wednesday, November 28, 2007 2:43 PM
To: Tomcat Users List
Cc: Tomcat Users List
Subject: Re: Create New Data Source


Christopher and Propes  thanks a lot !! 




Christopher Schultz <chris@christopherschultz.net> 
11/28/2007 12:33 PM
Please respond to
"Tomcat Users List" <users@tomcat.apache.org>


To
Tomcat Users List <users@tomcat.apache.org>
cc

Subject
Re: Create New Data Source






-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Shekhar,

You might want to start here:

http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html#Database%20Connection%20Pool%20(DBCP)%20Configurations


This page might be helpful for more Oracle questions:
http://www.oracle.com/technology/tech/java/sqlj_jdbc/htdocs/jdbc_faq.htm

Shekhar.Dhotre@CobbEnergy.com wrote:
> I see following fields when I click on create data source . Where do the 

> above values go or is there an example somewhere that I can follow? 

> User Name:
> Password:

These two should be obvious.

> JNDI Name: 

You get to make this one up. Usually it's something similar to the name
of the database, but you can make it anything you'd like (I recommend
against using / characters in the name, though). Try "lawdb" or
something. This name needs to match the JNDI data source name that your
application is expecting.

> JDBC Driver Class: 

This is the name of the JDBC driver's class. It depends on the driver
you are using for Oracle. Often, it's something like
"oracle.jdbc.driver.OracleDriver".

> Data Source URL: 

This also depends on the driver you are using. The "thin" driver takes
URLs like this:

jdbc:oracle:thin:<username/password>@<database>

For you, this would be:

jdbc:oracle:thin:sdhotre/password@cemcp62:1521:lawtst

                  ^user   ^pass   ^ host  ^ port  ^ SID

> Max. Active Connections: 
> Max. Idle Connections: 
> Max. Wait for Connection: 
> Validation Query:

These depend on what resource allocation and validation you want for
connection pooling. You should read:
http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html#Database%20Connection%20Pool%20(DBCP)%20Configurations

and
http://commons.apache.org/dbcp/configuration.html

For development and testing, I *always* set maxActive=1, maxIdle=1, and
maxWait=1000 (10 seconds). For Oracle, a good validation query might be
"SELECT 1 FROM DUAL".

Hope that helps,
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHTaZ/9CaO5/Lv0PARAo1AAJ0VG9AvcTBrJ2vQHimRcJ1GRAy3xACfbK+U
/+n1hb2kchfkWkEyZcBIDb8=
=jOZF
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message