I think I need to be give specific imformation to how I arrived at the problem.

I have a few tables in postgres which I am accessing using entity beans. Some 
of these tables contain basic information like user names, password etc. The 
other tables have columns which have id's from these tables as foreign keys. 

When the JBoss server is running, I am getting the following error in the jboss 
log:


  | 2006-01-27 16:00:05,914 ERROR [org.hibernate.util.JDBCExceptionReporter] 
ERROR: deadlock detected
  | 2006-01-27 16:00:05,914 ERROR 
[org.hibernate.event.def.AbstractFlushingEventListener] Could not synchronize 
database state with session
  | org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch 
update
  | 

and in the database I am getting the error:


  | CONTEXT:  SQL statement "SELECT 1 FROM ONLY "public"."name" x WHERE "id" = 
$1 FOR UPDATE OF x"
  | ERROR:  deadlock detected
  | DETAIL:  Process 3177 waits for ShareLock on transaction 9349151; blocked 
by process 3175.
  |         Process 3175 waits for ShareLock on transaction 9349149; blocked by 
process 3177.
  | 

These transactions succedd if I send them again (as one expects).

The problem is that the transactions which are throwing this error are not 
updating the name table. I just want to use a simple select query instead of a 
"select _____ for update of __" query.

If I remove the foreign key constraint for name, I do not get these errors.

This led me to thinking that having read-only entity beans for basic objects 
like name might solve the problem.

Thanks

ducky

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

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


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to