geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cjbly...@apache.org
Subject svn commit: r509337 - in /geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader: direct/TradeDirect.java ejb/TradeBean.java
Date Mon, 19 Feb 2007 21:19:08 GMT
Author: cjblythe
Date: Mon Feb 19 13:19:07 2007
New Revision: 509337

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

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

Modified: geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/direct/TradeDirect.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/direct/TradeDirect.java?view=diff&rev=509337&r1=509336&r2=509337
==============================================================================
--- geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/direct/TradeDirect.java
(original)
+++ geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/direct/TradeDirect.java
Mon Feb 19 13:19:07 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/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb/TradeBean.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb/TradeBean.java?view=diff&rev=509337&r1=509336&r2=509337
==============================================================================
--- geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb/TradeBean.java
(original)
+++ geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb/TradeBean.java
Mon Feb 19 13:19:07 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