[jboss-cvs] JBoss Messaging SVN: r3026 - trunk/src/main/org/jboss/messaging/core/impl.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Aug 22 09:18:52 EDT 2007
Author: timfox
Date: 2007-08-22 09:18:52 -0400 (Wed, 22 Aug 2007)
New Revision: 3026
Modified:
trunk/src/main/org/jboss/messaging/core/impl/JDBCPersistenceManager.java
Log:
PersistenceManager interim commit5
Modified: trunk/src/main/org/jboss/messaging/core/impl/JDBCPersistenceManager.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/impl/JDBCPersistenceManager.java 2007-08-22 13:14:56 UTC (rev 3025)
+++ trunk/src/main/org/jboss/messaging/core/impl/JDBCPersistenceManager.java 2007-08-22 13:18:52 UTC (rev 3026)
@@ -1485,6 +1485,8 @@
PreparedStatement psReference = null;
PreparedStatement psInsertMessage = null;
PreparedStatement psUpdateReference = null;
+
+ List<Message> messagesStored = new ArrayList<Message>();
try
{
@@ -1531,6 +1533,8 @@
if (trace) { log.trace("Inserted " + rows + " rows"); }
m.setPersisted(true);
+
+ messagesStored.add(m);
}
}
}
@@ -1557,6 +1561,16 @@
return null;
}
+ catch (Exception e)
+ {
+ for (Iterator i = messagesStored.iterator(); i.hasNext(); )
+ {
+ Message msg = (Message)i.next();
+
+ msg.setPersisted(false);
+ }
+ throw e;
+ }
finally
{
closeStatement(psReference);
More information about the jboss-cvs-commits
mailing list