Hi,
Can anyone help me with this issue.
I have created a JCA connector and deployed in JBoss Server. Connector is deployed as
Mbeans . For the deployed connector I tried retrieving all the connector related
attributes like min pool size , max pool size etc which was given at the time of creating
the connector using the code
JCAStats jcaStats = getJCAStats(name); // The method getJCAStats() is pasted below.
JCAConnectionPoolStats[] connPools = jcaStats.getConnectionPools();
JCAConnectionPoolStats connPoolStats;
for (int i = 0; i < connPools.length; i++) {
connPoolStats = connPools(i) ;
}
Using this connPoolStats variable I tried to retrieve the values of minimum and maximum
pool size using the two methods given below . The issue is that I am getting the Maximum
pool size correctly but the value of Minimum pool size is always zero. Why is this methods
not picking the correct value of lower bound if it could pick the value upper bound
correctly. I have checked the JMX console for the deployed connector Mbean and there the
values of Minimum and maximum pool size are shown correctly
maxPoolSize = connPoolStats.getPoolSize().getUpperBound();
minPoolSize = connPoolStats.getPoolSize().getLowerBound();
******** Method getJCAStas*********
public JCAStats getJCAStats(String jndiName){
JCAStats jcaStats = null;
try{
Management mejb = getMEJB();
ObjectName filterNames = getResourceManagerFilter(jndiName);
Set mbeanNames = mejb.queryNames(filterNames, null);
Iterator it = mbeanNames.iterator();
while (it.hasNext()) {
// Get List of ResourceAdapters on the server
ObjectName name = (ObjectName) it.next();
String jcaResource = name.getKeyProperty("JCAResource");
ObjectName jcaFilter = getJCAFilter(jcaResource);
Set mbeanSet = mejb.queryNames(jcaFilter, null);
Iterator iter = mbeanSet.iterator();
while (iter.hasNext()) {
ObjectName jcaObj = (ObjectName)iter.next();
jcaStats = (JCAStats)mejb.getAttribute(jcaObj, "stats");
}
}
}catch(Exception ex){
ex.printStackTrace();
}
return jcaStats;
}
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4048574#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...