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
Id=257, GlobalId=penpc09//1665, BranchQual=] timed out. status=STATUS_ACTIVE
how can I control the transaction timeout?
Go to jboss-3.0.3\server\default\conf\jboss-service.xml
and search the tag
then change the value 300 for what ever you want.
300 = 5 minutes
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.