commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1221705 [9/9] - in /commons/proper/pool/branches/POOL_1_X: ./ src/java/org/apache/commons/pool/ src/java/org/apache/commons/pool/impl/ src/site/ src/site/xdoc/ src/test/org/apache/commons/pool/ src/test/org/apache/commons/pool/impl/ src/te...
Date Wed, 21 Dec 2011 13:03:55 GMT
Modified: commons/proper/pool/branches/POOL_1_X/src/test/org/apache/commons/pool/impl/TestStackObjectPool.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/branches/POOL_1_X/src/test/org/apache/commons/pool/impl/TestStackObjectPool.java?rev=1221705&r1=1221704&r2=1221705&view=diff
==============================================================================
--- commons/proper/pool/branches/POOL_1_X/src/test/org/apache/commons/pool/impl/TestStackObjectPool.java
(original)
+++ commons/proper/pool/branches/POOL_1_X/src/test/org/apache/commons/pool/impl/TestStackObjectPool.java
Wed Dec 21 13:03:54 2011
@@ -32,26 +32,26 @@ import org.apache.commons.pool.TestBaseO
  * @author Sandy McArthur
  * @version $Revision$ $Date$
  */
-public class TestStackObjectPool extends TestBaseObjectPool {
+public class TestStackObjectPool extends TestBaseObjectPool<String> {
     public TestStackObjectPool(String testName) {
         super(testName);
     }
 
-    protected ObjectPool makeEmptyPool(int mincap) {
-        return new StackObjectPool(new SimpleFactory());
+    protected ObjectPool<String> makeEmptyPool(int mincap) {
+        return new StackObjectPool<String>(new SimpleFactory());
     }
 
-    protected ObjectPool makeEmptyPool(final PoolableObjectFactory factory) {
-        return new StackObjectPool(factory);
+    protected ObjectPool<Integer> makeEmptyPool(final PoolableObjectFactory<Integer>
factory) {
+        return new StackObjectPool<Integer>(factory);
     }
 
-    protected Object getNthObject(int n) {
+    protected String getNthObject(int n) {
         return String.valueOf(n);
     }
 
     public void testIdleCap() throws Exception {
-        ObjectPool pool = makeEmptyPool(8);
-        Object[] active = new Object[100];
+        ObjectPool<String> pool = makeEmptyPool(8);
+        String[] active = new String[100];
         for(int i=0;i<100;i++) {
             active[i] = pool.borrowObject();
         }
@@ -68,7 +68,7 @@ public class TestStackObjectPool extends
      * @deprecated - to be removed in pool 2.0
      */
     public void testPoolWithNullFactory() throws Exception {
-        ObjectPool pool = new StackObjectPool(10);
+        ObjectPool<Integer> pool = new StackObjectPool<Integer>(10);
         for(int i=0;i<10;i++) {
             pool.returnObject(new Integer(i));
         }
@@ -76,7 +76,7 @@ public class TestStackObjectPool extends
             Integer[] borrowed = new Integer[10];
             BitSet found = new BitSet();
             for(int i=0;i<10;i++) {
-                borrowed[i] = (Integer)(pool.borrowObject());
+                borrowed[i] = pool.borrowObject();
                 assertNotNull(borrowed);
                 assertTrue(!found.get(borrowed[i].intValue()));
                 found.set(borrowed[i].intValue());
@@ -94,7 +94,7 @@ public class TestStackObjectPool extends
      * @deprecated - to be removed in pool 2.0
      */
     public void testBorrowFromEmptyPoolWithNullFactory() throws Exception {
-        ObjectPool pool = new StackObjectPool();
+        ObjectPool<Object> pool = new StackObjectPool<Object>();
         try {
             pool.borrowObject();
             fail("Expected NoSuchElementException");
@@ -107,7 +107,7 @@ public class TestStackObjectPool extends
      * @deprecated - to be removed in pool 2.0
      */
     public void testSetFactory() throws Exception {
-        ObjectPool pool = new StackObjectPool();
+        ObjectPool<String> pool = new StackObjectPool<String>();
         try {
             pool.borrowObject();
             fail("Expected NoSuchElementException");
@@ -115,7 +115,7 @@ public class TestStackObjectPool extends
             // expected
         }
         pool.setFactory(new SimpleFactory());
-        Object obj = pool.borrowObject();
+        String obj = pool.borrowObject();
         assertNotNull(obj);
         pool.returnObject(obj);
     }
@@ -124,9 +124,9 @@ public class TestStackObjectPool extends
      * @deprecated - to be removed in pool 2.0
      */
     public void testCantResetFactoryWithActiveObjects() throws Exception {
-        ObjectPool pool = new StackObjectPool();
+        ObjectPool<String> pool = new StackObjectPool<String>();
         pool.setFactory(new SimpleFactory());
-        Object obj = pool.borrowObject();
+        String obj = pool.borrowObject();
         assertNotNull(obj);
 
         try {
@@ -141,16 +141,16 @@ public class TestStackObjectPool extends
      * @deprecated - to be removed in pool 2.0
      */
     public void testCanResetFactoryWithoutActiveObjects() throws Exception {
-        ObjectPool pool = new StackObjectPool();
+        ObjectPool<String> pool = new StackObjectPool<String>();
         {
             pool.setFactory(new SimpleFactory());
-            Object obj = pool.borrowObject();        
+            String obj = pool.borrowObject();        
             assertNotNull(obj);
             pool.returnObject(obj);
         }
         {
             pool.setFactory(new SimpleFactory());
-            Object obj = pool.borrowObject();        
+            String obj = pool.borrowObject();        
             assertNotNull(obj);
             pool.returnObject(obj);
         }
@@ -165,16 +165,16 @@ public class TestStackObjectPool extends
         SelectiveFactory factory = new SelectiveFactory();
         factory.setValidateSelectively(true);  // Even numbers fail validation
         factory.setPassivateSelectively(true); // Multiples of 3 fail passivation
-        ObjectPool pool = new StackObjectPool(factory, 20);
-        Object[] obj = new Object[10];
+        ObjectPool<Integer> pool = new StackObjectPool<Integer>(factory, 20);
+        Integer[] obj = new Integer[10];
         for(int i=0;i<10;i++) {
-            Object object = null;
+            Integer object = null;
             int k = 0;
             while (object == null && k < 100) { // bound not really needed
                 try {
                     k++;
                     object = pool.borrowObject();
-                    if (((Integer) object).intValue() % 2 == 0) {
+                    if (object.intValue() % 2 == 0) {
                         fail("Expecting NoSuchElementException");
                     } else {
                         obj[i] = object; 
@@ -207,9 +207,9 @@ public class TestStackObjectPool extends
      */
     public void testBorrowReturnWithSometimesInvalidObjects() throws Exception {
         SelectiveFactory factory = new SelectiveFactory();
-        ObjectPool pool = new StackObjectPool(factory, 20);
+        ObjectPool<Integer> pool = new StackObjectPool<Integer>(factory, 20);
 
-        Object[] obj = new Object[10];
+        Integer[] obj = new Integer[10];
         for(int i=0;i<10;i++) {
             obj[i] = pool.borrowObject();
             assertEquals("Each time we borrow, get one more active.", i+1, pool.getNumActive());
@@ -229,27 +229,27 @@ public class TestStackObjectPool extends
      
     public void testVariousConstructors() throws Exception {
         {
-            StackObjectPool pool = new StackObjectPool();
+            StackObjectPool<Object> pool = new StackObjectPool<Object>();
             assertNotNull(pool);
         }
         {
-            StackObjectPool pool = new StackObjectPool(10);
+            StackObjectPool<Object> pool = new StackObjectPool<Object>(10);
             assertNotNull(pool);
         }
         {
-            StackObjectPool pool = new StackObjectPool(10,5);
+            StackObjectPool<Object> pool = new StackObjectPool<Object>(10,5);
             assertNotNull(pool);
         }
         {
-            StackObjectPool pool = new StackObjectPool(null);
+            StackObjectPool<Object> pool = new StackObjectPool<Object>(null);
             assertNotNull(pool);
         }
         {
-            StackObjectPool pool = new StackObjectPool(null,10);
+            StackObjectPool<Object> pool = new StackObjectPool<Object>(null,10);
             assertNotNull(pool);
         }
         {
-            StackObjectPool pool = new StackObjectPool(null,10,5);
+            StackObjectPool<Object> pool = new StackObjectPool<Object>(null,10,5);
             assertNotNull(pool);
         }
     }
@@ -259,7 +259,7 @@ public class TestStackObjectPool extends
      */
     public void testMaxIdleInitCapacityOutOfRange() throws Exception {
         SimpleFactory factory = new SimpleFactory();
-        StackObjectPool pool = new StackObjectPool(factory, -1, 0);
+        StackObjectPool<String> pool = new StackObjectPool<String>(factory, -1,
0);
         assertEquals(pool.getMaxSleeping(), StackObjectPool.DEFAULT_MAX_SLEEPING);
         pool.addObject();
         pool.close();
@@ -271,13 +271,13 @@ public class TestStackObjectPool extends
      */
     public void testReturnObjectDiscardOrder() throws Exception {
         SelectiveFactory factory = new SelectiveFactory();
-        ObjectPool pool = new StackObjectPool(factory, 3);
+        ObjectPool<Integer> pool = new StackObjectPool<Integer>(factory, 3);
 
         // borrow more objects than the pool can hold
-        Integer i0 = (Integer)pool.borrowObject();
-        Integer i1 = (Integer)pool.borrowObject();
-        Integer i2 = (Integer)pool.borrowObject();
-        Integer i3 = (Integer)pool.borrowObject();
+        Integer i0 = pool.borrowObject();
+        Integer i1 = pool.borrowObject();
+        Integer i2 = pool.borrowObject();
+        Integer i3 = pool.borrowObject();
 
         // tests
         // return as many as the pool will hold.
@@ -293,7 +293,7 @@ public class TestStackObjectPool extends
         assertEquals("One object should have been destroyed.", 1, factory.getDestroyed().size());
 
         // check to see what object was destroyed
-        Integer d = (Integer)factory.getDestroyed().get(0);
+        Integer d = factory.getDestroyed().get(0);
         assertEquals("Destoryed object should be the stalest object.", i0, d);
     }
     
@@ -304,7 +304,7 @@ public class TestStackObjectPool extends
      */
     public void testExceptionOnActivate() throws Exception {
         SelectiveFactory factory = new SelectiveFactory();
-        ObjectPool pool = new StackObjectPool(factory);
+        ObjectPool<Integer> pool = new StackObjectPool<Integer>(factory);
         pool.addObject();
         pool.addObject();
         factory.setThrowOnActivate(true);
@@ -324,14 +324,14 @@ public class TestStackObjectPool extends
      */
     public void testExceptionOnDestroy() throws Exception {
         SelectiveFactory factory = new SelectiveFactory();
-        ObjectPool pool = new StackObjectPool(factory, 2);
+        ObjectPool<Integer> pool = new StackObjectPool<Integer>(factory, 2);
         factory.setThrowOnDestroy(true);
         for (int i = 0; i < 3; i++) {
             pool.addObject(); // Third one will destroy, exception should be swallowed
         }
         assertEquals(2, pool.getNumIdle());
         
-        Object[] objects = new Object[3];
+        Integer[] objects = new Integer[3];
         for (int i = 0; i < 3; i++) {
             objects[i] = pool.borrowObject();
         }
@@ -347,7 +347,7 @@ public class TestStackObjectPool extends
      */
     public void testExceptionOnPassivate() throws Exception {
         SelectiveFactory factory = new SelectiveFactory();
-        ObjectPool pool = new StackObjectPool(factory, 2);
+        ObjectPool<Integer> pool = new StackObjectPool<Integer>(factory, 2);
         factory.setThrowOnPassivate(true);
         
         // addObject propagates
@@ -361,7 +361,7 @@ public class TestStackObjectPool extends
         assertEquals(0, pool.getNumIdle());
         
         // returnObject swallows 
-        Object obj = pool.borrowObject();
+        Integer obj = pool.borrowObject();
         pool.returnObject(obj);
         assertEquals(0, pool.getNumIdle());
     }
@@ -371,7 +371,7 @@ public class TestStackObjectPool extends
      */
     public void testExceptionOnValidate() throws Exception {
         SelectiveFactory factory = new SelectiveFactory();
-        ObjectPool pool = new StackObjectPool(factory, 2);
+        ObjectPool<Integer> pool = new StackObjectPool<Integer>(factory, 2);
         factory.setThrowOnValidate(true);
         
         // addObject
@@ -385,7 +385,7 @@ public class TestStackObjectPool extends
         
         // returnObject 
         factory.setThrowOnValidate(false);
-        Object obj = pool.borrowObject();
+        Integer obj = pool.borrowObject();
         factory.setThrowOnValidate(true);
         try {
             pool.returnObject(obj);
@@ -410,7 +410,7 @@ public class TestStackObjectPool extends
     public void testExceptionOnMake() throws Exception {
         SelectiveFactory factory = new SelectiveFactory();
         factory.setThrowOnMake(true);
-        ObjectPool pool = new StackObjectPool(factory);
+        ObjectPool<Integer> pool = new StackObjectPool<Integer>(factory);
         try {
             pool.borrowObject();
             fail("Expecting IntegerFactoryException");
@@ -430,7 +430,7 @@ public class TestStackObjectPool extends
      */
     public void testMakeNull() throws Exception {
         SelectiveFactory factory = new SelectiveFactory();
-        ObjectPool pool = new StackObjectPool(factory);
+        ObjectPool<Integer> pool = new StackObjectPool<Integer>(factory);
         factory.setMakeNull(true);
         try {
             pool.borrowObject();
@@ -444,13 +444,13 @@ public class TestStackObjectPool extends
      * Verifies that initIdleCapacity is not a hard limit, but maxIdle is.
      */
     public void testInitIdleCapacityExceeded() throws Exception {
-        PoolableObjectFactory factory = new SimpleFactory();
-        ObjectPool pool = new StackObjectPool(factory, 2, 1);
+        PoolableObjectFactory<String> factory = new SimpleFactory();
+        ObjectPool<String> pool = new StackObjectPool<String>(factory, 2, 1);
         pool.addObject();
         pool.addObject();
         assertEquals(2, pool.getNumIdle());
         pool.close();
-        pool = new StackObjectPool(factory, 1, 2);
+        pool = new StackObjectPool<String>(factory, 1, 2);
         pool.addObject();
         pool.addObject();
         assertEquals(1, pool.getNumIdle());
@@ -462,16 +462,16 @@ public class TestStackObjectPool extends
      */
     public void testClose() throws Exception {
         SelectiveFactory factory = new SelectiveFactory();
-        ObjectPool pool = new StackObjectPool(factory);
+        ObjectPool<Integer> pool = new StackObjectPool<Integer>(factory);
         pool.addObject(); // 0
         pool.addObject(); // 1
         pool.addObject(); // 2
-        Integer two = (Integer) pool.borrowObject();
+        Integer two = pool.borrowObject();
         assertEquals(2, two.intValue());
         pool.close();
         assertEquals(0, pool.getNumIdle());
         assertEquals(1, pool.getNumActive());
-        List destroyed = factory.getDestroyed();
+        List<Integer> destroyed = factory.getDestroyed();
         assertEquals(2, destroyed.size());
         assertTrue(destroyed.contains(new Integer(0)));
         assertTrue(destroyed.contains(new Integer(0)));
@@ -495,21 +495,21 @@ public class TestStackObjectPool extends
      * Simple factory that creates Integers. Validation and other factory methods
      * always succeed.
      */
-    static class SimpleFactory implements PoolableObjectFactory {
+    static class SimpleFactory implements PoolableObjectFactory<String> {
         int counter = 0;
-        public Object makeObject() { return String.valueOf(counter++); }
-        public void destroyObject(Object obj) { }
-        public boolean validateObject(Object obj) { return true; }
-        public void activateObject(Object obj) { }
-        public void passivateObject(Object obj) { }
+        public String makeObject() { return String.valueOf(counter++); }
+        public void destroyObject(String obj) { }
+        public boolean validateObject(String obj) { return true; }
+        public void activateObject(String obj) { }
+        public void passivateObject(String obj) { }
     }
     
     /**
      * Integer factory that fails validation and other factory methods "selectively" and
      * tracks object destruction.
      */
-    static class SelectiveFactory implements PoolableObjectFactory {
-        private List destroyed = new ArrayList();
+    static class SelectiveFactory implements PoolableObjectFactory<Integer> {
+        private List<Integer> destroyed = new ArrayList<Integer>();
         private int counter = 0;
         private boolean validateSelectively = false;  // true <-> validate returns
false for even Integers
         private boolean passivateSelectively = false; // true <-> passivate throws
RTE if Integer = 0 mod 3
@@ -519,7 +519,7 @@ public class TestStackObjectPool extends
         private boolean throwOnValidate= false;       // true <-> validate throws RTE
(always)
         private boolean throwOnPassivate = false;     // true <-> passivate throws
RTE (always)
         private boolean makeNull = false;             // true <-> make returns null
-        public Object makeObject() {
+        public Integer makeObject() {
             if (throwOnMake) {
                 final int next = counter + 1;
                 throw new IntegerFactoryException("makeObject", next);
@@ -527,47 +527,43 @@ public class TestStackObjectPool extends
                 return makeNull? null : new Integer(counter++);
             }
         }
-        public void destroyObject(Object obj) {
+        public void destroyObject(Integer obj) {
             if (throwOnDestroy) {
-                final Integer integer = (Integer)obj;
+                final Integer integer = obj;
                 throw new IntegerFactoryException("destroyObject", integer.intValue());
             }
             destroyed.add(obj);
         }
-        public boolean validateObject(Object obj) {
+        public boolean validateObject(Integer obj) {
             if (throwOnValidate) {
-                final Integer integer = (Integer)obj;
+                final Integer integer = obj;
                 throw new IntegerFactoryException("validateObject", integer.intValue());
             }
             if (validateSelectively) {
                 // only odd objects are valid
-                if(obj instanceof Integer) {
-                    return ((((Integer)obj).intValue() % 2) == 1);
-                } else {
-                    return false;
-                }
+                return ((obj.intValue() % 2) == 1);
             }
             return true;
         }
-        public void activateObject(Object obj) {
+        public void activateObject(Integer obj) {
             if (throwOnActivate) {
-                final Integer integer = (Integer)obj;
+                final Integer integer = obj;
                 throw new IntegerFactoryException("activateObject", integer.intValue());
             }
         }
-        public void passivateObject(Object obj) { 
+        public void passivateObject(Integer obj) { 
             if (throwOnPassivate) {
-                final Integer integer = (Integer)obj;
+                final Integer integer = obj;
                 throw new IntegerFactoryException("passivateObject", integer.intValue());
             }
             if (passivateSelectively) {
-                final Integer integer = (Integer)obj;
+                final Integer integer = obj;
                 if (integer.intValue() % 3 == 0) {
                     throw new IntegerFactoryException("passivateObject", integer.intValue());
                 }
             }
         }
-        public List getDestroyed() {
+        public List<Integer> getDestroyed() {
             return destroyed;
         }
         public void setCounter(int counter) {

Modified: commons/proper/pool/branches/POOL_1_X/src/test/org/apache/commons/pool/impl/TestStackObjectPoolFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/branches/POOL_1_X/src/test/org/apache/commons/pool/impl/TestStackObjectPoolFactory.java?rev=1221705&r1=1221704&r2=1221705&view=diff
==============================================================================
--- commons/proper/pool/branches/POOL_1_X/src/test/org/apache/commons/pool/impl/TestStackObjectPoolFactory.java
(original)
+++ commons/proper/pool/branches/POOL_1_X/src/test/org/apache/commons/pool/impl/TestStackObjectPoolFactory.java
Wed Dec 21 13:03:54 2011
@@ -33,29 +33,29 @@ public class TestStackObjectPoolFactory 
         super(name);
     }
 
-    protected ObjectPoolFactory makeFactory(final PoolableObjectFactory objectFactory) throws
UnsupportedOperationException {
-        return new StackObjectPoolFactory(objectFactory);
+    protected ObjectPoolFactory<Integer> makeFactory(final PoolableObjectFactory<Integer>
objectFactory) throws UnsupportedOperationException {
+        return new StackObjectPoolFactory<Integer>(objectFactory);
     }
 
     public void testConstructors() throws Exception {
-        StackObjectPoolFactory factory = new StackObjectPoolFactory();
+        StackObjectPoolFactory<Integer> factory = new StackObjectPoolFactory<Integer>();
         factory.createPool().close();
 
         
-        factory = new StackObjectPoolFactory(1);
-        StackObjectPool pool = (StackObjectPool)factory.createPool();
+        factory = new StackObjectPoolFactory<Integer>(1);
+        StackObjectPool<Integer> pool = (StackObjectPool<Integer>)factory.createPool();
         pool.close();
 
 
-        factory = new StackObjectPoolFactory(1, 1);
-        pool = (StackObjectPool)factory.createPool();
+        factory = new StackObjectPoolFactory<Integer>(1, 1);
+        pool = (StackObjectPool<Integer>)factory.createPool();
         pool.close();
 
 
-        factory = new StackObjectPoolFactory(new MethodCallPoolableObjectFactory(), 1);
-        pool = (StackObjectPool)factory.createPool();
-        Object a = pool.borrowObject();
-        Object b = pool.borrowObject();
+        factory = new StackObjectPoolFactory<Integer>(new MethodCallPoolableObjectFactory(),
1);
+        pool = (StackObjectPool<Integer>)factory.createPool();
+        Integer a = pool.borrowObject();
+        Integer b = pool.borrowObject();
         pool.returnObject(a);
         pool.returnObject(b);
         assertEquals(1, pool.getNumIdle());

Modified: commons/proper/pool/branches/POOL_1_X/src/test/org/apache/commons/pool/performance/PerformanceTest.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/branches/POOL_1_X/src/test/org/apache/commons/pool/performance/PerformanceTest.java?rev=1221705&r1=1221704&r2=1221705&view=diff
==============================================================================
--- commons/proper/pool/branches/POOL_1_X/src/test/org/apache/commons/pool/performance/PerformanceTest.java
(original)
+++ commons/proper/pool/branches/POOL_1_X/src/test/org/apache/commons/pool/performance/PerformanceTest.java
Wed Dec 21 13:03:54 2011
@@ -29,7 +29,7 @@ public class PerformanceTest {
     private int logLevel = 0;
     private int nrIterations = 5;
 
-    private GenericObjectPool pool;
+    private GenericObjectPool<Integer> pool;
     private boolean start = false;
     private volatile int waiting = 0;
     private volatile int complete = 0;
@@ -62,7 +62,7 @@ public class PerformanceTest {
                     System.out.println(name + "   waiting: " + waiting + "   complete: "
+ complete);
                 }
                 long bbegin = System.currentTimeMillis();
-                Object o = pool.borrowObject();
+                Integer o = pool.borrowObject();
                 long bend = System.currentTimeMillis();
                 waiting--;
                 do {
@@ -111,7 +111,7 @@ public class PerformanceTest {
         
         SleepingObjectFactory factory = new SleepingObjectFactory();
         if (logLevel >= 4) { factory.setDebug(true); } 
-        pool = new GenericObjectPool(factory);
+        pool = new GenericObjectPool<Integer>(factory);
         pool.setMaxActive(maxActive);
         pool.setMaxIdle(maxIdle);
         pool.setTestOnBorrow(true);

Modified: commons/proper/pool/branches/POOL_1_X/src/test/org/apache/commons/pool/performance/SleepingObjectFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/branches/POOL_1_X/src/test/org/apache/commons/pool/performance/SleepingObjectFactory.java?rev=1221705&r1=1221704&r2=1221705&view=diff
==============================================================================
--- commons/proper/pool/branches/POOL_1_X/src/test/org/apache/commons/pool/performance/SleepingObjectFactory.java
(original)
+++ commons/proper/pool/branches/POOL_1_X/src/test/org/apache/commons/pool/performance/SleepingObjectFactory.java
Wed Dec 21 13:03:54 2011
@@ -25,35 +25,35 @@ import org.apache.commons.pool.PoolableO
  * @author Dirk Verbeeck
  * @version $Revision$ $Date$ 
  */
-public class SleepingObjectFactory implements PoolableObjectFactory {
+public class SleepingObjectFactory implements PoolableObjectFactory<Integer> {
 
     private int counter = 0;
     private boolean debug = false;
 
-    public Object makeObject() throws Exception {
-        Object obj = new Integer(counter++);
+    public Integer makeObject() throws Exception {
+        Integer obj = new Integer(counter++);
         debug("makeObject", obj);
         sleep(500);
         return obj;
     }
 
-    public void destroyObject(Object obj) throws Exception {
+    public void destroyObject(Integer obj) throws Exception {
         debug("destroyObject", obj);
         sleep(250);
     }
 
-    public boolean validateObject(Object obj) {
+    public boolean validateObject(Integer obj) {
         debug("validateObject", obj);
         sleep(30);
         return true;
     }
 
-    public void activateObject(Object obj) throws Exception {
+    public void activateObject(Integer obj) throws Exception {
         debug("activateObject", obj);
         sleep(10);
     }
 
-    public void passivateObject(Object obj) throws Exception {
+    public void passivateObject(Integer obj) throws Exception {
         debug("passivateObject", obj);
         sleep(10);
     }



Mime
View raw message