Rubens Gomes wrote:
> I posted this question awhile ago, but no reasonable answer
> was given yet. This has to do with the database doing "ON
> DELETE CASCADE" on database child records.
>
> If a direct delete occurs on the database, the EJB 1.1 spec
> says that the corresponding bean should be removed from the
> container. But how can this be done ? The database does
> not notify the container if a record was deleted.
If there is a possibility of DB updates from other sources (either a
non-Java app or a fava app in another JVM) the container must not cache
entities. Hence the deletion will be detected by the find.
The whole idea of optimisation by caching in the JVM to avoid DB access and
(re)construction of objects from data is somewhat suspect. It can and will
be done but it only works in special cases where there is a clean
relationship between database rows and EBs and is fundamentally
non-scaleable to multiple JVMs and clusered systems.
Ian McCallion
CICS Business Unit
IBM Hursley
[EMAIL PROTECTED]
Tel: ++44-1962-818065
Fax: ++44-1962-818069
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".