Hi Rick,

The EJB spec says that once the entity bean is loaded from the database,
the container (Orion) doesn't have any responsibility to keep track of any
possible changes to the database.  So what you are doing is basically
sneaking behind Orion's back.

The consequences of this depend on the circumstances, I believe.  Here's my
best guess ...

Suppose the server had not been busy for quite a while.  Under these
conditions Orion would have written all its entity beans back to the DB and
removed them from memory. If you now empty the DB, then all the entity
beans are gone (in the sense that trying to find one from its primary key
will fail).

If the server is extremely busy when you emtied the DB, then all the entity
beans may well have been in memory, and they will get recreated in the DB
when Orion writes them out.

Hope that helps.

Nick Newman, SCIENTECH

At 04:14 PM 7/20/00 -0400, you wrote:
>If I have entity beans associated with a table in a database, 
>and I delete all the records in the database outside of 
>the application server, ( .ie using the database command
>interactive SQL program ) what happens to the entity beans. ?
>
>When I try to recreate a record that I erased outside of
>the application server, I am told that the entity already 
>exists.
>
>Thanks.
>


Reply via email to