jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cko...@apache.org
Subject svn commit: r749622 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/XASessionImpl.java
Date Tue, 03 Mar 2009 14:46:25 GMT
Author: ckoell
Date: Tue Mar  3 14:46:24 2009
New Revision: 749622

URL: http://svn.apache.org/viewvc?rev=749622&view=rev
Log:
JCR-2002 Support system property to define the DefaultTransactionTimeout for a XASession

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/XASessionImpl.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/XASessionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/XASessionImpl.java?rev=749622&r1=749621&r2=749622&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/XASessionImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/XASessionImpl.java
Tue Mar  3 14:46:24 2009
@@ -56,9 +56,16 @@
     private static final Map txGlobal = Collections.synchronizedMap(new HashMap());
 
     /**
+     * System property specifying the default Transaction Timeout
+     */
+    public static final String SYSTEM_PROPERTY_DEFAULT_TRANSACTION_TIMEOUT = "org.apache.jackrabbit.core.defaultTransactionTimeout";
+
+    /**
      * Default transaction timeout, in seconds.
+     * Either it is specified by the System Property {@link XASessionImpl#SYSTEM_PROPERTY_DEFAULT_TRANSACTION_TIMEOUT}
or
+     * it is per default 5 seconds if it is not set by the TransactionManager at runtime
      */
-    private static final int DEFAULT_TX_TIMEOUT = 5;
+    private static final int DEFAULT_TX_TIMEOUT = Integer.parseInt(System.getProperty(SYSTEM_PROPERTY_DEFAULT_TRANSACTION_TIMEOUT,
"5"));
 
     /**
      * Currently associated transaction



Mime
View raw message