[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: EntityManager.flush not flushing

DaHunter do-not-reply at jboss.com
Thu Aug 9 16:15:03 EDT 2007

I did find a work around to this.  It seems that any method that referenced the EntityManager had to be in a transaction, and the whole method had to complete before the commits occured.

To work around it I removed all references to the EntityManager from my session bean with the timer and set my long running (looping) method so that it doesn't support transactions.

I then created another bean that performs the actual database writes.  I then called those methods that write to the database from within the long running (looping) method.

It seems like a lot of overhead to require this to be done in different beans, but it did work.


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

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

More information about the jboss-user mailing list