riftsaw SVN: r346 - trunk/samples/esb/webservice_esb_bpel.
by riftsaw-commits@lists.jboss.org
Author: objectiser
Date: 2009-11-27 11:05:34 -0500 (Fri, 27 Nov 2009)
New Revision: 346
Added:
trunk/samples/esb/webservice_esb_bpel/jboss-structure.xml
Log:
Added jboss-structure.xml to enable Webservice_esb_bpel example to work with ESB4.7, which no longer examines sub-folders for deployable components. This was preventing the BPEL processes from being deployed.
Added: trunk/samples/esb/webservice_esb_bpel/jboss-structure.xml
===================================================================
--- trunk/samples/esb/webservice_esb_bpel/jboss-structure.xml (rev 0)
+++ trunk/samples/esb/webservice_esb_bpel/jboss-structure.xml 2009-11-27 16:05:34 UTC (rev 346)
@@ -0,0 +1,24 @@
+<structure>
+ <context>
+ <path name=""/>
+ <metaDataPath>
+ <path name="META-INF"/>
+ </metaDataPath>
+ <classpath>
+ <path name=""/>
+ <path name="" suffixes=".jar"/>
+ </classpath>
+ </context>
+ <context>
+ <path name="Quickstart_webservice_bpel.war"/>
+ <metaDataPath>
+ <path name="META-INF"/>
+ </metaDataPath>
+ </context>
+ <context>
+ <path name="jbm-queue-service.xml"/>
+ </context>
+ <context>
+ <path name="bpel/bpel-deploy.xml"/>
+ </context>
+</structure>
15 years, 1 month
riftsaw SVN: r345 - in branches/ODE/ODE-1.x-jpa: bpel-store/src/main/java/org/apache/ode/store/jpa and 5 other directories.
by riftsaw-commits@lists.jboss.org
Author: jeff.yuchang
Date: 2009-11-27 04:49:06 -0500 (Fri, 27 Nov 2009)
New Revision: 345
Added:
branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/src/descriptor/
branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/src/descriptor/META-INF/
branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/src/descriptor/META-INF/persistence.xml
Modified:
branches/ODE/ODE-1.x-jpa/Rakefile-riftsaw
branches/ODE/ODE-1.x-jpa/bpel-store/src/main/java/org/apache/ode/store/jpa/ProcessConfDaoImpl.java
branches/ODE/ODE-1.x-jpa/bpel-store/src/main/java/org/apache/ode/store/jpa/ProcessConfPropertyDaoImpl.java
branches/ODE/ODE-1.x-jpa/bpel-store/src/main/java/org/apache/ode/store/jpa/VersionTrackerDAOImpl.java
branches/ODE/ODE-1.x-jpa/bpel-store/src/main/resources/META-INF/persistence.xml
branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/build.xml
branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/pom.xml
Log:
* updated the bpel-store to use hibernate as JPA provider.
* add id for entity, otherwise hibernte will complain it, seems openjpa generate an id automatically.
* update the @JoinColumn and HashMap to Map API, hibernate just recoginize the Map.
* add entity class in the db generation script.
Modified: branches/ODE/ODE-1.x-jpa/Rakefile-riftsaw
===================================================================
--- branches/ODE/ODE-1.x-jpa/Rakefile-riftsaw 2009-11-27 07:33:08 UTC (rev 344)
+++ branches/ODE/ODE-1.x-jpa/Rakefile-riftsaw 2009-11-27 09:49:06 UTC (rev 345)
@@ -348,12 +348,12 @@
define "bpel-store" do
compile.with projects("bpel-api", "bpel-compiler", "bpel-dao", "bpel-obj", "bpel-schemas", "bpel-epr",
"dao-hibernate", "dao-jpa", "utils"),
- COMMONS.logging, JAVAX.persistence, JAVAX.stream, JAVAX.transaction, HIBERNATE, HSQLDB, XMLBEANS, XERCES, WSDL4J, OPENJPA
- compile { open_jpa_enhance }
- resources hibernate_doclet(:package=>"org.apache.ode.store.hib", :excludedtags=>"@version,@author,@todo")
+ COMMONS.logging, JAVAX.persistence, JAVAX.stream, JAVAX.transaction, HIBERNATE, HSQLDB, XMLBEANS, XERCES, WSDL4J
+
+ resources hibernate_doclet(:package=>"org.apache.ode.store.hib", :excludedtags=>"@version,@author,@todo")
test.with COMMONS.collections, COMMONS.lang, JAVAX.connector, JAVAX.transaction, DOM4J, LOG4J,
- XERCES, XALAN, JAXEN, SAXON, OPENJPA, GERONIMO.transaction
+ XERCES, XALAN, JAXEN, SAXON, GERONIMO.transaction
package :jar
end
Modified: branches/ODE/ODE-1.x-jpa/bpel-store/src/main/java/org/apache/ode/store/jpa/ProcessConfDaoImpl.java
===================================================================
--- branches/ODE/ODE-1.x-jpa/bpel-store/src/main/java/org/apache/ode/store/jpa/ProcessConfDaoImpl.java 2009-11-27 07:33:08 UTC (rev 344)
+++ branches/ODE/ODE-1.x-jpa/bpel-store/src/main/java/org/apache/ode/store/jpa/ProcessConfDaoImpl.java 2009-11-27 09:49:06 UTC (rev 345)
@@ -29,6 +29,7 @@
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
+import java.util.Map;
/**
* @author Matthieu Riou <mriou at apache dot org>
@@ -38,13 +39,13 @@
public class ProcessConfDaoImpl extends JpaObj implements ProcessConfDAO {
@ManyToOne(targetEntity=DeploymentUnitDaoImpl.class,fetch=FetchType.EAGER,cascade={CascadeType.ALL})
- @Column(name="DU")
+ @JoinColumn(name="DU")
private DeploymentUnitDaoImpl _du;
@OneToMany(fetch=FetchType.EAGER,cascade={CascadeType.ALL})
@MapKey(name="_key")
@JoinTable(name="STORE_PROC_TO_PROP")
- private HashMap<String,ProcessConfPropertyDaoImpl> _properties = new HashMap<String,ProcessConfPropertyDaoImpl>();
+ private Map<String,ProcessConfPropertyDaoImpl> _properties = new HashMap<String,ProcessConfPropertyDaoImpl>();
@Id @Column(name="PID")
private String _processId;
Modified: branches/ODE/ODE-1.x-jpa/bpel-store/src/main/java/org/apache/ode/store/jpa/ProcessConfPropertyDaoImpl.java
===================================================================
--- branches/ODE/ODE-1.x-jpa/bpel-store/src/main/java/org/apache/ode/store/jpa/ProcessConfPropertyDaoImpl.java 2009-11-27 07:33:08 UTC (rev 344)
+++ branches/ODE/ODE-1.x-jpa/bpel-store/src/main/java/org/apache/ode/store/jpa/ProcessConfPropertyDaoImpl.java 2009-11-27 09:49:06 UTC (rev 345)
@@ -22,6 +22,8 @@
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
import javax.persistence.Table;
/**
@@ -30,6 +32,10 @@
@Entity
@Table(name="STORE_PROCESS_PROP")
public class ProcessConfPropertyDaoImpl {
+
+ @Id @Column(name="id")
+ @GeneratedValue
+ private Long _id;
@Basic @Column(name="PROP_KEY")
private String _key;
@@ -51,4 +57,13 @@
public void setValue(String value) {
_value = value;
}
+
+ public Long getId() {
+ return _id;
+ }
+
+ public void setId(Long id) {
+ this._id = id;
+ }
+
}
Modified: branches/ODE/ODE-1.x-jpa/bpel-store/src/main/java/org/apache/ode/store/jpa/VersionTrackerDAOImpl.java
===================================================================
--- branches/ODE/ODE-1.x-jpa/bpel-store/src/main/java/org/apache/ode/store/jpa/VersionTrackerDAOImpl.java 2009-11-27 07:33:08 UTC (rev 344)
+++ branches/ODE/ODE-1.x-jpa/bpel-store/src/main/java/org/apache/ode/store/jpa/VersionTrackerDAOImpl.java 2009-11-27 09:49:06 UTC (rev 345)
@@ -22,6 +22,8 @@
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
import javax.persistence.Table;
/**
@@ -30,7 +32,11 @@
@Entity
@Table(name="STORE_VERSIONS")
public class VersionTrackerDAOImpl {
-
+
+ @Id @Column(name="id")
+ @GeneratedValue
+ private Long _id;
+
@Basic @Column(name="VERSION")
private long _version;
@@ -41,4 +47,14 @@
public void setVersion(long version) {
_version = version;
}
+
+ public Long getId() {
+ return _id;
+ }
+
+ public void setId(Long id) {
+ this._id = id;
+ }
+
+
}
Modified: branches/ODE/ODE-1.x-jpa/bpel-store/src/main/resources/META-INF/persistence.xml
===================================================================
--- branches/ODE/ODE-1.x-jpa/bpel-store/src/main/resources/META-INF/persistence.xml 2009-11-27 07:33:08 UTC (rev 344)
+++ branches/ODE/ODE-1.x-jpa/bpel-store/src/main/resources/META-INF/persistence.xml 2009-11-27 09:49:06 UTC (rev 345)
@@ -22,14 +22,19 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="1.0">
<persistence-unit name="ode-store">
- <!--
- This properties file is used specifically by the
- OpenJPA Enhancer.
- -->
- <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
+ <provider>org.hibernate.ejb.HibernatePersistence</provider>
<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.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>
Modified: branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/build.xml
===================================================================
--- branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/build.xml 2009-11-27 07:33:08 UTC (rev 344)
+++ branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/build.xml 2009-11-27 09:49:06 UTC (rev 345)
@@ -13,7 +13,7 @@
<property name="config.dir" value="src/main/files/hibernate.cfg"/>
<path id="classpath">
- <path location="src/main/resources"/>
+ <path location="src/descriptor"/>
<pathelement path="${maven.runtime.classpath}"/>
</path>
Modified: branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/pom.xml
===================================================================
--- branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/pom.xml 2009-11-27 07:33:08 UTC (rev 344)
+++ branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/pom.xml 2009-11-27 09:49:06 UTC (rev 345)
@@ -78,6 +78,11 @@
<artifactId>riftsaw-utils</artifactId>
<version>2.0-SNAPSHOT</version>
</dependency>
+ <dependency>
+ <groupId>org.jboss.soa.bpel</groupId>
+ <artifactId>riftsaw-bpel-store</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ </dependency>
<!-- Database Drivers -->
<dependency>
Added: branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/src/descriptor/META-INF/persistence.xml
===================================================================
--- branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/src/descriptor/META-INF/persistence.xml (rev 0)
+++ branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/src/descriptor/META-INF/persistence.xml 2009-11-27 09:49:06 UTC (rev 345)
@@ -0,0 +1,58 @@
+<?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-dao">
+ <provider>org.hibernate.ejb.HibernatePersistence</provider>
+
+
+ <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.ScopeDAOImpl</class>
+ <class>org.apache.ode.dao.jpa.XmlDataDAOImpl</class>
+ <class>org.apache.ode.dao.jpa.CorrSetProperty</class>
+ <class>org.apache.ode.dao.jpa.MexProperty</class>
+ <class>org.apache.ode.dao.jpa.XmlDataProperty</class>
+ <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.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.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>
\ No newline at end of file
15 years, 1 month
riftsaw SVN: r344 - in branches/ODE/ODE-1.x-jpa: dao-jpa/src/main/java/org/apache/ode/dao/jpa and 2 other directories.
by riftsaw-commits@lists.jboss.org
Author: jeff.yuchang
Date: 2009-11-27 02:33:08 -0500 (Fri, 27 Nov 2009)
New Revision: 344
Modified:
branches/ODE/ODE-1.x-jpa/Rakefile-riftsaw
branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/build.xml
branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/pom.xml
branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/src/main/resources/META-INF/persistence.xml
branches/ODE/ODE-1.x-jpa/dao-jpa/src/main/java/org/apache/ode/dao/jpa/ActivityRecoveryDAOImpl.java
branches/ODE/ODE-1.x-jpa/dao-jpa/src/main/java/org/apache/ode/dao/jpa/CorrSetProperty.java
branches/ODE/ODE-1.x-jpa/dao-jpa/src/main/java/org/apache/ode/dao/jpa/CorrelationSetDAOImpl.java
branches/ODE/ODE-1.x-jpa/dao-jpa/src/main/java/org/apache/ode/dao/jpa/CorrelatorDAOImpl.java
branches/ODE/ODE-1.x-jpa/dao-jpa/src/main/java/org/apache/ode/dao/jpa/EventDAOImpl.java
branches/ODE/ODE-1.x-jpa/dao-jpa/src/main/java/org/apache/ode/dao/jpa/MessageDAOImpl.java
branches/ODE/ODE-1.x-jpa/dao-jpa/src/main/java/org/apache/ode/dao/jpa/MessageExchangeDAOImpl.java
branches/ODE/ODE-1.x-jpa/dao-jpa/src/main/java/org/apache/ode/dao/jpa/MessageRouteDAOImpl.java
branches/ODE/ODE-1.x-jpa/dao-jpa/src/main/java/org/apache/ode/dao/jpa/MexProperty.java
branches/ODE/ODE-1.x-jpa/dao-jpa/src/main/java/org/apache/ode/dao/jpa/PartnerLinkDAOImpl.java
branches/ODE/ODE-1.x-jpa/dao-jpa/src/main/java/org/apache/ode/dao/jpa/ProcessInstanceDAOImpl.java
branches/ODE/ODE-1.x-jpa/dao-jpa/src/main/java/org/apache/ode/dao/jpa/ScopeDAOImpl.java
branches/ODE/ODE-1.x-jpa/dao-jpa/src/main/java/org/apache/ode/dao/jpa/XmlDataDAOImpl.java
branches/ODE/ODE-1.x-jpa/dao-jpa/src/main/java/org/apache/ode/dao/jpa/XmlDataProperty.java
Log:
* update the @Column to @JoinColumn for @ManyToOne, @OneToOne. otherwise, it won't work against Hibernate.
* now it is only configured to generate the hsql db's script. (will need to test it under riftsaw env first before producing other db's script)
Modified: branches/ODE/ODE-1.x-jpa/Rakefile-riftsaw
===================================================================
--- branches/ODE/ODE-1.x-jpa/Rakefile-riftsaw 2009-11-27 06:27:43 UTC (rev 343)
+++ branches/ODE/ODE-1.x-jpa/Rakefile-riftsaw 2009-11-27 07:33:08 UTC (rev 344)
@@ -189,7 +189,7 @@
libs = projects("axis2", "bpel-api", "bpel-compiler", "bpel-connector", "bpel-dao",
"bpel-epr", "bpel-obj", "bpel-ql", "bpel-runtime", "scheduler-simple",
"bpel-schemas", "bpel-store", "dao-hibernate", "jacob", "jca-ra", "jca-server",
- "utils", "dao-jpa", "agents"),
+ "utils", "dao-jpa","dao-jpa-ojpa", "dao-jpa-hibernate", "agents"),
AXIS2_ALL, ANNONGEN, BACKPORT, COMMONS.codec, COMMONS.collections, COMMONS.fileupload, COMMONS.io, COMMONS.httpclient,
COMMONS.lang, COMMONS.logging, COMMONS.pool, DERBY, DERBY_TOOLS, JAXEN, JAVAX.activation, JAVAX.ejb, JAVAX.javamail,
JAVAX.connector, JAVAX.jms, JAVAX.persistence, JAVAX.transaction, JAVAX.stream, JIBX,
@@ -285,6 +285,7 @@
package :jar
end
+
desc "ODE Interface Layers Common"
define "bpel-epr" do
compile.with projects("utils", "bpel-dao", "bpel-api"),
@@ -440,15 +441,31 @@
package(:zip).include(derby_db)
end
- desc "ODE OpenJPA DAO Implementation"
+ desc "ODE JPA DAO Implementation"
define "dao-jpa" do
compile.with projects("bpel-api", "bpel-dao", "utils"),
COMMONS.collections, COMMONS.logging, JAVAX.connector, JAVAX.persistence, JAVAX.transaction,
- OPENJPA, XERCES
- compile { open_jpa_enhance }
+ XERCES
package :jar
end
+ desc "ODE OpenJPA DAO Implementation"
+ define "dao-jpa-ojpa" do
+ compile.with projects("bpel-api", "bpel-dao", "utils", "dao-jpa"),
+ COMMONS.collections, COMMONS.logging, JAVAX.connector, JAVAX.persistence, JAVAX.transaction,
+ OPENJPA, XERCES
+ compile { open_jpa_enhance }
+ package :jar
+ end
+
+ desc "ODE Hibernate DAO Implementation"
+ define "dao-jpa-hibernate" do
+ compile.with projects("bpel-api", "bpel-dao", "utils", "dao-jpa"),
+ COMMONS.collections, COMMONS.logging, JAVAX.connector, JAVAX.persistence, JAVAX.transaction,
+ XERCES
+ package :jar
+ end
+
desc "ODE OpenJPA Derby Database"
define "dao-jpa-ojpa-derby" do
%w{ derby mysql oracle }.each do |db|
@@ -458,14 +475,14 @@
partial_sql = file("target/partial.#{db}.sql"=>db_xml) do |task|
mkpath _("target"), :verbose=>false
Buildr::OpenJPA.mapping_tool :properties=>db_xml, :action=>"build", :sql=>task.name,
- :classpath=>projects("bpel-store", "dao-jpa", "bpel-api", "bpel-dao", "utils" )
+ :classpath=>projects("bpel-store", "dao-jpa","dao-jpa-ojpa", "bpel-api", "bpel-dao", "utils" )
end
sql = concat(_("target/#{db}.sql")=>[_("src/main/scripts/license-header.sql"), common_sql, partial_sql, scheduler_sql])
build sql
end
derby_db = Derby.create(_("target/derby/jpadb")=>_("target/derby.sql"))
- test.with projects("bpel-api", "bpel-dao", "bpel-obj", "bpel-epr", "dao-jpa", "utils"),
+ test.with projects("bpel-api", "bpel-dao", "dao-jpa-ojpa", "bpel-obj", "bpel-epr", "dao-jpa", "utils"),
BACKPORT, COMMONS.collections, COMMONS.lang, COMMONS.logging, GERONIMO.transaction,
GERONIMO.kernel, GERONIMO.connector, HSQLDB, JAVAX.connector, JAVAX.ejb, JAVAX.persistence,
JAVAX.transaction, LOG4J, OPENJPA, XERCES, WSDL4J
@@ -502,7 +519,7 @@
libs = artifacts(package(:jar),
projects("bpel-api", "bpel-api-jca", "bpel-compiler", "bpel-connector", "bpel-dao",
"bpel-epr", "jca-ra", "jca-server", "bpel-obj", "bpel-ql", "bpel-runtime",
- "scheduler-simple", "bpel-schemas", "bpel-store", "dao-hibernate", "dao-jpa",
+ "scheduler-simple", "bpel-schemas", "bpel-store", "dao-hibernate", "dao-jpa", "dao-jpa-ojpa", "dao-jpa-hibernate",
"jacob", "jacob-ap", "utils", "agents"),
ANT, AXIOM, BACKPORT, COMMONS.codec, COMMONS.collections, COMMONS.dbcp, COMMONS.lang, COMMONS.pool,
COMMONS.primitives, DERBY, GERONIMO.connector, GERONIMO.transaction, JAXEN, JAVAX.connector,
Modified: branches/ODE/ODE-1.x-jpa/dao-jpa/src/main/java/org/apache/ode/dao/jpa/ActivityRecoveryDAOImpl.java
===================================================================
--- branches/ODE/ODE-1.x-jpa/dao-jpa/src/main/java/org/apache/ode/dao/jpa/ActivityRecoveryDAOImpl.java 2009-11-27 06:27:43 UTC (rev 343)
+++ branches/ODE/ODE-1.x-jpa/dao-jpa/src/main/java/org/apache/ode/dao/jpa/ActivityRecoveryDAOImpl.java 2009-11-27 07:33:08 UTC (rev 344)
@@ -31,6 +31,7 @@
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
+import javax.persistence.JoinColumn;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
@@ -77,7 +78,7 @@
// _instances is unused because this is a one-way relationship at the database level
@SuppressWarnings("unused")
- @ManyToOne(fetch=FetchType.LAZY,cascade={CascadeType.PERSIST}) @Column(name="INSTANCE_ID")
+ @ManyToOne(fetch=FetchType.LAZY,cascade={CascadeType.PERSIST}) @JoinColumn(name="INSTANCE_ID")
private ProcessInstanceDAOImpl _instance;
Modified: branches/ODE/ODE-1.x-jpa/dao-jpa/src/main/java/org/apache/ode/dao/jpa/CorrSetProperty.java
===================================================================
--- branches/ODE/ODE-1.x-jpa/dao-jpa/src/main/java/org/apache/ode/dao/jpa/CorrSetProperty.java 2009-11-27 06:27:43 UTC (rev 343)
+++ branches/ODE/ODE-1.x-jpa/dao-jpa/src/main/java/org/apache/ode/dao/jpa/CorrSetProperty.java 2009-11-27 07:33:08 UTC (rev 344)
@@ -26,6 +26,7 @@
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
+import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
@@ -55,7 +56,7 @@
@Basic @Column(name="CORRSET_ID", insertable=false, updatable=false, nullable=true)
private Long corrSetId;
- @ManyToOne(fetch=FetchType.LAZY,cascade={CascadeType.PERSIST}) @Column(name="CORRSET_ID")
+ @ManyToOne(fetch=FetchType.LAZY,cascade={CascadeType.PERSIST}) @JoinColumn(name="CORRSET_ID")
private CorrelationSetDAOImpl _corrSet;
public CorrSetProperty() {
Modified: branches/ODE/ODE-1.x-jpa/dao-jpa/src/main/java/org/apache/ode/dao/jpa/CorrelationSetDAOImpl.java
===================================================================
--- branches/ODE/ODE-1.x-jpa/dao-jpa/src/main/java/org/apache/ode/dao/jpa/CorrelationSetDAOImpl.java 2009-11-27 06:27:43 UTC (rev 343)
+++ branches/ODE/ODE-1.x-jpa/dao-jpa/src/main/java/org/apache/ode/dao/jpa/CorrelationSetDAOImpl.java 2009-11-27 07:33:08 UTC (rev 344)
@@ -33,6 +33,7 @@
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
+import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
@@ -70,7 +71,7 @@
@OneToMany(targetEntity=CorrSetProperty.class,mappedBy="_corrSet",fetch=FetchType.LAZY,cascade={CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH})
private Collection<CorrSetProperty> _props = new ArrayList<CorrSetProperty>();
- @ManyToOne(fetch=FetchType.LAZY,cascade={CascadeType.PERSIST}) @Column(name="SCOPE_ID")
+ @ManyToOne(fetch=FetchType.LAZY,cascade={CascadeType.PERSIST}) @JoinColumn(name="SCOPE_ID")
private ScopeDAOImpl _scope;
public CorrelationSetDAOImpl() {}
Modified: branches/ODE/ODE-1.x-jpa/dao-jpa/src/main/java/org/apache/ode/dao/jpa/CorrelatorDAOImpl.java
===================================================================
--- branches/ODE/ODE-1.x-jpa/dao-jpa/src/main/java/org/apache/ode/dao/jpa/CorrelatorDAOImpl.java 2009-11-27 06:27:43 UTC (rev 343)
+++ branches/ODE/ODE-1.x-jpa/dao-jpa/src/main/java/org/apache/ode/dao/jpa/CorrelatorDAOImpl.java 2009-11-27 07:33:08 UTC (rev 344)
@@ -23,6 +23,7 @@
import org.apache.ode.bpel.dao.*;
import javax.persistence.*;
+
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
@@ -47,7 +48,7 @@
private Collection<MessageRouteDAOImpl> _routes = new ArrayList<MessageRouteDAOImpl>();
@OneToMany(targetEntity=MessageExchangeDAOImpl.class,mappedBy="_correlator",fetch=FetchType.LAZY,cascade={CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH})
private Collection<MessageExchangeDAOImpl> _exchanges = new ArrayList<MessageExchangeDAOImpl>();
- @ManyToOne(fetch= FetchType.LAZY,cascade={CascadeType.PERSIST}) @Column(name="PROC_ID")
+ @ManyToOne(fetch= FetchType.LAZY,cascade={CascadeType.PERSIST}) @JoinColumn(name="PROC_ID")
private ProcessDAOImpl _process;
public CorrelatorDAOImpl(){}
Modified: branches/ODE/ODE-1.x-jpa/dao-jpa/src/main/java/org/apache/ode/dao/jpa/EventDAOImpl.java
===================================================================
--- branches/ODE/ODE-1.x-jpa/dao-jpa/src/main/java/org/apache/ode/dao/jpa/EventDAOImpl.java 2009-11-27 06:27:43 UTC (rev 343)
+++ branches/ODE/ODE-1.x-jpa/dao-jpa/src/main/java/org/apache/ode/dao/jpa/EventDAOImpl.java 2009-11-27 07:33:08 UTC (rev 344)
@@ -29,6 +29,7 @@
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
+import javax.persistence.JoinColumn;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
@@ -65,9 +66,9 @@
@Basic @Column(name="SCOPE_ID")
private Long _scopeId;
- @ManyToOne(fetch=FetchType.LAZY,cascade={CascadeType.PERSIST}) @Column(name="PROCESS_ID")
+ @ManyToOne(fetch=FetchType.LAZY,cascade={CascadeType.PERSIST}) @JoinColumn(name="PROCESS_ID")
private ProcessDAOImpl _process;
- @ManyToOne(fetch= FetchType.LAZY,cascade={CascadeType.PERSIST}) @Column(name="INSTANCE_ID")
+ @ManyToOne(fetch= FetchType.LAZY,cascade={CascadeType.PERSIST}) @JoinColumn(name="INSTANCE_ID")
private ProcessInstanceDAOImpl _instance;
@Lob @Column(name="DATA")
private BpelEvent _event;
Modified: branches/ODE/ODE-1.x-jpa/dao-jpa/src/main/java/org/apache/ode/dao/jpa/MessageDAOImpl.java
===================================================================
--- branches/ODE/ODE-1.x-jpa/dao-jpa/src/main/java/org/apache/ode/dao/jpa/MessageDAOImpl.java 2009-11-27 06:27:43 UTC (rev 343)
+++ branches/ODE/ODE-1.x-jpa/dao-jpa/src/main/java/org/apache/ode/dao/jpa/MessageDAOImpl.java 2009-11-27 07:33:08 UTC (rev 344)
@@ -33,6 +33,7 @@
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
+import javax.persistence.JoinColumn;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
@@ -63,7 +64,7 @@
private Element _element;
@Transient
private Element _headerElement;
- @ManyToOne(fetch=FetchType.LAZY,cascade={CascadeType.ALL}) @Column(name="MESSAGE_EXCHANGE_ID")
+ @ManyToOne(fetch=FetchType.LAZY,cascade={CascadeType.ALL}) @JoinColumn(name="MESSAGE_EXCHANGE_ID")
private MessageExchangeDAOImpl _messageExchange;
public MessageDAOImpl() {
Modified: branches/ODE/ODE-1.x-jpa/dao-jpa/src/main/java/org/apache/ode/dao/jpa/MessageExchangeDAOImpl.java
===================================================================
--- branches/ODE/ODE-1.x-jpa/dao-jpa/src/main/java/org/apache/ode/dao/jpa/MessageExchangeDAOImpl.java 2009-11-27 06:27:43 UTC (rev 343)
+++ branches/ODE/ODE-1.x-jpa/dao-jpa/src/main/java/org/apache/ode/dao/jpa/MessageExchangeDAOImpl.java 2009-11-27 07:33:08 UTC (rev 344)
@@ -34,6 +34,7 @@
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
+import javax.persistence.JoinColumn;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
@@ -104,18 +105,18 @@
@OneToMany(targetEntity=MexProperty.class,mappedBy="_mex",fetch=FetchType.EAGER,cascade={CascadeType.ALL})
private Collection<MexProperty> _props = new ArrayList<MexProperty>();
- @ManyToOne(fetch=FetchType.LAZY,cascade={CascadeType.PERSIST}) @Column(name="PROCESS_INSTANCE_ID")
+ @ManyToOne(fetch=FetchType.LAZY,cascade={CascadeType.PERSIST}) @JoinColumn(name="PROCESS_INSTANCE_ID")
private ProcessInstanceDAOImpl _processInst;
- @ManyToOne(fetch=FetchType.LAZY,cascade={CascadeType.PERSIST}) @Column(name="PARTNER_LINK_ID")
+ @ManyToOne(fetch=FetchType.LAZY,cascade={CascadeType.PERSIST}) @JoinColumn(name="PARTNER_LINK_ID")
private PartnerLinkDAOImpl _partnerLink;
- @ManyToOne(fetch=FetchType.LAZY,cascade={CascadeType.PERSIST}) @Column(name="PROCESS_ID")
+ @ManyToOne(fetch=FetchType.LAZY,cascade={CascadeType.PERSIST}) @JoinColumn(name="PROCESS_ID")
private ProcessDAOImpl _process;
- @OneToOne(fetch=FetchType.LAZY,cascade={CascadeType.ALL}) @Column(name="REQUEST_MESSAGE_ID")
+ @OneToOne(fetch=FetchType.LAZY,cascade={CascadeType.ALL}) @JoinColumn(name="REQUEST_MESSAGE_ID")
private MessageDAOImpl _request;
- @OneToOne(fetch=FetchType.LAZY,cascade={CascadeType.ALL}) @Column(name="RESPONSE_MESSAGE_ID")
+ @OneToOne(fetch=FetchType.LAZY,cascade={CascadeType.ALL}) @JoinColumn(name="RESPONSE_MESSAGE_ID")
private MessageDAOImpl _response;
- @ManyToOne(fetch= FetchType.LAZY,cascade={CascadeType.PERSIST}) @Column(name="CORR_ID")
+ @ManyToOne(fetch= FetchType.LAZY,cascade={CascadeType.PERSIST}) @JoinColumn(name="CORR_ID")
private CorrelatorDAOImpl _correlator;
public MessageExchangeDAOImpl() {
Modified: branches/ODE/ODE-1.x-jpa/dao-jpa/src/main/java/org/apache/ode/dao/jpa/MessageRouteDAOImpl.java
===================================================================
--- branches/ODE/ODE-1.x-jpa/dao-jpa/src/main/java/org/apache/ode/dao/jpa/MessageRouteDAOImpl.java 2009-11-27 06:27:43 UTC (rev 343)
+++ branches/ODE/ODE-1.x-jpa/dao-jpa/src/main/java/org/apache/ode/dao/jpa/MessageRouteDAOImpl.java 2009-11-27 07:33:08 UTC (rev 344)
@@ -32,6 +32,7 @@
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
+import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
@@ -62,10 +63,10 @@
@SuppressWarnings("unused")
@Basic @Column(name="PROCESS_INSTANCE_ID", insertable=false, updatable=false, nullable=true)
private int _instanceId;
- @ManyToOne(fetch=FetchType.LAZY,cascade={CascadeType.PERSIST}) @Column(name="PROCESS_INSTANCE_ID")
+ @ManyToOne(fetch=FetchType.LAZY,cascade={CascadeType.PERSIST}) @JoinColumn(name="PROCESS_INSTANCE_ID")
private ProcessInstanceDAOImpl _processInst;
- @ManyToOne(fetch= FetchType.LAZY,cascade={CascadeType.PERSIST}) @Column(name="CORR_ID")
+ @ManyToOne(fetch= FetchType.LAZY,cascade={CascadeType.PERSIST}) @JoinColumn(name="CORR_ID")
@SuppressWarnings("unused")
private CorrelatorDAOImpl _correlator;
Modified: branches/ODE/ODE-1.x-jpa/dao-jpa/src/main/java/org/apache/ode/dao/jpa/MexProperty.java
===================================================================
--- branches/ODE/ODE-1.x-jpa/dao-jpa/src/main/java/org/apache/ode/dao/jpa/MexProperty.java 2009-11-27 06:27:43 UTC (rev 343)
+++ branches/ODE/ODE-1.x-jpa/dao-jpa/src/main/java/org/apache/ode/dao/jpa/MexProperty.java 2009-11-27 07:33:08 UTC (rev 344)
@@ -27,6 +27,7 @@
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
+import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
@@ -56,7 +57,7 @@
@Basic @Column(name="MEX_ID", insertable=false, updatable=false, nullable=true)
private String _mexId;
@ManyToOne(fetch= FetchType.LAZY,cascade={CascadeType.PERSIST})
- @Column(name="MEX_ID")
+ @JoinColumn(name="MEX_ID")
@SuppressWarnings("unused")
private MessageExchangeDAOImpl _mex;
Modified: branches/ODE/ODE-1.x-jpa/dao-jpa/src/main/java/org/apache/ode/dao/jpa/PartnerLinkDAOImpl.java
===================================================================
--- branches/ODE/ODE-1.x-jpa/dao-jpa/src/main/java/org/apache/ode/dao/jpa/PartnerLinkDAOImpl.java 2009-11-27 06:27:43 UTC (rev 343)
+++ branches/ODE/ODE-1.x-jpa/dao-jpa/src/main/java/org/apache/ode/dao/jpa/PartnerLinkDAOImpl.java 2009-11-27 07:33:08 UTC (rev 344)
@@ -32,6 +32,7 @@
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
+import javax.persistence.JoinColumn;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
@@ -78,7 +79,7 @@
@SuppressWarnings("unused")
@Basic @Column(name="SCOPE_ID", nullable=true, insertable=false, updatable=false)
private Long _scopeId;
- @ManyToOne(fetch= FetchType.LAZY,cascade={CascadeType.PERSIST}) @Column(name="SCOPE_ID")
+ @ManyToOne(fetch= FetchType.LAZY,cascade={CascadeType.PERSIST}) @JoinColumn(name="SCOPE_ID")
@SuppressWarnings("unused")
private ScopeDAOImpl _scope;
Modified: branches/ODE/ODE-1.x-jpa/dao-jpa/src/main/java/org/apache/ode/dao/jpa/ProcessInstanceDAOImpl.java
===================================================================
--- branches/ODE/ODE-1.x-jpa/dao-jpa/src/main/java/org/apache/ode/dao/jpa/ProcessInstanceDAOImpl.java 2009-11-27 06:27:43 UTC (rev 343)
+++ branches/ODE/ODE-1.x-jpa/dao-jpa/src/main/java/org/apache/ode/dao/jpa/ProcessInstanceDAOImpl.java 2009-11-27 07:33:08 UTC (rev 344)
@@ -45,6 +45,7 @@
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
+import javax.persistence.JoinColumn;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
@@ -99,7 +100,7 @@
@Basic @Column(name="DATE_CREATED")
private Date _dateCreated = new Date();
- @OneToOne(fetch=FetchType.LAZY,cascade={CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH}) @Column(name="ROOT_SCOPE_ID")
+ @OneToOne(fetch=FetchType.LAZY,cascade={CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH}) @JoinColumn(name="ROOT_SCOPE_ID")
private ScopeDAOImpl _rootScope;
@OneToMany(targetEntity=ScopeDAOImpl.class,mappedBy="_processInstance",fetch=FetchType.LAZY,cascade={CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH})
private Collection<ScopeDAO> _scopes = new ArrayList<ScopeDAO>();
@@ -109,11 +110,11 @@
@SuppressWarnings("unused")
@Basic @Column(name="FAULT_ID", insertable=false, updatable=false, nullable=true)
private long _faultId;
- @OneToOne(fetch=FetchType.LAZY,cascade={CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH}) @Column(name="FAULT_ID")
+ @OneToOne(fetch=FetchType.LAZY,cascade={CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH}) @JoinColumn(name="FAULT_ID")
private FaultDAOImpl _fault;
- @ManyToOne(fetch=FetchType.LAZY,cascade={CascadeType.PERSIST}) @Column(name="PROCESS_ID")
+ @ManyToOne(fetch=FetchType.LAZY,cascade={CascadeType.PERSIST}) @JoinColumn(name="PROCESS_ID")
private ProcessDAOImpl _process;
- @ManyToOne(fetch=FetchType.LAZY,cascade={CascadeType.PERSIST}) @Column(name="INSTANTIATING_CORRELATOR_ID")
+ @ManyToOne(fetch=FetchType.LAZY,cascade={CascadeType.PERSIST}) @JoinColumn(name="INSTANTIATING_CORRELATOR_ID")
private CorrelatorDAOImpl _instantiatingCorrelator;
@OneToMany(targetEntity=MessageExchangeDAOImpl.class,mappedBy="_processInst",fetch=FetchType.LAZY)
Modified: branches/ODE/ODE-1.x-jpa/dao-jpa/src/main/java/org/apache/ode/dao/jpa/ScopeDAOImpl.java
===================================================================
--- branches/ODE/ODE-1.x-jpa/dao-jpa/src/main/java/org/apache/ode/dao/jpa/ScopeDAOImpl.java 2009-11-27 06:27:43 UTC (rev 343)
+++ branches/ODE/ODE-1.x-jpa/dao-jpa/src/main/java/org/apache/ode/dao/jpa/ScopeDAOImpl.java 2009-11-27 07:33:08 UTC (rev 344)
@@ -35,6 +35,7 @@
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
+import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
@@ -70,7 +71,7 @@
private String _scopeState;
@ManyToOne(fetch=FetchType.LAZY,cascade={CascadeType.PERSIST})
- @Column(name="PARENT_SCOPE_ID")
+ @JoinColumn(name="PARENT_SCOPE_ID")
private ScopeDAOImpl _parentScope;
@OneToMany(targetEntity=ScopeDAOImpl.class,mappedBy="_parentScope",fetch=FetchType.LAZY,cascade={CascadeType.ALL})
@@ -81,7 +82,7 @@
private Collection<PartnerLinkDAO> _partnerLinks = new ArrayList<PartnerLinkDAO>();
@OneToMany(targetEntity=XmlDataDAOImpl.class,mappedBy="_scope",fetch=FetchType.LAZY,cascade={CascadeType.MERGE, CascadeType.REFRESH, CascadeType.PERSIST})
private Collection<XmlDataDAO> _variables = new ArrayList<XmlDataDAO>();
- @ManyToOne(fetch=FetchType.LAZY,cascade={CascadeType.PERSIST}) @Column(name="PROCESS_INSTANCE_ID")
+ @ManyToOne(fetch=FetchType.LAZY,cascade={CascadeType.PERSIST}) @JoinColumn(name="PROCESS_INSTANCE_ID")
private ProcessInstanceDAOImpl _processInstance;
public ScopeDAOImpl() {}
Modified: branches/ODE/ODE-1.x-jpa/dao-jpa/src/main/java/org/apache/ode/dao/jpa/XmlDataDAOImpl.java
===================================================================
--- branches/ODE/ODE-1.x-jpa/dao-jpa/src/main/java/org/apache/ode/dao/jpa/XmlDataDAOImpl.java 2009-11-27 06:27:43 UTC (rev 343)
+++ branches/ODE/ODE-1.x-jpa/dao-jpa/src/main/java/org/apache/ode/dao/jpa/XmlDataDAOImpl.java 2009-11-27 07:33:08 UTC (rev 344)
@@ -35,6 +35,7 @@
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
+import javax.persistence.JoinColumn;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
@@ -79,7 +80,7 @@
@SuppressWarnings("unused")
@Basic @Column(name="SCOPE_ID", nullable=true, insertable=false, updatable=false)
private Long _scopeId;
- @ManyToOne(fetch=FetchType.LAZY,cascade={CascadeType.PERSIST}) @Column(name="SCOPE_ID")
+ @ManyToOne(fetch=FetchType.LAZY,cascade={CascadeType.PERSIST}) @JoinColumn(name="SCOPE_ID")
private ScopeDAOImpl _scope;
public XmlDataDAOImpl() {}
Modified: branches/ODE/ODE-1.x-jpa/dao-jpa/src/main/java/org/apache/ode/dao/jpa/XmlDataProperty.java
===================================================================
--- branches/ODE/ODE-1.x-jpa/dao-jpa/src/main/java/org/apache/ode/dao/jpa/XmlDataProperty.java 2009-11-27 06:27:43 UTC (rev 343)
+++ branches/ODE/ODE-1.x-jpa/dao-jpa/src/main/java/org/apache/ode/dao/jpa/XmlDataProperty.java 2009-11-27 07:33:08 UTC (rev 344)
@@ -27,6 +27,7 @@
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
+import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
@@ -56,7 +57,7 @@
@Basic @Column(name="XML_DATA_ID", insertable=false, updatable=false, nullable=true)
private Long _xmlDataId;
@ManyToOne(fetch= FetchType.LAZY,cascade={CascadeType.PERSIST})
- @Column(name="XML_DATA_ID")
+ @JoinColumn(name="XML_DATA_ID")
@SuppressWarnings("unused")
private XmlDataDAOImpl _xmlData;
Modified: branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/build.xml
===================================================================
--- branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/build.xml 2009-11-27 06:27:43 UTC (rev 343)
+++ branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/build.xml 2009-11-27 07:33:08 UTC (rev 344)
@@ -41,4 +41,4 @@
</target>
-</project>
\ No newline at end of file
+</project>
Modified: branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/pom.xml
===================================================================
--- branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/pom.xml 2009-11-27 06:27:43 UTC (rev 343)
+++ branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/pom.xml 2009-11-27 07:33:08 UTC (rev 344)
@@ -20,15 +20,15 @@
<dependencies>
<dependency>
<groupId>org.hibernate</groupId>
+ <artifactId>hibernate-entitymanager</artifactId>
+ <version>3.4.0.GA</version>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
<artifactId>hibernate-tools</artifactId>
<version>${hibernate-tools-version}</version>
- </dependency>
+ </dependency>
<dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-entitymanager</artifactId>
- <version>3.4.0.GA</version>
- </dependency>
- <dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.4.2</version>
@@ -37,7 +37,12 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.4.2</version>
- </dependency>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>1.1.1</version>
+ </dependency>
<dependency>
<groupId>hsqldb</groupId>
<artifactId>hsqldb</artifactId>
@@ -51,9 +56,29 @@
<dependency>
<groupId>org.jboss.soa.bpel</groupId>
<artifactId>riftsaw-dao-jpa</artifactId>
- <version>2.0-M2</version>
+ <version>2.0-SNAPSHOT</version>
</dependency>
-
+ <dependency>
+ <groupId>org.jboss.soa.bpel</groupId>
+ <artifactId>riftsaw-dao-jpa-hibernate</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.soa.bpel</groupId>
+ <artifactId>riftsaw-bpel-dao</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.soa.bpel</groupId>
+ <artifactId>riftsaw-bpel-api</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.soa.bpel</groupId>
+ <artifactId>riftsaw-utils</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ </dependency>
+
<!-- Database Drivers -->
<dependency>
<groupId>mysql</groupId>
Modified: 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 2009-11-27 06:27:43 UTC (rev 343)
+++ branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/src/main/resources/META-INF/persistence.xml 2009-11-27 07:33:08 UTC (rev 344)
@@ -21,12 +21,9 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="1.0">
<persistence-unit name="ode-dao">
- <provider>org.hibernate.ejb.HibernatePersistence</provider>
+ <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>
@@ -39,6 +36,10 @@
<class>org.apache.ode.dao.jpa.CorrSetProperty</class>
<class>org.apache.ode.dao.jpa.MexProperty</class>
<class>org.apache.ode.dao.jpa.XmlDataProperty</class>
+ <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>
<properties>
<property name="hibernate.show_sql" value="false" />
15 years, 1 month
riftsaw SVN: r343 - trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws.
by riftsaw-commits@lists.jboss.org
Author: alex.guizar(a)jboss.com
Date: 2009-11-27 01:27:43 -0500 (Fri, 27 Nov 2009)
New Revision: 343
Modified:
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/SOAPMessageAdapter.java
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/WSDLParser.java
Log:
RIFTSAW-118: scan only input messages reachable from the receiving port when resolving doc/lit operation
Modified: trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/SOAPMessageAdapter.java
===================================================================
--- trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/SOAPMessageAdapter.java 2009-11-27 03:32:13 UTC (rev 342)
+++ trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/SOAPMessageAdapter.java 2009-11-27 06:27:43 UTC (rev 343)
@@ -333,19 +333,21 @@
// Extracting whatever header elements we find in the message, binding and abstract parts
// aren't reliable enough given what people do out there.
- Iterator headersIter = soapHeader.getChildElements();
- while (headersIter.hasNext()) {
- javax.xml.soap.SOAPHeaderElement headerElem = (javax.xml.soap.SOAPHeaderElement) headersIter.next();
- String partName = findHeaderPartName(headerDefs, headerElem.getElementQName());
- Document doc = DOMUtils.newDocument();
-
- // RIFTSAW-74 - slight modification to avoid jbossws exception when reconstructing the
- // SOAP message.
-
- //Element destPart = doc.createElementNS(null, partName);
- //destPart.appendChild(doc.importNode(headerElem, true));
- //odeMessage.setHeaderPart(partName, destPart);
- odeMessage.setHeaderPart(partName, (Element)doc.importNode(headerElem, true));
+ if (soapHeader != null) {
+ Iterator headersIter = soapHeader.getChildElements();
+ while (headersIter.hasNext()) {
+ javax.xml.soap.SOAPHeaderElement headerElem = (javax.xml.soap.SOAPHeaderElement) headersIter.next();
+ String partName = findHeaderPartName(headerDefs, headerElem.getElementQName());
+ Document doc = DOMUtils.newDocument();
+
+ // RIFTSAW-74 - slight modification to avoid jbossws exception when reconstructing the
+ // SOAP message.
+
+ //Element destPart = doc.createElementNS(null, partName);
+ //destPart.appendChild(doc.importNode(headerElem, true));
+ //odeMessage.setHeaderPart(partName, destPart);
+ odeMessage.setHeaderPart(partName, (Element)doc.importNode(headerElem, true));
+ }
}
}
catch (SOAPException e)
@@ -369,13 +371,14 @@
javax.wsdl.Message msgType) {
// Is this header part of the "payload" messsage?
boolean payloadMessageHeader = headerdef.getMessage() == null || headerdef.getMessage().equals(msgType.getQName());
- boolean requiredHeader = payloadMessageHeader || (headerdef.getRequired() != null && headerdef.getRequired());
+ boolean requiredHeader = payloadMessageHeader || Boolean.TRUE.equals(headerdef.getRequired());
- if (requiredHeader && header == null)
- throw new RuntimeException("Soap Header is missing a required field " + headerdef.getElementType());
+ if (header == null) {
+ if (requiredHeader)
+ throw new RuntimeException("Soap Header is missing a required field " + headerdef.getElementType());
- if (header == null)
- return;
+ return;
+ }
javax.wsdl.Message hdrMsg = wsdl.getMessage(headerdef.getMessage());
if (hdrMsg == null)
Modified: trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/WSDLParser.java
===================================================================
--- trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/WSDLParser.java 2009-11-27 03:32:13 UTC (rev 342)
+++ trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/WSDLParser.java 2009-11-27 06:27:43 UTC (rev 343)
@@ -25,6 +25,7 @@
import javax.wsdl.extensions.soap.SOAPAddress;
import javax.xml.namespace.QName;
import java.net.URL;
+import java.util.Collection;
import java.util.List;
import java.util.Map;
@@ -50,81 +51,54 @@
public Operation getDocLitOperation(QName service, String port, QName payloadName)
{
reset();
- return _getDocLitOperation(this.wsdlDefinition, service, port, payloadName);
+ Operation result = _getDocLitOperation(this.wsdlDefinition, service, port, payloadName);
+ if (result == null)
+ throw new IllegalArgumentException("Unable to find operation for element "+payloadName);
+ return result;
}
- private Operation _getDocLitOperation(Definition wsdl, QName service, String port, QName payloadName)
+ @SuppressWarnings("unchecked")
+ private Operation _getDocLitOperation(Definition wsdl, QName serviceName, String portName, QName payloadName)
{
- Operation match = null;
- dfsDepth++;
+ if(++dfsDepth>50) // easier then retaining references
+ throw new IllegalStateException("Recursive loop detected. DFS depth reached limit");
- if(dfsDepth>50) // easier then retaining references
- throw new IllegalStateException("Recursive loop detected. DFS depth reached limit");
-
// namespace / java.util.List of imports
- Map<String, List<Import>> imports = wsdl.getImports();
- for(String ns : imports.keySet())
+ Collection<List<Import>> imports = wsdl.getImports().values();
+ for(List<Import> importNS : imports)
{
- List<Import> importNS = imports.get(ns);
for(Import wsdlImport : importNS)
{
- Operation result = _getDocLitOperation(wsdlImport.getDefinition(), service, port, payloadName);
+ Operation result = _getDocLitOperation(wsdlImport.getDefinition(), serviceName, portName, payloadName);
if(result!=null)
- {
- match = result;
- break;
- }
+ return result;
}
-
- if(match!=null) break;
}
- if(match!=null) // DFS results
- return match;
-
- // resolve wsdl:message
- Map<QName, Message> messages = wsdl.getMessages();
- QName relatedMessage = null;
- for(QName qname : messages.keySet())
- {
- Message candidate = messages.get(qname);
- Map<String, Part> parts = candidate.getParts();
- for(String s : parts.keySet())
- {
- Part p = parts.get(s);
- if(p.getElementName().equals(payloadName))
- {
- relatedMessage = qname;
- break;
- }
- }
- }
-
- if(null==relatedMessage)
- throw new IllegalArgumentException("Unable to find WSDL Message for element "+payloadName);
-
// resolve the port & operation
- Operation relatedOperation = null;
+ Service service = wsdl.getService(serviceName);
+ if (service == null)
+ return null; // service might be defined elsewhere
- Service s = wsdl.getService(service);
- Port p = s.getPort(port);
- Binding b = p.getBinding();
+ Port port = service.getPort(portName);
+ if (port == null)
+ throw new IllegalArgumentException("service "+serviceName+" contains no such port "+portName);
- PortType portType = b.getPortType();
+ Binding binding = port.getBinding();
+ PortType portType = binding.getPortType();
List<Operation> operations = portType.getOperations();
for(Operation op : operations)
{
- if(op.getInput().getMessage().getQName().equals(relatedMessage))
+ Message message = op.getInput().getMessage();
+ Collection<Part> parts = message.getParts().values();
+ for(Part part : parts)
{
- relatedOperation = op;
- break;
+ if(part.getElementName().equals(payloadName))
+ return op;
}
}
- if(null==relatedOperation)
- throw new IllegalArgumentException("Unable to find WSDL Operation for Message "+relatedMessage);
-
- return relatedOperation;
+ return null;
}
public URL getServiceLocationURL(QName serviceQName, String portName)
15 years, 1 month
riftsaw SVN: r342 - in trunk: integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples and 7 other directories.
by riftsaw-commits@lists.jboss.org
Author: alex.guizar(a)jboss.com
Date: 2009-11-26 22:32:13 -0500 (Thu, 26 Nov 2009)
New Revision: 342
Added:
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/TutorialBPELAtmTestCase.java
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/TutorialBPELPurchaseTestCase.java
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/TutorialBPELTravelAgencyTestCase.java
trunk/integration-tests/src/test/resources/samples/Tutorial_bpel_atm/
trunk/integration-tests/src/test/resources/samples/Tutorial_bpel_purchase/
trunk/integration-tests/src/test/resources/samples/Tutorial_bpel_travel_agency/
trunk/samples/tutorial/
trunk/samples/tutorial/atm/
trunk/samples/tutorial/purchase/
trunk/samples/tutorial/travel_agency/
Removed:
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartBPELAtmTestCase.java
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartBPELPurchaseTestCase.java
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartBPELTravelAgencyTestCase.java
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_purchase/
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_travel_agency/
trunk/samples/quickstart/atm/
trunk/samples/quickstart/purchase/
trunk/samples/quickstart/travel_agency/
Modified:
trunk/integration-tests/build.xml
trunk/integration-tests/pom.xml
trunk/integration-tests/src/test/resources/samples/Tutorial_bpel_atm/build.xml
trunk/integration-tests/src/test/resources/samples/Tutorial_bpel_purchase/build.xml
trunk/integration-tests/src/test/resources/samples/Tutorial_bpel_travel_agency/build.xml
Log:
RIFTSAW-34: rename comprehensive examples to Tutorial*
Modified: trunk/integration-tests/build.xml
===================================================================
--- trunk/integration-tests/build.xml 2009-11-26 17:40:48 UTC (rev 341)
+++ trunk/integration-tests/build.xml 2009-11-27 03:32:13 UTC (rev 342)
@@ -122,13 +122,14 @@
<ant antfile="src/test/resources/samples/Quickstart_bpel_simple_correlation/build.xml" />
<ant antfile="src/test/resources/samples/Quickstart_bpel_simple_invoke/build.xml" />
<ant antfile="src/test/resources/samples/Quickstart_bpel_loan_approval/build.xml" />
- <ant antfile="src/test/resources/samples/Quickstart_bpel_atm/build.xml" />
- <ant antfile="src/test/resources/samples/Quickstart_bpel_purchase/build.xml" />
- <ant antfile="src/test/resources/samples/Quickstart_bpel_travel_agency/build.xml" />
<ant antfile="src/test/resources/samples/Quickstart_esb_bpel_hello_world/build.xml" />
<ant antfile="src/test/resources/samples/Quickstart_esb_bpel_loan_fault/build.xml" />
+ <ant antfile="src/test/resources/samples/Tutorial_bpel_atm/build.xml" />
+ <ant antfile="src/test/resources/samples/Tutorial_bpel_purchase/build.xml" />
+ <ant antfile="src/test/resources/samples/Tutorial_bpel_travel_agency/build.xml" />
+
<ant antfile="src/test/resources/testcases/RiftSaw_118/build.xml" />
</target>
Modified: trunk/integration-tests/pom.xml
===================================================================
--- trunk/integration-tests/pom.xml 2009-11-26 17:40:48 UTC (rev 341)
+++ trunk/integration-tests/pom.xml 2009-11-27 03:32:13 UTC (rev 342)
@@ -1,6 +1,5 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.soa.bpel</groupId>
<artifactId>integration-tests</artifactId>
@@ -8,32 +7,32 @@
<version>2.0-SNAPSHOT</version>
<name>RiftSaw::Integration-Tests</name>
- <parent>
- <groupId>org.jboss.soa</groupId>
+ <parent>
+ <groupId>org.jboss.soa</groupId>
<artifactId>bpel</artifactId>
<version>2.0-SNAPSHOT</version>
</parent>
-
- <properties>
- <jboss.jbosssx.version>2.0.2.SP3</jboss.jbosssx.version>
- <jboss.common.version>1.2.1.GA</jboss.common.version>
- <jboss.version>5.1.0.GA</jboss.version>
- </properties>
+ <properties>
+ <jboss.jbosssx.version>2.0.2.SP3</jboss.jbosssx.version>
+ <jboss.common.version>1.2.1.GA</jboss.common.version>
+ <jboss.version>5.1.0.GA</jboss.version>
+ </properties>
+
<dependencies>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>commons-httpclient</groupId>
- <artifactId>commons-httpclient</artifactId>
- <version>3.1</version>
- <scope>test</scope>
- </dependency>
-
<dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-httpclient</groupId>
+ <artifactId>commons-httpclient</artifactId>
+ <version>3.1</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
<groupId>org.jboss.soa.bpel.dependencies.esb</groupId>
<artifactId>jbossesb-rosetta</artifactId>
<version>${jbossesb.version}</version>
@@ -68,18 +67,24 @@
<version>1.0.1</version>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-client</artifactId>
- <version>${jboss.version}</version>
- <type>pom</type>
- <scope>test</scope>
- </dependency>
<dependency>
+ <groupId>org.jboss.jbossas</groupId>
+ <artifactId>jboss-as-client</artifactId>
+ <version>${jboss.version}</version>
+ <type>pom</type>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
<groupId>org.apache.ws.scout</groupId>
<artifactId>scout</artifactId>
<version>1.1</version>
<scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>com.sun.xml.bind</groupId>
+ <artifactId>jaxb-impl</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.apache.xmlbeans</groupId>
@@ -142,161 +147,155 @@
<version>2.1.0.GA</version>
<scope>test</scope>
</dependency>
-
</dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <version>1.3</version>
- <executions>
- <execution>
- <id>deploy-riftsaw</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <tasks>
- <property name="compile_classpath" refid="maven.compile.classpath" />
- <property name="runtime_classpath" refid="maven.runtime.classpath" />
- <property name="test_classpath" refid="maven.test.classpath" />
- <property name="plugin_classpath" refid="maven.plugin.classpath" />
- <property name="project.version" value="${project.version}" />
- <property name="riftsaw.engine.version"
- value="${riftsaw.engine.version}" />
- <property name="dependency.bpel.deployer"
- value="${maven.dependency.org.jboss.soa.bpel.runtime.deployer.jar.path}" />
- <property name="dependency.bpel.engine"
- value="${maven.dependency.org.jboss.soa.bpel.runtime.engine.jar.path}" />
- <property name="dependency.bpel.jb-bpel-store"
- value="${maven.dependency.org.jboss.soa.bpel.runtime.jb-bpel-store.jar.path}" />
- <ant antfile="${basedir}/build.xml">
- <target name="unpack-distribution" />
- </ant>
- <ant antfile="${basedir}/build.xml">
- <target name="package-tests" />
- </ant>
-
- <ant antfile="${basedir}/build.xml">
- <target name="deploy-riftsaw" />
- </ant>
- <ant antfile="${basedir}/build.xml">
- <target name="start-server" />
- </ant>
- </tasks>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>undeploy-riftsaw</id>
- <phase>post-integration-test</phase>
- <configuration>
- <tasks>
- <property name="compile_classpath" refid="maven.compile.classpath" />
- <property name="runtime_classpath" refid="maven.runtime.classpath" />
- <property name="test_classpath" refid="maven.test.classpath" />
- <property name="plugin_classpath" refid="maven.plugin.classpath" />
- <property name="project.version" value="${project.version}" />
- <property name="riftsaw.engine.version"
- value="${riftsaw.engine.version}" />
- <property name="dependency.bpel.deployer"
- value="${maven.dependency.org.jboss.soa.bpel.runtime.deployer.jar.path}" />
- <property name="dependency.bpel.engine"
- value="${maven.dependency.org.jboss.soa.bpel.runtime.engine.jar.path}" />
- <property name="dependency.bpel.jb-bpel-store"
- value="${maven.dependency.org.jboss.soa.bpel.runtime.jb-bpel-store.jar.path}" />
- <ant antfile="${basedir}/build.xml">
- <target name="stop-server" />
- </ant>
- <ant antfile="${basedir}/build.xml">
- <target name="undeploy-riftsaw" />
- </ant>
- <!--
- -->
- </tasks>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <executions>
- <execution>
- <id>compiler-it</id>
- <phase>pre-integration-test</phase>
- <goals>
- <goal>testCompile</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <additionalClasspathElements>
- <additionalClasspathElement>${basedir}/src/test/resources/conf</additionalClasspathElement>
- </additionalClasspathElements>
- <systemProperties>
- <property>
- <name>test.dir</name>
- <value>${basedir}/target/tests</value>
- </property>
- <property>
- <name>java.naming.factory.initial</name>
- <value>org.jnp.interfaces.NamingContextFactory</value>
- </property>
- <property>
- <name>java.naming.factory.url.pkgs</name>
- <value>org.jboss.naming:org.jnp.interfaces</value>
- </property>
- <property>
- <name>java.naming.provider.url</name>
- <value>jnp://localhost:1099</value>
- </property>
- <property>
- <name>java.rmi.server.ignoreStubClasses</name>
- <value>true</value>
- </property>
- </systemProperties>
- <testFailureIgnore>true</testFailureIgnore>
- <includes>
- <include>**/*TestCase.java</include>
- <include>**/*Test.java</include>
- </includes>
- <!-- https://jira.jboss.org/jira/browse/RIFTSAW-34 -->
- <excludes>
- <exclude>org/jboss/soa/bpel/tests/samples/QuickstartBPELAtmTestCase.java</exclude>
- <exclude>org/jboss/soa/bpel/tests/samples/QuickstartBPELPurchaseTestCase.java</exclude>
- <exclude>org/jboss/soa/bpel/tests/samples/QuickstartBPELTravelAgencyTestCase.java</exclude>
- </excludes>
- </configuration>
- <executions>
- <execution>
- <id>test-riftsaw</id>
- <phase>integration-test</phase>
- <goals>
- <goal>test</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- <reporting>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-report-plugin</artifactId>
- </plugin>
- </plugins>
- </reporting>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.3</version>
+ <executions>
+ <execution>
+ <id>deploy-riftsaw</id>
+ <phase>pre-integration-test</phase>
+ <configuration>
+ <tasks>
+ <property name="compile_classpath" refid="maven.compile.classpath" />
+ <property name="runtime_classpath" refid="maven.runtime.classpath" />
+ <property name="test_classpath" refid="maven.test.classpath" />
+ <property name="plugin_classpath" refid="maven.plugin.classpath" />
+ <property name="project.version" value="${project.version}" />
+ <property name="riftsaw.engine.version" value="${riftsaw.engine.version}" />
+ <property name="dependency.bpel.deployer"
+ value="${maven.dependency.org.jboss.soa.bpel.runtime.deployer.jar.path}" />
+ <property name="dependency.bpel.engine"
+ value="${maven.dependency.org.jboss.soa.bpel.runtime.engine.jar.path}" />
+ <property name="dependency.bpel.jb-bpel-store"
+ value="${maven.dependency.org.jboss.soa.bpel.runtime.jb-bpel-store.jar.path}" />
+ <ant antfile="${basedir}/build.xml">
+ <target name="unpack-distribution" />
+ </ant>
+ <ant antfile="${basedir}/build.xml">
+ <target name="package-tests" />
+ </ant>
+ <ant antfile="${basedir}/build.xml">
+ <target name="deploy-riftsaw" />
+ </ant>
+ <ant antfile="${basedir}/build.xml">
+ <target name="start-server" />
+ </ant>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>undeploy-riftsaw</id>
+ <phase>post-integration-test</phase>
+ <configuration>
+ <tasks>
+ <property name="compile_classpath" refid="maven.compile.classpath" />
+ <property name="runtime_classpath" refid="maven.runtime.classpath" />
+ <property name="test_classpath" refid="maven.test.classpath" />
+ <property name="plugin_classpath" refid="maven.plugin.classpath" />
+ <property name="project.version" value="${project.version}" />
+ <property name="riftsaw.engine.version" value="${riftsaw.engine.version}" />
+ <property name="dependency.bpel.deployer"
+ value="${maven.dependency.org.jboss.soa.bpel.runtime.deployer.jar.path}" />
+ <property name="dependency.bpel.engine"
+ value="${maven.dependency.org.jboss.soa.bpel.runtime.engine.jar.path}" />
+ <property name="dependency.bpel.jb-bpel-store"
+ value="${maven.dependency.org.jboss.soa.bpel.runtime.jb-bpel-store.jar.path}" />
+ <ant antfile="${basedir}/build.xml">
+ <target name="stop-server" />
+ </ant>
+ <ant antfile="${basedir}/build.xml">
+ <target name="undeploy-riftsaw" />
+ </ant>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>compiler-it</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>testCompile</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <additionalClasspathElements>
+ <additionalClasspathElement>${basedir}/src/test/resources/conf</additionalClasspathElement>
+ </additionalClasspathElements>
+ <systemProperties>
+ <property>
+ <name>test.dir</name>
+ <value>${basedir}/target/tests</value>
+ </property>
+ <property>
+ <name>java.naming.factory.initial</name>
+ <value>org.jnp.interfaces.NamingContextFactory</value>
+ </property>
+ <property>
+ <name>java.naming.factory.url.pkgs</name>
+ <value>org.jboss.naming:org.jnp.interfaces</value>
+ </property>
+ <property>
+ <name>java.naming.provider.url</name>
+ <value>jnp://localhost:1099</value>
+ </property>
+ <property>
+ <name>java.rmi.server.ignoreStubClasses</name>
+ <value>true</value>
+ </property>
+ </systemProperties>
+ <testFailureIgnore>true</testFailureIgnore>
+ <includes>
+ <include>**/*TestCase.java</include>
+ <include>**/*Test.java</include>
+ </includes>
+ <!-- https://jira.jboss.org/jira/browse/RIFTSAW-34 -->
+ <excludes>
+ <exclude>org/jboss/soa/bpel/tests/samples/TutorialBPELAtmTestCase.java</exclude>
+ <exclude>org/jboss/soa/bpel/tests/samples/TutorialBPELPurchaseTestCase.java</exclude>
+ <exclude>org/jboss/soa/bpel/tests/samples/TutorialBPELTravelAgencyTestCase.java</exclude>
+ </excludes>
+ </configuration>
+ <executions>
+ <execution>
+ <id>test-riftsaw</id>
+ <phase>integration-test</phase>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-report-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </reporting>
</project>
Deleted: trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartBPELAtmTestCase.java
===================================================================
--- trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartBPELAtmTestCase.java 2009-11-26 17:40:48 UTC (rev 341)
+++ trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartBPELAtmTestCase.java 2009-11-27 03:32:13 UTC (rev 342)
@@ -1,193 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.soa.bpel.tests.samples;
-
-import junit.framework.Test;
-
-import org.jboss.soa.bpel.tests.RiftSawTest;
-import org.jboss.soa.bpel.tests.RiftSawTestSetup;
-import org.jboss.soa.bpel.tests.samples.atm.AtmService;
-import org.jboss.soa.bpel.tests.samples.atm.FrontEnd;
-import org.jboss.soa.bpel.tests.samples.atm.InsufficientFunds;
-import org.jboss.soa.bpel.tests.samples.atm.InsufficientFunds_Exception;
-import org.jboss.soa.bpel.tests.samples.atm.UnauthorizedAccess_Exception;
-
-/**
- * Test for common ATM usage scenarios.
- *
- * @author Juan Cantu
- * @author Alejandro Guizar
- */
-public class QuickstartBPELAtmTestCase extends RiftSawTest {
-
- private FrontEnd frontEnd;
-
- private static final String TEST_NAME = "Quickstart_bpel_atm";
-
- public QuickstartBPELAtmTestCase() {
- super(TEST_NAME);
- }
-
- public static Test suite() {
- return new RiftSawTestSetup(QuickstartBPELAtmTestCase.class, TEST_NAME,
- "Quickstart_bpel_atm.war,Quickstart_bpel_atm-1.jar");
- }
-
- protected void setUp() throws Exception {
- AtmService frontEndService = new AtmService();
-
- // obtain dynamic proxy for web service port
- frontEnd = frontEndService.getFrontEndPort();
- }
-
- public void testConnect() {
- // connect to bank
- int ticketNumber = frontEnd.connect();
- assertTrue(ticketNumber > 0);
-
- // check atm is connected
- String status = frontEnd.status(ticketNumber);
- assertEquals("connected", status);
-
- // disconnect from bank
- frontEnd.disconnect(ticketNumber);
- }
-
- public void testLogOnAuthorized() {
- // connect to bank
- int ticketNumber = frontEnd.connect();
-
- // begin customer session
- final String customerName = "koen";
- try {
- frontEnd.logOn(ticketNumber, customerName);
- }
- catch (UnauthorizedAccess_Exception e) {
- fail("log on of authorized customer should succeed");
- }
-
- // end customer session
- frontEnd.logOff(customerName);
-
- // disconnect from bank
- frontEnd.disconnect(ticketNumber);
- }
-
- public void testLogOnUnauthorized() {
- // connect to bank
- int ticketNumber = frontEnd.connect();
-
- // begin customer session
- final String customerName = "nobody";
- try {
- frontEnd.logOn(ticketNumber, customerName);
- fail("log on of unauthorized customer should fail");
- }
- catch (UnauthorizedAccess_Exception e) {
- assertEquals(customerName, e.getFaultInfo().getCustomerName());
- }
-
- // disconnect from bank
- frontEnd.disconnect(ticketNumber);
- }
-
- public void testDeposit() throws UnauthorizedAccess_Exception {
- // connect to bank
- int ticketNumber = frontEnd.connect();
-
- // begin customer session
- final String customerName = "tom";
- frontEnd.logOn(ticketNumber, customerName);
-
- // get current balance
- double previousBalance = frontEnd.getBalance(customerName);
-
- // deposit some funds
- double newBalance = frontEnd.deposit(customerName, 10);
- // check the new balance is correct
- assertEquals(previousBalance + 10, newBalance, 0);
-
- // end customer session
- frontEnd.logOff(customerName);
-
- // disconnect from bank
- frontEnd.disconnect(ticketNumber);
- }
-
- public void testWithdrawUnderBalance() throws UnauthorizedAccess_Exception {
- // connect to bank
- int ticketNumber = frontEnd.connect();
-
- // begin customer session
- final String customerName = "tom";
- frontEnd.logOn(ticketNumber, customerName);
-
- // get current balance
- double previousBalance = frontEnd.getBalance(customerName);
-
- // withdraw some funds
- try {
- double newBalance = frontEnd.withdraw(customerName, 10);
- // check new balance is correct
- assertEquals(previousBalance - 10, newBalance, 0);
- }
- catch (InsufficientFunds_Exception e) {
- fail("withdraw under balance should succeed");
- }
-
- // end customer session
- frontEnd.logOff(customerName);
-
- // disconnect from bank
- frontEnd.disconnect(ticketNumber);
- }
-
- public void testWithdrawOverBalance() throws UnauthorizedAccess_Exception {
- // connect to bank
- int ticketNumber = frontEnd.connect();
-
- // begin customer session
- final String customerName = "fady";
- frontEnd.logOn(ticketNumber, customerName);
-
- // get current balance
- double previousBalance = frontEnd.getBalance(customerName);
-
- // try to withdraw an amount greater than current balance
- try {
- frontEnd.withdraw(customerName, previousBalance + 1);
- fail("withdraw over balance should fail");
- }
- catch (InsufficientFunds_Exception e) {
- InsufficientFunds faultInfo = e.getFaultInfo();
- assertEquals(customerName, faultInfo.getCustomerName());
- // check account balance has not changed
- assertEquals(previousBalance, faultInfo.getAmount(), 0);
- }
-
- // end customer session
- frontEnd.logOff(customerName);
-
- // disconnect from bank
- frontEnd.disconnect(ticketNumber);
- }
-}
\ No newline at end of file
Deleted: trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartBPELPurchaseTestCase.java
===================================================================
--- trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartBPELPurchaseTestCase.java 2009-11-26 17:40:48 UTC (rev 341)
+++ trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartBPELPurchaseTestCase.java 2009-11-27 03:32:13 UTC (rev 342)
@@ -1,107 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.soa.bpel.tests.samples;
-
-import junit.framework.Test;
-
-import org.jboss.soa.bpel.tests.RiftSawTest;
-import org.jboss.soa.bpel.tests.RiftSawTestSetup;
-import org.jboss.soa.bpel.tests.samples.purchase.CustomerInfo;
-import org.jboss.soa.bpel.tests.samples.purchase.Invoice;
-import org.jboss.soa.bpel.tests.samples.purchase.OrderFaultType;
-import org.jboss.soa.bpel.tests.samples.purchase.PurchaseOrder;
-import org.jboss.soa.bpel.tests.samples.purchase.PurchaseOrderPT;
-import org.jboss.soa.bpel.tests.samples.purchase.PurchaseSVC;
-
-/**
- * Test for common order purchasing scenarios.
- *
- * @author Jeff DeLong
- * @author Alejandro Guizar
- */
-public class QuickstartBPELPurchaseTestCase extends RiftSawTest {
-
- private PurchaseOrderPT purchaseOrderPT;
-
- private static final String TEST_NAME = "Quickstart_bpel_purchase";
-
- public QuickstartBPELPurchaseTestCase() {
- super(TEST_NAME);
- }
-
- public static Test suite() {
- return new RiftSawTestSetup(
- QuickstartBPELPurchaseTestCase.class,
- TEST_NAME,
- "Quickstart_bpel_purchase.war,Quickstart_bpel_purchase_ejb.jar,Quickstart_bpel_purchase-1.jar");
- }
-
- protected void setUp() throws Exception {
- PurchaseSVC service = new PurchaseSVC();
- purchaseOrderPT = service.getPurchaseOrderSP();
- }
-
- public void testSendPurchaseOrderAvailable() {
- CustomerInfo customerInfo = new CustomerInfo();
- customerInfo.setCustomerId("manager");
- customerInfo.setAddress("123 Main St");
-
- PurchaseOrder purchaseOrder = new PurchaseOrder();
- purchaseOrder.setOrderId(10);
- purchaseOrder.setPartNumber(23);
- purchaseOrder.setQuantity(4);
-
- try {
- Invoice invoice =
- purchaseOrderPT.sendPurchaseOrder(customerInfo, purchaseOrder);
- // In our system, the part number is also the unit price!
- // The shipper charges a flat fare of $9.50
- assertEquals(purchaseOrder.getPartNumber() * purchaseOrder.getQuantity()
- + 9.50, invoice.getAmount(), 0);
- assertEquals(purchaseOrder.getOrderId(), invoice.getOrderId());
- }
- catch (OrderFaultType e) {
- fail("shipping to available address should complete");
- }
- }
-
- public void testSendPurchaseOrderNotAvailable() {
- CustomerInfo customerInfo = new CustomerInfo();
- customerInfo.setCustomerId("freddy");
- customerInfo.setAddress("666 Elm St");
-
- PurchaseOrder purchaseOrder = new PurchaseOrder();
- purchaseOrder.setOrderId(20);
- purchaseOrder.setPartNumber(13);
- purchaseOrder.setQuantity(7);
-
- try {
- purchaseOrderPT.sendPurchaseOrder(customerInfo, purchaseOrder);
- fail("shipping to unavailable address should not complete");
- }
- catch (OrderFaultType e) {
- assertTrue(e.getFaultInfo()
- .getDetail()
- .indexOf(customerInfo.getAddress()) != -1);
- }
- }
-}
Deleted: trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartBPELTravelAgencyTestCase.java
===================================================================
--- trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartBPELTravelAgencyTestCase.java 2009-11-26 17:40:48 UTC (rev 341)
+++ trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartBPELTravelAgencyTestCase.java 2009-11-27 03:32:13 UTC (rev 342)
@@ -1,141 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.soa.bpel.tests.samples;
-
-import java.rmi.RemoteException;
-import java.util.Calendar;
-import java.util.GregorianCalendar;
-
-import javax.xml.datatype.DatatypeFactory;
-import javax.xml.datatype.XMLGregorianCalendar;
-
-import junit.framework.Test;
-
-import org.jboss.soa.bpel.tests.RiftSawTest;
-import org.jboss.soa.bpel.tests.RiftSawTestSetup;
-import org.jboss.soa.bpel.tests.samples.travel.Cancelation;
-import org.jboss.soa.bpel.tests.samples.travel.Detail;
-import org.jboss.soa.bpel.tests.samples.travel.Flight;
-import org.jboss.soa.bpel.tests.samples.travel.Hotel;
-import org.jboss.soa.bpel.tests.samples.travel.Invoice;
-import org.jboss.soa.bpel.tests.samples.travel.ItemSet;
-import org.jboss.soa.bpel.tests.samples.travel.Order;
-import org.jboss.soa.bpel.tests.samples.travel.Penalty;
-import org.jboss.soa.bpel.tests.samples.travel.Query;
-import org.jboss.soa.bpel.tests.samples.travel.RentalCar;
-import org.jboss.soa.bpel.tests.samples.travel.TravelAgent;
-import org.jboss.soa.bpel.tests.samples.travel.TravelService;
-
-/**
- * @author Alejandro Guizar
- */
-public class QuickstartBPELTravelAgencyTestCase extends RiftSawTest {
-
- private TravelAgent travelAgent;
-
- private Flight flight = new Flight();
- private Hotel hotel = new Hotel();
- private RentalCar car = new RentalCar();
- private XMLGregorianCalendar tripDate;
-
- private static final String TEST_NAME = "Quickstart_bpel_travel_agency";
-
- public QuickstartBPELTravelAgencyTestCase() {
- super(TEST_NAME);
- }
-
- public static Test suite() {
- return new RiftSawTestSetup(QuickstartBPELTravelAgencyTestCase.class,
- TEST_NAME,
- "Quickstart_bpel_travel_agency.war,Quickstart_bpel_travel_agency-1.jar");
- }
-
- protected void setUp() throws Exception {
- TravelService tripService = new TravelService();
- travelAgent = tripService.getTravelAgentPort();
-
- flight.setAirline("AM");
- flight.setNumber(637);
- hotel.setName("Maria Isabel");
- car.setCompany("Alamo");
-
- GregorianCalendar now = new GregorianCalendar();
- now.add(Calendar.SECOND, 10);
- tripDate = DatatypeFactory.newInstance().newXMLGregorianCalendar(now);
- }
-
- public void testPurchaseTrip() throws RemoteException {
- ItemSet items = new ItemSet();
- items.setFlight(flight); // cost: 300
- items.setHotel(hotel); // cost: 100
-
- Order order = new Order();
- order.setDate(tripDate);
- order.setItems(items);
-
- Invoice invoice = travelAgent.purchaseTrip(order);
- assertEquals(300 + 100, invoice.getCost(), 0);
- }
-
- public void testGetTripDetails() throws RemoteException {
- ItemSet items = new ItemSet();
- items.setFlight(flight);
- items.setHotel(hotel);
- items.setRentalCar(car);
-
- Order order = new Order();
- order.setDate(tripDate);
- order.setItems(items);
-
- Invoice invoice = travelAgent.purchaseTrip(order);
-
- Query query = new Query();
- query.setLocator(invoice.getLocator());
-
- Detail detail = travelAgent.getTripDetail(query);
- items = detail.getItems();
-
- assertEquals(flight.getAirline(), items.getFlight().getAirline());
- assertEquals(flight.getNumber(), items.getFlight().getNumber());
- assertEquals(hotel.getName(), items.getHotel().getName());
- assertEquals(car.getCompany(), items.getRentalCar().getCompany());
- assertEquals(invoice.getCost(), detail.getCost(), 0);
- }
-
- public void testCancelTrip() throws Exception {
- ItemSet items = new ItemSet();
- items.setFlight(flight); // fee: 100
- items.setRentalCar(car); // fee: 5
-
- Order order = new Order();
- order.setDate(tripDate);
- order.setItems(items);
-
- Invoice invoice = travelAgent.purchaseTrip(order);
-
- Cancelation reference = new Cancelation();
- reference.setLocator(invoice.getLocator());
-
- Penalty penalty = travelAgent.cancelTrip(reference);
- assertEquals(100 + 5, penalty.getFee(), 0);
- }
-}
Copied: trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/TutorialBPELAtmTestCase.java (from rev 332, trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartBPELAtmTestCase.java)
===================================================================
--- trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/TutorialBPELAtmTestCase.java (rev 0)
+++ trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/TutorialBPELAtmTestCase.java 2009-11-27 03:32:13 UTC (rev 342)
@@ -0,0 +1,193 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.soa.bpel.tests.samples;
+
+import junit.framework.Test;
+
+import org.jboss.soa.bpel.tests.RiftSawTest;
+import org.jboss.soa.bpel.tests.RiftSawTestSetup;
+import org.jboss.soa.bpel.tests.samples.atm.AtmService;
+import org.jboss.soa.bpel.tests.samples.atm.FrontEnd;
+import org.jboss.soa.bpel.tests.samples.atm.InsufficientFunds;
+import org.jboss.soa.bpel.tests.samples.atm.InsufficientFunds_Exception;
+import org.jboss.soa.bpel.tests.samples.atm.UnauthorizedAccess_Exception;
+
+/**
+ * Test for common ATM usage scenarios.
+ *
+ * @author Juan Cantu
+ * @author Alejandro Guizar
+ */
+public class TutorialBPELAtmTestCase extends RiftSawTest {
+
+ private FrontEnd frontEnd;
+
+ private static final String TEST_NAME = "Tutorial_bpel_atm";
+
+ public TutorialBPELAtmTestCase() {
+ super(TEST_NAME);
+ }
+
+ public static Test suite() {
+ return new RiftSawTestSetup(TutorialBPELAtmTestCase.class, TEST_NAME,
+ "Tutorial_bpel_atm.war,Tutorial_bpel_atm-1.jar");
+ }
+
+ protected void setUp() throws Exception {
+ AtmService frontEndService = new AtmService();
+
+ // obtain dynamic proxy for web service port
+ frontEnd = frontEndService.getFrontEndPort();
+ }
+
+ public void testConnect() {
+ // connect to bank
+ int ticketNumber = frontEnd.connect();
+ assertTrue(ticketNumber > 0);
+
+ // check atm is connected
+ String status = frontEnd.status(ticketNumber);
+ assertEquals("connected", status);
+
+ // disconnect from bank
+ frontEnd.disconnect(ticketNumber);
+ }
+
+ public void testLogOnAuthorized() {
+ // connect to bank
+ int ticketNumber = frontEnd.connect();
+
+ // begin customer session
+ final String customerName = "koen";
+ try {
+ frontEnd.logOn(ticketNumber, customerName);
+ }
+ catch (UnauthorizedAccess_Exception e) {
+ fail("log on of authorized customer should succeed");
+ }
+
+ // end customer session
+ frontEnd.logOff(customerName);
+
+ // disconnect from bank
+ frontEnd.disconnect(ticketNumber);
+ }
+
+ public void testLogOnUnauthorized() {
+ // connect to bank
+ int ticketNumber = frontEnd.connect();
+
+ // begin customer session
+ final String customerName = "nobody";
+ try {
+ frontEnd.logOn(ticketNumber, customerName);
+ fail("log on of unauthorized customer should fail");
+ }
+ catch (UnauthorizedAccess_Exception e) {
+ assertEquals(customerName, e.getFaultInfo().getCustomerName());
+ }
+
+ // disconnect from bank
+ frontEnd.disconnect(ticketNumber);
+ }
+
+ public void testDeposit() throws UnauthorizedAccess_Exception {
+ // connect to bank
+ int ticketNumber = frontEnd.connect();
+
+ // begin customer session
+ final String customerName = "tom";
+ frontEnd.logOn(ticketNumber, customerName);
+
+ // get current balance
+ double previousBalance = frontEnd.getBalance(customerName);
+
+ // deposit some funds
+ double newBalance = frontEnd.deposit(customerName, 10);
+ // check the new balance is correct
+ assertEquals(previousBalance + 10, newBalance, 0);
+
+ // end customer session
+ frontEnd.logOff(customerName);
+
+ // disconnect from bank
+ frontEnd.disconnect(ticketNumber);
+ }
+
+ public void testWithdrawUnderBalance() throws UnauthorizedAccess_Exception {
+ // connect to bank
+ int ticketNumber = frontEnd.connect();
+
+ // begin customer session
+ final String customerName = "tom";
+ frontEnd.logOn(ticketNumber, customerName);
+
+ // get current balance
+ double previousBalance = frontEnd.getBalance(customerName);
+
+ // withdraw some funds
+ try {
+ double newBalance = frontEnd.withdraw(customerName, 10);
+ // check new balance is correct
+ assertEquals(previousBalance - 10, newBalance, 0);
+ }
+ catch (InsufficientFunds_Exception e) {
+ fail("withdraw under balance should succeed");
+ }
+
+ // end customer session
+ frontEnd.logOff(customerName);
+
+ // disconnect from bank
+ frontEnd.disconnect(ticketNumber);
+ }
+
+ public void testWithdrawOverBalance() throws UnauthorizedAccess_Exception {
+ // connect to bank
+ int ticketNumber = frontEnd.connect();
+
+ // begin customer session
+ final String customerName = "fady";
+ frontEnd.logOn(ticketNumber, customerName);
+
+ // get current balance
+ double previousBalance = frontEnd.getBalance(customerName);
+
+ // try to withdraw an amount greater than current balance
+ try {
+ frontEnd.withdraw(customerName, previousBalance + 1);
+ fail("withdraw over balance should fail");
+ }
+ catch (InsufficientFunds_Exception e) {
+ InsufficientFunds faultInfo = e.getFaultInfo();
+ assertEquals(customerName, faultInfo.getCustomerName());
+ // check account balance has not changed
+ assertEquals(previousBalance, faultInfo.getAmount(), 0);
+ }
+
+ // end customer session
+ frontEnd.logOff(customerName);
+
+ // disconnect from bank
+ frontEnd.disconnect(ticketNumber);
+ }
+}
\ No newline at end of file
Copied: trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/TutorialBPELPurchaseTestCase.java (from rev 332, trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartBPELPurchaseTestCase.java)
===================================================================
--- trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/TutorialBPELPurchaseTestCase.java (rev 0)
+++ trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/TutorialBPELPurchaseTestCase.java 2009-11-27 03:32:13 UTC (rev 342)
@@ -0,0 +1,107 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.soa.bpel.tests.samples;
+
+import junit.framework.Test;
+
+import org.jboss.soa.bpel.tests.RiftSawTest;
+import org.jboss.soa.bpel.tests.RiftSawTestSetup;
+import org.jboss.soa.bpel.tests.samples.purchase.CustomerInfo;
+import org.jboss.soa.bpel.tests.samples.purchase.Invoice;
+import org.jboss.soa.bpel.tests.samples.purchase.OrderFaultType;
+import org.jboss.soa.bpel.tests.samples.purchase.PurchaseOrder;
+import org.jboss.soa.bpel.tests.samples.purchase.PurchaseOrderPT;
+import org.jboss.soa.bpel.tests.samples.purchase.PurchaseSVC;
+
+/**
+ * Test for common order purchasing scenarios.
+ *
+ * @author Jeff DeLong
+ * @author Alejandro Guizar
+ */
+public class TutorialBPELPurchaseTestCase extends RiftSawTest {
+
+ private PurchaseOrderPT purchaseOrderPT;
+
+ private static final String TEST_NAME = "Tutorial_bpel_purchase";
+
+ public TutorialBPELPurchaseTestCase() {
+ super(TEST_NAME);
+ }
+
+ public static Test suite() {
+ return new RiftSawTestSetup(
+ TutorialBPELPurchaseTestCase.class,
+ TEST_NAME,
+ "Tutorial_bpel_purchase.war,Tutorial_bpel_purchase_ejb.jar,Tutorial_bpel_purchase-1.jar");
+ }
+
+ protected void setUp() throws Exception {
+ PurchaseSVC service = new PurchaseSVC();
+ purchaseOrderPT = service.getPurchaseOrderSP();
+ }
+
+ public void testSendPurchaseOrderAvailable() {
+ CustomerInfo customerInfo = new CustomerInfo();
+ customerInfo.setCustomerId("manager");
+ customerInfo.setAddress("123 Main St");
+
+ PurchaseOrder purchaseOrder = new PurchaseOrder();
+ purchaseOrder.setOrderId(10);
+ purchaseOrder.setPartNumber(23);
+ purchaseOrder.setQuantity(4);
+
+ try {
+ Invoice invoice =
+ purchaseOrderPT.sendPurchaseOrder(customerInfo, purchaseOrder);
+ // In our system, the part number is also the unit price!
+ // The shipper charges a flat fare of $9.50
+ assertEquals(purchaseOrder.getPartNumber() * purchaseOrder.getQuantity()
+ + 9.50, invoice.getAmount(), 0);
+ assertEquals(purchaseOrder.getOrderId(), invoice.getOrderId());
+ }
+ catch (OrderFaultType e) {
+ fail("shipping to available address should complete");
+ }
+ }
+
+ public void testSendPurchaseOrderNotAvailable() {
+ CustomerInfo customerInfo = new CustomerInfo();
+ customerInfo.setCustomerId("freddy");
+ customerInfo.setAddress("666 Elm St");
+
+ PurchaseOrder purchaseOrder = new PurchaseOrder();
+ purchaseOrder.setOrderId(20);
+ purchaseOrder.setPartNumber(13);
+ purchaseOrder.setQuantity(7);
+
+ try {
+ purchaseOrderPT.sendPurchaseOrder(customerInfo, purchaseOrder);
+ fail("shipping to unavailable address should not complete");
+ }
+ catch (OrderFaultType e) {
+ assertTrue(e.getFaultInfo()
+ .getDetail()
+ .indexOf(customerInfo.getAddress()) != -1);
+ }
+ }
+}
Copied: trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/TutorialBPELTravelAgencyTestCase.java (from rev 332, trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartBPELTravelAgencyTestCase.java)
===================================================================
--- trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/TutorialBPELTravelAgencyTestCase.java (rev 0)
+++ trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/TutorialBPELTravelAgencyTestCase.java 2009-11-27 03:32:13 UTC (rev 342)
@@ -0,0 +1,141 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.soa.bpel.tests.samples;
+
+import java.rmi.RemoteException;
+import java.util.Calendar;
+import java.util.GregorianCalendar;
+
+import javax.xml.datatype.DatatypeFactory;
+import javax.xml.datatype.XMLGregorianCalendar;
+
+import junit.framework.Test;
+
+import org.jboss.soa.bpel.tests.RiftSawTest;
+import org.jboss.soa.bpel.tests.RiftSawTestSetup;
+import org.jboss.soa.bpel.tests.samples.travel.Cancelation;
+import org.jboss.soa.bpel.tests.samples.travel.Detail;
+import org.jboss.soa.bpel.tests.samples.travel.Flight;
+import org.jboss.soa.bpel.tests.samples.travel.Hotel;
+import org.jboss.soa.bpel.tests.samples.travel.Invoice;
+import org.jboss.soa.bpel.tests.samples.travel.ItemSet;
+import org.jboss.soa.bpel.tests.samples.travel.Order;
+import org.jboss.soa.bpel.tests.samples.travel.Penalty;
+import org.jboss.soa.bpel.tests.samples.travel.Query;
+import org.jboss.soa.bpel.tests.samples.travel.RentalCar;
+import org.jboss.soa.bpel.tests.samples.travel.TravelAgent;
+import org.jboss.soa.bpel.tests.samples.travel.TravelService;
+
+/**
+ * @author Alejandro Guizar
+ */
+public class TutorialBPELTravelAgencyTestCase extends RiftSawTest {
+
+ private TravelAgent travelAgent;
+
+ private Flight flight = new Flight();
+ private Hotel hotel = new Hotel();
+ private RentalCar car = new RentalCar();
+ private XMLGregorianCalendar tripDate;
+
+ private static final String TEST_NAME = "Tutorial_bpel_travel_agency";
+
+ public TutorialBPELTravelAgencyTestCase() {
+ super(TEST_NAME);
+ }
+
+ public static Test suite() {
+ return new RiftSawTestSetup(TutorialBPELTravelAgencyTestCase.class,
+ TEST_NAME,
+ "Tutorial_bpel_travel_agency.war,Tutorial_bpel_travel_agency-1.jar");
+ }
+
+ protected void setUp() throws Exception {
+ TravelService tripService = new TravelService();
+ travelAgent = tripService.getTravelAgentPort();
+
+ flight.setAirline("AM");
+ flight.setNumber(637);
+ hotel.setName("Maria Isabel");
+ car.setCompany("Alamo");
+
+ GregorianCalendar now = new GregorianCalendar();
+ now.add(Calendar.SECOND, 10);
+ tripDate = DatatypeFactory.newInstance().newXMLGregorianCalendar(now);
+ }
+
+ public void testPurchaseTrip() throws RemoteException {
+ ItemSet items = new ItemSet();
+ items.setFlight(flight); // cost: 300
+ items.setHotel(hotel); // cost: 100
+
+ Order order = new Order();
+ order.setDate(tripDate);
+ order.setItems(items);
+
+ Invoice invoice = travelAgent.purchaseTrip(order);
+ assertEquals(300 + 100, invoice.getCost(), 0);
+ }
+
+ public void testGetTripDetails() throws RemoteException {
+ ItemSet items = new ItemSet();
+ items.setFlight(flight);
+ items.setHotel(hotel);
+ items.setRentalCar(car);
+
+ Order order = new Order();
+ order.setDate(tripDate);
+ order.setItems(items);
+
+ Invoice invoice = travelAgent.purchaseTrip(order);
+
+ Query query = new Query();
+ query.setLocator(invoice.getLocator());
+
+ Detail detail = travelAgent.getTripDetail(query);
+ items = detail.getItems();
+
+ assertEquals(flight.getAirline(), items.getFlight().getAirline());
+ assertEquals(flight.getNumber(), items.getFlight().getNumber());
+ assertEquals(hotel.getName(), items.getHotel().getName());
+ assertEquals(car.getCompany(), items.getRentalCar().getCompany());
+ assertEquals(invoice.getCost(), detail.getCost(), 0);
+ }
+
+ public void testCancelTrip() throws Exception {
+ ItemSet items = new ItemSet();
+ items.setFlight(flight); // fee: 100
+ items.setRentalCar(car); // fee: 5
+
+ Order order = new Order();
+ order.setDate(tripDate);
+ order.setItems(items);
+
+ Invoice invoice = travelAgent.purchaseTrip(order);
+
+ Cancelation reference = new Cancelation();
+ reference.setLocator(invoice.getLocator());
+
+ Penalty penalty = travelAgent.cancelTrip(reference);
+ assertEquals(100 + 5, penalty.getFee(), 0);
+ }
+}
Copied: trunk/integration-tests/src/test/resources/samples/Tutorial_bpel_atm (from rev 332, trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm)
Modified: trunk/integration-tests/src/test/resources/samples/Tutorial_bpel_atm/build.xml
===================================================================
--- trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/build.xml 2009-11-25 21:39:25 UTC (rev 332)
+++ trunk/integration-tests/src/test/resources/samples/Tutorial_bpel_atm/build.xml 2009-11-27 03:32:13 UTC (rev 342)
@@ -1,4 +1,4 @@
-<project name="Quickstart_bpel_atm" default="deploy" basedir=".">
+<project name="Tutorial_bpel_atm" default="deploy" basedir=".">
<description>${ant.project.name}</description>
Copied: trunk/integration-tests/src/test/resources/samples/Tutorial_bpel_purchase (from rev 332, trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_purchase)
Modified: trunk/integration-tests/src/test/resources/samples/Tutorial_bpel_purchase/build.xml
===================================================================
--- trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_purchase/build.xml 2009-11-25 21:39:25 UTC (rev 332)
+++ trunk/integration-tests/src/test/resources/samples/Tutorial_bpel_purchase/build.xml 2009-11-27 03:32:13 UTC (rev 342)
@@ -1,4 +1,4 @@
-<project name="Quickstart_bpel_purchase" default="deploy" basedir=".">
+<project name="Tutorial_bpel_purchase" default="deploy" basedir=".">
<description>${ant.project.name}</description>
Copied: trunk/integration-tests/src/test/resources/samples/Tutorial_bpel_travel_agency (from rev 332, trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_travel_agency)
Modified: trunk/integration-tests/src/test/resources/samples/Tutorial_bpel_travel_agency/build.xml
===================================================================
--- trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_travel_agency/build.xml 2009-11-25 21:39:25 UTC (rev 332)
+++ trunk/integration-tests/src/test/resources/samples/Tutorial_bpel_travel_agency/build.xml 2009-11-27 03:32:13 UTC (rev 342)
@@ -1,4 +1,4 @@
-<project name="Quickstart_bpel_travel_agency" default="deploy" basedir=".">
+<project name="Tutorial_bpel_travel_agency" default="deploy" basedir=".">
<description>${ant.project.name}</description>
Copied: trunk/samples/tutorial/atm (from rev 332, trunk/samples/quickstart/atm)
Copied: trunk/samples/tutorial/purchase (from rev 332, trunk/samples/quickstart/purchase)
Copied: trunk/samples/tutorial/travel_agency (from rev 332, trunk/samples/quickstart/travel_agency)
15 years, 1 month
riftsaw SVN: r341 - in trunk: integration-tests/src/test/resources/samples/Quickstart_bpel_hello_world_header_ode/messages and 1 other directories.
by riftsaw-commits@lists.jboss.org
Author: objectiser
Date: 2009-11-26 12:40:48 -0500 (Thu, 26 Nov 2009)
New Revision: 341
Modified:
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartBPELHelloWorldHeaderODETestCase.java
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_hello_world_header_ode/messages/hello_response1.xml
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/SOAPMessageAdapter.java
Log:
RIFTSAW-74 - fixed issues with ODE specific header access approach. Still need example using soap:header definition in the WSDL binding.
Modified: trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartBPELHelloWorldHeaderODETestCase.java
===================================================================
--- trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartBPELHelloWorldHeaderODETestCase.java 2009-11-26 17:24:07 UTC (rev 340)
+++ trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartBPELHelloWorldHeaderODETestCase.java 2009-11-26 17:40:48 UTC (rev 341)
@@ -47,6 +47,6 @@
"http://localhost:8080/Quickstart_bpel_hello_world_header_odeWS");
// TODO: Commented out until fixed
- //assertMessageFromFile(result, "hello_response1.xml");
+ assertMessageFromFile(result, "hello_response1.xml");
}
}
Modified: trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_hello_world_header_ode/messages/hello_response1.xml
===================================================================
--- trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_hello_world_header_ode/messages/hello_response1.xml 2009-11-26 17:24:07 UTC (rev 340)
+++ trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_hello_world_header_ode/messages/hello_response1.xml 2009-11-26 17:40:48 UTC (rev 341)
@@ -1 +1 @@
-<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'><env:Header></env:Header><env:Body><odens:helloResponse xmlns:odens='http://www.jboss.org/bpel/examples/wsdl'><TestPart>Hello World conversationId=12345</TestPart></odens:helloResponse></env:Body></env:Envelope>
\ No newline at end of file
+<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'><env:Header><ns:conversationId xmlns:ns='http://www.jboss.org/cid'>12345</ns:conversationId></env:Header><env:Body><odens:helloResponse xmlns:odens='http://www.jboss.org/bpel/examples/wsdl'><TestPart>Hello World conversationId=12345</TestPart></odens:helloResponse></env:Body></env:Envelope>
\ No newline at end of file
Modified: trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/SOAPMessageAdapter.java
===================================================================
--- trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/SOAPMessageAdapter.java 2009-11-26 17:24:07 UTC (rev 340)
+++ trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/SOAPMessageAdapter.java 2009-11-26 17:40:48 UTC (rev 341)
@@ -335,12 +335,17 @@
// aren't reliable enough given what people do out there.
Iterator headersIter = soapHeader.getChildElements();
while (headersIter.hasNext()) {
- javax.xml.soap.SOAPHeader header = (javax.xml.soap.SOAPHeader) headersIter.next();
- String partName = findHeaderPartName(headerDefs, header.getElementQName());
+ javax.xml.soap.SOAPHeaderElement headerElem = (javax.xml.soap.SOAPHeaderElement) headersIter.next();
+ String partName = findHeaderPartName(headerDefs, headerElem.getElementQName());
Document doc = DOMUtils.newDocument();
- Element destPart = doc.createElementNS(null, partName);
- destPart.appendChild(doc.importNode(header, true));
- odeMessage.setHeaderPart(partName, destPart);
+
+ // RIFTSAW-74 - slight modification to avoid jbossws exception when reconstructing the
+ // SOAP message.
+
+ //Element destPart = doc.createElementNS(null, partName);
+ //destPart.appendChild(doc.importNode(headerElem, true));
+ //odeMessage.setHeaderPart(partName, destPart);
+ odeMessage.setHeaderPart(partName, (Element)doc.importNode(headerElem, true));
}
}
catch (SOAPException e)
15 years, 1 month
riftsaw SVN: r340 - in branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate: src/main/resources/META-INF and 1 other directory.
by riftsaw-commits@lists.jboss.org
Author: jeff.yuchang
Date: 2009-11-26 12:24:07 -0500 (Thu, 26 Nov 2009)
New Revision: 340
Added:
branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/build.xml
branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/pom.xml
Modified:
branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/src/main/resources/META-INF/persistence.xml
Log:
* add maven-ant build script for schema generation, not working yet.
need to update Rakefile-riftsaw a little bit.
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 2009-11-26 17:24:07 UTC (rev 340)
@@ -0,0 +1,44 @@
+<?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="target/db/schema.scripts" />
+ <property name="config.dir" value="src/main/files/hibernate.cfg"/>
+
+ <path id="classpath">
+ <path location="src/main/resources"/>
+ <pathelement path="${maven.runtime.classpath}"/>
+ </path>
+
+ <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}" />
+
+ <echo>=====================</echo>
+
+ <hibernatetool destdir="${db.scripts.dir}">
+ <jpaconfiguration persistenceunit="ode-dao" />
+ <hbm2ddl drop="false" create="true" export="${export}" console="false"
+ outputfilename="riftsaw.hsql.create.sql" delimiter=";" format="true" />
+ <hbm2ddl drop="true" create="false" export="${export}" console="false"
+ outputfilename="riftsaw.hsql.drop.sql" delimiter=";" format="true" />
+ </hibernatetool>
+
+ <echo>Done.</echo>
+ <echo>=====================</echo>
+
+ </target>
+
+</project>
\ No newline at end of file
Added: branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/pom.xml
===================================================================
--- branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/pom.xml (rev 0)
+++ branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/pom.xml 2009-11-26 17:24:07 UTC (rev 340)
@@ -0,0 +1,108 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.jboss.soa.bpel</groupId>
+ <artifactId>hibernate-db</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ <packaging>pom</packaging>
+ <name>JPA Hibernate implementation</name>
+
+ <properties>
+ <hibernate-tools-version>3.2.4.GA</hibernate-tools-version>
+ <hsqldb-version>1.8.0.7</hsqldb-version>
+ <apache.ant.version>1.7.0</apache.ant.version>
+ <mysql.connector.version>5.0.8</mysql.connector.version>
+ <postgresql.version>8.3-603.jdbc3</postgresql.version>
+ <jtds.version>1.2.2</jtds.version>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-tools</artifactId>
+ <version>${hibernate-tools-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-entitymanager</artifactId>
+ <version>3.4.0.GA</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>1.4.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <version>1.4.2</version>
+ </dependency>
+ <dependency>
+ <groupId>hsqldb</groupId>
+ <artifactId>hsqldb</artifactId>
+ <version>${hsqldb-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant</artifactId>
+ <version>${apache.ant.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.soa.bpel</groupId>
+ <artifactId>riftsaw-dao-jpa</artifactId>
+ <version>2.0-M2</version>
+ </dependency>
+
+ <!-- Database Drivers -->
+ <dependency>
+ <groupId>mysql</groupId>
+ <artifactId>mysql-connector-java</artifactId>
+ <version>${mysql.connector.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>postgresql</groupId>
+ <artifactId>postgresql</artifactId>
+ <version>${postgresql.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>net.sourceforge.jtds</groupId>
+ <artifactId>jtds</artifactId>
+ <version>${jtds.version}</version>
+ </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">
+ </ant>
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+ <repositories>
+ <repository>
+ <id>jboss</id>
+ <url>http://repository.jboss.com/maven2/</url>
+ </repository>
+ </repositories>
+</project>
+
Modified: 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 2009-11-26 15:48:32 UTC (rev 339)
+++ branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/src/main/resources/META-INF/persistence.xml 2009-11-26 17:24:07 UTC (rev 340)
@@ -21,11 +21,8 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="1.0">
<persistence-unit name="ode-dao">
- <!--
- This properties file is used specifically by the
- OpenJPA Enhancer.
- -->
<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>
@@ -42,5 +39,14 @@
<class>org.apache.ode.dao.jpa.CorrSetProperty</class>
<class>org.apache.ode.dao.jpa.MexProperty</class>
<class>org.apache.ode.dao.jpa.XmlDataProperty</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>
\ No newline at end of file
15 years, 1 month
riftsaw SVN: r339 - in branches/ODE/ODE-1.x-jpa: dao-jpa-hibernate/src/main/java/org/apache/ode/dao/jpa and 1 other directories.
by riftsaw-commits@lists.jboss.org
Author: jeff.yuchang
Date: 2009-11-26 10:48:32 -0500 (Thu, 26 Nov 2009)
New Revision: 339
Added:
branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/src/main/java/org/apache/ode/dao/jpa/hibernate/
branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/src/main/java/org/apache/ode/dao/jpa/hibernate/HibernateDaoOperator.java
Removed:
branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/src/main/java/org/apache/ode/dao/jpa/openjpa/
Modified:
branches/ODE/ODE-1.x-jpa/dao-jpa/src/main/java/org/apache/ode/dao/jpa/JPADaoOperator.java
branches/ODE/ODE-1.x-jpa/dao-jpa/src/main/java/org/apache/ode/dao/jpa/JPADaoOperatorFactory.java
Log:
* rename the packagename and add the impl for daoOperatorFactory.
next step would be to use hibernate generate the ddl.
Modified: branches/ODE/ODE-1.x-jpa/dao-jpa/src/main/java/org/apache/ode/dao/jpa/JPADaoOperator.java
===================================================================
--- branches/ODE/ODE-1.x-jpa/dao-jpa/src/main/java/org/apache/ode/dao/jpa/JPADaoOperator.java 2009-11-26 15:09:40 UTC (rev 338)
+++ branches/ODE/ODE-1.x-jpa/dao-jpa/src/main/java/org/apache/ode/dao/jpa/JPADaoOperator.java 2009-11-26 15:48:32 UTC (rev 339)
@@ -8,10 +8,8 @@
import javax.sql.DataSource;
import javax.transaction.TransactionManager;
-import org.apache.ode.bpel.dao.BpelDAOConnection;
-
/**
- * These is interfaces that will include the methods that will be used in JPA DAO,
+ * this is interface that will include the methods that will be used in JPA DAO,
* But the implementation should be different from various JPA vendor, like OpenJPA, Hibernate etc.
*
* @author Jeff Yu
Modified: branches/ODE/ODE-1.x-jpa/dao-jpa/src/main/java/org/apache/ode/dao/jpa/JPADaoOperatorFactory.java
===================================================================
--- branches/ODE/ODE-1.x-jpa/dao-jpa/src/main/java/org/apache/ode/dao/jpa/JPADaoOperatorFactory.java 2009-11-26 15:09:40 UTC (rev 338)
+++ branches/ODE/ODE-1.x-jpa/dao-jpa/src/main/java/org/apache/ode/dao/jpa/JPADaoOperatorFactory.java 2009-11-26 15:48:32 UTC (rev 339)
@@ -3,18 +3,60 @@
*/
package org.apache.ode.dao.jpa;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Properties;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
/**
*
+ * This will look up the properties from bpel.properties file,
+ * the property would be like : jpa.dao.operator=org.apache.ode.dao.jpa.hibernate.HibernateDaoOperator
+ *
* @author Jeff Yu
*
*/
public class JPADaoOperatorFactory {
- private JPADaoOperatorFactory(){
+ public static final String DAO_OPERATOR = "jpa.dao.operator";
+
+ private static final Log log = LogFactory.getLog(JPADaoOperatorFactory.class);
+
+ private static JPADaoOperator operator;
+
+ private JPADaoOperatorFactory(){
+
}
+ private static void createJPADaoOperator(){
+ Properties props = new Properties();
+ InputStream is=JPADaoOperatorFactory.class.getClassLoader().getResourceAsStream("bpel.properties");
+ String daoOperatorClass = "org.apache.ode.dao.jpa.openjpa.OpenJPADaoOperator";
+ try {
+ props.load(is);
+ daoOperatorClass = props.getProperty(DAO_OPERATOR);
+ } catch (IOException e) {
+ log.error("error in finding the bpel.properties file", e);
+ }
+
+ log.debug("The jpa.dao.operator class is [" + daoOperatorClass + "]");
+
+ try {
+ operator = (JPADaoOperator) Class.forName(daoOperatorClass).newInstance();
+ } catch (Exception e) {
+ log.error("exception in create instance for " + daoOperatorClass, e);
+ throw new RuntimeException(e);
+ }
+
+ }
+
public static JPADaoOperator getJPADaoOperator() {
- return null;
+ if (operator == null) {
+ createJPADaoOperator();
+ }
+ return operator;
}
}
Added: branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/src/main/java/org/apache/ode/dao/jpa/hibernate/HibernateDaoOperator.java
===================================================================
--- branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/src/main/java/org/apache/ode/dao/jpa/hibernate/HibernateDaoOperator.java (rev 0)
+++ branches/ODE/ODE-1.x-jpa/dao-jpa-hibernate/src/main/java/org/apache/ode/dao/jpa/hibernate/HibernateDaoOperator.java 2009-11-26 15:48:32 UTC (rev 339)
@@ -0,0 +1,65 @@
+/*
+ * 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.dao.jpa.hibernate;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import javax.persistence.EntityManager;
+import javax.persistence.Persistence;
+import javax.persistence.Query;
+import javax.sql.DataSource;
+import javax.transaction.TransactionManager;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.ode.dao.jpa.JPADaoOperator;
+
+/**
+ *
+ * @author Jeff Yu
+ */
+public class HibernateDaoOperator implements JPADaoOperator {
+
+ private static final Log log = LogFactory.getLog(HibernateDaoOperator.class);
+
+ private static EntityManager em;
+
+ public EntityManager getEM() {
+ if (em == null) {
+ em = Persistence.createEntityManagerFactory("ode-dao").createEntityManager();
+ }
+ return em;
+ }
+
+ public <T> void batchUpdateByIds(Iterator<T> ids, Query query, String parameterName) {
+ //TODO
+ }
+
+ public Map<String, Object> getInitializeProperties(DataSource ds, boolean createDatamodel, TransactionManager tx) {
+ HashMap<String, Object> propMap = new HashMap<String,Object>();
+ //TODO
+ return propMap;
+ }
+
+ public void setBatchSize(Query query, int limit) {
+ //TODO
+ }
+}
\ No newline at end of file
15 years, 1 month