09-20-05 11:06 PM
The problem has indeed come up before, and the "defer database updates
until end of transaction" mode is (intended to be) the solution. With
that mode enabled, your DB remove operations will still occur in the
same transaction as the other operations, but will be performed last,
after your other operations to null out the references have been
processed. Unless I'm misunderstanding your scenario (let me know if
that is the case), that should be what's needed to solve the problem.
Note, I'm assuming that your ejbRemove() method isn't performing any
database operations directly, which it shouldn't be when using
container-managed persistence.
c_koell wrote:
> Ok this could be a solution ..
> But has nobody had this problem before ?
>
> I want to remove from a client Table the foreign-Key relation from the Par
ent Table and in the same transaction
> delete the parent Table entry. A other solution for me could be to delete
the parent table entry in a later transaction after the container has stored
the client table entry with the new foreign key value.
>
> But then i lost the transaction atomic ..
>
> Maybe is there anybody out who had this problem to ??
> Thanks
> Claus
>
[ Post a follow-up to this message ]
|