RE: Create New Data Source

2007-11-28 Thread Propes, Barry L
here ya go, Shekhar...see my XML config for JNDI.

Keep in mind, I'm on an older version oF TC, so you can probably align and list 
your param attributes all in one, or more conveniently than I was able to.


Resource name=jdbc/myoracle auth=Container type=javax.sql.DataSource/ 
 
 ResourceParams name=jdbc/myoracle
   parameter
 namefactory/name
 valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
   /parameter
   parameter
 namedriverClassName/name
 valueoracle.jdbc.OracleDriver/value
   /parameter
   parameter
 nameurl/name
 valuejdbc:oracle:thin:@192.222.44.999:1521:SID/value
   /parameter
   parameter
 nameusername/name
 valueuser_name/value
   /parameter
   parameter
 namepassword/name
 valuexx/value
   /parameter
   parameter
 namemaxActive/name
 value125/value
   /parameter
   parameter
 namemaxIdle/name
 value15/value
   /parameter
   parameter
 namemaxWait/name
 value7000/value
   /parameter
 parameter
 nameremoveAbandoned/name
 valuetrue/value
 /parameter
 parameter
 nameremoveAbandonedTimeout/name
 value60/value
 /parameter
 parameter
 namelogAbandoned/name
 valuetrue/value
 /parameter

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 28, 2007 11:02 AM
To: Tomcat Users List
Subject: Create New Data Source 


Hello list ,
Can someone please tell me how do I test the connectivity from tomcat 
server to oracle database. I am good on Unix/databases but new to Tomcat. 

I have oracle instance named as : lawtst .

lawtest  running at cemcp62 .  (system name)

user name is - sdhotre -password is password .

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? 

Data Sources 
Property  Value 
JNDI Name: 
Data Source URL: 
JDBC Driver Class: 
User Name: 
Password: 
Max. Active Connections: 
Max. Idle Connections: 
Max. Wait for Connection: 
Validation Query: 

Thanks 
Shekhar Dhotre.
Unix Admin.
CobbEnergy (Atlanta).
 

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



Re: Create New Data Source

2007-11-28 Thread Christopher Schultz
-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

[EMAIL PROTECTED] 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/[EMAIL PROTECTED]: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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Create New Data Source

2007-11-28 Thread Shekhar . Dhotre
Christopher and Propes  thanks a lot !! 




Christopher Schultz [EMAIL PROTECTED] 
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

[EMAIL PROTECTED] 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/[EMAIL PROTECTED]: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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Create New Data Source

2007-11-28 Thread Propes, Barry L
you bet.

Barry is fine,thanks! : )

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
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 [EMAIL PROTECTED] 
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

[EMAIL PROTECTED] 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/[EMAIL PROTECTED]: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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



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