PQ72821: REMOVE EJB METHOD CAUSES FOREIGN KEYS TO BE NULLED. | |||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||
![]() APAR status Closed as program error. Error description CUSTOMER CONTACT: JeongRan Lee PROBLEM: 2 EJBs (B & C) reference the primary key of a third ejb (A) as a foreign keys in their tables. In WAS 4.04, calling remove() on ejb A causes the foreign key fields in tables for B & C to be set to NULL.Local fix No WorkAround exists.Problem summary **************************************************************** * USERS AFFECTED: WebSphere Application Server user who calls * * remove method on an entity bean that uses * * foreign keys relationship to other table(s) * * may be affected. * **************************************************************** * PROBLEM DESCRIPTION: When an entity bean uses bottom-up * * schema map to establish relationships * * between 2 or more tables using foreign * * keys, invoking the remove method on * * the entity bean will fail as expected * * but the foreign key field in some of * * the table is nulled out that caused * * data corruption problem. * **************************************************************** * RECOMMENDATION: * **************************************************************** During the remove processing, the underlining database operation detects that the remove is invalid and subsequently throws an SQL exception. The EJB container intercepted the exeption and simply rethrew the exception. This leaves the transaction open even though the remove is rejected. Consequently, the transaction is committed that caused the changes of the foreign key field in the other table(s) to be committed.Problem conclusion The solution of this problem is to mark the SQL exception processed by the EJB container as an unchecked exception. An unchecked exception semantics will log the exception and finally rollback the transaction. This will avoid the data corruption of the foreign key in the other tables to occur.Temporary fix Customer has already verified the efix works for them.Comments
APAR is sysrouted FROM one or more of the following: PQ68515 APAR is sysrouted TO one or more of the following: Modules/Macros
Publications Referenced
|
Product categories: Software > Application Servers >
Distributed Application & Web Servers > WebSphere Application
Server > General
Operating system(s):
Software version: 00W
Software edition:
Reference #: PQ72821
IBM Group: Software Group
Modified date: Apr 3, 2003
(C) Copyright IBM Corporation 2000, 2008. All Rights Reserved.