geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r801468 - in /geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1: ./ geronimo-connector/ geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/ geronimo-transaction/
Date Wed, 05 Aug 2009 23:38:58 GMT
Author: djencks
Date: Wed Aug  5 23:38:57 2009
New Revision: 801468

URL: http://svn.apache.org/viewvc?rev=801468&view=rev
Log:
GERONIMO-4786 possible fix for multiple connections entering user tx.  Also upgrade to genesis
2

Modified:
    geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/pom.xml
    geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/TransactionCachingInterceptor.java
    geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-transaction/pom.xml
    geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/pom.xml

Modified: geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/pom.xml?rev=801468&r1=801467&r2=801468&view=diff
==============================================================================
--- geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/pom.xml
(original)
+++ geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/pom.xml
Wed Aug  5 23:38:57 2009
@@ -53,6 +53,13 @@
             <groupId>org.apache.geronimo.specs</groupId>
             <artifactId>geronimo-j2ee-connector_1.5_spec</artifactId>
         </dependency>
+
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+        
     </dependencies>
 
 </project>

Modified: geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/TransactionCachingInterceptor.java
URL: http://svn.apache.org/viewvc/geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/TransactionCachingInterceptor.java?rev=801468&r1=801467&r2=801468&view=diff
==============================================================================
--- geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/TransactionCachingInterceptor.java
(original)
+++ geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/main/java/org/apache/geronimo/connector/outbound/TransactionCachingInterceptor.java
Wed Aug  5 23:38:57 2009
@@ -77,18 +77,23 @@
             } else {
                 ManagedConnectionInfo managedConnectionInfo = managedConnectionInfos.getShared();
                 if (managedConnectionInfo != null) {
-                    connectionInfo.setManagedConnectionInfo(managedConnectionInfo);
-                    //return;
-                    if (log.isTraceEnabled()) {
-                        log.trace(
-                                "supplying connection from tx cache " + connectionInfo.getConnectionHandle()
+ " for managed connection " + connectionInfo.getManagedConnectionInfo().getManagedConnection()
+ " to tx caching interceptor " + this);
+                    ManagedConnectionInfo previousMci = connectionInfo.getManagedConnectionInfo();
+                    if (previousMci != null && previousMci != managedConnectionInfo
&& previousMci.getManagedConnection() != null) {
+                        //This might occur if more than one connection were obtained before
a UserTransaction were started.
+                        managedConnectionInfos.addUnshared(previousMci);
+                    } else {
+                        connectionInfo.setManagedConnectionInfo(managedConnectionInfo);
+
+                        //return;
+                        if (log.isTraceEnabled()) {
+                            log.trace("supplying connection from tx cache " + connectionInfo.getConnectionHandle()
+ " for managed connection " + connectionInfo.getManagedConnectionInfo().getManagedConnection()
+ " to tx caching interceptor " + this);
+                        }
                     }
                 } else {
                     next.getConnection(connectionInfo);
                     managedConnectionInfos.setShared(connectionInfo.getManagedConnectionInfo());
                     if (log.isTraceEnabled()) {
-                        log.trace(
-                                "supplying connection from pool " + connectionInfo.getConnectionHandle()
+ " for managed connection " + connectionInfo.getManagedConnectionInfo().getManagedConnection()
+ " to tx caching interceptor " + this);
+                        log.trace("supplying connection from pool " + connectionInfo.getConnectionHandle()
+ " for managed connection " + connectionInfo.getManagedConnectionInfo().getManagedConnection()
+ " to tx caching interceptor " + this);
                     }
                 }
             }
@@ -112,8 +117,7 @@
             if (transaction != null) {
                 if (TxUtil.isActive(transaction)) {
                     if (log.isTraceEnabled()) {
-                        log.trace(
-                                "tx active, not returning connection" + connectionInfo.getConnectionHandle()
+ " for managed connection " + connectionInfo.getManagedConnectionInfo().getManagedConnection()
+ " to tx caching interceptor " + this);
+                        log.trace("tx active, not returning connection" + connectionInfo.getConnectionHandle()
+ " for managed connection " + connectionInfo.getManagedConnectionInfo().getManagedConnection()
+ " to tx caching interceptor " + this);
                     }
                     return;
                 }
@@ -137,16 +141,14 @@
     private void internalReturn(ConnectionInfo connectionInfo, ConnectionReturnAction connectionReturnAction)
{
         if (connectionInfo.getManagedConnectionInfo().hasConnectionHandles()) {
             if (log.isTraceEnabled()) {
-                log.trace(
-                        "not returning connection from tx cache (has handles) " + connectionInfo.getConnectionHandle()
+ " for managed connection " + connectionInfo.getManagedConnectionInfo().getManagedConnection()
+ " to tx caching interceptor " + this);
+                log.trace("not returning connection from tx cache (has handles) " + connectionInfo.getConnectionHandle()
+ " for managed connection " + connectionInfo.getManagedConnectionInfo().getManagedConnection()
+ " to tx caching interceptor " + this);
             }
             return;
         }
         //No transaction, no handles, we return it.
         next.returnConnection(connectionInfo, connectionReturnAction);
         if (log.isTraceEnabled()) {
-            log.trace(
-                    "completed return of connection through tx cache " + connectionInfo.getConnectionHandle()
+ " for MCI: " + connectionInfo.getManagedConnectionInfo() + " and MC " + connectionInfo.getManagedConnectionInfo().getManagedConnection()
+ " to tx caching interceptor " + this);
+            log.trace("completed return of connection through tx cache " + connectionInfo.getConnectionHandle()
+ " for MCI: " + connectionInfo.getManagedConnectionInfo() + " and MC " + connectionInfo.getManagedConnectionInfo().getManagedConnection()
+ " to tx caching interceptor " + this);
         }
     }
 

Modified: geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-transaction/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-transaction/pom.xml?rev=801468&r1=801467&r2=801468&view=diff
==============================================================================
--- geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-transaction/pom.xml
(original)
+++ geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-transaction/pom.xml
Wed Aug  5 23:38:57 2009
@@ -57,6 +57,13 @@
             <groupId>org.objectweb.howl</groupId>
             <artifactId>howl</artifactId>
         </dependency>
+
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+        
     </dependencies>
 
 </project>

Modified: geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/pom.xml?rev=801468&r1=801467&r2=801468&view=diff
==============================================================================
--- geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/pom.xml (original)
+++ geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/pom.xml Wed Aug 
5 23:38:57 2009
@@ -23,9 +23,9 @@
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
-        <groupId>org.apache.geronimo.genesis.config</groupId>
-        <artifactId>project-config</artifactId>
-        <version>1.5</version>
+        <groupId>org.apache.geronimo.genesis</groupId>
+        <artifactId>genesis-java5-flava</artifactId>
+        <version>2.0</version>
     </parent>
 
     <groupId>org.apache.geronimo.components</groupId>
@@ -107,37 +107,11 @@
     <build>
         <pluginManagement>
             <plugins>
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-enforcer-plugin</artifactId>
-                    <version>1.0-alpha-3</version>
-                </plugin>
-                
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-surefire-plugin</artifactId>
-                    <version>2.3</version>
-                    <configuration>
-                        <redirectTestOutputToFile>true</redirectTestOutputToFile>
-                    </configuration>
-                </plugin>
 
                 <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-install-plugin</artifactId>
-                    <version>2.2</version>
-                </plugin>
-                
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-jar-plugin</artifactId>
                     <version>2.1</version>
-                    <configuration>
-                        <archive>
-                            <!-- Do not include META-INF/maven to avoid long file problems
on windows -->
-                            <addMavenDescriptor>false</addMavenDescriptor>
-                        </archive>
-                    </configuration>
                     <executions>
                         <execution>
                             <goals>
@@ -149,55 +123,6 @@
                 </plugin>
             </plugins>
         </pluginManagement>
-
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-enforcer-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <phase>validate</phase>
-                        <goals>
-                            <goal>enforce</goal>
-                        </goals>
-                        <configuration>
-                            <rules>
-                                <!-- Allow any Java >= 1.5, but not 1.6 or above -->
-                                <requireJavaVersion>
-                                    <version>[1.5,1.6)</version>
-                                </requireJavaVersion>
-                                
-                                <!-- Allow any Maven >= 2.0.5 -->
-                                <requireMavenVersion>
-                                    <version>[2.0.5,)</version>
-                                </requireMavenVersion>
-                            </rules>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-            
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <version>2.0</version>
-                <configuration>
-                    <source>1.5</source>
-                    <target>1.5</target>
-                </configuration>
-            </plugin>
-
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-idea-plugin</artifactId>
-                <version>2.1</version>
-                <configuration>
-                    <jdkName>1.5</jdkName>
-                    <jdkLevel>1.5</jdkLevel>
-                    <linkModules>true</linkModules>
-                </configuration>
-            </plugin>
-        </plugins>
     </build>
 
 </project>



Mime
View raw message