aspose file tools*
The moose likes JBoss/WildFly and the fly likes How to define transaction timeout Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "How to define transaction timeout" Watch "How to define transaction timeout" New topic
Author

How to define transaction timeout

Bruno Collet
Ranch Hand

Joined: Jun 08, 2004
Posts: 40
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.


Bruno Collet<br /><a href="http://www.practicalsoftwarearchitect.com" target="_blank" rel="nofollow">www.practicalsoftwarearchitect.com</a><br />- The Paradox of Software Architecture: It is easy to make a complex architecture, but it is difficult to make a simple architecture.
Matthias Germann
Greenhorn

Joined: Nov 08, 2004
Posts: 1
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

Joined: Mar 04, 2003
Posts: 21
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 :-)


If you want to do it...DO IT!!<br />You can't cross a sea by staring at it!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to define transaction timeout