To prevent these exceptions, designate the order in which entity beans update relational database tables by defining sequence groups for the beans.
Database exceptions resulting from foreign key conflicts, or deadlock when entity beans are configured for optimistic concurrency control
Exceptions resulting from foreign key conflicts, which signify
violations of database referential integrityA database referential integrity (RI) policy prescribes rules for how data is written to and deleted from the database tables to maintain relational consistency. Run-time requirements for managing bean persistence, however, can cause an EJB application to violate RI rules, which can cause database exceptions.Your EJB application is violating database RI if you see an exception message in your WAS trace or log file that is similar to one of the following messages (which were produced in an environment running DB2)
orThe insert or update value of the FOREIGN KEY table1.name_of_foreign_key_constraint is not equal to any value of the parent key of the parent table.A parent row cannot be deleted because the relationship table1.name_of_foreign_key_constraint is not equal to any value of the parent key of the parent table.
Use the sequence grouping feature to order bean persistence so that database deadlock is less likely to occur.Unsuccessful execution caused by deadlock or timeout.