Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to define transaction timeout

 
Bruno Collet
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I want to specify a transaction timeout on a per-method basis, but I can't find any relevant attribute in the jboss.xml for this.
Any help appreciated.
 
Matthias Germann
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Bruno,

Transaction timeouts can be set as described in http://www.jboss.org/j2ee/dtd/jboss_3_2.dtd.

<jboss>
<enterprise-beans>
<session>
...
<method-attributes>
<method>
<method-name>foo</method-name>
<transaction-timeout>1800</transaction-timeout>
</method>
....

Not every version of JBoss 3.2 supports transaction timeouts. I think that they are supported from version 3.2.4 on. To be sure, you have to look at the jboss_3_2.dtd which was shipped with your JBoss version.

Regards,
Matthias
 
Kiran Bandi
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using jboss3.2.5. In conf we have jboss-service.xml file which has some transaction settings. You may want to try tweaking it.

<mbean code="org.jboss.tm.TransactionManagerService"
name="jboss:service=TransactionManager"
xmbean-dd="resource:xmdesc/TransactionManagerService-xmbean.xml">
<attribute name="TransactionTimeout">300</attribute>
<depends optional-attribute-name="XidFactory">jboss:service=XidFactory</depends>
</mbean>

I have not tried jboss 3.2.4.
Good Luck :-)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic