Author: jeff.yuchang
Date: 2010-05-27 12:08:03 -0400 (Thu, 27 May 2010)
New Revision: 676
Added:
branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/build.xml
branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/src/main/descriptors/persistence.db.xml
branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/src/main/files/hibernate.cfg/oracle.properties
branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/src/main/files/hibernate.cfg/postgres.properties
branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/src/main/resources/
branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/src/main/resources/META-INF/
branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/src/main/resources/META-INF/persistence.xml
branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/src/main/scripts/common.sql
branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/src/main/scripts/simplesched-hsql.sql
Removed:
branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/src/main/descriptors/persistence.derby.xml
branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/src/main/descriptors/persistence.mysql.xml
branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/src/main/descriptors/persistence.oracle.xml
branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/src/main/descriptors/persistence.postgres.xml
Modified:
branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/pom.xml
branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/src/main/files/hibernate.cfg/hsql.properties
branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/src/main/java/org/apache/ode/dao/jpa/hibernate/BpelDAOConnectionFactoryImpl.java
branches/ODE/ODE-1.x-jpa/dao-jpa/pom.xml
branches/ODE/ODE-1.x-jpa/pom.xml
Log:
* using Hibernate built-in tool for the JPA entity DDL script.
Modified: branches/ODE/ODE-1.x-jpa/dao-jpa/pom.xml
===================================================================
--- branches/ODE/ODE-1.x-jpa/dao-jpa/pom.xml 2010-05-27 15:55:40 UTC (rev 675)
+++ branches/ODE/ODE-1.x-jpa/dao-jpa/pom.xml 2010-05-27 16:08:03 UTC (rev 676)
@@ -98,20 +98,21 @@
</goals>
<configuration>
<tasks>
- <property name="maven.runtime.classpath"
refid="maven.compile.classpath"/>
+ <copy todir="${basedir}/target/classes-openjpa">
+ <fileset dir="${basedir}/target/classes"
includes="**/*"/>
+ </copy>
+ <property name="maven.compile.classpath"
refid="maven.compile.classpath"/>
<path id="classpath">
- <pathelement path="${maven.runtime.classpath}"/>
- </path>
- <taskdef name="openjpac"
classname="org.apache.openjpa.ant.PCEnhancerTask"
classpathref="classpath"/>
- <openjpac>
- <fileset dir="${basedir}/src/main">
- <include name="**/*.java" />
- </fileset>
- <classpath>
- <pathelement location="${basedir}/target/classes"/>
- <pathelement path="${maven.runtime.classpath}"/>
- </classpath>
- </openjpac>
+ <pathelement
location="${basedir}/target/classes-openjpa"/>
+ <pathelement path="${maven.compile.classpath}"/>
+ </path>
+ <taskdef name="openjpac"
classname="org.apache.openjpa.ant.PCEnhancerTask"
classpathref="classpath"/>
+ <openjpac directory="${basedir}/target/classes-openjpa">
+ <fileset dir="${basedir}/src/main">
+ <include name="**/*.java" />
+ </fileset>
+ <classpath refid="classpath"/>
+ </openjpac>
</tasks>
</configuration>
</execution>
Added: branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/build.xml
===================================================================
--- branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/build.xml (rev 0)
+++ branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/build.xml 2010-05-27 16:08:03 UTC (rev
676)
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ============================================================ -->
+<!-- JBoss, the OpenSource J2EE webOS -->
+<!-- Distributable under LGPL license. -->
+<!-- See terms of license at
http://www.gnu.org. -->
+<!-- ============================================================ -->
+
+
+<project>
+
+ <property name="db.scripts.dir" value="${basedir}/target" />
+ <property name="descriptor.dir"
value="${basedir}/src/main/descriptors"/>
+ <property name="scripts.dir"
value="${basedir}/src/main/scripts"/>
+ <property name="META-INF.dir"
value="${basedir}/src/main/resources/META-INF" />
+
+ <path id="classpath">
+ <pathelement path="${maven.runtime.classpath}"/>
+ </path>
+
+
+ <!-- ================================================================== -->
+ <!-- jbossidm Database schema -->
+ <!-- ================================================================== -->
+
+ <target name="create-schema">
+
+ <taskdef name="hibernatetool"
classname="org.hibernate.tool.ant.HibernateToolTask"
+ classpathref="classpath"/>
+
+ <mkdir dir="target"/>
+ <mkdir dir="target/db" />
+ <mkdir dir="${db.scripts.dir}" />
+
+ <!-- Hsql -->
+ <create-ddl db="hsql"/>
+
+ <!-- MySQL -->
+ <create-ddl db="mysql"/>
+
+ <!-- Oracle -->
+ <create-ddl db="oracle"/>
+
+ <!-- PostgreSQL -->
+ <create-ddl db="postgres"/>
+
+ <create-ddl db="hsql"/>
+
+ </target>
+
+ <!--
+ ============================================
+ Macro defs, no need to change anything below
+ ============================================
+ -->
+
+ <macrodef name="create-ddl">
+ <attribute name="db"/>
+
+ <sequential>
+ <echo></echo>
+ <echo>=====================</echo>
+ <echo>Create DDL @{db}</echo>
+
+ <copy file="${descriptor.dir}/persistence.db.xml"
+ toFile="${META-INF.dir}/persistence.xml"
+ overwrite="true">
+ <filterset
filtersfile="${basedir}/src/main/files/hibernate.cfg/(a){db}.properties" />
+ </copy>
+
+ <hibernatetool destdir="${db.scripts.dir}">
+ <jpaconfiguration persistenceunit="ode-unit-test-embedded"/>
+ <hbm2ddl drop="false" create="true"
export="${export}" console="false"
+ outputfilename="partial.(a){db}.sql" delimiter=";"
format="true" />
+ </hibernatetool>
+ <concat destfile="${db.scripts.dir}/scripts/(a){db}.sql">
+ <fileset file="${scripts.dir}/license-header.sql"/>
+ <fileset file="${scripts.dir}/common.sql"/>
+ <fileset file="${scripts.dir}/simplesched-(a){db}.sql"/>
+ <fileset file="${db.scripts.dir}/partial.(a){db}.sql"/>
+ </concat>
+
+ <echo>Done.</echo>
+ <echo>=====================</echo>
+ </sequential>
+ </macrodef>
+
+</project>
Modified: branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/pom.xml
===================================================================
--- branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/pom.xml 2010-05-27 15:55:40 UTC (rev 675)
+++ branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/pom.xml 2010-05-27 16:08:03 UTC (rev 676)
@@ -59,10 +59,47 @@
<artifactId>hibernate-entitymanager</artifactId>
</dependency>
<dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-tools</artifactId>
+ <version>3.2.0.ga</version>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-annotations</artifactId>
+ <version>3.4.0.GA</version>
+ </dependency>
+ <dependency>
+ <groupId>javassist</groupId>
+ <artifactId>javassist</artifactId>
+ </dependency>
+ <dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</dependency>
</dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>create-db-schemas</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <property name="maven.runtime.classpath"
refid="maven.compile.classpath"/>
+ <ant antfile="build.xml"
target="create-schema" />
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
</project>
Added: branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/src/main/descriptors/persistence.db.xml
===================================================================
--- branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/src/main/descriptors/persistence.db.xml
(rev 0)
+++
branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/src/main/descriptors/persistence.db.xml 2010-05-27
16:08:03 UTC (rev 676)
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ 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.
+ -->
+<persistence
xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="1.0">
+ <persistence-unit name="ode-unit-test-embedded">
+ <provider>org.hibernate.ejb.HibernatePersistence</provider>
+
+ <class>org.apache.ode.dao.jpa.bpel.ActivityRecoveryDAOImpl</class>
+ <class>org.apache.ode.dao.jpa.bpel.CorrelationSetDAOImpl</class>
+ <class>org.apache.ode.dao.jpa.bpel.CorrelatorDAOImpl</class>
+ <class>org.apache.ode.dao.jpa.bpel.EventDAOImpl</class>
+ <class>org.apache.ode.dao.jpa.bpel.FaultDAOImpl</class>
+ <class>org.apache.ode.dao.jpa.bpel.MessageDAOImpl</class>
+ <class>org.apache.ode.dao.jpa.bpel.MessageExchangeDAOImpl</class>
+ <class>org.apache.ode.dao.jpa.bpel.MessageRouteDAOImpl</class>
+ <class>org.apache.ode.dao.jpa.bpel.PartnerLinkDAOImpl</class>
+ <class>org.apache.ode.dao.jpa.bpel.ProcessDAOImpl</class>
+ <class>org.apache.ode.dao.jpa.bpel.ProcessInstanceDAOImpl</class>
+ <class>org.apache.ode.dao.jpa.bpel.ScopeDAOImpl</class>
+ <class>org.apache.ode.dao.jpa.bpel.XmlDataDAOImpl</class>
+ <class>org.apache.ode.dao.jpa.bpel.CorrSetProperty</class>
+ <class>org.apache.ode.dao.jpa.bpel.MexProperty</class>
+ <class>org.apache.ode.dao.jpa.bpel.XmlDataProperty</class>
+
+ <class>org.apache.ode.dao.jpa.store.ProcessConfDaoImpl</class>
+ <class>org.apache.ode.dao.jpa.store.ProcessConfPropertyDaoImpl</class>
+ <class>org.apache.ode.dao.jpa.store.DeploymentUnitDaoImpl</class>
+ <class>org.apache.ode.dao.jpa.store.VersionTrackerDAOImpl</class>
+
+ <properties>
+ <property name="hibernate.show_sql" value="false" />
+ <property name="hibernate.dialect" value="@dialect@"
/>
+ <property name="hibernate.connection.datasource"
value="java:BPELDB" />
+ <property name="hibernate.transaction.factory_class"
value="org.hibernate.transaction.JTATransactionFactory" />
+ <property name="hibernate.transaction.manager_lookup_class"
value="org.hibernate.transaction.JBossTransactionManagerLookup" />
+ <property name="jta.UserTransaction"
value="jta.UserTransaction" />
+ </properties>
+ </persistence-unit>
+</persistence>
+
Deleted:
branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/src/main/descriptors/persistence.derby.xml
===================================================================
---
branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/src/main/descriptors/persistence.derby.xml 2010-05-27
15:55:40 UTC (rev 675)
+++
branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/src/main/descriptors/persistence.derby.xml 2010-05-27
16:08:03 UTC (rev 676)
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ 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.
- -->
-<persistence
xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="1.0">
- <persistence-unit name="ode-unit-test-embedded">
- <provider>org.hibernate.ejb.HibernatePersistence</provider>
-
- <class>org.apache.ode.dao.jpa.ActivityRecoveryDAOImpl</class>
- <class>org.apache.ode.dao.jpa.CorrelationSetDAOImpl</class>
- <class>org.apache.ode.dao.jpa.CorrelatorDAOImpl</class>
- <class>org.apache.ode.dao.jpa.EventDAOImpl</class>
- <class>org.apache.ode.dao.jpa.FaultDAOImpl</class>
- <class>org.apache.ode.dao.jpa.MessageDAOImpl</class>
- <class>org.apache.ode.dao.jpa.MessageExchangeDAOImpl</class>
- <class>org.apache.ode.dao.jpa.MessageRouteDAOImpl</class>
- <class>org.apache.ode.dao.jpa.PartnerLinkDAOImpl</class>
- <class>org.apache.ode.dao.jpa.ProcessDAOImpl</class>
- <class>org.apache.ode.dao.jpa.ProcessInstanceDAOImpl</class>
- <class>org.apache.ode.dao.jpa.ResourceRouteDAOImpl</class>
- <class>org.apache.ode.dao.jpa.ScopeDAOImpl</class>
- <class>org.apache.ode.dao.jpa.XmlDataDAOImpl</class>
- <class>org.apache.ode.dao.jpa.ContextValueDAOImpl</class>
-
- <class>org.apache.ode.store.jpa.ProcessConfDaoImpl</class>
- <class>org.apache.ode.store.jpa.ProcessConfPropertyDaoImpl</class>
- <class>org.apache.ode.store.jpa.DeploymentUnitDaoImpl</class>
- <class>org.apache.ode.store.jpa.VersionTrackerDAOImpl</class>
-
- <properties>
- <properties>
- <property name="hibernate.show_sql" value="false" />
- <property name="hibernate.dialect"
value="org.hibernate.dialect.DerbyDialect" />
- <property name="hibernate.connection.datasource"
value="java:BPELDB" />
- <property name="hibernate.transaction.factory_class"
value="org.hibernate.transaction.JTATransactionFactory" />
- <property name="hibernate.transaction.manager_lookup_class"
value="org.hibernate.transaction.JBossTransactionManagerLookup" />
- <property name="jta.UserTransaction"
value="jta.UserTransaction" />
- </properties>
- </persistence-unit>
-</persistence>
-
Deleted:
branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/src/main/descriptors/persistence.mysql.xml
===================================================================
---
branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/src/main/descriptors/persistence.mysql.xml 2010-05-27
15:55:40 UTC (rev 675)
+++
branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/src/main/descriptors/persistence.mysql.xml 2010-05-27
16:08:03 UTC (rev 676)
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ 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.
- -->
-<persistence
xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="1.0">
- <persistence-unit name="ode-unit-test-embedded">
-
<provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
- <class>org.apache.ode.dao.jpa.ActivityRecoveryDAOImpl</class>
- <class>org.apache.ode.dao.jpa.CorrelationSetDAOImpl</class>
- <class>org.apache.ode.dao.jpa.CorrelatorDAOImpl</class>
- <class>org.apache.ode.dao.jpa.EventDAOImpl</class>
- <class>org.apache.ode.dao.jpa.FaultDAOImpl</class>
- <class>org.apache.ode.dao.jpa.MessageDAOImpl</class>
- <class>org.apache.ode.dao.jpa.MessageExchangeDAOImpl</class>
- <class>org.apache.ode.dao.jpa.MessageRouteDAOImpl</class>
- <class>org.apache.ode.dao.jpa.PartnerLinkDAOImpl</class>
- <class>org.apache.ode.dao.jpa.ProcessDAOImpl</class>
- <class>org.apache.ode.dao.jpa.ProcessInstanceDAOImpl</class>
- <class>org.apache.ode.dao.jpa.ResourceRouteDAOImpl</class>
- <class>org.apache.ode.dao.jpa.ScopeDAOImpl</class>
- <class>org.apache.ode.dao.jpa.XmlDataDAOImpl</class>
- <class>org.apache.ode.dao.jpa.ContextValueDAOImpl</class>
-
- <class>org.apache.ode.store.jpa.ProcessConfDaoImpl</class>
- <class>org.apache.ode.store.jpa.ProcessConfPropertyDaoImpl</class>
- <class>org.apache.ode.store.jpa.DeploymentUnitDaoImpl</class>
- <class>org.apache.ode.store.jpa.VersionTrackerDAOImpl</class>
-
- <properties>
- <property name="hibernate.show_sql" value="false" />
- <property name="hibernate.dialect"
value="org.hibernate.dialect.MySQLInnoDBDialect" />
- <property name="hibernate.connection.datasource"
value="java:BPELDB" />
- <property name="hibernate.transaction.factory_class"
value="org.hibernate.transaction.JTATransactionFactory" />
- <property name="hibernate.transaction.manager_lookup_class"
value="org.hibernate.transaction.JBossTransactionManagerLookup" />
- <property name="jta.UserTransaction"
value="jta.UserTransaction" />
- </properties>
- </persistence-unit>
-</persistence>
-
Deleted:
branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/src/main/descriptors/persistence.oracle.xml
===================================================================
---
branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/src/main/descriptors/persistence.oracle.xml 2010-05-27
15:55:40 UTC (rev 675)
+++
branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/src/main/descriptors/persistence.oracle.xml 2010-05-27
16:08:03 UTC (rev 676)
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ 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.
- -->
-<persistence
xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="1.0">
- <persistence-unit name="ode-unit-test-embedded">
-
<provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
- <class>org.apache.ode.dao.jpa.ActivityRecoveryDAOImpl</class>
- <class>org.apache.ode.dao.jpa.CorrelationSetDAOImpl</class>
- <class>org.apache.ode.dao.jpa.CorrelatorDAOImpl</class>
- <class>org.apache.ode.dao.jpa.EventDAOImpl</class>
- <class>org.apache.ode.dao.jpa.FaultDAOImpl</class>
- <class>org.apache.ode.dao.jpa.MessageDAOImpl</class>
- <class>org.apache.ode.dao.jpa.MessageExchangeDAOImpl</class>
- <class>org.apache.ode.dao.jpa.MessageRouteDAOImpl</class>
- <class>org.apache.ode.dao.jpa.PartnerLinkDAOImpl</class>
- <class>org.apache.ode.dao.jpa.ProcessDAOImpl</class>
- <class>org.apache.ode.dao.jpa.ProcessInstanceDAOImpl</class>
- <class>org.apache.ode.dao.jpa.ResourceRouteDAOImpl</class>
- <class>org.apache.ode.dao.jpa.ScopeDAOImpl</class>
- <class>org.apache.ode.dao.jpa.XmlDataDAOImpl</class>
- <class>org.apache.ode.dao.jpa.ContextValueDAOImpl</class>
-
- <class>org.apache.ode.store.jpa.ProcessConfDaoImpl</class>
- <class>org.apache.ode.store.jpa.ProcessConfPropertyDaoImpl</class>
- <class>org.apache.ode.store.jpa.DeploymentUnitDaoImpl</class>
- <class>org.apache.ode.store.jpa.VersionTrackerDAOImpl</class>
-
- <properties>
- <property name="hibernate.show_sql" value="false" />
- <property name="hibernate.dialect"
value="org.hibernate.dialect.OracleDialect" />
- <property name="hibernate.connection.datasource"
value="java:BPELDB" />
- <property name="hibernate.transaction.factory_class"
value="org.hibernate.transaction.JTATransactionFactory" />
- <property name="hibernate.transaction.manager_lookup_class"
value="org.hibernate.transaction.JBossTransactionManagerLookup" />
- <property name="jta.UserTransaction"
value="jta.UserTransaction" />
- </properties>
- </persistence-unit>
-</persistence>
-
Deleted:
branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/src/main/descriptors/persistence.postgres.xml
===================================================================
---
branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/src/main/descriptors/persistence.postgres.xml 2010-05-27
15:55:40 UTC (rev 675)
+++
branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/src/main/descriptors/persistence.postgres.xml 2010-05-27
16:08:03 UTC (rev 676)
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ 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.
- -->
-<persistence
xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="1.0">
- <persistence-unit name="ode-unit-test-embedded">
-
<provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
- <class>org.apache.ode.dao.jpa.ActivityRecoveryDAOImpl</class>
- <class>org.apache.ode.dao.jpa.CorrelationSetDAOImpl</class>
- <class>org.apache.ode.dao.jpa.CorrelatorDAOImpl</class>
- <class>org.apache.ode.dao.jpa.EventDAOImpl</class>
- <class>org.apache.ode.dao.jpa.FaultDAOImpl</class>
- <class>org.apache.ode.dao.jpa.MessageDAOImpl</class>
- <class>org.apache.ode.dao.jpa.MessageExchangeDAOImpl</class>
- <class>org.apache.ode.dao.jpa.MessageRouteDAOImpl</class>
- <class>org.apache.ode.dao.jpa.PartnerLinkDAOImpl</class>
- <class>org.apache.ode.dao.jpa.ProcessDAOImpl</class>
- <class>org.apache.ode.dao.jpa.ProcessInstanceDAOImpl</class>
- <class>org.apache.ode.dao.jpa.ResourceRouteDAOImpl</class>
- <class>org.apache.ode.dao.jpa.ScopeDAOImpl</class>
- <class>org.apache.ode.dao.jpa.XmlDataDAOImpl</class>
- <class>org.apache.ode.dao.jpa.ContextValueDAOImpl</class>
-
- <class>org.apache.ode.store.jpa.ProcessConfDaoImpl</class>
- <class>org.apache.ode.store.jpa.ProcessConfPropertyDaoImpl</class>
- <class>org.apache.ode.store.jpa.DeploymentUnitDaoImpl</class>
- <class>org.apache.ode.store.jpa.VersionTrackerDAOImpl</class>
-
- <properties>
- <property name="hibernate.show_sql" value="false" />
- <property name="hibernate.dialect"
value="org.hibernate.dialect.PostgresDialect" />
- <property name="hibernate.connection.datasource"
value="java:BPELDB" />
- <property name="hibernate.transaction.factory_class"
value="org.hibernate.transaction.JTATransactionFactory" />
- <property name="hibernate.transaction.manager_lookup_class"
value="org.hibernate.transaction.JBossTransactionManagerLookup" />
- <property name="jta.UserTransaction"
value="jta.UserTransaction" />
- </properties>
- </persistence-unit>
-</persistence>
-
Modified:
branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/src/main/files/hibernate.cfg/hsql.properties
===================================================================
---
branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/src/main/files/hibernate.cfg/hsql.properties 2010-05-27
15:55:40 UTC (rev 675)
+++
branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/src/main/files/hibernate.cfg/hsql.properties 2010-05-27
16:08:03 UTC (rev 676)
@@ -1 +1 @@
-dialect=org.hibernate.dialect.HSQLDialect
\ No newline at end of file
+dialect=org.hibernate.dialect.H2Dialect
\ No newline at end of file
Added:
branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/src/main/files/hibernate.cfg/oracle.properties
===================================================================
---
branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/src/main/files/hibernate.cfg/oracle.properties
(rev 0)
+++
branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/src/main/files/hibernate.cfg/oracle.properties 2010-05-27
16:08:03 UTC (rev 676)
@@ -0,0 +1 @@
+dialect=org.hibernate.dialect.OracleDialect
\ No newline at end of file
Added:
branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/src/main/files/hibernate.cfg/postgres.properties
===================================================================
---
branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/src/main/files/hibernate.cfg/postgres.properties
(rev 0)
+++
branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/src/main/files/hibernate.cfg/postgres.properties 2010-05-27
16:08:03 UTC (rev 676)
@@ -0,0 +1 @@
+dialect=org.hibernate.dialect.PostgresDialect
\ No newline at end of file
Modified:
branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/src/main/java/org/apache/ode/dao/jpa/hibernate/BpelDAOConnectionFactoryImpl.java
===================================================================
---
branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/src/main/java/org/apache/ode/dao/jpa/hibernate/BpelDAOConnectionFactoryImpl.java 2010-05-27
15:55:40 UTC (rev 675)
+++
branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/src/main/java/org/apache/ode/dao/jpa/hibernate/BpelDAOConnectionFactoryImpl.java 2010-05-27
16:08:03 UTC (rev 676)
@@ -18,8 +18,6 @@
*/
package org.apache.ode.dao.jpa.hibernate;
-import java.sql.Connection;
-import java.sql.SQLException;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
@@ -40,8 +38,6 @@
import org.apache.ode.il.config.OdeConfigProperties;
import org.apache.ode.utils.GUID;
import org.hibernate.cfg.Environment;
-import org.hibernate.dialect.Dialect;
-import org.hibernate.dialect.resolver.DialectFactory;
import org.hibernate.ejb.EntityManagerImpl;
/**
@@ -93,7 +89,7 @@
if (ds != null) {
props.put(Environment.CONNECTION_PROVIDER,
DataSourceConnectionProvider.class.getName());
HibernateUtil.registerDatasource(guid, ds);
- props.put(Environment.DIALECT, guessDialect(ds));
+ //props.put(Environment.DIALECT, guessDialect(ds));
}
if (txm != null) {
props.put(Environment.CURRENT_SESSION_CONTEXT_CLASS, "jta");
@@ -157,7 +153,10 @@
}
private static final String DEFAULT_HIBERNATE_DIALECT =
"org.hibernate.dialect.DerbyDialect";
- public static String guessDialect(DataSource dataSource) {
+ //Because the JBoss AS 5.1.0.GA uses Hibernate 3.3.1.GA
+ //While SOA-P 5 uses Hibernate 3.3.2.GA, they are different for guessDialect, so
comment it now.
+
+/* private static String guessDialect(DataSource dataSource) {
String dialect = null;
// Open a connection and use that connection to figure out database
@@ -185,7 +184,7 @@
return dialect;
- }
+ } */
}
Added:
branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/src/main/resources/META-INF/persistence.xml
===================================================================
---
branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/src/main/resources/META-INF/persistence.xml
(rev 0)
+++
branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/src/main/resources/META-INF/persistence.xml 2010-05-27
16:08:03 UTC (rev 676)
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ 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.
+ -->
+<persistence
xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="1.0">
+ <persistence-unit name="ode-unit-test-embedded">
+ <provider>org.hibernate.ejb.HibernatePersistence</provider>
+
+ <class>org.apache.ode.dao.jpa.bpel.ActivityRecoveryDAOImpl</class>
+ <class>org.apache.ode.dao.jpa.bpel.CorrelationSetDAOImpl</class>
+ <class>org.apache.ode.dao.jpa.bpel.CorrelatorDAOImpl</class>
+ <class>org.apache.ode.dao.jpa.bpel.EventDAOImpl</class>
+ <class>org.apache.ode.dao.jpa.bpel.FaultDAOImpl</class>
+ <class>org.apache.ode.dao.jpa.bpel.MessageDAOImpl</class>
+ <class>org.apache.ode.dao.jpa.bpel.MessageExchangeDAOImpl</class>
+ <class>org.apache.ode.dao.jpa.bpel.MessageRouteDAOImpl</class>
+ <class>org.apache.ode.dao.jpa.bpel.PartnerLinkDAOImpl</class>
+ <class>org.apache.ode.dao.jpa.bpel.ProcessDAOImpl</class>
+ <class>org.apache.ode.dao.jpa.bpel.ProcessInstanceDAOImpl</class>
+ <class>org.apache.ode.dao.jpa.bpel.ScopeDAOImpl</class>
+ <class>org.apache.ode.dao.jpa.bpel.XmlDataDAOImpl</class>
+ <class>org.apache.ode.dao.jpa.bpel.CorrSetProperty</class>
+ <class>org.apache.ode.dao.jpa.bpel.MexProperty</class>
+ <class>org.apache.ode.dao.jpa.bpel.XmlDataProperty</class>
+
+ <class>org.apache.ode.dao.jpa.store.ProcessConfDaoImpl</class>
+ <class>org.apache.ode.dao.jpa.store.ProcessConfPropertyDaoImpl</class>
+ <class>org.apache.ode.dao.jpa.store.DeploymentUnitDaoImpl</class>
+ <class>org.apache.ode.dao.jpa.store.VersionTrackerDAOImpl</class>
+
+ <properties>
+ <property name="hibernate.show_sql" value="false" />
+ <property name="hibernate.dialect"
value="org.hibernate.dialect.H2Dialect" />
+ <property name="hibernate.connection.datasource"
value="java:BPELDB" />
+ <property name="hibernate.transaction.factory_class"
value="org.hibernate.transaction.JTATransactionFactory" />
+ <property name="hibernate.transaction.manager_lookup_class"
value="org.hibernate.transaction.JBossTransactionManagerLookup" />
+ <property name="jta.UserTransaction"
value="jta.UserTransaction" />
+ </properties>
+ </persistence-unit>
+</persistence>
+
Added: branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/src/main/scripts/common.sql
===================================================================
--- branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/src/main/scripts/common.sql
(rev 0)
+++ branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/src/main/scripts/common.sql 2010-05-27
16:08:03 UTC (rev 676)
@@ -0,0 +1,3 @@
+create table ODE_SCHEMA_VERSION(VERSION integer);
+insert into ODE_SCHEMA_VERSION values (6);
+
Added: branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/src/main/scripts/simplesched-hsql.sql
===================================================================
--- branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/src/main/scripts/simplesched-hsql.sql
(rev 0)
+++
branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/src/main/scripts/simplesched-hsql.sql 2010-05-27
16:08:03 UTC (rev 676)
@@ -0,0 +1,29 @@
+-- Apache ODE - SimpleScheduler Database Schema
+--
+-- Apache Derby scripts by Maciej Szefler.
+--
+--
+
+CREATE TABLE ode_job (
+ jobid CHAR(64) NOT NULL DEFAULT '',
+ ts BIGINT NOT NULL DEFAULT 0,
+ nodeid char(64),
+ scheduled int NOT NULL DEFAULT 0,
+ transacted int NOT NULL DEFAULT 0,
+
+ instanceId BIGINT,
+ mexId varchar(255),
+ processId varchar(255),
+ type varchar(255),
+ channel varchar(255),
+ correlatorId varchar(255),
+ correlationKeySet varchar(255),
+ retryCount int,
+ inMem int,
+ detailsExt varbinary,
+
+ PRIMARY KEY(jobid));
+
+CREATE INDEX IDX_ODE_JOB_TS ON ode_job(ts);
+CREATE INDEX IDX_ODE_JOB_NODEID ON ode_job(nodeid);
+
Modified: branches/ODE/ODE-1.x-jpa/pom.xml
===================================================================
--- branches/ODE/ODE-1.x-jpa/pom.xml 2010-05-27 15:55:40 UTC (rev 675)
+++ branches/ODE/ODE-1.x-jpa/pom.xml 2010-05-27 16:08:03 UTC (rev 676)
@@ -92,7 +92,7 @@
<persistence-api.version>1.0</persistence-api.version>
<xalan.version>2.7.1</xalan.version>
<ant.version>1.6.5</ant.version>
- <openjpa.version>1.2.1</openjpa.version>
+ <openjpa.version>1.3.0-SNAPSHOT</openjpa.version>
<serp.version>1.13.1</serp.version>
<dom4j.version>1.6.1</dom4j.version>
<derby.version>10.5.3.0_1</derby.version>