geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xuhaih...@apache.org
Subject svn commit: r1053001 - in /geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-1_6/src/main/java/org/apache/geronimo/connector/wrapper/outbound: GenericConnectionManagerGBean.java JCAConnectionFactoryImpl.java
Date Mon, 27 Dec 2010 05:51:41 GMT
Author: xuhaihong
Date: Mon Dec 27 05:51:41 2010
New Revision: 1053001

URL: http://svn.apache.org/viewvc?rev=1053001&view=rev
Log:
GERONIMO-5741 java.lang.ClassCastException at JCAConnectionFactoryImpl.getManagedConnectionFactoryInstance()
line: 64 (Patch from Shenhao Fang)

Modified:
    geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-1_6/src/main/java/org/apache/geronimo/connector/wrapper/outbound/GenericConnectionManagerGBean.java
    geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-1_6/src/main/java/org/apache/geronimo/connector/wrapper/outbound/JCAConnectionFactoryImpl.java

Modified: geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-1_6/src/main/java/org/apache/geronimo/connector/wrapper/outbound/GenericConnectionManagerGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-1_6/src/main/java/org/apache/geronimo/connector/wrapper/outbound/GenericConnectionManagerGBean.java?rev=1053001&r1=1053000&r2=1053001&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-1_6/src/main/java/org/apache/geronimo/connector/wrapper/outbound/GenericConnectionManagerGBean.java
(original)
+++ geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-1_6/src/main/java/org/apache/geronimo/connector/wrapper/outbound/GenericConnectionManagerGBean.java
Mon Dec 27 05:51:41 2010
@@ -46,6 +46,7 @@ import org.apache.geronimo.kernel.GBeanN
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.KernelRegistry;
 import org.apache.geronimo.kernel.proxy.ProxyManager;
+import org.apache.geronimo.management.geronimo.JCAManagedConnectionFactory;
 import org.apache.geronimo.naming.ResourceSource;
 import org.apache.geronimo.security.ContextManager;
 import org.apache.geronimo.transaction.manager.RecoverableTransactionManager;
@@ -62,6 +63,8 @@ public class GenericConnectionManagerGBe
     //externalizable format version
     private static final int VERSION = 1;
 
+    private ManagedConnectionFactoryWrapper managedConnectionFactoryWrapper;
+
     public GenericConnectionManagerGBean(@ParamAttribute(name="transactionSupport") TransactionSupport
transactionSupport,
                                          @ParamAttribute(name="pooling")PoolingSupport pooling,
                                          @ParamAttribute(name="containerManagedSecurity")boolean
containerManagedSecurity,
@@ -76,7 +79,7 @@ public class GenericConnectionManagerGBe
         super(transactionSupport, pooling, getSubjectSource(containerManagedSecurity), connectionTracker,
transactionManager, managedConnectionFactoryWrapper.getManagedConnectionFactory(), objectName,
classLoader);
         this.kernel = kernel;
         this.abstractName = abstractName;
-
+        this.managedConnectionFactoryWrapper = managedConnectionFactoryWrapper;
         doRecovery();
 
     }
@@ -85,6 +88,10 @@ public class GenericConnectionManagerGBe
         super();
     }
 
+    public JCAManagedConnectionFactory getJCAManagedConnectionFactory() {
+        return managedConnectionFactoryWrapper;
+    }
+
     public ConnectionManager getConnectionManager() {
         ConnectionManager unproxied = super.getConnectionManager();
         ProxyManager pm = kernel.getProxyManager();

Modified: geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-1_6/src/main/java/org/apache/geronimo/connector/wrapper/outbound/JCAConnectionFactoryImpl.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-1_6/src/main/java/org/apache/geronimo/connector/wrapper/outbound/JCAConnectionFactoryImpl.java?rev=1053001&r1=1053000&r2=1053001&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-1_6/src/main/java/org/apache/geronimo/connector/wrapper/outbound/JCAConnectionFactoryImpl.java
(original)
+++ geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-1_6/src/main/java/org/apache/geronimo/connector/wrapper/outbound/JCAConnectionFactoryImpl.java
Mon Dec 27 05:51:41 2010
@@ -56,12 +56,12 @@ public class JCAConnectionFactoryImpl im
 
     @Override
     public String getManagedConnectionFactory() {
-        return ((JCAManagedConnectionFactory)connectionManager.getManagedConnectionFactory()).getObjectName();
+        return getManagedConnectionFactoryInstance().getObjectName();
     }
 
     @Override
     public JCAManagedConnectionFactory getManagedConnectionFactoryInstance() {
-        return ((JCAManagedConnectionFactory)connectionManager.getManagedConnectionFactory());
+        return connectionManager.getJCAManagedConnectionFactory();
     }
 
     @Override



Mime
View raw message