This content has been marked as final.
Show 3 replies
-
1. Re: How to Run a long Period thread that use entityManager without loosing transaction or how to not use tranction and obtain db access from it
lvdberg Oct 15, 2010 10:29 AM (in response to assem)Hi,
This question was answered numerous times already, sop please search in previous threads. The answer is that you must make the transaction timeout of your container longer. With JBoss this is done in the file transaction-jboss-beans.xml
Leo
-
2. Re: How to Run a long Period thread that use entityManager without loosing transaction or how to not use tranction and obtain db access from it
bravocharlie.seam.signup.benny.me.uk Oct 15, 2010 12:59 PM (in response to assem)Or alternatively if you can (depends what the processing is), do your work in the @Asynchronous method (but with no transaction REQUIRED set), and call another method with REQUIRED when you need to use a transaction.
(beware if your REQUIRED method is in the same class you'll have to use Component.getInstance to get a proxy to the class so the transaction interceptors can do their magic)
-
3. Re: How to Run a long Period thread that use entityManager without loosing transaction or how to not use tranction and obtain db access from it
assem Oct 18, 2010 7:19 AM (in response to assem)thank you so much!!
have a sweet day!!