In this case ejbStore() should be called after setPrice() method.
Did it so happen that it was not called??Did you verify??
It will be synchronised immly.
Thanks,
Ramki.
----- Original Message -----
From: Heiko Gottschling <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, January 05, 2001 5:03 PM
Subject: Entity Bean / database synchronization issues
| Hi,
|
| as I understand the specification, it is up to the container to synchronize
| existing entity bean instances with the DB, i.e. the bean developer must not
| make any assumptions as to when the ejbStore() / ejbLoad() methods are called.
|
| If this is the case, how is consistency preserved if the tables associated
| with the enitity bean is accessed "behind the bean's back"? Imagine something
| like this:
|
| orderItem.setPrice(100.00);
| statement.execute("SELECT SUM(price) FROM OrderItem WHERE OrderID=1234");
|
| Here the price column of an OrderItem record (represented by an entity bean)
| is updated and the table is queried immediately after. For this to work, the
| entity bean must have been written to the database before the execution of
| the SELECT statement. How is data integrity guaranteed in this case?
|
| thx
| Heiko
|
| ===========================================================================
| 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".
|
|
===========================================================================
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".