WebSphere Application Server - Re: Entity ejbRemove, with Foreign Key Dependancies, in a Transaction

This is Interesting: Free IT Magazines  
Home > Archive > WebSphere Application Server > September 2005 > Re: Entity ejbRemove, with Foreign Key Dependancies, in a Transaction





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: Entity ejbRemove, with Foreign Key Dependancies, in a Transaction
Randy Schnier

2005-09-20, 6: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 Parent 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
>

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com