tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zdeněk Vráblík" <zde...@vrablik.org>
Subject Re: JDBC
Date Tue, 22 May 2007 08:41:47 GMT
Hi,

here is example of Resource configration. Put it in context.xml file.

<Resource name="Name"
          auth="Container"
          type="oracle.jdbc.pool.OracleDataSource"
          factory="oracle.jdbc.pool.OracleDataSourceFactory"
          user="oraUserName"
          password="oraUserPass"
          driverClassName="oracle.jdbc.driver.OracleDriver"
          url="jdbc:oracle:thin:@IPAddress:1521:orcl"
          maxActive="20" maxIdle="10" maxwait="-1"/>


java code to get connection:

 DataSource ds = (DataSource) ctxt.lookup("java:/comp/env/" + poolName);
 OracleConnection   conn       = ds.getConnection();

There is used another datasource type in OC4J
http://www.oracle.com/technology/sample_code/tech/java/codesnippet/j2ee/jdbc/JDBC_in_J2EE.html

Regards,
Zdenek

On 5/22/07, Mohammed Zabin <jotnarta@gmail.com> wrote:
> Hi All
>
> Am new on this, i want to know how to configure Database Connection Pooling
> to use Oracle Database?? anyhelp will be appreciated.
>
> Jotnarta
>

---------------------------------------------------------------------
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