Adam, your image didn't come through the list, at least for me.  Can you give 
me a textual path to where you're looking?


The only thing listed as openejb under mbeans is "openejb.management."  There's 
nothing under there that matches the names of any of my pools.  The only 
matches for "datasource" I see are the containers for the stateless, stateful, 
singleton, and managed beans.  The only pool related stuff I see under there is 
for the EJB instances.

I see an "Active" attribute under the TransactionManager, but that's not 
per-pool, and I'm not sure that it represents all of the JDBC connections as 
opposed to an EJB container transaction.  We'd have EJB's that are set 
@TransactionAttribute(NOT_SUPPORTED) as well as single transactions that touch 
several connection pools (XA), so active transactions from the container's 
point of view isn't granular enough to know if one of the pools is running low.

-Zac




On Oct 28, 2016, at 13:30, Adam Cornett 
<[email protected]<mailto:[email protected]>> wrote:

Here is a screenshot out of jconsole showing the location and attributes:


On Fri, Oct 28, 2016 at 1:21 PM, Romain Manni-Bucau 
<[email protected]<mailto:[email protected]>> wrote:
Hi Zachary,

2016-10-28 19:18 GMT+02:00 Zachary Bedell 
<[email protected]<mailto:[email protected]>>:

> Good afternoon,
>
> I'm working on a monitoring agent for TomEE to plugin to an in-house
> package we use.  One of the most common failures in our current app server
> (JBoss) usually manifests as expended JDBC connection pools, so we alert as
> pools approach full to get some kind of warning of impending doom when the
> database can't keep up.
>
> I need to get a handle on TomEE's datasource pools to check their maximum
> size & current active connection count programatically.  I've tried
> searching through both JMX (how we do it in JBoss) and the JNDI tree.  I
> can find the javax.sql.DataSource in both trees as well as a reference to
> org.apache.openejb.resource.jdbc.DataSourceFactory in JMX.  It doesn't
> appear any of the objects I've been able to find expose a count of active
> connections nor what the configured maximum is.
>
>
in openejb MBeans it should be there


> Is there a way to get the count of active connections & the configured max
> for a named connection pool (I can find the names via JMX or JNDI) or for
> all connection pools?
>


> Thanks in advance,
> Zac Bedell
>
>



--
Adam Cornett
[email protected]<mailto:[email protected]>
(678) 296-1150

Reply via email to