Re: Verify JDBC Connection Pooling

From: bhogak <bhogak_no_spam_at_attbi.com>
Date: Sun, 01 Jun 2003 15:07:24 GMT
Message-ID: <MEoCa.1060705$3D1.618301_at_sccrnsc01>


You should be able to get active connections from your connection pool implementation. If you know your Max Size, you can find out what are available (activeSize()). If your "open" means connections that have not yet physically connected to the database, then as soon as you connect to the Database, use DBMS_SESSION.SET_APPLICATION_INFO / CLIENT_INFO procedures and populate some session information. You can then do a count(*) on v$session to get the number of connections from your application. And from max connections of your connection pool, you should be able to get those open/ unused connections.
Another approach is to enable tracing in your TNS listener and see how many connections were established.
bhogak

"Sean" <sean_bu_at_yahoo.com> wrote in message news:999ced66.0306010651.78d56b2_at_posting.google.com...
> By the theory, the connection pooling is a frame work for caches of
> database connections --- "Physically". Some of the connection have
> been "established", which can be verified from v$session, and others
> may be the open . These open connections in the pool are no way to be
> verified at the database level, because they have not been used for
> the database connections yet. How can I find/verify those have not
> been used the connections in the pool? Because they should be the
> "sockets" , can very find out at OS level. I used the following unix
> command, it gives all the established connections, but I want to find
> out not-yet connections:
> lsof -i TCP:1521.
> If you or anyone could help to find out the open connections of jdbc
> at OS level, I will be very thankful.
>
> As you might suggest to use 9iAS monitoring tools to find out the jdbc
> connection pooling infor, I used the OEM Website, it give very
> misleading results as such as
> One time:
> JDBC Usage:
> Open JDBC Connections 11,207
> Total JDBC Connections 22,387
> Active Transactions 0
> Transaction Commits 0
> Transaction Rollbacks 0
>
> At a other time
> JDBC Usage:
> Open JDBC Connections 0
> Total JDBC Connections 0
> Active Transactions 0
> Transaction Commits 0
> Transaction Rollbacks 0
>
> We know the result were not correct/realistic.
Received on Sun Jun 01 2003 - 17:07:24 CEST

Original text of this message