[jboss-cvs] JBossAS SVN: r111190 - projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sat Apr 16 13:41:27 EDT 2011


Author: jesper.pedersen
Date: 2011-04-16 13:41:27 -0400 (Sat, 16 Apr 2011)
New Revision: 111190

Modified:
   projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/AbstractFungalRADeployer.java
   projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/DsXmlDeployer.java
Log:
Improve filtering for JMX operations

Modified: projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/AbstractFungalRADeployer.java
===================================================================
--- projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/AbstractFungalRADeployer.java	2011-04-16 17:40:46 UTC (rev 111189)
+++ projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/AbstractFungalRADeployer.java	2011-04-16 17:41:27 UTC (rev 111190)
@@ -456,8 +456,17 @@
                   String raSName = baseName + ",type=ResourceAdapterStatistics,class=" +
                      getClassName(mgtRa.getResourceAdapter().getClass().getName());
 
+                  Set<String> writeStatAttributes = new HashSet<String>();
+                  writeStatAttributes.add("Enabled");
+                  Set<String> excludeStatAttributes = new HashSet<String>();
+                  excludeStatAttributes.add("Names");
+                  Set<String> excludeStatOperations = new HashSet<String>();
+                  excludeStatOperations.add("delta(.)*");
+
                   DynamicMBean raSDMB = JMX.createMBean(mgtRa.getStatistics(),
-                                                        "Resource adapter statistics");
+                                                        "Resource adapter statistics",
+                                                        writeStatAttributes, null,
+                                                        excludeStatAttributes, excludeStatOperations);
                   ObjectName raSON = new ObjectName(raSName);
                   
                   server.registerMBean(raSDMB, raSON);
@@ -509,8 +518,17 @@
                   String mcfSName = baseName + ",type=ManagedConnectionFactoryStatistics,class=" +
                      getClassName(mgtMcf.getManagedConnectionFactory().getClass().getName());
 
+                  Set<String> writeStatAttributes = new HashSet<String>();
+                  writeStatAttributes.add("Enabled");
+                  Set<String> excludeStatAttributes = new HashSet<String>();
+                  excludeStatAttributes.add("Names");
+                  Set<String> excludeStatOperations = new HashSet<String>();
+                  excludeStatOperations.add("delta(.)*");
+
                   DynamicMBean mcfSDMB = JMX.createMBean(mgtMcf.getStatistics(),
-                                                         "Managed connection factory statistics");
+                                                         "Managed connection factory statistics",
+                                                         writeStatAttributes, null,
+                                                         excludeStatAttributes, excludeStatOperations);
                   ObjectName mcfSON = new ObjectName(mcfSName);
 
                   server.registerMBean(mcfSDMB, mcfSON);
@@ -550,7 +568,16 @@
                   String cfPSName = baseName + ",type=ConnectionFactory,class=" +
                      getClassName(mgtCf.getConnectionFactory().getClass().getName()) + ",subcategory=PoolStatistics";
 
-                  DynamicMBean cfPSDMB = JMX.createMBean(mgtCf.getPool().getStatistics(), "Pool statistics");
+                  Set<String> writeStatAttributes = new HashSet<String>();
+                  writeStatAttributes.add("Enabled");
+                  Set<String> excludeStatAttributes = new HashSet<String>();
+                  excludeStatAttributes.add("Names");
+                  Set<String> excludeStatOperations = new HashSet<String>();
+                  excludeStatOperations.add("delta(.)*");
+
+                  DynamicMBean cfPSDMB = JMX.createMBean(mgtCf.getPool().getStatistics(), "Pool statistics",
+                                                         writeStatAttributes, null,
+                                                         excludeStatAttributes, excludeStatOperations);
                   ObjectName cfPSON = new ObjectName(cfPSName);
                   
                   server.registerMBean(cfPSDMB, cfPSON);
@@ -600,8 +627,17 @@
                   String aoSName = baseName + ",type=AdminObjectStatistics,class=" +
                      getClassName(mgtAo.getAdminObject().getClass().getName());
 
+                  Set<String> writeStatAttributes = new HashSet<String>();
+                  writeStatAttributes.add("Enabled");
+                  Set<String> excludeStatAttributes = new HashSet<String>();
+                  excludeStatAttributes.add("Names");
+                  Set<String> excludeStatOperations = new HashSet<String>();
+                  excludeStatOperations.add("delta(.)*");
+
                   DynamicMBean aoSDMB = JMX.createMBean(mgtAo.getStatistics(),
-                                                        "Admin object statistics");
+                                                        "Admin object statistics",
+                                                        writeStatAttributes, null,
+                                                        excludeStatAttributes, excludeStatOperations);
                   ObjectName aoSON = new ObjectName(aoSName);
 
                   server.registerMBean(aoSDMB, aoSON);

Modified: projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/DsXmlDeployer.java
===================================================================
--- projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/DsXmlDeployer.java	2011-04-16 17:40:46 UTC (rev 111189)
+++ projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/DsXmlDeployer.java	2011-04-16 17:41:27 UTC (rev 111190)
@@ -36,6 +36,7 @@
 import java.io.InputStream;
 import java.net.URL;
 import java.util.ArrayList;
+import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
 
@@ -391,7 +392,15 @@
                {
                   String dsPSName = baseName + ",type=PoolStatistics";
                   
-                  DynamicMBean dsPSDMB = JMX.createMBean(mgtDs.getPool().getStatistics(), "PoolStatistics");
+                  Set<String> writeAttributes = new HashSet<String>();
+                  writeAttributes.add("Enabled");
+                  Set<String> excludeAttributes = new HashSet<String>();
+                  excludeAttributes.add("Names");
+                  Set<String> excludeOperations = new HashSet<String>();
+                  excludeOperations.add("delta(.)*");
+
+                  DynamicMBean dsPSDMB = JMX.createMBean(mgtDs.getPool().getStatistics(), "PoolStatistics",
+                                                         writeAttributes, null, excludeAttributes, excludeOperations);
                   ObjectName dsPSON = new ObjectName(dsPSName);
 
                   server.registerMBean(dsPSDMB, dsPSON);
@@ -403,8 +412,15 @@
             if (mgtDs.getStatistics() != null)
             {
                String dsSName = baseName + ",type=Statistics";
+               Set<String> writeAttributes = new HashSet<String>();
+               writeAttributes.add("Enabled");
+               Set<String> excludeAttributes = new HashSet<String>();
+               excludeAttributes.add("Names");
+               Set<String> excludeOperations = new HashSet<String>();
+               excludeOperations.add("delta(.)*");
                   
-               DynamicMBean dsSDMB = JMX.createMBean(mgtDs.getStatistics(), "Statistics");
+               DynamicMBean dsSDMB = JMX.createMBean(mgtDs.getStatistics(), "Statistics",
+                                                     writeAttributes, null, excludeAttributes, excludeOperations);
                ObjectName dsSON = new ObjectName(dsSName);
 
                server.registerMBean(dsSDMB, dsSON);



More information about the jboss-cvs-commits mailing list