ode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From va...@apache.org
Subject [12/13] git commit: ODE-997: Throw an exception if an external datasource is configured but no JTA transaction manager is passed in (which is needed to let ODE do its work properly).
Date Fri, 23 Aug 2013 18:50:37 GMT
ODE-997: Throw an exception if an external datasource is configured but no JTA transaction
manager is passed in (which is needed to let ODE do its work properly).


Project: http://git-wip-us.apache.org/repos/asf/ode/repo
Commit: http://git-wip-us.apache.org/repos/asf/ode/commit/2368d4e6
Tree: http://git-wip-us.apache.org/repos/asf/ode/tree/2368d4e6
Diff: http://git-wip-us.apache.org/repos/asf/ode/diff/2368d4e6

Branch: refs/heads/ode-1.3.6.x
Commit: 2368d4e6393dd6341b9a83c9b628e5b5c239ea9a
Parents: 3bb3bfa
Author: Tammo van Lessen <tvanlessen@gmail.com>
Authored: Fri Aug 23 19:38:51 2013 +0200
Committer: Tammo van Lessen <tvanlessen@gmail.com>
Committed: Fri Aug 23 19:38:51 2013 +0200

----------------------------------------------------------------------
 axis2/src/main/java/org/apache/ode/axis2/ODEServer.java | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ode/blob/2368d4e6/axis2/src/main/java/org/apache/ode/axis2/ODEServer.java
----------------------------------------------------------------------
diff --git a/axis2/src/main/java/org/apache/ode/axis2/ODEServer.java b/axis2/src/main/java/org/apache/ode/axis2/ODEServer.java
index b5a198c..b164275 100644
--- a/axis2/src/main/java/org/apache/ode/axis2/ODEServer.java
+++ b/axis2/src/main/java/org/apache/ode/axis2/ODEServer.java
@@ -73,6 +73,7 @@ import org.apache.ode.bpel.intercept.MessageExchangeInterceptor;
 import org.apache.ode.bpel.memdao.BpelDAOConnectionFactoryImpl;
 import org.apache.ode.bpel.pmapi.InstanceManagement;
 import org.apache.ode.bpel.pmapi.ProcessManagement;
+import org.apache.ode.il.config.OdeConfigProperties;
 import org.apache.ode.il.dbutil.Database;
 import org.apache.ode.scheduler.simple.JdbcDelegate;
 import org.apache.ode.scheduler.simple.SimpleScheduler;
@@ -398,6 +399,11 @@ public class ODEServer {
 
     @SuppressWarnings("unchecked")
      private void initTxMgr() throws ServletException {
+        if (_odeConfig.getDbMode().equals(OdeConfigProperties.DatabaseMode.EXTERNAL) &&
+                _odeConfig.getTxFactoryClass().equals(OdeConfigProperties.DEFAULT_TX_FACTORY_CLASS_NAME))
{
+            throw new ServletException("No external transaction manager factory configured.
Please use the INTERNAL mode or configure an external transaction manager that is associated
with external datasource.");
+        }
+        
         String txFactoryName = _odeConfig.getTxFactoryClass();
         __log.debug("Initializing transaction manager using " + txFactoryName);
         try {


Mime
View raw message