activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1452979 - in /activemq/trunk/activemq-pool/src/main/java/org/apache/activemq/pool: JcaConnectionPool.java PooledConnectionFactory.java XaConnectionPool.java
Date Tue, 05 Mar 2013 20:19:51 GMT
Author: tabish
Date: Tue Mar  5 20:19:51 2013
New Revision: 1452979

URL: http://svn.apache.org/r1452979
Log:
fix for: https://issues.apache.org/jira/browse/AMQ-4360

Modified:
    activemq/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/JcaConnectionPool.java
    activemq/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/PooledConnectionFactory.java
    activemq/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/XaConnectionPool.java

Modified: activemq/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/JcaConnectionPool.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/JcaConnectionPool.java?rev=1452979&r1=1452978&r2=1452979&view=diff
==============================================================================
--- activemq/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/JcaConnectionPool.java
(original)
+++ activemq/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/JcaConnectionPool.java
Tue Mar  5 20:19:51 2013
@@ -21,25 +21,18 @@ import javax.transaction.xa.XAResource;
 
 import org.apache.activemq.ActiveMQConnection;
 import org.apache.activemq.ra.LocalAndXATransaction;
-import org.apache.commons.pool.ObjectPoolFactory;
 import org.apache.geronimo.transaction.manager.WrapperNamedXAResource;
 
 public class JcaConnectionPool extends XaConnectionPool {
 
-    private String name;
+    private final String name;
 
     public JcaConnectionPool(ActiveMQConnection connection, TransactionManager transactionManager,
String name) {
         super(connection, transactionManager);
         this.name = name;
     }
 
-    /**
-     * @deprecated
-     */
-    public JcaConnectionPool(ActiveMQConnection connection, ObjectPoolFactory poolFactory,
TransactionManager transactionManager, String name) {
-        this(connection, transactionManager, name);
-    }
-
+    @Override
     protected XAResource createXaResource(PooledSession session) throws JMSException {
         XAResource xares = new LocalAndXATransaction(session.getInternalSession().getTransactionContext());
         if (name != null) {
@@ -47,5 +40,4 @@ public class JcaConnectionPool extends X
         }
         return xares;
     }
-
 }

Modified: activemq/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/PooledConnectionFactory.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/PooledConnectionFactory.java?rev=1452979&r1=1452978&r2=1452979&view=diff
==============================================================================
--- activemq/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/PooledConnectionFactory.java
(original)
+++ activemq/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/PooledConnectionFactory.java
Tue Mar  5 20:19:51 2013
@@ -28,7 +28,6 @@ import org.apache.activemq.Service;
 import org.apache.activemq.util.JMSExceptionSupport;
 import org.apache.commons.pool.KeyedObjectPool;
 import org.apache.commons.pool.KeyedPoolableObjectFactory;
-import org.apache.commons.pool.ObjectPoolFactory;
 import org.apache.commons.pool.impl.GenericKeyedObjectPool;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -235,13 +234,6 @@ public class PooledConnectionFactory imp
         return new PooledConnection(connection);
     }
 
-    /**
-     * @deprecated
-     */
-    public ObjectPoolFactory<?> getPoolFactory() {
-        return null;
-    }
-
     protected ActiveMQConnection createConnection(ConnectionKey key) throws JMSException
{
         if (key.getUserName() == null && key.getPassword() == null) {
             return (ActiveMQConnection)connectionFactory.createConnection();
@@ -293,22 +285,6 @@ public class PooledConnectionFactory imp
     }
 
     /**
-     * @deprecated use {@link #getMaximumActiveSessionPerConnection()}
-     */
-    @Deprecated
-    public int getMaximumActive() {
-        return getMaximumActiveSessionPerConnection();
-    }
-
-    /**
-     * @deprecated use {@link #setMaximumActiveSessionPerConnection(int)}
-     */
-    @Deprecated
-    public void setMaximumActive(int maximumActive) {
-        setMaximumActiveSessionPerConnection(maximumActive);
-    }
-
-    /**
      * Returns the currently configured maximum number of sessions a pooled Connection will
      * create before it either blocks or throws an exception when a new session is requested,
      * depending on configuration.
@@ -480,12 +456,6 @@ public class PooledConnectionFactory imp
     }
 
     /**
-     * @deprecated
-     */
-    public void setPoolFactory(ObjectPoolFactory<?> factory) {
-    }
-
-    /**
      * Delegate that creates each instance of an ConnectionPool object.  Subclasses can override
      * this method to customize the type of connection pool returned.
      *

Modified: activemq/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/XaConnectionPool.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/XaConnectionPool.java?rev=1452979&r1=1452978&r2=1452979&view=diff
==============================================================================
--- activemq/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/XaConnectionPool.java
(original)
+++ activemq/trunk/activemq-pool/src/main/java/org/apache/activemq/pool/XaConnectionPool.java
Tue Mar  5 20:19:51 2013
@@ -25,7 +25,6 @@ import javax.transaction.TransactionMana
 import javax.transaction.xa.XAResource;
 
 import org.apache.activemq.ActiveMQConnection;
-import org.apache.commons.pool.ObjectPoolFactory;
 
 /**
  * An XA-aware connection pool.  When a session is created and an xa transaction is active,
@@ -35,20 +34,13 @@ import org.apache.commons.pool.ObjectPoo
  */
 public class XaConnectionPool extends ConnectionPool {
 
-    private TransactionManager transactionManager;
+    private final TransactionManager transactionManager;
 
     public XaConnectionPool(ActiveMQConnection connection, TransactionManager transactionManager)
{
         super(connection);
         this.transactionManager = transactionManager;
     }
 
-    /**
-     * @deprecated
-     */
-    public XaConnectionPool(ActiveMQConnection connection, ObjectPoolFactory poolFactory,
TransactionManager transactionManager) {
-        this(connection, transactionManager);
-    }
-
     @Override
     public Session createSession(boolean transacted, int ackMode) throws JMSException {
         try {
@@ -90,9 +82,11 @@ public class XaConnectionPool extends Co
             this.session = session;
         }
 
+        @Override
         public void beforeCompletion() {
         }
 
+        @Override
         public void afterCompletion(int status) {
             try {
                 // This will return session to the pool.



Mime
View raw message