Hi,
I had faced a similar problem, in my application I was doing huge insertion/updates on entities.The insertion/update was done in a complex logical CPU intensive block.
Troubleshooting.
1) Check if you are calling a Transaction with AttributeType.REQUIRES_NEW from existing Transaction( This causes lot of pagination, I believe Container tries to serialize the existing managed object, before it enters new transaction).
2)Use jconsole.exe (located in JDK) to monitor statics of you JVM. Transaction take infinite time if Heap Memory utilization is very high)
3) Try to create a map of managed objects instead of doing a lookup from entityManger.This should reduce trips to DB.
regards
Suyog
[Message sent by forum member 'suyogbarve' (suyogbarve)]
http://forums.java.net/jive/thread.jspa?messageID=338265