openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jrba...@apache.org
Subject svn commit: r982848 - in /openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/instrumentation: ./ jmx/
Date Fri, 06 Aug 2010 02:10:15 GMT
Author: jrbauer
Date: Fri Aug  6 02:10:14 2010
New Revision: 982848

URL: http://svn.apache.org/viewvc?rev=982848&view=rev
Log:
OPENJPA-1739 Fixes to JMXProvider and cache MBeans

Added:
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/instrumentation/jmx/DataCacheJMXInstrumentMBean.java
      - copied, changed from r982455, openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/instrumentation/DataCacheInstrumentMBean.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/instrumentation/jmx/PreparedQueryCacheJMXInstrumentMBean.java
      - copied, changed from r982455, openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/instrumentation/PreparedQueryCacheInstrumentationMBean.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/instrumentation/jmx/QueryCacheJMXInstrumentMBean.java
      - copied, changed from r982455, openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/instrumentation/QueryCacheInstrumentMBean.java
Removed:
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/instrumentation/DataCacheInstrumentMBean.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/instrumentation/PreparedQueryCacheInstrumentationMBean.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/instrumentation/QueryCacheInstrumentMBean.java
Modified:
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/instrumentation/jmx/DataCacheJMXInstrument.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/instrumentation/jmx/JMXProvider.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/instrumentation/jmx/PreparedQueryCacheJMXInstrument.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/instrumentation/jmx/QueryCacheJMXInstrument.java

Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/instrumentation/jmx/DataCacheJMXInstrument.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/instrumentation/jmx/DataCacheJMXInstrument.java?rev=982848&r1=982847&r2=982848&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/instrumentation/jmx/DataCacheJMXInstrument.java
(original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/instrumentation/jmx/DataCacheJMXInstrument.java
Fri Aug  6 02:10:14 2010
@@ -18,7 +18,15 @@
  */
 package org.apache.openjpa.instrumentation.jmx;
 
+import javax.management.Attribute;
+import javax.management.AttributeList;
+import javax.management.AttributeNotFoundException;
+import javax.management.InvalidAttributeValueException;
+import javax.management.MBeanException;
+import javax.management.MBeanInfo;
 import javax.management.ObjectName;
+import javax.management.DynamicMBean;
+import javax.management.ReflectionException;
 
 import org.apache.openjpa.conf.OpenJPAConfiguration;
 import org.apache.openjpa.datacache.DataCache;
@@ -34,7 +42,7 @@ import org.apache.openjpa.util.UserExcep
  * A JMX-specific instrument for the data cache
  */
 public class DataCacheJMXInstrument extends AbstractDataCacheInstrument 
-    implements JMXInstrument {
+    implements JMXInstrument, DataCacheJMXInstrumentMBean {
     
     private static Localizer _loc = Localizer.forPackage(DataCacheJMXInstrument.class);
 
@@ -96,4 +104,38 @@ public class DataCacheJMXInstrument exte
     public void stop() {
         getProvider().stopInstrument(this);
     }
+
+    public Object getAttribute(String attribute)
+        throws AttributeNotFoundException, MBeanException, ReflectionException {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public AttributeList getAttributes(String[] attributes) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public MBeanInfo getMBeanInfo() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public Object invoke(String actionName, Object[] params, String[] signature)
+        throws MBeanException, ReflectionException {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public void setAttribute(Attribute attribute)
+        throws AttributeNotFoundException, InvalidAttributeValueException,
+        MBeanException, ReflectionException {
+        // TODO Auto-generated method stub
+        
+    }
+
+    public AttributeList setAttributes(AttributeList attributes) {
+        // TODO Auto-generated method stub
+        return null;
+    }
 }

Copied: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/instrumentation/jmx/DataCacheJMXInstrumentMBean.java
(from r982455, openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/instrumentation/DataCacheInstrumentMBean.java)
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/instrumentation/jmx/DataCacheJMXInstrumentMBean.java?p2=openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/instrumentation/jmx/DataCacheJMXInstrumentMBean.java&p1=openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/instrumentation/DataCacheInstrumentMBean.java&r1=982455&r2=982848&rev=982848&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/instrumentation/DataCacheInstrumentMBean.java
(original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/instrumentation/jmx/DataCacheJMXInstrumentMBean.java
Fri Aug  6 02:10:14 2010
@@ -16,7 +16,9 @@
  * specific language governing permissions and limitations
  * under the License.    
  */
-package org.apache.openjpa.instrumentation;
+package org.apache.openjpa.instrumentation.jmx;
+
+import org.apache.openjpa.instrumentation.DataCacheInstrument;
 
 /**
  * Simple MBean interface for providing instrumented data cache metrics 
@@ -24,7 +26,7 @@ package org.apache.openjpa.instrumentati
  * Note: Simple MBeans require an MBean interface matching the supplied 
  * implementation class.
  */
-public interface DataCacheInstrumentMBean 
+public interface DataCacheJMXInstrumentMBean 
     extends DataCacheInstrument {
 
 }

Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/instrumentation/jmx/JMXProvider.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/instrumentation/jmx/JMXProvider.java?rev=982848&r1=982847&r2=982848&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/instrumentation/jmx/JMXProvider.java
(original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/instrumentation/jmx/JMXProvider.java
Fri Aug  6 02:10:14 2010
@@ -45,7 +45,7 @@ public class JMXProvider
     /**
      * The standard mbean package for OpenJPA
      */
-    public static final String MBEAN_PACKAGE = "org.apache.openjpa";
+    public static final String MBEAN_DOMAIN = "org.apache.openjpa";
     
     private MBeanServer _mbs = null;
 
@@ -100,8 +100,8 @@ public class JMXProvider
     public static ObjectName createObjectName(JMXInstrument instrument, Map<String,String>
props) 
         throws Exception {
         // Construct the base name
-        StringBuilder sbName = new StringBuilder(MBEAN_PACKAGE);
-        sbName.append("type=");
+        StringBuilder sbName = new StringBuilder(MBEAN_DOMAIN);
+        sbName.append(":type=");
         sbName.append(instrument.getName());
         sbName.append(",cfgid=");
         sbName.append(instrument.getConfigId());

Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/instrumentation/jmx/PreparedQueryCacheJMXInstrument.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/instrumentation/jmx/PreparedQueryCacheJMXInstrument.java?rev=982848&r1=982847&r2=982848&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/instrumentation/jmx/PreparedQueryCacheJMXInstrument.java
(original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/instrumentation/jmx/PreparedQueryCacheJMXInstrument.java
Fri Aug  6 02:10:14 2010
@@ -31,7 +31,7 @@ import org.apache.openjpa.util.UserExcep
  * A JMX-specific instrument for the query cache
  */
 public class PreparedQueryCacheJMXInstrument extends AbstractPreparedQueryCacheInstrument

-    implements JMXInstrument {
+    implements JMXInstrument, PreparedQueryCacheJMXInstrumentMBean {
     
     private static Localizer _loc = Localizer.forPackage(PreparedQueryCacheJMXInstrument.class);
 

Copied: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/instrumentation/jmx/PreparedQueryCacheJMXInstrumentMBean.java
(from r982455, openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/instrumentation/PreparedQueryCacheInstrumentationMBean.java)
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/instrumentation/jmx/PreparedQueryCacheJMXInstrumentMBean.java?p2=openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/instrumentation/jmx/PreparedQueryCacheJMXInstrumentMBean.java&p1=openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/instrumentation/PreparedQueryCacheInstrumentationMBean.java&r1=982455&r2=982848&rev=982848&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/instrumentation/PreparedQueryCacheInstrumentationMBean.java
(original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/instrumentation/jmx/PreparedQueryCacheJMXInstrumentMBean.java
Fri Aug  6 02:10:14 2010
@@ -16,9 +16,11 @@
  * specific language governing permissions and limitations
  * under the License.    
  */
-package org.apache.openjpa.instrumentation;
+package org.apache.openjpa.instrumentation.jmx;
 
-public interface PreparedQueryCacheInstrumentationMBean 
+import org.apache.openjpa.instrumentation.PreparedQueryCacheInstrument;
+
+public interface PreparedQueryCacheJMXInstrumentMBean 
    extends PreparedQueryCacheInstrument {
 
 }

Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/instrumentation/jmx/QueryCacheJMXInstrument.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/instrumentation/jmx/QueryCacheJMXInstrument.java?rev=982848&r1=982847&r2=982848&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/instrumentation/jmx/QueryCacheJMXInstrument.java
(original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/instrumentation/jmx/QueryCacheJMXInstrument.java
Fri Aug  6 02:10:14 2010
@@ -32,7 +32,7 @@ import org.apache.openjpa.util.UserExcep
  * A JMX-specific instrument for the query cache
  */
 public class QueryCacheJMXInstrument extends AbstractQueryCacheInstrument 
-    implements JMXInstrument {
+    implements JMXInstrument, QueryCacheJMXInstrumentMBean {
     
     private static Localizer _loc = Localizer.forPackage(QueryCacheJMXInstrument.class);
 

Copied: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/instrumentation/jmx/QueryCacheJMXInstrumentMBean.java
(from r982455, openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/instrumentation/QueryCacheInstrumentMBean.java)
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/instrumentation/jmx/QueryCacheJMXInstrumentMBean.java?p2=openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/instrumentation/jmx/QueryCacheJMXInstrumentMBean.java&p1=openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/instrumentation/QueryCacheInstrumentMBean.java&r1=982455&r2=982848&rev=982848&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/instrumentation/QueryCacheInstrumentMBean.java
(original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/instrumentation/jmx/QueryCacheJMXInstrumentMBean.java
Fri Aug  6 02:10:14 2010
@@ -16,7 +16,9 @@
  * specific language governing permissions and limitations
  * under the License.    
  */
-package org.apache.openjpa.instrumentation;
+package org.apache.openjpa.instrumentation.jmx;
+
+import org.apache.openjpa.instrumentation.QueryCacheInstrument;
 
 /**
  * Simple MBean interface for providing instrumented query cache metrics 
@@ -24,6 +26,6 @@ package org.apache.openjpa.instrumentati
  * Note: Simple MBeans require an MBean interface matching the supplied 
  * implementation class.
  */
-public interface QueryCacheInstrumentMBean extends QueryCacheInstrument {
+public interface QueryCacheJMXInstrumentMBean extends QueryCacheInstrument {
 
 }



Mime
View raw message