The method you use to change data in your bean is runned within a transaction (i quess). When this transactions ends it will be commited. And when it ends will depend on your settings of what transaction philosophy to use.

/Lennart

Damon Williams wrote:

 When using Entity Beans w/ container managed persistence, when does the actual committing of changes to the underlying database take place?   I thought it was whenever the data fields in the Bean object changed.  But, in my code I alter the Bean's data (after performing a findByPrimaryKey() ), and then do a SQL query to check the database - and the old data is still there.  The Bean is persistent - even after rebooting my machine the "new" data is there the next time I do a findByPrimaryKey() but what about the legacy system I am integrating with?  How will they know what the new data is if the database record has not changed! I could put an SQL UPDATE line in my Bean's ejbStore() method, but isn't that defeating the purpose of container-managed persistence? ---------------------------------------------------
Damon Williams
Simplified Telesys
Sun Certified Java Programmer
www.simpletel.com  
=========================================================================== 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".

Reply via email to