[jboss-cvs] JBossAS SVN: r57113 - trunk/connector/src/main/org/jboss/resource/adapter/jms/inflow

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sun Sep 24 03:02:57 EDT 2006


Author: weston.price at jboss.com
Date: 2006-09-24 03:02:57 -0400 (Sun, 24 Sep 2006)
New Revision: 57113

Modified:
   trunk/connector/src/main/org/jboss/resource/adapter/jms/inflow/JmsServerSession.java
   trunk/connector/src/main/org/jboss/resource/adapter/jms/inflow/JmsServerSessionPool.java
Log:
[JBAS-3631] Added missing branch to JMS/JCA adapter. 

Modified: trunk/connector/src/main/org/jboss/resource/adapter/jms/inflow/JmsServerSession.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/jms/inflow/JmsServerSession.java	2006-09-24 07:00:29 UTC (rev 57112)
+++ trunk/connector/src/main/org/jboss/resource/adapter/jms/inflow/JmsServerSession.java	2006-09-24 07:02:57 UTC (rev 57113)
@@ -476,6 +476,17 @@
                {
                   session.commit();
                }
+            
+            }else
+            {
+               tm.suspend();
+               
+               if (xaSession == null && pool.getActivation().isDeliveryTransacted())
+               {
+                  session.rollback();
+               }
+               
+               
             }
 
          }

Modified: trunk/connector/src/main/org/jboss/resource/adapter/jms/inflow/JmsServerSessionPool.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/jms/inflow/JmsServerSessionPool.java	2006-09-24 07:00:29 UTC (rev 57112)
+++ trunk/connector/src/main/org/jboss/resource/adapter/jms/inflow/JmsServerSessionPool.java	2006-09-24 07:02:57 UTC (rev 57113)
@@ -73,7 +73,8 @@
    
    /** The number of sessions */
    int sessionCount = 0;
-
+   
+   
    /**
     * Create a new session pool
     * 
@@ -119,6 +120,7 @@
          log.trace("getServerSession");
 
       ServerSession result = null;
+      
       try
       {
          synchronized (serverSessions)
@@ -126,13 +128,16 @@
             while (true)
             {
                int sessionsSize = serverSessions.size();
+               
                if (stopped)
                   throw new Exception("Cannot get a server session after the pool is stopped");
+               
                else if (sessionsSize > 0)
                {
                   result = (ServerSession) serverSessions.remove(sessionsSize-1);
                   break;
                }
+               
                else
                {
                   try




More information about the jboss-cvs-commits mailing list