[jboss-cvs] JBoss Messaging SVN: r3064 - trunk/src/main/org/jboss/messaging/core/impl.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Aug 28 14:22:39 EDT 2007
Author: clebert.suconic at jboss.com
Date: 2007-08-28 14:22:39 -0400 (Tue, 28 Aug 2007)
New Revision: 3064
Modified:
trunk/src/main/org/jboss/messaging/core/impl/JDBCPersistenceManager.java
Log:
Fix on oracle
Modified: trunk/src/main/org/jboss/messaging/core/impl/JDBCPersistenceManager.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/impl/JDBCPersistenceManager.java 2007-08-28 04:15:15 UTC (rev 3063)
+++ trunk/src/main/org/jboss/messaging/core/impl/JDBCPersistenceManager.java 2007-08-28 18:22:39 UTC (rev 3064)
@@ -595,11 +595,19 @@
}
catch (SQLException e)
{
- log.warn("An exception happened while storing message (probably a duplicated key)", e);
+ rows = 0;
+ // According to docs and tests, this will be aways the same on duplicated index
+ // Per XOpen documentation
+ if (e.getSQLState().equals("23000"))
+ {
+ log.debug("Message was already stored, just ignoring the exception - " + e.toString());
+ }
+ else
+ {
+ throw e;
+ }
}
- m.setPersisted(true);
-
if (trace) { log.trace("Inserted " + rows + " rows"); }
}
More information about the jboss-cvs-commits
mailing list