The create should not have gotten as far as reported. jboss checks for a duplicate prior to the db operation. If there is a duplicate, jboss throws a DuplicateKeyException, a subclass of CreateException. It does this before it gets to point where the cited IllegalStateException exception could be raised. Is it possible that another client is concurrently attempting to create the record. Or that the record was deleted and jboss is not synchronized with the db after the delete and before the create?
Fred Loney Spirited Software, Inc. www.spiritedsw.com ----- Original Message ----- From: "Frank Morton" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, October 03, 2001 7:49 PM Subject: [JBoss-user] Shouldn't It Be CreateException > I'm using JBoss-2.4.1a_Tomcat-3.2.3.zip with mySQL. If I > attempt to create two beans with the same primary key, I > get back: > > java.rmi.ServerException: RemoteException occurred in server thread; nested > exception is: > javax.transaction.TransactionRolledbackException: INSERTING AN > ALREADY EXISTING BEAN, ID = test; nested exception is: > java.lang.IllegalStateException: INSERTING AN ALREADY EXISTING BEAN, > ID = test > > I was expecting a CreateException. Is this right and can I rely > on it with different datastores underneath to return the same > exception? > > Thanks. > > > > _______________________________________________ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user > _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
