users@glassfish.java.net

is it possible to tell the connectionpooling remove one or all connection

From: <glassfish_at_javadesktop.org>
Date: Fri, 08 Jan 2010 01:00:50 PST

Hi Forum,

is it possible when I use a pooled oracle connection via jni from gf ver 2.2 to raise some exception or set some property (where?) to say that this connection is to remove from the pool or that all connections are to remove from pool?

I need this for some oracle specific errors like ORA-03113 --> here this connection is (often) terminated by server. In this case only this connection is died but the other works well. Or ORA-04068 when I compile a oracle package --> here I want that the pooling renew all! connections because every connection will get this error and this is (in my case) not acceptable.

My settings look like:

asadmin> get server.resources.jdbc-connection-pool.IcwdbaPool.*
***
server.resources.jdbc-connection-pool.IcwdbaPool.datasource-classname = oracle.jdbc.pool.OracleDataSource
server.resources.jdbc-connection-pool.IcwdbaPool.name = IcwdbaPool

****
 
asadmin> get server.resource-ref.jdbc/icwdba.*
server.resource-ref.jdbc/icwdba.enabled = true
server.resource-ref.jdbc/icwdba.ref = jdbc/icwdba

asadmin> get domain.resources.jdbc-resource.jdbc/icwdba.*
domain.resources.jdbc-resource.jdbc/icwdba.description =
domain.resources.jdbc-resource.jdbc/icwdba.enabled = true
domain.resources.jdbc-resource.jdbc/icwdba.jndi-name = jdbc/icwdba
domain.resources.jdbc-resource.jdbc/icwdba.object-type = user
domain.resources.jdbc-resource.jdbc/icwdba.pool-name = IcwdbaPool


the code look like

[code]
Context initCtx = new InitialContext();
DataSource ds = (DataSource)initCtx.lookup("jdbc/icwdba");
Connection conn = ds.getConnection();
[/code]

any help/ comment or hint is wellcome

thanks Dietmar
[Message sent by forum member 'oaspublic' (dietmar.mueller_at_eurotours.at)]

http://forums.java.net/jive/thread.jspa?messageID=379542