geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cjbly...@apache.org
Subject svn commit: r508536 - in /geronimo/daytrader/branches/1.2/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader: direct/TradeDirect.java ejb/TradeBean.java
Date Fri, 16 Feb 2007 19:05:16 GMT
Author: cjblythe
Date: Fri Feb 16 11:05:15 2007
New Revision: 508536

URL: http://svn.apache.org/viewvc?view=rev&rev=508536
Log:
DAYTRADER-33 Close JMS connections/sessions in TradeDirect and TradeBean

Modified:
    geronimo/daytrader/branches/1.2/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/direct/TradeDirect.java
    geronimo/daytrader/branches/1.2/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb/TradeBean.java

Modified: geronimo/daytrader/branches/1.2/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/direct/TradeDirect.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/branches/1.2/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/direct/TradeDirect.java?view=diff&rev=508536&r1=508535&r2=508536
==============================================================================
--- geronimo/daytrader/branches/1.2/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/direct/TradeDirect.java
(original)
+++ geronimo/daytrader/branches/1.2/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/direct/TradeDirect.java
Fri Feb 16 11:05:15 2007
@@ -409,8 +409,10 @@
 		
 		finally
 		{
-			if (sess != null)
+			if (sess != null)	
 				sess.close();
+			if (conn != null)
+				conn.close();
 		}
 	}
 
@@ -1483,10 +1485,10 @@
 		
 		finally
 		{
-			if (conn != null)
-				conn.close();
 			if (sess != null)	
-				sess.close();					
+				sess.close();
+			if (conn != null)
+				conn.close();					
 		}	
 	}		
 

Modified: geronimo/daytrader/branches/1.2/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb/TradeBean.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/branches/1.2/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb/TradeBean.java?view=diff&rev=508536&r1=508535&r2=508536
==============================================================================
--- geronimo/daytrader/branches/1.2/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb/TradeBean.java
(original)
+++ geronimo/daytrader/branches/1.2/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb/TradeBean.java
Fri Feb 16 11:05:15 2007
@@ -79,10 +79,10 @@
 		}
 		
 		finally {
-			if (conn != null )
-				conn.close();
 			if (sess != null)
 				sess.close();
+			if (conn != null )
+				conn.close();
 		}
 	}
 	
@@ -312,10 +312,10 @@
 		}	
 		finally {	
             try{
-			if (conn != null)
-				conn.close();	
-			if (sess != null)
-			sess.close();		
+            	if (sess != null)
+        		sess.close();
+            	if (conn != null)
+    			conn.close();	
             }catch (Exception e){
                 throw new RemoteException(e.getMessage(),e); // pass the exception back
             }



Mime
View raw message