commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1507223 - in /commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl: DefaultPooledObjectInfo.java DefaultPooledObjectInfoMBean.java
Date Fri, 26 Jul 2013 08:59:30 GMT
Author: markt
Date: Fri Jul 26 08:59:29 2013
New Revision: 1507223

URL: http://svn.apache.org/r1507223
Log:
Expose the type and toString() value of a pooled object to the JMX interface.

Modified:
    commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/DefaultPooledObjectInfo.java
    commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/DefaultPooledObjectInfoMBean.java

Modified: commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/DefaultPooledObjectInfo.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/DefaultPooledObjectInfo.java?rev=1507223&r1=1507222&r2=1507223&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/DefaultPooledObjectInfo.java
(original)
+++ commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/DefaultPooledObjectInfo.java
Fri Jul 26 08:59:29 2013
@@ -69,4 +69,14 @@ public class DefaultPooledObjectInfo imp
         SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss Z");
         return sdf.format(Long.valueOf(pooledObject.getLastReturnTime()));
     }
+
+    @Override
+    public String getPooledObjectType() {
+        return pooledObject.getObject().getClass().getName();
+    }
+
+    @Override
+    public String getPooledObjectToString() {
+        return pooledObject.getObject().toString();
+    }
 }

Modified: commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/DefaultPooledObjectInfoMBean.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/DefaultPooledObjectInfoMBean.java?rev=1507223&r1=1507222&r2=1507223&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/DefaultPooledObjectInfoMBean.java
(original)
+++ commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/DefaultPooledObjectInfoMBean.java
Fri Jul 26 08:59:29 2013
@@ -24,4 +24,6 @@ public interface DefaultPooledObjectInfo
     String getLastBorrowTrace();
     long getLastReturnTime();
     String getLastReturnTimeFormatted();
+    String getPooledObjectType();
+    String getPooledObjectToString();
 }



Mime
View raw message