I have a stateless session bean on JBoss,I set transaction as "required".when it call a big stored procedure on database,I got warning:
11:24:00,120 WARN [TransactionImpl] Transaction TransactionImpl:XidImpl
[Format
Id=257, GlobalId=penpc09//1665, BranchQual=] timed out. status=STATUS_ACTIVE
how can I control the transaction timeout?
-
transaction timeout (2 messages)
- Posted by: zhang zhang
- Posted on: March 16 2004 11:46 EST
Threaded Messages (2)
- TransactionTimeout in jboss-service.xml by Airam Odner on March 18 2005 13:08 EST
- TransactionTimeout in jboss-service.xml by Andre Fernandes on March 18 2005 13:47 EST
-
TransactionTimeout in jboss-service.xml[ Go to top ]
- Posted by: Airam Odner
- Posted on: March 18 2005 13:08 EST
- in response to zhang zhang
Go to jboss-3.0.3\server\default\conf\jboss-service.xml
and search the tag
<attribute name="TransactionTimeout">300</attribute>
then change the value 300 for what ever you want.
300 = 5 minutes
Good luck -
TransactionTimeout in jboss-service.xml[ Go to top ]
- Posted by: Andre Fernandes
- Posted on: March 18 2005 13:47 EST
- in response to Airam Odner
Anyway, it is a bad idea to have a transaction that long. Most DBAs will set timeout thresholds on the database that will, of course, ignore whatever settings you do in JBoss.
You should try another approach to your problem. If you are doing a long update, perhaps you could do it from a simple stand-alone batch application. If you really need to run it inside the application server, maybe you could split the work in smaller pieces (each one of these could be transactional).
Remember that even if you'd like the whole execution (one big huge update to thousands of lines) to go in a single transaction it might be simply impossible - mostly because of DB restrictions.