[transactions] Weblogic Transaction Timeout : how to set in admin console in WebLogic AS 8.1

I face the following exception:
weblogic.transaction.internal.TimedOutException: Transaction timed out after 300 seconds

this is set within the Stateless Session EJB Bean as javax.transaction.UserTransaction jtaTransaction.setTransactionTimeout(300) but I cannot figure out, where in the application console to set this property.

This question is related to transactions weblogic

The answer is


If you don't want to change the domain-wide default timeout, your best option is to change the deployment descriptor by setting the trans-timeout-seconds attribute in the weblogic-ejb-jar.xml - see http://docs.oracle.com/cd/E11035_01/wls100/jta/trxejb.html

This overrides the "Timeout Seconds" default, only for this specific EJB, while leaving all other EJB unaffected.


Its possible at application level. Click on the EJB under the deployment(like Home > >Summary of Deployments >). Click on the Configuration tab and there is "Transaction Timeout:"


Had the same problem, thanks mikej.

In WLS 10.3 this configuration can be found in Services > JTA menu, or if you click on the domain name (first item in the menu) - on the Configuration > JTA tabs.

alt text


In Weblogic 9.2 the configuration via console is as follows:

enter image description here

I believe the default value was 60. Remember to use Release Configuration button after you edit the field.


The link above is rather outdated. For WebLogic 12c you may define the transaction timout in a transaction-descriptor for each EJB in the WebLogic deployment descriptor weblogic-ejb-jar.xml, see weblogic-ejb-jar.xml Deployment Descriptor Reference.

For a message driven been it looks like this:

<weblogic-enterprise-bean>
    <ejb-name>TestMessageBeanLow</ejb-name>
    <message-driven-descriptor>
        <pool>
            <max-beans-in-free-pool>1</max-beans-in-free-pool>
        </pool>
        <destination-jndi-name>jms/ActiveMQ/TestRequestQueue_LOW</destination-jndi-name>
        <connection-factory-jndi-name>jms/ActiveMQ/TestConnectionFactory</connection-factory-jndi-name>
    </message-driven-descriptor>
    <transaction-descriptor>
        <trans-timeout-seconds>60</trans-timeout-seconds>
    </transaction-descriptor>
    <resource-description>
        <res-ref-name>jms/ConnectionFactory</res-ref-name>
        <jndi-name>jms/ActiveMQ/TestConnectionFactory</jndi-name>
    </resource-description>
</weblogic-enterprise-bean>