[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - 'no-select-before-insert'

GabrielBianco do-not-reply at jboss.com
Fri Jul 14 14:27:15 EDT 2006


I'm not sure if I should post this here or under "Installation, Configuration & Deployment" but it's related to CMP, so...

We found out that CMP instance creation is causing a pretty big perfomance loss... The cause is described in the wiki:
http://wiki.jboss.org/wiki/Wiki.jsp?page=CMPInstanceCreation

We tried 'no-select-before-insert' and it worked exactly as wiki entry says it would, with only one detail:

First, DuplicateKeyExceptions no longe occur. Instead we get CreateExceptions. That easy to deal with. But, before we can catch the CreateException, JBoss outputs the original exception (the one it got from the DB driver). Only after that it throws us a CreateException explaining that it was probably caused by a primary key violation...

We don't want this output at all, as it gives us a huge and hard to read stdout.log...

The undesired output is something like this:

anonymous wrote : 
  | 14:25:58,875 ERROR [EjbName] Failed to create instance.
  | java.sql.SQLException: [DBHOSTNAME]Violation of PRIMARY KEY constraint 'PK__TableName__2136E270'. Cannot insert duplicate key in object 'TableName'.
  |         at com.inet.tds.e.a(Unknown Source)
  |         ... 
  |         large stack trace
  |         ...
  | 

Is it possible to configure JBoss so it won't show certain exceptions?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3958178#3958178

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3958178



More information about the jboss-user mailing list