Zdeněk Vráblík escribió:
Hi,

4. I use OracleConnectionPoolDataSource because with
javax.sql.DataSource it doesn't close correctly close connections from
pool and server got to hang up.

Have you got any exception?

It throwed "Closed Statement", "Exhausted Resultset" and "NullPointerException", but only when I do stress test. If I browse page with navigator it works correctly and throws no exceptions.

This is my resource:

<Resource name="IC"
auth="Container"
type="oracle.jdbc.pool.OracleDataSource"
factory="oracle.jdbc.pool.OracleDataSourceFactory"
user="IC"
password="IC"
driverClassName="oracle.jdbc.driver.OracleDriver"
url="jdbc:oracle:thin:@192.168.100.119:1521:orcl"

maxActive="20" maxIdle="10" maxwait="-1"/> and this is my java code I use
try
{
// Look up the data source on the JNDI tree
DataSource ds = (DataSource) ctxt.lookup("java:/comp/env/" + poolName);


if (ds instanceof OracleDataSource)
{
log.debug("oracleDatasource found");
}

conn = ds.getConnection();

if (conn instanceof OracleConnection)
{
log.debug( "OracleConnection - delegated" );
}
}
catch ( Exception ex )
{
log.error( classId + "Error getting Oracle Connection.", ex );
throw ex;
}

With OracleDataSource instead of OracleConnectionPoolDataSource I can use "user" and "password" in the context, but when I run stress test with 10 users, I see it uses more connections than I put in context (It uses one per user and I put 8 in the context). It's seems not to respect the pool. And it throws no exceptions.
What jdbc driver do you use?

I use the driver from www.oracle.com that corresponds with my oracle version (http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/htdocs/jdbc9201.html) Oracle9/i/ 9.2.0.1 JDBC Drivers for JDK 1.4.
And one question. Are you going to use any user transaction manager? :)
I use simpleJTA, but I have tested it only in developement...

I'm not using any user transaction manager. I think my page doesn't need it.
Regards,
Zdenek

Regards.
---------------------------------------------------------------------
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]

Reply via email to