You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ode.apache.org by bo...@apache.org on 2007/03/27 23:43:18 UTC
svn commit: r523095 - in /incubator/ode/trunk: ./ axis2-war/ axis2/
axis2/src/main/java/org/apache/ode/axis2/
axis2/src/main/java/org/apache/ode/axis2/util/ bpel-epr/
bpel-epr/src/main/java/org/apache/ode/il/
bpel-epr/src/main/java/org/apache/ode/il/co...
Author: boisvert
Date: Tue Mar 27 14:43:17 2007
New Revision: 523095
URL: http://svn.apache.org/viewvc?view=rev&rev=523095
Log:
-Switch from JOTM transaction manager to Geronimo transaction manager
-Switch from Minerva connection pool to Tranql connection pool
Added:
incubator/ode/trunk/bpel-epr/src/main/java/org/apache/ode/il/EmbeddedGeronimoFactory.java
Removed:
incubator/ode/trunk/axis2/src/main/java/org/apache/ode/axis2/util/JotmFactory.java
incubator/ode/trunk/minerva/
Modified:
incubator/ode/trunk/axis2-war/pom.xml
incubator/ode/trunk/axis2/pom.xml
incubator/ode/trunk/axis2/src/main/java/org/apache/ode/axis2/Messages.java
incubator/ode/trunk/bpel-epr/pom.xml
incubator/ode/trunk/bpel-epr/src/main/java/org/apache/ode/il/config/OdeConfigProperties.java
incubator/ode/trunk/bpel-epr/src/main/java/org/apache/ode/il/dbutil/Database.java
incubator/ode/trunk/bpel-epr/src/main/java/org/apache/ode/il/dbutil/Messages.java
incubator/ode/trunk/bpel-runtime/pom.xml
incubator/ode/trunk/bpel-runtime/src/test/java/org/apache/ode/bpel/runtime/MockBpelServer.java
incubator/ode/trunk/dao-hibernate/pom.xml
incubator/ode/trunk/dao-hibernate/src/test/java/org/apache/ode/daohib/bpel/BaseDAOTest.java
incubator/ode/trunk/jbi/pom.xml
incubator/ode/trunk/jbi/src/main/java/org/apache/ode/jbi/Messages.java
incubator/ode/trunk/jbi/src/test/java/org/apache/ode/jbi/TestOdeJbiComponentLifeCycle.java
incubator/ode/trunk/pom.xml
Modified: incubator/ode/trunk/axis2-war/pom.xml
URL: http://svn.apache.org/viewvc/incubator/ode/trunk/axis2-war/pom.xml?view=diff&rev=523095&r1=523094&r2=523095
==============================================================================
--- incubator/ode/trunk/axis2-war/pom.xml (original)
+++ incubator/ode/trunk/axis2-war/pom.xml Tue Mar 27 14:43:17 2007
@@ -50,7 +50,7 @@
<targetPath>WEB-INF</targetPath>
</resource>
</webResources>
- <dependentWarExcludes>WEB-INF/web.xml</dependentWarExcludes>
+ <dependentWarExcludes>WEB-INF/web.xml</dependentWarExcludes>
</configuration>
</execution>
</executions>
@@ -80,7 +80,7 @@
<execution>
<id>unpack-jpa</id>
<phase>generate-resources</phase>
- <goals>
+ <goals>
<goal>unpack</goal>
</goals>
<configuration>
@@ -91,7 +91,7 @@
<artifactId>ode-jpa-ojpa-derby</artifactId>
<version>${pom.version}</version>
<type>tar</type>
- </artifactItem>
+ </artifactItem>
</artifactItems>
</configuration>
</execution>
@@ -99,7 +99,7 @@
<execution>
<id>unpack-hib</id>
<phase>generate-resources</phase>
- <goals>
+ <goals>
<goal>unpack</goal>
</goals>
<configuration>
@@ -110,7 +110,7 @@
<artifactId>ode-dao-hibernate-db-derby</artifactId>
<version>${pom.version}</version>
<type>tar</type>
- </artifactItem>
+ </artifactItem>
</artifactItems>
</configuration>
</execution>
@@ -299,11 +299,6 @@
</dependency>
<dependency>
<groupId>org.apache.ode</groupId>
- <artifactId>ode-minerva</artifactId>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.ode</groupId>
<artifactId>ode-utils</artifactId>
<scope>runtime</scope>
</dependency>
@@ -389,16 +384,16 @@
<scope>runtime</scope>
</dependency>
<dependency>
- <groupId>geronimo</groupId>
+ <groupId>org.apache.geronimo.modules</groupId>
<artifactId>geronimo-kernel</artifactId>
<version>${geronimoVersion}</version>
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>geronimo</groupId>
+ <groupId>org.apache.geronimo.modules</groupId>
<artifactId>geronimo-transaction</artifactId>
<version>${geronimoVersion}</version>
- <scope>provided</scope>
+ <scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.jencks</groupId>
Modified: incubator/ode/trunk/axis2/pom.xml
URL: http://svn.apache.org/viewvc/incubator/ode/trunk/axis2/pom.xml?view=diff&rev=523095&r1=523094&r2=523095
==============================================================================
--- incubator/ode/trunk/axis2/pom.xml (original)
+++ incubator/ode/trunk/axis2/pom.xml Tue Mar 27 14:43:17 2007
@@ -48,10 +48,6 @@
</dependency>
<dependency>
<groupId>org.apache.ode</groupId>
- <artifactId>ode-minerva</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.ode</groupId>
<artifactId>ode-bpel-api</artifactId>
</dependency>
<dependency>
@@ -76,7 +72,7 @@
<artifactId>ode-dao-jpa</artifactId>
<scope>test</scope>
</dependency>
-
+
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2</artifactId>
@@ -101,28 +97,23 @@
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
</dependency>
- <dependency>
- <groupId>jotm</groupId>
- <artifactId>jotm</artifactId>
- </dependency>
<!-- The following are needed for Geronimo transactions mgr lookup -->
<dependency>
- <groupId>geronimo</groupId>
+ <groupId>org.apache.geronimo.modules</groupId>
<artifactId>geronimo-kernel</artifactId>
</dependency>
-
+
<dependency>
- <groupId>geronimo</groupId>
+ <groupId>org.apache.geronimo.modules</groupId>
<artifactId>geronimo-transaction</artifactId>
</dependency>
-
+
<dependency>
<groupId>org.jencks</groupId>
<artifactId>jencks</artifactId>
</dependency>
- <!-- The following are needed by JOTM -->
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-j2ee-connector_1.5_spec</artifactId>
@@ -134,8 +125,6 @@
<artifactId>geronimo-jta_1.0.1B_spec</artifactId>
<scope>compile</scope>
</dependency>
- <!-- ################################ -->
-
<dependency>
<groupId>javax.activation</groupId>
Modified: incubator/ode/trunk/axis2/src/main/java/org/apache/ode/axis2/Messages.java
URL: http://svn.apache.org/viewvc/incubator/ode/trunk/axis2/src/main/java/org/apache/ode/axis2/Messages.java?view=diff&rev=523095&r1=523094&r2=523095
==============================================================================
--- incubator/ode/trunk/axis2/src/main/java/org/apache/ode/axis2/Messages.java (original)
+++ incubator/ode/trunk/axis2/src/main/java/org/apache/ode/axis2/Messages.java Tue Mar 27 14:43:17 2007
@@ -71,7 +71,7 @@
}
public String msgOdeDbPoolStartupFailed(String url) {
- return format("Error starting Minerva connection pool for \"{0}\".", url);
+ return format("Error starting connection pool for \"{0}\".", url);
}
public String msgOdeBpelServerStartFailure() {
Modified: incubator/ode/trunk/bpel-epr/pom.xml
URL: http://svn.apache.org/viewvc/incubator/ode/trunk/bpel-epr/pom.xml?view=diff&rev=523095&r1=523094&r2=523095
==============================================================================
--- incubator/ode/trunk/bpel-epr/pom.xml (original)
+++ incubator/ode/trunk/bpel-epr/pom.xml Tue Mar 27 14:43:17 2007
@@ -44,21 +44,25 @@
<groupId>org.apache.ode</groupId>
<artifactId>ode-bpel-api</artifactId>
</dependency>
- <dependency>
+ <dependency>
<groupId>wsdl4j</groupId>
<artifactId>wsdl4j</artifactId>
</dependency>
- <dependency>
- <groupId>org.apache.ode</groupId>
- <artifactId>ode-minerva</artifactId>
- </dependency>
- <dependency>
+ <dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
</dependency>
<dependency>
- <groupId>geronimo</groupId>
- <artifactId>geronimo-transaction</artifactId>
+ <groupId>org.apache.geronimo.modules</groupId>
+ <artifactId>geronimo-transaction</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.modules</groupId>
+ <artifactId>geronimo-connector</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>tranql</groupId>
+ <artifactId>tranql-connector</artifactId>
</dependency>
</dependencies>
Added: incubator/ode/trunk/bpel-epr/src/main/java/org/apache/ode/il/EmbeddedGeronimoFactory.java
URL: http://svn.apache.org/viewvc/incubator/ode/trunk/bpel-epr/src/main/java/org/apache/ode/il/EmbeddedGeronimoFactory.java?view=auto&rev=523095
==============================================================================
--- incubator/ode/trunk/bpel-epr/src/main/java/org/apache/ode/il/EmbeddedGeronimoFactory.java (added)
+++ incubator/ode/trunk/bpel-epr/src/main/java/org/apache/ode/il/EmbeddedGeronimoFactory.java Tue Mar 27 14:43:17 2007
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.ode.il;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.geronimo.transaction.manager.GeronimoTransactionManager;
+
+import javax.transaction.TransactionManager;
+
+public class EmbeddedGeronimoFactory {
+ private static final Log LOG = LogFactory.getLog(EmbeddedGeronimoFactory.class);
+
+ /* Public no-arg contructor is required */
+ public EmbeddedGeronimoFactory() {
+ }
+
+ public TransactionManager getTransactionManager() {
+ LOG.info("Using embedded Geronimo transaction manager");
+ try {
+ return new GeronimoTransactionManager();
+ } catch (Exception except) {
+ throw new IllegalStateException("Unable to instantiate Geronimo Transaction Manager", except);
+ }
+ }
+
+}
Modified: incubator/ode/trunk/bpel-epr/src/main/java/org/apache/ode/il/config/OdeConfigProperties.java
URL: http://svn.apache.org/viewvc/incubator/ode/trunk/bpel-epr/src/main/java/org/apache/ode/il/config/OdeConfigProperties.java?view=diff&rev=523095&r1=523094&r2=523095
==============================================================================
--- incubator/ode/trunk/bpel-epr/src/main/java/org/apache/ode/il/config/OdeConfigProperties.java (original)
+++ incubator/ode/trunk/bpel-epr/src/main/java/org/apache/ode/il/config/OdeConfigProperties.java Tue Mar 27 14:43:17 2007
@@ -30,7 +30,7 @@
/**
* Configuration object used for configuring the intergration layer. The propereties are those likely to be common to all layers.
- *
+ *
* @author mszefler
*/
public class OdeConfigProperties {
@@ -39,46 +39,46 @@
private static final Log __log = LogFactory.getLog(OdeConfigProperties.class);
- private static final String PROP_DB_MODE = "db.mode";
+ public static final String PROP_DB_MODE = "db.mode";
- private static final String PROP_DB_EXTERNAL_DS = "db.ext.dataSource";
+ public static final String PROP_DB_EXTERNAL_DS = "db.ext.dataSource";
- private static final String PROP_DB_EMBEDDED_NAME = "db.emb.name";
+ public static final String PROP_DB_EMBEDDED_NAME = "db.emb.name";
- private static final String PROP_DB_INTERNAL_URL = "db.int.jdbcurl";
+ public static final String PROP_DB_INTERNAL_URL = "db.int.jdbcurl";
- private static final String PROP_DB_INTERNAL_DRIVER = "db.int.driver";
+ public static final String PROP_DB_INTERNAL_DRIVER = "db.int.driver";
- private static final String PROP_DB_INTERNAL_PASSWORD = "db.int.password";
+ public static final String PROP_DB_INTERNAL_PASSWORD = "db.int.password";
- private static final String PROP_DB_INTERNAL_USER = "db.int.username";
+ public static final String PROP_DB_INTERNAL_USER = "db.int.username";
- private static final String PROP_DB_LOGGING = "db.logging";
+ public static final String PROP_DB_LOGGING = "db.logging";
- private static final String PROP_TX_FACTORY_CLASS = "tx.factory.class";
+ public static final String PROP_TX_FACTORY_CLASS = "tx.factory.class";
- private static final String PROP_POOL_MAX = "db.pool.max";
+ public static final String PROP_POOL_MAX = "db.pool.max";
- private static final String PROP_POOL_MIN = "db.pool.min";
+ public static final String PROP_POOL_MIN = "db.pool.min";
- private static final String PROP_DB_POOL_BLOCKING = "db.pool.blocking";
+ public static final String PROP_DB_POOL_BLOCKING = "db.pool.blocking";
- private static final String PROP_THREAD_POOL_SIZE = "threads.pool.size";
-
- private static final String PROP_CONNECTOR_PORT = "jca.port";
+ public static final String PROP_THREAD_POOL_SIZE = "threads.pool.size";
- private static final String PROP_CONNECTOR_NAME = "jca.name";
+ public static final String PROP_CONNECTOR_PORT = "jca.port";
- private static final String PROP_WORKING_DIR = "working.dir";
+ public static final String PROP_CONNECTOR_NAME = "jca.name";
- private static final String PROP_REPLICATE_EMPTYNS = "message.replicate.emptyns";
+ public static final String PROP_WORKING_DIR = "working.dir";
- private static final String PROP_EVENT_LISTENERS = "event.listeners";
+ public static final String PROP_REPLICATE_EMPTYNS = "message.replicate.emptyns";
- private static final String PROP_PROCESS_DEHYDRATION = "process.dehydration";
+ public static final String PROP_EVENT_LISTENERS = "event.listeners";
- private static final String PROP_DAOCF = "dao.factory";
+ public static final String PROP_PROCESS_DEHYDRATION = "process.dehydration";
+
+ public static final String PROP_DAOCF = "dao.factory";
private File _cfgFile;
@@ -92,12 +92,12 @@
static {
String odep = System.getProperty("ode.persistence");
- if (odep != null &&
+ if (odep != null &&
"hibernate".equalsIgnoreCase(odep)) {
__log.debug("Using HIBERNATE due to system property override!");
__dbEmbName = "hibdb";
__daoCfClass = "org.apache.ode.daohib.bpel.BpelDAOConnectionFactoryImpl";
-
+
}
}
/**
@@ -107,10 +107,10 @@
/** External data-source (managed by app server) */
EXTERNAL,
- /** Internal data-source (managed by us--Minerva) */
+ /** Internal data-source (User provides database info, Ode provides connection pool) */
INTERNAL,
- /** Embedded database (managed by us--Minerva) */
+ /** Embedded database (Ode provides default embedded database with connection pool) */
EMBEDDED
}
@@ -120,10 +120,16 @@
_props = new Properties();
}
+ public OdeConfigProperties(Properties props, String prefix) {
+ _cfgFile = null;
+ _prefix = prefix;
+ _props = props;
+ }
+
public File getFile() {
return _cfgFile;
}
-
+
public void load() throws IOException {
if (_cfgFile.exists()) {
__log.debug("config file exists: " + _cfgFile);
@@ -147,21 +153,21 @@
/**
* Should the internal database be used, or are the datasources provided?
- *
+ *
* @return db mode
*/
public String getDbEmbeddedName() {
- return getProperty(OdeConfigProperties.PROP_DB_EMBEDDED_NAME, __dbEmbName);
-
- }
-
+ return getProperty(OdeConfigProperties.PROP_DB_EMBEDDED_NAME, __dbEmbName);
+
+ }
+
public DatabaseMode getDbMode() {
return DatabaseMode.valueOf(getProperty(OdeConfigProperties.PROP_DB_MODE, DatabaseMode.EMBEDDED.toString()).trim()
.toUpperCase());
}
-
+
public String getDAOConnectionFactory() {
- return getProperty(PROP_DAOCF, __daoCfClass);
+ return getProperty(PROP_DAOCF, __daoCfClass);
}
public String getDbDataSource() {
@@ -174,13 +180,13 @@
/**
* JDBC driver class (for use in INTERNAL mode).
- *
+ *
* @return
*/
public String getDbInternalJdbcDriverClass() {
return getProperty(OdeConfigProperties.PROP_DB_INTERNAL_DRIVER, "org.apache.derby.jdbc.ClientDriver");
}
-
+
public boolean getPoolBlocking() {
return Boolean.valueOf(getProperty(PROP_DB_POOL_BLOCKING,"false"));
}
@@ -200,7 +206,7 @@
public int getConnectorPort() {
return Integer.valueOf(getProperty(OdeConfigProperties.PROP_CONNECTOR_PORT, "2099"));
}
-
+
public String getConnectorName() {
return getProperty(OdeConfigProperties.PROP_CONNECTOR_NAME, "ode");
}
@@ -210,7 +216,7 @@
}
public String getTxFactoryClass() {
- return getProperty(OdeConfigProperties.PROP_TX_FACTORY_CLASS, "org.apache.ode.axis2.util.JotmFactory");
+ return getProperty(OdeConfigProperties.PROP_TX_FACTORY_CLASS, "org.apache.ode.il.EmbeddedGeronimoFactory");
}
public boolean isReplicateEmptyNS() {
Modified: incubator/ode/trunk/bpel-epr/src/main/java/org/apache/ode/il/dbutil/Database.java
URL: http://svn.apache.org/viewvc/incubator/ode/trunk/bpel-epr/src/main/java/org/apache/ode/il/dbutil/Database.java?view=diff&rev=523095&r1=523094&r2=523095
==============================================================================
--- incubator/ode/trunk/bpel-epr/src/main/java/org/apache/ode/il/dbutil/Database.java (original)
+++ incubator/ode/trunk/bpel-epr/src/main/java/org/apache/ode/il/dbutil/Database.java Tue Mar 27 14:43:17 2007
@@ -11,16 +11,19 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.derby.jdbc.EmbeddedDriver;
+import org.apache.geronimo.connector.outbound.GenericConnectionManager;
+import org.apache.geronimo.connector.outbound.connectionmanagerconfig.LocalTransactions;
+import org.apache.geronimo.connector.outbound.connectionmanagerconfig.PoolingSupport;
+import org.apache.geronimo.connector.outbound.connectionmanagerconfig.SinglePool;
+import org.apache.geronimo.connector.outbound.connectionmanagerconfig.TransactionSupport;
import org.apache.ode.bpel.dao.BpelDAOConnectionFactoryJDBC;
import org.apache.ode.il.config.OdeConfigProperties;
import org.apache.ode.utils.LoggingDataSourceWrapper;
-import org.opentools.minerva.MinervaPool;
+import org.tranql.connector.jdbc.JDBCDriverMCF;
/**
* Does the dirty work of setting up / obtaining a DataSource based on the configuration in the {@link OdeConfigProperties} object.
- *
- * @author mszefler
- *
+ *
*/
public class Database {
private static final Log __log = LogFactory.getLog(Database.class);
@@ -29,11 +32,15 @@
private static final Messages __msgs = Messages.getMessages(Messages.class);
+ private static final int CONNECTION_MAX_WAIT_MILLIS = 30000;
+
+ private static final int CONNECTION_MAX_IDLE_MINUTES = 5;
+
private OdeConfigProperties _odeConfig;
private boolean _started;
- private MinervaPool _minervaPool;
+ private GenericConnectionManager _connectionManager;
private TransactionManager _txm;
@@ -63,11 +70,11 @@
public synchronized void start() throws DatabaseConfigException {
if (_started)
return;
-
+
_needDerbyShutdown = false;
_datasource = null;
- _minervaPool = null;
-
+ _connectionManager = null;
+
initDataSource();
_started = true;
}
@@ -76,15 +83,14 @@
if (!_started)
return;
- if (_minervaPool != null)
+ if (_connectionManager != null)
try {
- __log.debug("shutting down minerva pool.");
- _minervaPool.stop();
- _minervaPool = null;
+ __log.debug("Stopping connection manager");
+ _connectionManager.doStop();
} catch (Throwable t) {
- __log.debug("Exception in minervaPool.stop()");
+ __log.warn("Exception while stopping connection manager: " + t.getMessage());
} finally {
- _minervaPool = null;
+ _connectionManager = null;
}
if (_needDerbyShutdown) {
@@ -145,34 +151,47 @@
}
- private void initInternalDb(String url, String driverClass,String username,String password) throws DatabaseConfigException {
+ private void initInternalDb(String url, String driverClass, String username,String password) throws DatabaseConfigException {
+
+ __log.debug("Creating connection pool for " + url + " with driver " + driverClass);
- __log.debug("Creating Minerva DataSource/Pool for " + url + " with driver " + driverClass);
+ TransactionSupport transactionSupport = LocalTransactions.INSTANCE;
- _minervaPool = new MinervaPool();
- _minervaPool.setTransactionManager(_txm);
- _minervaPool.getConnectionFactory().setConnectionURL(url);
- if (username != null)
- _minervaPool.getConnectionFactory().setUserName(username);
- if (password != null)
- _minervaPool.getConnectionFactory().setPassword(password);
- _minervaPool.getConnectionFactory().setDriver(driverClass);
-
- _minervaPool.getPoolParams().maxSize = _odeConfig.getPoolMaxSize();
- _minervaPool.getPoolParams().minSize = _odeConfig.getPoolMinSize();
- _minervaPool.getPoolParams().blocking = _odeConfig.getPoolBlocking();
- _minervaPool.setType(MinervaPool.PoolType.MANAGED);
+ PoolingSupport poolingSupport = new SinglePool(
+ _odeConfig.getPoolMaxSize(),
+ _odeConfig.getPoolMinSize(),
+ CONNECTION_MAX_WAIT_MILLIS,
+ CONNECTION_MAX_IDLE_MINUTES,
+ true, // match one
+ false, // match all
+ false); // select one assume match
+
+ _connectionManager = new GenericConnectionManager(
+ transactionSupport,
+ poolingSupport,
+ false, // no container-managed security
+ null, // no connection tracker
+ _txm,
+ getClass().getName(),
+ getClass().getClassLoader());
+ JDBCDriverMCF mcf = new JDBCDriverMCF();
try {
- _minervaPool.start();
+ mcf.setDriver(driverClass);
+ mcf.setConnectionURL(url);
+ if (username != null) {
+ mcf.setUserName(username);
+ }
+ if (password != null) {
+ mcf.setPassword(password);
+ }
+ _connectionManager.doStart();
+ _datasource = (DataSource) mcf.createConnectionFactory(_connectionManager);
} catch (Exception ex) {
String errmsg = __msgs.msgOdeDbPoolStartupFailed(url);
__log.error(errmsg, ex);
throw new DatabaseConfigException(errmsg, ex);
}
-
- _datasource = _minervaPool.createDataSource();
-
}
/**
Modified: incubator/ode/trunk/bpel-epr/src/main/java/org/apache/ode/il/dbutil/Messages.java
URL: http://svn.apache.org/viewvc/incubator/ode/trunk/bpel-epr/src/main/java/org/apache/ode/il/dbutil/Messages.java?view=diff&rev=523095&r1=523094&r2=523095
==============================================================================
--- incubator/ode/trunk/bpel-epr/src/main/java/org/apache/ode/il/dbutil/Messages.java (original)
+++ incubator/ode/trunk/bpel-epr/src/main/java/org/apache/ode/il/dbutil/Messages.java Tue Mar 27 14:43:17 2007
@@ -28,7 +28,7 @@
}
public String msgOdeDbPoolStartupFailed(String url) {
- return format("Error starting Minerva connection pool for \"{0}\".", url);
+ return format("Error starting connection pool for \"{0}\".", url);
}
public String msgOdeUsingDAOImpl(String className) {
Modified: incubator/ode/trunk/bpel-runtime/pom.xml
URL: http://svn.apache.org/viewvc/incubator/ode/trunk/bpel-runtime/pom.xml?view=diff&rev=523095&r1=523094&r2=523095
==============================================================================
--- incubator/ode/trunk/bpel-runtime/pom.xml (original)
+++ incubator/ode/trunk/bpel-runtime/pom.xml Tue Mar 27 14:43:17 2007
@@ -118,11 +118,6 @@
</dependency>
<dependency>
- <groupId>jotm</groupId>
- <artifactId>jotm</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-j2ee-connector_1.5_spec</artifactId>
<scope>test</scope>
@@ -155,11 +150,6 @@
<dependency>
<groupId>org.apache.ode</groupId>
<artifactId>ode-dao-hibernate</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.ode</groupId>
- <artifactId>ode-minerva</artifactId>
<scope>test</scope>
</dependency>
<dependency>
Modified: incubator/ode/trunk/bpel-runtime/src/test/java/org/apache/ode/bpel/runtime/MockBpelServer.java
URL: http://svn.apache.org/viewvc/incubator/ode/trunk/bpel-runtime/src/test/java/org/apache/ode/bpel/runtime/MockBpelServer.java?view=diff&rev=523095&r1=523094&r2=523095
==============================================================================
--- incubator/ode/trunk/bpel-runtime/src/test/java/org/apache/ode/bpel/runtime/MockBpelServer.java (original)
+++ incubator/ode/trunk/bpel-runtime/src/test/java/org/apache/ode/bpel/runtime/MockBpelServer.java Tue Mar 27 14:43:17 2007
@@ -34,11 +34,10 @@
import org.apache.ode.bpel.iapi.Scheduler;
import org.apache.ode.bpel.scheduler.quartz.QuartzSchedulerImpl;
import org.apache.ode.dao.jpa.BPELDAOConnectionFactoryImpl;
+import org.apache.ode.il.EmbeddedGeronimoFactory;
import org.apache.ode.store.ProcessStoreImpl;
import org.apache.ode.utils.DOMUtils;
import org.apache.ode.utils.GUID;
-import org.objectweb.jotm.Jotm;
-import org.opentools.minerva.MinervaPool;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
@@ -64,8 +63,7 @@
BpelServerImpl _server;
ProcessStoreImpl _store;
TransactionManager _txManager;
- Jotm _jotm;
- MinervaPool _minervaPool;
+ Database _database;
DataSource _dataSource;
SchedulerWrapper _scheduler;
BpelDAOConnectionFactory _daoCF;
@@ -154,7 +152,7 @@
_server.stop();
_scheduler.stop();
_scheduler.shutdown();
- _jotm.stop();
+ // TODO stop transaction manager
try {
DriverManager.getConnection("jdbc:derby:target/test-classes/derby-db/jpadb;shutdown=true");
} catch (Exception ex) {
@@ -165,8 +163,8 @@
}
protected TransactionManager createTransactionManager() throws Exception {
- _jotm = new Jotm(true, false);
- _txManager = _jotm.getTransactionManager();
+ EmbeddedTransactionManager factory = new EmbeddedTransactionManager();
+ _txManager = factory.getTransactionManager();
_txManager.setTransactionTimeout(30);
return _txManager;
}
@@ -175,16 +173,20 @@
if (_txManager == null)
throw new RuntimeException("No transaction manager");
String url = "jdbc:derby:target/test-classes/derby-db/jpadb";
- _minervaPool = new MinervaPool();
- _minervaPool.setTransactionManager(_txManager);
- _minervaPool.getConnectionFactory().setConnectionURL(url);
- _minervaPool.getConnectionFactory().setUserName("sa");
- _minervaPool.getConnectionFactory().setDriver(org.apache.derby.jdbc.EmbeddedDriver.class.getName());
- _minervaPool.getPoolParams().minSize = 0;
- _minervaPool.getPoolParams().maxSize = 10;
- _minervaPool.setType(MinervaPool.PoolType.MANAGED);
- _minervaPool.start();
- _dataSource = _minervaPool.createDataSource();
+
+ Properties props = new Properties();
+ props.put("test."+OdeConfigProperties.PROP_DB_MODE, "internal");
+ props.put("test."+OdeConfigProperties.PROP_DB_INTERNAL_DRIVER, org.apache.derby.jdbc.EmbeddedDriver.class.getName());
+ props.put("test."+OdeConfigProperties.PROP_DB_INTERNAL_URL, url);
+ props.put("test."+OdeConfigProperties.PROP_DB_INTERNAL_USER, "sa");
+ props.put("test."+OdeConfigProperties.PROP_POOL_MIN, "0");
+ props.put("test."+OdeConfigProperties.PROP_POOL_MAX, "10");
+
+ OdeConfigProperties odeConfig = new OdeConfigProperties(props, "test");
+ _database = new Database(odeConfig);
+ _database.setTransactionManager(_txManager);
+ _database.start();
+ _dataSource = _database.getDataSource();
return _dataSource;
}
@@ -308,7 +310,7 @@
public <T> T execTransaction(Callable<T> transaction) throws Exception, ContextException {
return _quartz.execTransaction(transaction);
}
-
+
public <T> Future<T> execIsolatedTransaction(Callable<T> transaction) throws Exception, ContextException {
return _quartz.execIsolatedTransaction(transaction);
}
Modified: incubator/ode/trunk/dao-hibernate/pom.xml
URL: http://svn.apache.org/viewvc/incubator/ode/trunk/dao-hibernate/pom.xml?view=diff&rev=523095&r1=523094&r2=523095
==============================================================================
--- incubator/ode/trunk/dao-hibernate/pom.xml (original)
+++ incubator/ode/trunk/dao-hibernate/pom.xml Tue Mar 27 14:43:17 2007
@@ -63,13 +63,8 @@
<version>1.6.1</version>
<scope>compile</scope>
</dependency>
-
- <dependency>
- <groupId>jotm</groupId>
- <artifactId>jotm</artifactId>
- <scope>test</scope>
- </dependency>
</dependencies>
+
<build>
<plugins>
<plugin>
@@ -83,7 +78,7 @@
</goals>
<configuration>
<tasks>
- <hibernatedoclet destdir="${basedir}/target/generated-resources/xdoclet" excludedtags="@version,@author,@todo" force="false" verbose="false">
+ <hibernatedoclet destdir="${basedir}/target/generated-resources/xdoclet" excludedtags="@version,@author,@todo" force="false" verbose="false">
<hibernate version="3.0" destdir="${basedir}/target/generated-resources/xdoclet" />
<fileset dir="${basedir}/src/main/java" includes="**/*.java"/>
</hibernatedoclet>
Modified: incubator/ode/trunk/dao-hibernate/src/test/java/org/apache/ode/daohib/bpel/BaseDAOTest.java
URL: http://svn.apache.org/viewvc/incubator/ode/trunk/dao-hibernate/src/test/java/org/apache/ode/daohib/bpel/BaseDAOTest.java?view=diff&rev=523095&r1=523094&r2=523095
==============================================================================
--- incubator/ode/trunk/dao-hibernate/src/test/java/org/apache/ode/daohib/bpel/BaseDAOTest.java (original)
+++ incubator/ode/trunk/dao-hibernate/src/test/java/org/apache/ode/daohib/bpel/BaseDAOTest.java Tue Mar 27 14:43:17 2007
@@ -24,7 +24,7 @@
import junit.framework.TestCase;
import org.apache.ode.bpel.dao.BpelDAOConnection;
-import org.objectweb.jotm.Jotm;
+import org.apache.ode.il.EmbeddedGeronimoFactory;
/**
* Testing BpelDAOConnectionImpl.listInstance. We're just producing a lot
@@ -35,28 +35,33 @@
public class BaseDAOTest extends TestCase {
protected BpelDAOConnection daoConn;
- private Jotm jotm;
+ private TransactionManager txm;
private DataSource ds;
-
+
protected void initTM() throws Exception {
-
- jotm = new Jotm(true, false);
+
+ EmbeddedGeronimoFactory factory = new EmbeddedGeronimoFactory();
+ txm = factory.getTransactionManager();
ds = getDataSource();
- jotm.getTransactionManager().begin();
+ txm.begin();
BpelDAOConnectionFactoryImpl factoryImpl = new BpelDAOConnectionFactoryImpl();
- factoryImpl.setTransactionManager(jotm.getTransactionManager());
+ factoryImpl.setTransactionManager(txm);
factoryImpl.setDataSource(ds);
daoConn = factoryImpl.getConnection();
}
protected void stopTM() throws Exception {
- jotm.getTransactionManager().commit();
+ txm.commit();
}
- private DataSource getDataSource() {
+ protected DataSource getDataSource() {
throw new Error("Not implemented");
+ }
+
+ protected TransactionManager getTransactionManager() {
+ return txm;
}
}
Modified: incubator/ode/trunk/jbi/pom.xml
URL: http://svn.apache.org/viewvc/incubator/ode/trunk/jbi/pom.xml?view=diff&rev=523095&r1=523094&r2=523095
==============================================================================
--- incubator/ode/trunk/jbi/pom.xml (original)
+++ incubator/ode/trunk/jbi/pom.xml Tue Mar 27 14:43:17 2007
@@ -73,10 +73,6 @@
</dependency>
<dependency>
<groupId>org.apache.ode</groupId>
- <artifactId>ode-minerva</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.ode</groupId>
<artifactId>ode-bpel-connector</artifactId>
</dependency>
<dependency>
@@ -129,7 +125,7 @@
<scope>provided</scope>
<version>2.1.0</version>
</dependency>
-
+
<!-- The following dependencies are "provided" to reduce size/footprint when deploying to ServiceMix -->
<dependency>
<groupId>org.apache.derby</groupId>
@@ -172,7 +168,7 @@
<artifactId>ode-jpa-ojpa-derby</artifactId>
<version>${pom.version}</version>
<type>tar</type>
- </artifactItem>
+ </artifactItem>
</artifactItems>
</configuration>
</execution>
@@ -190,7 +186,7 @@
<artifactId>ode-dao-hibernate-db-derby</artifactId>
<version>${pom.version}</version>
<type>tar</type>
- </artifactItem>
+ </artifactItem>
</artifactItems>
</configuration>
</execution>
Modified: incubator/ode/trunk/jbi/src/main/java/org/apache/ode/jbi/Messages.java
URL: http://svn.apache.org/viewvc/incubator/ode/trunk/jbi/src/main/java/org/apache/ode/jbi/Messages.java?view=diff&rev=523095&r1=523094&r2=523095
==============================================================================
--- incubator/ode/trunk/jbi/src/main/java/org/apache/ode/jbi/Messages.java (original)
+++ incubator/ode/trunk/jbi/src/main/java/org/apache/ode/jbi/Messages.java Tue Mar 27 14:43:17 2007
@@ -69,7 +69,7 @@
}
public String msgOdeDbPoolStartupFailed(String url) {
- return format("Error starting Minerva connection pool for \"{0}\".", url);
+ return format("Error starting connection pool for \"{0}\".", url);
}
public String msgOdeBpelServerStartFailure() {
Modified: incubator/ode/trunk/jbi/src/test/java/org/apache/ode/jbi/TestOdeJbiComponentLifeCycle.java
URL: http://svn.apache.org/viewvc/incubator/ode/trunk/jbi/src/test/java/org/apache/ode/jbi/TestOdeJbiComponentLifeCycle.java?view=diff&rev=523095&r1=523094&r2=523095
==============================================================================
--- incubator/ode/trunk/jbi/src/test/java/org/apache/ode/jbi/TestOdeJbiComponentLifeCycle.java (original)
+++ incubator/ode/trunk/jbi/src/test/java/org/apache/ode/jbi/TestOdeJbiComponentLifeCycle.java Tue Mar 27 14:43:17 2007
@@ -8,11 +8,11 @@
import javax.xml.namespace.QName;
import javax.xml.transform.stream.StreamSource;
+import org.apache.ode.il.EmbeddedGeronimoFactory;
import org.apache.ode.utils.DOMUtils;
import org.apache.servicemix.client.DefaultServiceMixClient;
import org.apache.servicemix.jbi.container.ActivationSpec;
import org.apache.servicemix.jbi.container.JBIContainer;
-import org.objectweb.jotm.Jotm;
import org.xml.sax.InputSource;
import junit.framework.TestCase;
@@ -21,24 +21,24 @@
JBIContainer container;
File rootDir, installDir, odeDir;
- Jotm jotm;
+ TransactionManager txm;
private OdeComponent component;
protected void setUp() throws Exception {
rootDir = File.createTempFile("smixInstallDir","");
installDir = new File(rootDir,"install");
installDir.mkdir();
- jotm = new Jotm(true,false);
+ txm = new EmbeddedGeronimoFactory().getTransactionManager();
odeDir = new File(installDir,"ODE");
odeDir.mkdir();
-
+
container = new JBIContainer();
container.setUseMBeanServer(false);
container.setCreateMBeanServer(false);
container.setEmbedded(true);
-
-
- container.setTransactionManager(jotm.getTransactionManager());
+
+
+ container.setTransactionManager(txm);
container.init();
container.start();
@@ -53,15 +53,15 @@
} catch (Exception ex) {
;//ok ignore
}
-
+
if (container != null) {
container.shutDown();
container = null;
}
-
+
component = null;
-
-
+
+
}
public void testComponentLifeCycle() throws Exception {
@@ -72,7 +72,7 @@
public void testProcessLifeCycle() throws Exception {
container.activateComponent(component, "ODE");
container.start();
-
+
// For lack of a better way of doing this:
component.getServiceUnitManager().deploy("HelloWorld", "../distro-jbi/src/examples/HelloWorld2/HelloWorld2-process");
component.getServiceUnitManager().init("HelloWorld", "../distro-jbi/src/examples/HelloWorld2/HelloWorld2-process");
@@ -81,16 +81,16 @@
component.getServiceUnitManager().undeploy("HelloWorld", "../distro-jbi/src/examples/HelloWorld2/HelloWorld2-process");
container.deactivateComponent("ODE");
-
+
container.stop();
-
+
}
-
+
public void testHelloWorld() throws Exception {
OdeComponent component = new OdeComponent();
- container.activateComponent(component, "ODE");
-
+ container.activateComponent(component, "ODE");
+
// For lack of a better way of doing this:
component.getServiceUnitManager().deploy("HelloWorld", "../jbi-examples/src/examples/HelloWorld2/HelloWorld2-process");
component.getServiceUnitManager().init("HelloWorld", "../jbi-examples/src/examples/HelloWorld2/HelloWorld2-process");
@@ -104,8 +104,8 @@
assertEquals(ExchangeStatus.ACTIVE,io.getStatus());
assertNotNull(io.getOutMessage());
assertNotNull(io.getOutMessage().getContent());
-
+
}
-
+
}
Modified: incubator/ode/trunk/pom.xml
URL: http://svn.apache.org/viewvc/incubator/ode/trunk/pom.xml?view=diff&rev=523095&r1=523094&r2=523095
==============================================================================
--- incubator/ode/trunk/pom.xml (original)
+++ incubator/ode/trunk/pom.xml Tue Mar 27 14:43:17 2007
@@ -65,14 +65,14 @@
<commonsLoggingVersion>1.0.3</commonsLoggingVersion>
<commonsPoolVersion>1.2</commonsPoolVersion>
<geronimoSpecsVersion>1.0</geronimoSpecsVersion>
- <geronimoVersion>1.1</geronimoVersion>
+ <geronimoVersion>1.2-beta</geronimoVersion>
+ <tranqlVersion>1.1</tranqlVersion>
<hibernateVersion>3.1.2</hibernateVersion>
<jaxenVersion>1.1-beta-8</jaxenVersion>
<jettyVersion>5.1.9</jettyVersion>
<jencksVersion>1.3</jencksVersion>
<jasperVersion>4.2.20RC0</jasperVersion>
<jmockVersion>1.1.0</jmockVersion>
- <jotmVersion>2.0.10</jotmVersion>
<junitVersion>3.8.1</junitVersion>
<log4jVersion>1.2.13</log4jVersion>
<saxonVersion>8.7</saxonVersion>
@@ -111,7 +111,6 @@
<module>axis2-war</module>
<module>utils</module>
- <module>minerva</module>
<module>jacob</module>
<module>jacob-ap</module>
@@ -330,7 +329,7 @@
</repository>
-<!-- Rely only on Intalio repository, prevents maven madness.
+<!-- Rely only on Intalio repository, prevents maven madness.
<repository>
<id>central-maven</id>
<name>Maven Repository Switchboard</name>
@@ -562,11 +561,6 @@
</dependency>
<dependency>
<groupId>org.apache.ode</groupId>
- <artifactId>ode-minerva</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.ode</groupId>
<artifactId>ode-tools</artifactId>
<version>${project.version}</version>
</dependency>
@@ -608,20 +602,20 @@
<exclusion>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
- </exclusion>
+ </exclusion>
<exclusion>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
- </exclusion>
+ </exclusion>
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>servlet</artifactId>
- </exclusion>
+ </exclusion>
<exclusion>
<groupId>javax.ejb</groupId>
<artifactId>ejb</artifactId>
- </exclusion>
- </exclusions>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
@@ -835,42 +829,6 @@
</dependency>
<dependency>
- <groupId>jotm</groupId>
- <artifactId>jotm</artifactId>
- <version>${jotmVersion}</version>
- <exclusions>
- <exclusion>
- <artifactId>junit</artifactId>
- <groupId>junit</groupId>
- </exclusion>
- <exclusion>
- <artifactId>jta</artifactId>
- <groupId>javax.transaction</groupId>
- </exclusion>
- <exclusion>
- <artifactId>javax.jts</artifactId>
- <groupId>jts</groupId>
- </exclusion>
- <exclusion>
- <groupId>javax.resource</groupId>
- <artifactId>connector</artifactId>
- </exclusion>
- <exclusion>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- </exclusion>
- <exclusion>
- <groupId>commons-cli</groupId>
- <artifactId>commons-cli</artifactId>
- </exclusion>
- <exclusion>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- <dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>${log4jVersion}</version>
@@ -907,16 +865,73 @@
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>geronimo</groupId>
+ <groupId>org.apache.geronimo.modules</groupId>
<artifactId>geronimo-kernel</artifactId>
<version>${geronimoVersion}</version>
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>geronimo</groupId>
- <artifactId>geronimo-transaction</artifactId>
- <version>${geronimoVersion}</version>
- <scope>provided</scope>
+ <groupId>org.apache.geronimo.modules</groupId>
+ <artifactId>geronimo-transaction</artifactId>
+ <version>${geronimoVersion}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.geronimo.modules</groupId>
+ <artifactId>geronimo-j2ee</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.geronimo.modules</groupId>
+ <artifactId>geronimo-core</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.modules</groupId>
+ <artifactId>geronimo-connector</artifactId>
+ <version>${geronimoVersion}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.geronimo.modules</groupId>
+ <artifactId>geronimo-kernel</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.geronimo.modules</groupId>
+ <artifactId>geronimo-system</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.geronimo.modules</groupId>
+ <artifactId>geronimo-security</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.geronimo.modules</groupId>
+ <artifactId>geronimo-core</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.geronimo.modules</groupId>
+ <artifactId>geronimo-j2ee</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.geronimo.modules</groupId>
+ <artifactId>geronimo-common</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.geronimo.modules</groupId>
+ <artifactId>geronimo-management</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.geronimo.modules</groupId>
+ <artifactId>geronimo-naming</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.geronimo.modules</groupId>
+ <artifactId>geronimo-deployment</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>tranql</groupId>
+ <artifactId>tranql-connector</artifactId>
+ <version>${tranqlVersion}</version>
</dependency>
<dependency>
<groupId>net.sf.saxon</groupId>