-
1. Re: Concurrency problem with entityManager.flush()?
marcio.dantas Mar 18, 2011 4:59 PM (in response to thiagosil)Who's managing you're transactions?
The table or rows getting locked means that the transactions are not commiting.Maybe you're having deadlocks issues..
What's your database? MS-SQL-Server 2000? -
2. Re: Concurrency problem with entityManager.flush()?
thiagosil Mar 22, 2011 12:59 PM (in response to thiagosil)We are not explicitly managing the transactions, so i guess Seam is doing it.
The database is oracle 10g. I'm trying to figure out why the transactions are not committing,
but i have no clue. -
3. Re: Concurrency problem with entityManager.flush()?
lvdberg Mar 22, 2011 3:53 PM (in response to thiagosil)Hi,
You should try it in another scope and inject the entityManager the
normal
way. Try something like this:@Name("collectorObserver" public class DataCollectorManager { @In EntityManager em; @Observer(CollectorConstants.ACCESS, create= true) @Transactional public void collectAccess(YourObjectYouWantSaved o) { em.merge(o); em.flush(); } }
You just raise an event with the right parameter and that's all there is.
Leo
-
4. Re: Concurrency problem with entityManager.flush()?
marcio.dantas Mar 23, 2011 3:30 PM (in response to thiagosil)Seam uses some default transactions during request life cycle, but i think you should not be counting on them.
Use Seam'sannotated transactions
like on the code above.In fact, maybe you should do a test turning off Seam's DFAULT transaction management.
You're able to do it without hurting the annotated transactions.