[jboss-user] [EJB/JBoss] - Re: Flushing CMP 2.0 EntityBean updates before end of transa

srikap2007 do-not-reply at jboss.com
Sat Aug 25 11:10:03 EDT 2007


Hi Ram,
            Entity Bean is in memory, so you are seeing your updates. And JDBC is reading from database so you are not seeing your updates. EJBFind is returning reference to the bean in memory. Anyway, if you want to see the results from session bean, then you should force entity bean (its like cache/buffer) to commit. That you can do by calling entity bean method with in a transaction (thats the only way ejbStore is guaranteed to call). 

Or you can implement SessionSynchronization interface in your sessionBean. Then you can listen to Beforecommit event. Thats a different approach but more right approach to achieve what you are trying to do.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4078028#4078028

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4078028



More information about the jboss-user mailing list