[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: Efficient concurrent insert and unique constraint
do-not-reply at jboss.com
Tue May 20 06:21:08 EDT 2008
I tried to find a word-around to my problem and found a deprecated way to access a JDBC connection with Session.connection(); and do my error checking there.
I've read that in the future a Worker API will be available via Session.doWork(Work w) and I could gain access to the current JDBC Connection object.
I've prepared my code to handle this but for now I still use the deprecated Session.connection().
My question is : can I rely on this? Will a catched SQLException thrown within a doWork() will rollback my current transaction?
If no, is there any design pattern to make a concurrent safe "find or create" entity with hibernate?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4151951#4151951
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4151951
More information about the jboss-user