geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hogst...@apache.org
Subject svn commit: r554959 - /geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/direct/TradeDirect.java
Date Tue, 10 Jul 2007 14:21:39 GMT
Author: hogstrom
Date: Tue Jul 10 07:21:38 2007
New Revision: 554959

URL: http://svn.apache.org/viewvc?view=rev&rev=554959
Log:
Added code to not throw exceptions when tables are dropped and not there

Modified:
    geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/direct/TradeDirect.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=554959&r1=554958&r2=554959
==============================================================================
--- 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
Tue Jul 10 07:21:38 2007
@@ -1798,8 +1798,11 @@
 				}
 				catch(SQLException ex) 
 				{
-                	Log.error("TradeDirect:recreateDBTables SQL Exception thrown on executing
the foll sql command: " + sqlBuffer[i], ex);
+					// Ignore DROP statements as tables won't always exist.
+					if (((String)sqlBuffer[i]).indexOf("DROP TABLE") < 0) { 
+                	    Log.error("TradeDirect:recreateDBTables SQL Exception thrown on executing
the foll sql command: " + sqlBuffer[i], ex);
                         out.println("<BR>SQL Exception thrown on executing the foll
sql command: <I>" + sqlBuffer[i] + "</I> . Check log for details.</BR>");
+					}
                 }
 			}
 			stmt.close();



Mime
View raw message