Monitoring Connection Pool with DBMonitor

Monitoring Connection Pool with DBMonitor

Postby silverfox » Wed 25 Apr 2012 15:57

Hello,

I would like to monitor the pooling features of Devart. I know that it is possible with the DBMonitor application, but I would like to do that in code (with OracleMonitor class) and I don't want to parse some text to know what the pool is doing and what is the current pooling status.

Here is what I need to know :
- The pool open a connection (Connect Event from DbConnectionPool)
- The pool activate a connection (ActivateInPool Event)
- The pool get back a connection (ReturnToPool Event)
- The pool close a connection (Disconnect Event from DbConnectionPool)

Everything is right when ActivateInPool is triggered because it is triggered twice. Firstly with an OracleConnection sender and secondly with a DbConnectionPool(which seems to be a devart internal class). Here I can use ActivateInPool + sender is OracleConnection to get all the needed information.

However, ReturnToPool Event does not trigger with an OracleConnection sender. It is triggered only once with a DbConnectionPool sender and ExtraInfo property is empty. Here there is no way to know which connection pool is concerned.

To filter the Open connection in pool events (which has also a DbConnectionPool sender) I can test sender.GetType().FullName == "Devart.Common.DbConnectionPool" but this seems a bit dirty ... This is the same when I filter the Disconnect connection in pool event.

Can you explain me how can I monitor the pool via the OracleMonitor ? It should be possible for me to monitor the pool if the connection string is always provided in the ExtraInfo.

If the OracleMonitor is not intended to get information about pooling can you tell me how do I get the pool status of a connection at any time ? Also, is it possible to know the pooling status through performance counter ?

Thanks in advance,
silverfox
 
Posts: 10
Joined: Wed 18 Jan 2012 10:58
Location: Belgium

Re: Monitoring Connection Pool with DBMonitor

Postby Shalex » Thu 03 May 2012 11:09

silverfox wrote:can you tell me how do I get the pool status of a connection

Could you please give us a definition (or link to its description) which explains the "pool status" you have used in your post?

silverfox wrote:to monitor the pool if the connection string is always provided in the ExtraInfo

How do you want to use the connection string for monitoring the pool?
Connection string which we generate for pool can differ from the one which is used in the OracleConnection.ConnectionString property.
Shalex
Devart Team
 
Posts: 7391
Joined: Thu 14 Aug 2008 12:44

Re: Monitoring Connection Pool with DBMonitor

Postby silverfox » Mon 21 May 2012 07:39

Could you please give us a definition (or link to its description) which explains the "pool status" you have used in your post?


I do not know if there is a definition of pool status, I just like to know some information such as :
    * An Identifier of the pool (the connection string for example)
    * The number of connection opened in the pool
    * The number of connection currently used in the pool
    * ...

How do you want to use the connection string for monitoring the pool?

With the connection string in the ExtraInfo property and the events(ActivateInPool, ReturnToPool, ...) provided by the Devart OracleMonitor object I could monitor a pool for a given pool defined in a connection string.

Connection string which we generate for pool can differ from the one which is used in the OracleConnection.ConnectionString property.

So, there is no way to identify a pool from a connection string in an application ? Maybe I am trying to monitor a pool in the wrong way. If so, can you please explain me how can I achieve this monitoring in code ?

Thank you for the support and for your answers.
silverfox
 
Posts: 10
Joined: Wed 18 Jan 2012 10:58
Location: Belgium

Re: Monitoring Connection Pool with DBMonitor

Postby Pinturiccio » Wed 30 May 2012 08:32

We are investigating the possibility to identify pool from connection string and will notify you about the results as soon as possible.
Pinturiccio
Devart Team
 
Posts: 1866
Joined: Wed 02 Nov 2011 09:44

Re: Monitoring Connection Pool with DBMonitor

Postby Pinturiccio » Wed 06 Jun 2012 10:38

We have changed the behaviour: the 'sender' parameter in MonitorEventHandler is a connection and the MonitorEventArgs.ExtraInfo property is filled with the connection string. We will post here when the corresponding build of dotConnect for Oracle is available for download.
Pinturiccio
Devart Team
 
Posts: 1866
Joined: Wed 02 Nov 2011 09:44

Re: Monitoring Connection Pool with DBMonitor

Postby Pinturiccio » Fri 08 Jun 2012 14:00

The new build of dotConnect for Oracle 7.0.17 is available for download now!
It can be downloaded from http://www.devart.com/dotconnect/oracle/download.html (trial version) or from Registered Users' Area (for users with valid subscription only).
For more information, please refer to http://forums.devart.com/viewtopic.php?t=24290
Pinturiccio
Devart Team
 
Posts: 1866
Joined: Wed 02 Nov 2011 09:44


Return to dotConnect for Oracle