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
 

 

Reply via email to