JBoss JBPM SVN: r6575 - jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/xml.
by do-not-reply@jboss.org
Author: rebody
Date: 2010-08-11 09:56:21 -0400 (Wed, 11 Aug 2010)
New Revision: 6575
Modified:
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/xml/JpdlParser.java
Log:
add jbpm-4.5.xsd to JpdlParser
Modified: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/xml/JpdlParser.java
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/xml/JpdlParser.java 2010-08-11 13:52:37 UTC (rev 6574)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/xml/JpdlParser.java 2010-08-11 13:56:21 UTC (rev 6575)
@@ -86,15 +86,16 @@
public static final String NAMESPACE_JPDL_42 = "http://jbpm.org/4.2/jpdl";
public static final String NAMESPACE_JPDL_43 = "http://jbpm.org/4.3/jpdl";
public static final String NAMESPACE_JPDL_44 = "http://jbpm.org/4.4/jpdl";
+ public static final String NAMESPACE_JPDL_45 = "http://jbpm.org/4.5/jpdl";
- public static final String CURRENT_VERSION_JBPM = "4.4";
+ public static final String CURRENT_VERSION_JBPM = "4.5";
public static final String CURRENT_VERSION_NAMESPACE =
"http://jbpm.org/" + CURRENT_VERSION_JBPM + "/jpdl";
public static final String CURRENT_VERSION_PROCESS_LANGUAGE_ID =
"jpdl-" + CURRENT_VERSION_JBPM;
private static final String[] SCHEMA_RESOURCES =
- { "jpdl-4.0.xsd", "jpdl-4.2.xsd", "jpdl-4.3.xsd", "jpdl-4.4.xsd" };
+ { "jpdl-4.0.xsd", "jpdl-4.2.xsd", "jpdl-4.3.xsd", "jpdl-4.4.xsd", "jpdl-4.5.xsd" };
// array elements are mutable, even when final
// never make a static array public
@@ -119,7 +120,9 @@
if (resourceUrls.hasMoreElements()) {
while (resourceUrls.hasMoreElements()) {
URL resourceUrl = resourceUrls.nextElement();
- log.trace("loading jpdl bindings from resource: " + resourceUrl);
+ if (log.isTraceEnabled()) {
+ log.trace("loading jpdl bindings from resource: " + resourceUrl);
+ }
jpdlBindingsParser.createParse()
.setUrl(resourceUrl)
.contextMapPut(Parse.CONTEXT_KEY_BINDINGS, bindings)
@@ -128,7 +131,9 @@
}
}
else {
- log.trace("skipping unavailable jpdl activities resource: " + activityResource);
+ if (log.isTraceEnabled()) {
+ log.trace("skipping unavailable jpdl activities resource: " + activityResource);
+ }
}
}
}
@@ -289,7 +294,9 @@
JpdlBinding activityBinding = (JpdlBinding) getBinding(nestedElement, CATEGORY_ACTIVITY);
if (activityBinding == null) {
- log.debug("unrecognized activity: " + tagName);
+ if (log.isDebugEnabled()) {
+ log.debug("unrecognized activity: " + tagName);
+ }
continue;
}
13 years, 10 months
JBoss JBPM SVN: r6574 - in jbpm4/trunk/modules: examples/src/test/java/org/jbpm/examples/hql and 4 other directories.
by do-not-reply@jboss.org
Author: rebody
Date: 2010-08-11 09:52:37 -0400 (Wed, 11 Aug 2010)
New Revision: 6574
Added:
jbpm4/trunk/modules/api/src/main/resources/jpdl-4.5.xsd
jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/hql/HqlUpdateTest.java
jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/sql/SqlUpdateTest.java
jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/hql/hqlupdate.jpdl.xml
jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/sql/sqlupdate.jpdl.xml
Modified:
jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/hql/HqlTest.java
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/HqlActivity.java
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/HqlBinding.java
Log:
JBPM-2792 HQL/SQL support execute update.
Added: jbpm4/trunk/modules/api/src/main/resources/jpdl-4.5.xsd
===================================================================
--- jbpm4/trunk/modules/api/src/main/resources/jpdl-4.5.xsd (rev 0)
+++ jbpm4/trunk/modules/api/src/main/resources/jpdl-4.5.xsd 2010-08-11 13:52:37 UTC (rev 6574)
@@ -0,0 +1,1781 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://jbpm.org/4.4/jpdl"
+ xmlns:tns="http://jbpm.org/4.4/jpdl" elementFormDefault="qualified">
+ <annotation>
+ <documentation>Schema for jPDL 4 process descriptions;
+ the top level element is process.</documentation>
+ </annotation>
+
+ <!-- ### PROCESS DEFINITION ############################################# -->
+
+ <element name="process">
+ <annotation>
+ <documentation>jBPM Process Definition Language definition.
+ This is the top level element in a process definition file.</documentation>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element name="description" minOccurs="0" type="string" />
+ <choice minOccurs="0" maxOccurs="unbounded">
+ <element ref="tns:swimlane" />
+ <element ref="tns:on" />
+ <element ref="tns:timer" />
+ <element ref="tns:variable" />
+ <group ref="tns:activityGroup" />
+ </choice>
+ <element ref="tns:migrate-instances" minOccurs="0" />
+ </sequence>
+ <attribute name="name" use="required" type="string">
+ <annotation>
+ <documentation>The process name. Multiple processes can be deployed with the same
+ name, as long as they have a different version.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="key" type="string">
+ <annotation>
+ <documentation>The key can be used to provide a short acronym that replaces the name
+ as the basis for the generated process definition id.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="version" type="int">
+ <annotation>
+ <documentation>Indicates the version number of this process definition among its
+ homonyms. By specifying a version, automatic deployment can tell whether this
+ process is already deployed.</documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <!-- ### ACTIVITIES ##################################################### -->
+
+ <group name="activityGroup">
+ <choice>
+ <!-- ~~~ START ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <element name="start">
+ <annotation>
+ <documentation>Start event.</documentation>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element name="description" minOccurs="0" type="string" />
+ <choice minOccurs="0" maxOccurs="unbounded">
+ <element ref="tns:on" />
+ <element ref="tns:transition" />
+ </choice>
+ </sequence>
+ <attributeGroup ref="tns:activityAttributes" />
+ <attribute name="form" type="string">
+ <annotation>
+ <documentation>Resource name of the form in the deployment.</documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <!-- ~~~ END ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <element name="end">
+ <annotation>
+ <documentation>End event.</documentation>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element name="description" minOccurs="0" type="string" />
+ <element ref="tns:on" minOccurs="0" maxOccurs="unbounded" />
+ </sequence>
+ <attributeGroup ref="tns:activityAttributes" />
+ <attribute name="ends" default="process-instance">
+ <simpleType>
+ <restriction base="string">
+ <enumeration value="execution" />
+ <enumeration value="process-instance" />
+ </restriction>
+ </simpleType>
+ </attribute>
+ <attribute name="state" default="ended" type="string">
+ <annotation>
+ <documentation>Specify the end state of the execution explicitly.</documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="end-cancel">
+ <annotation>
+ <documentation>End cancel event.</documentation>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element name="description" minOccurs="0" type="string" />
+ <element ref="tns:on" minOccurs="0" maxOccurs="unbounded" />
+ </sequence>
+ <attributeGroup ref="tns:activityAttributes" />
+ <attribute name="ends" default="process-instance">
+ <simpleType>
+ <restriction base="string">
+ <enumeration value="execution" />
+ <enumeration value="process-instance" />
+ </restriction>
+ </simpleType>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="end-error">
+ <annotation>
+ <documentation>End cancel event.</documentation>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element name="description" minOccurs="0" type="string" />
+ <element ref="tns:on" minOccurs="0" maxOccurs="unbounded" />
+ </sequence>
+ <attributeGroup ref="tns:activityAttributes" />
+ <attribute name="ends" default="process-instance">
+ <simpleType>
+ <restriction base="string">
+ <enumeration value="execution" />
+ <enumeration value="process-instance" />
+ </restriction>
+ </simpleType>
+ </attribute>
+ </complexType>
+ </element>
+
+ <!-- ~~~ STATE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <element name="state">
+ <annotation>
+ <documentation>Wait state. When an execution arrives in this activity,
+ the execution stops until an external trigger is delivered through
+ execution.signal() or execution.getActivityInstance().signal()</documentation>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element name="description" minOccurs="0" type="string" />
+ <choice minOccurs="0" maxOccurs="unbounded">
+ <element ref="tns:on" />
+ <element name="transition">
+ <complexType>
+ <complexContent>
+ <extension base="tns:transitionType">
+ <sequence>
+ <element ref="tns:timer" minOccurs="0" />
+ </sequence>
+ </extension>
+ </complexContent>
+ </complexType>
+ </element>
+ </choice>
+ </sequence>
+ <attributeGroup ref="tns:activityAttributes" />
+ </complexType>
+ </element>
+
+ <!-- ~~~ DECISION ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <element name="decision">
+ <annotation>
+ <documentation>Decision gateway: selects one path out of many alternatives.
+ When an execution arrives, it takes exactly one outgoing transition.</documentation>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element name="description" minOccurs="0" type="string" />
+ <element name="handler" minOccurs="0" type="tns:wireObjectType" />
+ <choice minOccurs="0" maxOccurs="unbounded">
+ <element ref="tns:on" minOccurs="0" maxOccurs="unbounded" />
+ <element name="transition" minOccurs="0" maxOccurs="unbounded">
+ <complexType>
+ <complexContent>
+ <extension base="tns:transitionType">
+ <sequence>
+ <element name="condition" minOccurs="0" maxOccurs="unbounded">
+ <complexType>
+ <attribute name="expr" type="string">
+ <annotation>
+ <documentation>Expression to evaluate.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="lang" type="string">
+ <annotation>
+ <documentation>Scripting language to interpret.</documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+ </sequence>
+ </extension>
+ </complexContent>
+ </complexType>
+ </element>
+ </choice>
+ </sequence>
+ <attributeGroup ref="tns:activityAttributes" />
+ <attribute name="expr" type="string">
+ <annotation>
+ <documentation>The script that will be evaluated and resolve to
+ the name of the outgoing transition.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="lang" type="string">
+ <annotation>
+ <documentation>Identification of the scripting language
+ to use for the expr attribute.</documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <!-- ~~~ FOREACH ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <element name="foreach">
+ <annotation>
+ <documentation>Spawns concurrent paths of execution
+ over each element of a collection.</documentation>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element name="description" minOccurs="0" type="string" />
+ <choice minOccurs="0" maxOccurs="unbounded">
+ <element ref="tns:on" />
+ <element ref="tns:transition" />
+ </choice>
+ </sequence>
+ <attributeGroup ref="tns:activityAttributes" />
+ <attribute name="var" type="string" use="required" />
+ <attribute name="in" type="string" use="required" />
+ </complexType>
+ </element>
+
+ <!-- ~~~ FORK ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <element name="fork">
+ <annotation>
+ <documentation>Spawns multiple concurrent paths of
+ execution.</documentation>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element name="description" minOccurs="0" type="string" />
+ <choice minOccurs="0" maxOccurs="unbounded">
+ <element ref="tns:on" />
+ <element ref="tns:transition" />
+ </choice>
+ </sequence>
+ <attributeGroup ref="tns:activityAttributes" />
+ </complexType>
+ </element>
+
+ <!-- ~~~ JOIN ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <element name="join">
+ <annotation>
+ <documentation>Spawns multiple concurrent paths of
+ execution.</documentation>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element name="description" minOccurs="0" type="string" />
+ <choice minOccurs="0" maxOccurs="unbounded">
+ <element ref="tns:on" />
+ <element ref="tns:transition" />
+ </choice>
+ </sequence>
+ <attributeGroup ref="tns:activityAttributes" />
+ <attribute name="multiplicity" type="string" />
+ <attribute name="lockmode" default="upgrade">
+ <simpleType>
+ <restriction base="string">
+ <enumeration value="none" />
+ <enumeration value="read" />
+ <enumeration value="upgrade" />
+ <enumeration value="upgrade_nowait" />
+ <enumeration value="write" />
+ </restriction>
+ </simpleType>
+ </attribute>
+ </complexType>
+ </element>
+
+ <!-- ~~~ SCRIPT ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <element name="script">
+ <annotation>
+ <documentation>Evaluates a piece of text as a script.</documentation>
+ </annotation>
+ <complexType>
+ <complexContent>
+ <extension base="tns:scriptType">
+ <choice minOccurs="0" maxOccurs="unbounded">
+ <element ref="tns:on" />
+ <element ref="tns:transition" />
+ </choice>
+ <attributeGroup ref="tns:activityAttributes" />
+ </extension>
+ </complexContent>
+ </complexType>
+ </element>
+
+ <!-- ~~~ HQL ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <element name="hql">
+ <annotation>
+ <documentation>Performs a Hibernate query.</documentation>
+ </annotation>
+ <complexType>
+ <complexContent>
+ <extension base="tns:qlType">
+ <choice minOccurs="0" maxOccurs="unbounded">
+ <element ref="tns:on" />
+ <element ref="tns:transition" />
+ </choice>
+ <attributeGroup ref="tns:activityAttributes" />
+ </extension>
+ </complexContent>
+ </complexType>
+ </element>
+
+ <!-- ~~~ SQL ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <element name="sql">
+ <annotation>
+ <documentation>Performs a Hibernate SQL query.</documentation>
+ </annotation>
+ <complexType>
+ <complexContent>
+ <extension base="tns:qlType">
+ <choice minOccurs="0" maxOccurs="unbounded">
+ <element ref="tns:on" />
+ <element ref="tns:transition" />
+ </choice>
+ <attributeGroup ref="tns:activityAttributes" />
+ </extension>
+ </complexContent>
+ </complexType>
+ </element>
+
+ <!-- ~~~ MAIL ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <element name="mail">
+ <annotation>
+ <documentation>Sends an email.</documentation>
+ </annotation>
+ <complexType>
+ <complexContent>
+ <extension base="tns:mailType">
+ <choice minOccurs="0" maxOccurs="unbounded">
+ <element ref="tns:on" />
+ <element ref="tns:transition" />
+ </choice>
+ <attributeGroup ref="tns:activityAttributes" />
+ </extension>
+ </complexContent>
+ </complexType>
+ </element>
+
+ <!-- ~~~ JMS ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <element name="jms">
+ <annotation>
+ <documentation>Sends an email.</documentation>
+ </annotation>
+ <complexType>
+ <complexContent>
+ <extension base="tns:jmsType">
+ <choice minOccurs="0" maxOccurs="unbounded">
+ <element ref="tns:on" />
+ <element ref="tns:transition" />
+ </choice>
+ <attributeGroup ref="tns:activityAttributes" />
+ </extension>
+ </complexContent>
+ </complexType>
+ </element>
+
+ <!-- ~~~ JAVA ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <element name="java">
+ <annotation>
+ <documentation>Invokes a method on a java object.
+ Either the java class is instantiated with reflection,
+ or the java object is fetched from the environment.
+ Values are then injected into the fields and.
+ Finally a method is invoked.</documentation>
+ </annotation>
+ <complexType>
+ <complexContent>
+ <extension base="tns:javaType">
+ <choice minOccurs="0" maxOccurs="unbounded">
+ <element ref="tns:on" />
+ <element ref="tns:transition" />
+ </choice>
+ <attributeGroup ref="tns:activityAttributes" />
+ </extension>
+ </complexContent>
+ </complexType>
+ </element>
+
+ <!-- ~~~ ASSIGN ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <element name="assign">
+ <annotation>
+ <documentation>Assigns a source value to a target location.</documentation>
+ </annotation>
+ <complexType>
+ <complexContent>
+ <extension base="tns:assignType">
+ <choice minOccurs="0" maxOccurs="unbounded">
+ <element ref="tns:on" />
+ <element ref="tns:transition" />
+ </choice>
+ <attributeGroup ref="tns:activityAttributes" />
+ </extension>
+ </complexContent>
+ </complexType>
+ </element>
+
+ <!-- ~~~ CUSTOM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <element name="custom">
+ <annotation>
+ <documentation>Calls a user defined, custom implementation of
+ ActivityBehaviour.</documentation>
+ </annotation>
+ <complexType>
+ <complexContent>
+ <extension base="tns:wireObjectType">
+ <choice minOccurs="0" maxOccurs="unbounded">
+ <element ref="tns:on" />
+ <element name="transition">
+ <complexType>
+ <complexContent>
+ <extension base="tns:transitionType">
+ <sequence>
+ <element ref="tns:timer" minOccurs="0" />
+ </sequence>
+ </extension>
+ </complexContent>
+ </complexType>
+ </element>
+ </choice>
+ <attributeGroup ref="tns:activityAttributes" />
+ </extension>
+ </complexContent>
+ </complexType>
+ </element>
+
+ <!-- ~~~ TASK ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <element name="task">
+ <annotation>
+ <documentation>Creates a task in the task component.</documentation>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element name="description" minOccurs="0" type="string" />
+ <element name="assignment-handler" minOccurs="0" type="tns:wireObjectType" />
+ <element name="notification" minOccurs="0">
+ <complexType>
+ <attribute name="continue" type="tns:continueType" default="sync" />
+ <attribute name="template" type="tns:templateType" use="optional" />
+ </complexType>
+ </element>
+ <element name="reminder" minOccurs="0">
+ <complexType>
+ <attribute name="duedate" type="string" />
+ <attribute name="repeat" type="string" />
+ <attribute name="continue" type="tns:continueType" default="sync" />
+ <attribute name="template" type="tns:templateType" use="optional" />
+ </complexType>
+ </element>
+ <choice minOccurs="0" maxOccurs="unbounded">
+ <element ref="tns:on" />
+ <element ref="tns:timer" />
+ <element name="transition">
+ <complexType>
+ <complexContent>
+ <extension base="tns:transitionType">
+ <sequence>
+ <element ref="tns:timer" minOccurs="0" />
+ </sequence>
+ </extension>
+ </complexContent>
+ </complexType>
+ </element>
+ </choice>
+ </sequence>
+ <attributeGroup ref="tns:activityAttributes" />
+ <attributeGroup ref="tns:assignmentAttributes" />
+ <attribute name="swimlane" type="string" />
+ <attribute name="form" type="string">
+ <annotation>
+ <documentation>Resource name of the form in the deployment.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="duedate" type="string" />
+ <attribute name="on-transition" default="cancel">
+ <simpleType>
+ <restriction base="string">
+ <enumeration value="keep" />
+ <enumeration value="cancel" />
+ </restriction>
+ </simpleType>
+ </attribute>
+ <attribute name="completion" type="string" default="complete" />
+ </complexType>
+ </element>
+
+ <!-- ~~~ SUB-PROCESS ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <element name="sub-process">
+ <annotation>
+ <documentation>Waits while a sub process instance is being executed
+ and continues when the sub process instance ends.</documentation>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element name="description" minOccurs="0" type="string" />
+ <choice minOccurs="0" maxOccurs="unbounded">
+ <element name="parameter-in" type="tns:parameterType" />
+ <element name="parameter-out" type="tns:parameterType" />
+ <element ref="tns:timer" />
+ <element ref="tns:on">
+ <annotation>
+ <documentation>Events on which listeners can be registered.</documentation>
+ </annotation>
+ </element>
+ <element name="swimlane-mapping">
+ <complexType>
+ <attribute name="swimlane" type="string" use="required" />
+ <attribute name="sub-swimlane" type="string" use="required" />
+ </complexType>
+ </element>
+ <element name="transition">
+ <complexType>
+ <complexContent>
+ <extension base="tns:transitionType">
+ <sequence>
+ <element name="outcome-value" minOccurs="0" maxOccurs="unbounded">
+ <complexType>
+ <group ref="tns:wireObjectGroup" />
+ </complexType>
+ </element>
+ </sequence>
+ </extension>
+ </complexContent>
+ </complexType>
+ </element>
+ </choice>
+ </sequence>
+ <attribute name="sub-process-id" type="string">
+ <annotation>
+ <documentation>References a sub-process by id. This means that a specific
+ version of a process definition is referenced.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="sub-process-key" type="string">
+ <annotation>
+ <documentation>References a sub-process by key. Therefore, the latest
+ version of the process definition with the given key is referenced.
+ The latest version is resolved in each execution.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="outcome" type="string">
+ <annotation>
+ <documentation>Expression that is evaluated when the sub process instance ends.
+ The value is then used for outcome transition mapping.</documentation>
+ </annotation>
+ </attribute>
+ <attributeGroup ref="tns:activityAttributes" />
+ </complexType>
+ </element>
+
+ <!-- ~~~ GROUP ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <element name="group">
+ <annotation>
+ <documentation>Scope enclosing a number of activities.</documentation>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element name="description" minOccurs="0" type="string" />
+ <choice minOccurs="0" maxOccurs="unbounded">
+ <group ref="tns:activityGroup" />
+ <element ref="tns:transition" />
+ <element ref="tns:on">
+ <annotation>
+ <documentation>Events on which listeners can be registered.</documentation>
+ </annotation>
+ </element>
+ <element ref="tns:timer" />
+ </choice>
+ </sequence>
+ <attributeGroup ref="tns:activityAttributes" />
+ </complexType>
+ </element>
+
+ <!-- ~~~ RULES DECISION ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <element name="rules-decision">
+ <annotation>
+ <documentation>Selects one outgoing transition based on evaluation
+ of rules.</documentation>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element name="description" minOccurs="0" type="string" />
+ <choice minOccurs="0" maxOccurs="unbounded">
+ <element ref="tns:transition" />
+ <element ref="tns:on">
+ <annotation>
+ <documentation>Events on which listeners can be registered.</documentation>
+ </annotation>
+ </element>
+ </choice>
+ </sequence>
+ <attributeGroup ref="tns:activityAttributes" />
+ </complexType>
+ </element>
+
+ <!-- ~~~ RULES ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <element name="rules">
+ <annotation>
+ <documentation>Evaluates rules after feeding in some facts in a stateful
+ knowledge session.</documentation>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element name="description" minOccurs="0" type="string" />
+ <choice minOccurs="0" maxOccurs="unbounded">
+ <element name="fact">
+ <complexType>
+ <attribute name="var" type="string" />
+ <attribute name="expr" type="string" />
+ </complexType>
+ </element>
+ <element name="transition">
+ <complexType>
+ <complexContent>
+ <extension base="tns:transitionType">
+ <sequence>
+ <element name="condition" minOccurs="0" maxOccurs="unbounded">
+ <complexType>
+ <sequence>
+ <element name="handler" minOccurs="0" type="tns:wireObjectType" />
+ </sequence>
+ <attribute name="expr" type="string">
+ <annotation>
+ <documentation>Expression to evaluate.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="lang" type="string">
+ <annotation>
+ <documentation>Script language to interpret.</documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+ </sequence>
+ </extension>
+ </complexContent>
+ </complexType>
+ </element>
+ <element ref="tns:on">
+ <annotation>
+ <documentation>Events on which listeners can be registered.</documentation>
+ </annotation>
+ </element>
+ </choice>
+ </sequence>
+ <attributeGroup ref="tns:activityAttributes" />
+ </complexType>
+ </element>
+ </choice>
+ </group>
+
+ <group name="wireObjectGroup">
+ <choice>
+
+ <!-- SPECIAL OBJECTS ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <element name="null">
+ <annotation>
+ <documentation>The null value.</documentation>
+ </annotation>
+ </element>
+ <element name="ref">
+ <annotation>
+ <documentation>Reference to an object in the current environment.</documentation>
+ </annotation>
+ <complexType>
+ <attribute name="object" type="string" use="required">
+ <annotation>
+ <documentation>The name of the referred object.</documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+ <element name="env-ref">
+ <annotation>
+ <documentation>The current environment.</documentation>
+ </annotation>
+ </element>
+ <element name="jndi">
+ <annotation>
+ <documentation>JNDI lookup based off the initial context.</documentation>
+ </annotation>
+ <complexType>
+ <attribute name="jndi-name" type="string" use="required" />
+ </complexType>
+ </element>
+
+ <!-- COLLECTIONS ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <element name="list">
+ <annotation>
+ <documentation>java.util.List instance.</documentation>
+ </annotation>
+ <complexType>
+ <choice minOccurs="0" maxOccurs="unbounded">
+ <group ref="tns:wireObjectGroup" />
+ </choice>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>The name of the object. Optional, serves as an identifier
+ to refer to this object from other object descriptions.
+ Also used to fetch the object programmatically.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="class" type="string" default="java.util.ArrayList">
+ <annotation>
+ <documentation>List implementation class.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="synchronized" type="tns:booleanValueType" default="false">
+ <annotation>
+ <documentation>Indicates if this collection should be synchronized
+ with Collections.synchronizedList()</documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="map" type="tns:mapType" />
+
+ <element name="set">
+ <annotation>
+ <documentation>java.util.Set instance.</documentation>
+ </annotation>
+ <complexType>
+ <choice minOccurs="0" maxOccurs="unbounded">
+ <group ref="tns:wireObjectGroup" />
+ </choice>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>The name of the object. Optional, serves as an identifier
+ to refer to this object from other object descriptions.
+ Also used to fetch the object programmatically.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="class" type="string" default="java.util.HashList">
+ <annotation>
+ <documentation>Set implementation class.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="synchronized" type="tns:booleanValueType" default="false">
+ <annotation>
+ <documentation>Indicates if this collection should be synchronized
+ with Collections.synchronizedSet()</documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="properties">
+ <annotation>
+ <documentation>java.util.Properties instance.</documentation>
+ </annotation>
+ <complexType>
+ <choice minOccurs="0" maxOccurs="unbounded">
+ <element name="property">
+ <complexType>
+ <attribute name="name" type="string" use="required" />
+ <attribute name="value" type="string" use="required" />
+ </complexType>
+ </element>
+ </choice>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>The name of the object. Optional, serves as an identifier
+ to refer to this object from other object descriptions.
+ Also used to fetch the object programmatically.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="file" type="string">
+ <annotation>
+ <documentation>File in the file system.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="resource" type="string">
+ <annotation>
+ <documentation>Resource in the classpath.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="url" type="string">
+ <annotation>
+ <documentation>Resource in the web.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="is-xml" type="tns:booleanValueType">
+ <annotation>
+ <documentation>tells whether the resource referenced by
+ attributes 'file', 'resource' or 'url' is XML. The default is the
+ plain properties format, where a space or '=' separates the key
+ from the value in each line.</documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <!-- OBJECT ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <element name="object" type="tns:wireObjectType" />
+
+ <!-- BASIC TYPES ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <element name="string">
+ <complexType>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>The name of the object. Optional, serves as an identifier
+ to refer to this object from other object descriptions.
+ Also used to fetch the object programmatically.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="value" />
+ </complexType>
+ </element>
+
+ <element name="byte">
+ <annotation>
+ <documentation>8-bit signed integer.</documentation>
+ </annotation>
+ <complexType>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>The name of the object. Optional, serves as an identifier
+ to refer to this object from other object descriptions.
+ Also used to fetch the object programmatically.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="value" type="byte" use="required" />
+ </complexType>
+ </element>
+ <element name="char">
+ <annotation>
+ <documentation>16-bit Unicode character.</documentation>
+ </annotation>
+ <complexType>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>The name of the object. Optional, serves as an identifier
+ to refer to this object from other object descriptions.
+ Also used to fetch the object programmatically.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="value" use="required">
+ <simpleType>
+ <restriction base="string">
+ <maxLength value="1" />
+ </restriction>
+ </simpleType>
+ </attribute>
+ </complexType>
+ </element>
+ <element name="double">
+ <annotation>
+ <documentation>64-bit floating point number.</documentation>
+ </annotation>
+ <complexType>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>The name of the object. Optional, serves as an identifier
+ to refer to this object from other object descriptions.
+ Also used to fetch the object programmatically.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="value" type="double" use="required" />
+ </complexType>
+ </element>
+ <element name="false">
+ <annotation>
+ <documentation>Boolean false value</documentation>
+ </annotation>
+ <complexType>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>The name of the object. Optional, serves as an identifier
+ to refer to this object from other object descriptions.
+ Also used to fetch the object programmatically.</documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+ <element name="float">
+ <annotation>
+ <documentation>32-bit floating point number.</documentation>
+ </annotation>
+ <complexType>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>The name of the object. Optional, serves as an identifier
+ to refer to this object from other object descriptions.
+ Also used to fetch the object programmatically.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="value" type="float" use="required" />
+ </complexType>
+ </element>
+ <element name="int">
+ <annotation>
+ <documentation>32-bit signed integer.</documentation>
+ </annotation>
+ <complexType>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>The name of the object. Optional, serves as an identifier
+ to refer to this object from other object descriptions.
+ Also used to fetch the object programmatically.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="value" type="int" use="required" />
+ </complexType>
+ </element>
+ <element name="long">
+ <annotation>
+ <documentation>64-bit signed integer.</documentation>
+ </annotation>
+ <complexType>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>The name of the object. Optional, serves as an identifier
+ to refer to this object from other object descriptions.
+ Also used to fetch the object programmatically.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="value" type="long" use="required" />
+ </complexType>
+ </element>
+ <element name="short">
+ <annotation>
+ <documentation>16-bit signed integer.</documentation>
+ </annotation>
+ <complexType>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>The name of the object. Optional, serves as an identifier
+ to refer to this object from other object descriptions.
+ Also used to fetch the object programmatically.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="value" type="short" use="required" />
+ </complexType>
+ </element>
+ <element name="true">
+ <annotation>
+ <documentation>Boolean true value.</documentation>
+ </annotation>
+ <complexType>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>The name of the object. Optional, serves as an identifier
+ to refer to this object from other object descriptions.
+ Also used to fetch the object programmatically.</documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+ </choice>
+ </group>
+
+ <complexType name="wireObjectType">
+ <annotation>
+ <documentation>Any java object that will be created by reflection.
+ <p>There are three main ways to create an object: by constructor or by a factory
+ object or a static factory method.</p>
+ <p><b>Using the constructor</b>: the <code>class</code> attribute must provide
+ the fully qualified class name. In case a constructor other than the default
+ should be invoked, a <code>constructor</code> child element can be provided.
+ The <code>factory</code> attribute should be absent when using a constructor.</p>
+ <p><b>Using a factory</b>: the <code>factory</code> attribute or one
+ <code>factory</code> element must be provided along with the attribute
+ <code>method</code>.</p>
+ <p><b>Using a static factory method</b>: the <code>class</code> and <code>method</code>
+ attributes should be specified. There should not be a <code>factory</code>
+ attribute or element.</p>
+ <p><b>Construction and initialization</b>: all objects (constructor and factory)
+ are build in two phases: construction and initialisation phase. During construction
+ all is done until a pointer is obtained to the object. In initialisation, operations
+ are applied to the object until it is ready to be used. The separation between
+ construction and initialisation is made to allow for bidirectional references.</p>
+ <p><b>Operations</b>: after construction, various operations can be applied to objects
+ like e.g. direct field injection, injection through setters, method invocation,
+ enlist with the standard transaction, subscribe the object to an observable.</p>
+ <p><b>Arguments</b>: there are two different places for arguments. The <code>arg</code>
+ elements for the factory method invocation should be placed as child elements under
+ the <code>object</code> element. The <code>arg</code> elements for the constructor
+ should be placed as child elements of the <code>constructor</code> element.</p>
+ </documentation>
+ </annotation>
+ <choice minOccurs="0" maxOccurs="unbounded">
+ <element name="description" minOccurs="0" maxOccurs="unbounded" type="string" />
+ <element name="factory">
+ <annotation>
+ <documentation>Contains one element that describes the factory object.</documentation>
+ </annotation>
+ <complexType>
+ <group ref="tns:wireObjectGroup" />
+ </complexType>
+ </element>
+ <element name="constructor">
+ <annotation>
+ <documentation>Specifies the arguments for a non-default constructor.</documentation>
+ </annotation>
+ <complexType>
+ <choice maxOccurs="unbounded">
+ <element name="arg" type="tns:argType" />
+ </choice>
+ </complexType>
+ </element>
+ <element name="arg" type="tns:argType">
+ <annotation>
+ <documentation>The factory method arguments.</documentation>
+ </annotation>
+ </element>
+ <element name="field">
+ <annotation>
+ <documentation>Injects a value into a member field of this object.
+ Exactly one child element must specify the value.</documentation>
+ </annotation>
+ <complexType>
+ <group ref="tns:wireObjectGroup" />
+ <attribute name="name">
+ <annotation>
+ <documentation>Member field name.</documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+ <element name="property">
+ <annotation>
+ <documentation>Injects a value through a setter method.
+ Exactly one child element must specify the value.</documentation>
+ </annotation>
+ <complexType>
+ <group ref="tns:wireObjectGroup" />
+ <attribute name="name">
+ <annotation>
+ <documentation>Name of the property (without the 'set' prefix).</documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+ <element name="invoke">
+ <annotation>
+ <documentation>Invokes a method.</documentation>
+ </annotation>
+ <complexType>
+ <choice minOccurs="0" maxOccurs="unbounded">
+ <element name="arg" type="tns:argType" />
+ </choice>
+ <attribute name="method" type="string" use="required">
+ <annotation>
+ <documentation>Method name.</documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+ </choice>
+ <attribute name="class" type="string">
+ <annotation>
+ <documentation>Fully qualified class name</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="expr" type="string">
+ <annotation>
+ <documentation>Expression that provides the object.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="lang" type="string">
+ <annotation>
+ <documentation>Script language to interpret.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="factory" type="string">
+ <annotation>
+ <documentation>Name of the factory object.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="method" type="string">
+ <annotation>
+ <documentation>Factory method name</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="auto-wire" type="string">
+ <annotation>
+ <documentation>Indicates if the member fields and setter properties
+ should be wired automatically based on matching the property names and types
+ with the object names and types.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="cache" type="tns:booleanValueType">
+ <annotation>
+ <documentation>Indicates if the user code should be cached.</documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+
+ <complexType name="argType">
+ <annotation>
+ <documentation>The method arguments.
+ Each 'arg' element should have exactly one child
+ element that represents the value of the argument.</documentation>
+ </annotation>
+ <group ref="tns:wireObjectGroup" />
+ <attribute name="type" type="string">
+ <annotation>
+ <documentation>Class name representing the method type.
+ Optional, helps resolve the appropriate method in case of overloading.</documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+
+ <complexType name="mapType">
+ <annotation>
+ <documentation>java.util.Map instance.</documentation>
+ </annotation>
+ <sequence>
+ <element name="entry" minOccurs="0" maxOccurs="unbounded">
+ <complexType>
+ <sequence>
+ <element name="key" minOccurs="0">
+ <complexType>
+ <group ref="tns:wireObjectGroup" />
+ </complexType>
+ </element>
+ <element name="value" minOccurs="0">
+ <complexType>
+ <group ref="tns:wireObjectGroup" />
+ </complexType>
+ </element>
+ </sequence>
+ </complexType>
+ </element>
+ </sequence>
+ <attribute name="class" type="string" default="java.util.HashMap">
+ <annotation>
+ <documentation>Map implementation class.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="synchronized" type="tns:booleanValueType" default="false">
+ <annotation>
+ <documentation>Indicates if this collection should be synchronized
+ with Collections.synchronizedCollection()</documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+
+ <complexType name="javaType">
+ <sequence>
+ <element name="description" minOccurs="0" type="string" />
+ <choice minOccurs="0" maxOccurs="unbounded">
+ <element name="field">
+ <annotation>
+ <documentation>Field injections from the environment invocation.</documentation>
+ </annotation>
+ </element>
+ <element name="arg">
+ <annotation>
+ <documentation>Method arguments.</documentation>
+ </annotation>
+ </element>
+ </choice>
+ </sequence>
+ <attribute name="method" type="string" use="required">
+ <annotation>
+ <documentation>The name of the method to invoke.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="ejb-jndi-name" type="string">
+ <annotation>
+ <documentation>The jndi name of the ejb that needs to be invoked.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="class" type="string">
+ <annotation>
+ <documentation>The class to instantiate.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="expr" type="string">
+ <annotation>
+ <documentation>Expression that resolves to the target object
+ on which the method should be invoked.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="lang" type="string">
+ <annotation>
+ <documentation>The language in which attribute 'expr' is to be
+ resolved.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="var" type="string">
+ <annotation>
+ <documentation>The variable name to store the return value.</documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+
+ <complexType name="scriptType">
+ <sequence>
+ <element name="description" minOccurs="0" type="string" />
+ <element name="text" type="string" minOccurs="0">
+ <annotation>
+ <documentation>The text content of this element is the script to evaluate.
+ This element and the expression attribute are mutually exclusive.</documentation>
+ </annotation>
+ </element>
+ </sequence>
+ <attribute name="expr" type="string">
+ <annotation>
+ <documentation>The value of this attribute is the script to evaluate.
+ This attribute and the text element are mutually exclusive.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="lang" type="string">
+ <annotation>
+ <documentation>Identifies the scripting language in use.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="var" type="string">
+ <annotation>
+ <documentation>Name of the variable in which the result
+ of the script evaluation will be stored.</documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+
+ <complexType name="assignType">
+ <sequence>
+ <element name="description" minOccurs="0" type="string" />
+ <element name="from" minOccurs="0">
+ <annotation>
+ <documentation>Descriptor that constructs the source value.</documentation>
+ </annotation>
+ <complexType>
+ <group ref="tns:wireObjectGroup" />
+ </complexType>
+ </element>
+ </sequence>
+ <attribute name="from-expr" type="string">
+ <annotation>
+ <documentation>Expression that resolves the source value.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="lang" type="string">
+ <annotation>
+ <documentation>Language in which from-expr is written.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="from-var" type="string">
+ <annotation>
+ <documentation>Variable that provides the source value.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="to-expr" type="string">
+ <annotation>
+ <documentation>Expression that resolves the target location.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="to-var" type="string">
+ <annotation>
+ <documentation>Variable that provides the target location.</documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+
+ <complexType name="qlType">
+ <sequence>
+ <element name="description" minOccurs="0" type="string" />
+ <element name="query" type="string">
+ <annotation>
+ <documentation>Query text.</documentation>
+ </annotation>
+ </element>
+ <element name="parameters" minOccurs="0">
+ <annotation>
+ <documentation>Query parameters.</documentation>
+ </annotation>
+ <complexType>
+ <sequence>
+ <group ref="tns:wireObjectGroup" maxOccurs="unbounded" />
+ </sequence>
+ </complexType>
+ </element>
+ </sequence>
+ <attribute name="var" type="string">
+ <annotation>
+ <documentation>Name of the variable in which the result
+ of the script evaluation will be stored.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="unique" type="string">
+ <annotation>
+ <documentation>Tells whether the query returns a unique result.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="update" type="tns:booleanValueType">
+ <annotation>
+ <documentation>Whether should execute update. default is false.</documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+
+ <attributeGroup name="activityAttributes">
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>Name of this activity. The name should be unique
+ in the complete scope of the process.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="g" type="string">
+ <annotation>
+ <documentation>Graphical information used by process designer tool.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="continue" default="sync" type="tns:continueType">
+ <annotation>
+ <documentation>Specifies async continuation.</documentation>
+ </annotation>
+ </attribute>
+ </attributeGroup>
+
+ <simpleType name="continueType">
+ <restriction base="string">
+ <enumeration value="async" />
+ <enumeration value="sync" />
+ <enumeration value="exclusive" />
+ </restriction>
+ </simpleType>
+
+ <attributeGroup name="assignmentAttributes">
+ <annotation>
+ <documentation>The assignment attributes are used in
+ tasks and swimlanes to specify who is the assignee.
+ </documentation>
+ </annotation>
+ <attribute name="assignee" type="string">
+ <annotation>
+ <documentation>Expression that resolves to a userId referencing
+ the person to whom the task or swimlane will be assigned.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="assignee-lang" type="string">
+ <annotation>
+ <documentation>Expression language for the assignee attribute.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="candidate-users" type="string">
+ <annotation>
+ <documentation>Expression that resolves to a comma separated
+ list of userIds. All the referred people will be candidates for
+ take the task or swimlane.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="candidate-users-lang" type="string">
+ <annotation>
+ <documentation>Expression language for the
+ candidate-users attribute.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="candidate-groups" type="string">
+ <annotation>
+ <documentation>Resolves to a comma separated list of groupIds.
+ All the referred people will be candidates to
+ take the task or swimlane.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="candidate-groups-lang" type="string">
+ <annotation>
+ <documentation>Expression language for the
+ candidate-groups attribute.</documentation>
+ </annotation>
+ </attribute>
+ </attributeGroup>
+
+ <element name="swimlane">
+ <annotation>
+ <documentation>Process role.</documentation>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element name="description" minOccurs="0" type="string" />
+ </sequence>
+ <attribute name="name" type="string" use="required" />
+ <attributeGroup ref="tns:assignmentAttributes" />
+ </complexType>
+ </element>
+
+ <complexType name="transitionType">
+ <annotation>
+ <documentation>The outgoing transitions. The first in the list
+ will be the default outgoing transition.</documentation>
+ </annotation>
+ <sequence>
+ <element name="description" minOccurs="0" type="string" />
+ <group ref="tns:eventListenerGroup" minOccurs="0" maxOccurs="unbounded" />
+ </sequence>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>Name of this outgoing transition</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="to" type="string">
+ <annotation>
+ <documentation>Name of the destination activity of this transition.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="g" type="string">
+ <annotation>
+ <documentation>Graphical information used by process designer tool.</documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+
+ <element name="transition" type="tns:transitionType">
+ <annotation>
+ <documentation>Link from one activity to another.</documentation>
+ </annotation>
+ </element>
+
+ <element name="on">
+ <complexType>
+ <sequence>
+ <element ref="tns:timer" minOccurs="0" />
+ <group ref="tns:eventListenerGroup" minOccurs="0" maxOccurs="unbounded">
+ <annotation>
+ <documentation>List of event listeners that will
+ be notified when the event is fired</documentation>
+ </annotation>
+ </group>
+ </sequence>
+ <attribute name="event" type="string">
+ <annotation>
+ <documentation>Event identification. start, end, take or
+ any other custom event.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="continue" type="tns:continueType" default="sync" />
+ </complexType>
+ </element>
+
+ <complexType name="parameterType">
+ <attribute name="subvar" type="string">
+ <annotation>
+ <documentation>Name of the sub process variable.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="expr" type="string">
+ <annotation>
+ <documentation>Expression that provides the variable value.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="lang" type="string">
+ <annotation>
+ <documentation>Language of the expression.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="var" type="string">
+ <annotation>
+ <documentation>Name of the process variable
+ in the super process.</documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+
+ <element name="timer">
+ <complexType>
+ <sequence>
+ <annotation>
+ <documentation>List of event listeners that will
+ be notified when the timer fires.</documentation>
+ </annotation>
+ <element name="description" minOccurs="0" type="string" />
+ <group ref="tns:eventListenerGroup" minOccurs="0" maxOccurs="unbounded" />
+ </sequence>
+ <attribute name="duedate" type="string">
+ <annotation>
+ <documentation>Timer duedate expression that defines the duedate of this
+ timer relative to the creation time of the timer.
+ E.g. '2 hours' or '4 business days'.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="repeat" type="string">
+ <annotation>
+ <documentation>Timer duedate expression that defines repeated scheduling
+ relative to the last timer fire event.
+ E.g. '2 hours' or '4 business days'</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="duedatetime" type="string">
+ <annotation>
+ <documentation>Absolute time in the format <code>HH:mm dd/MM/yyyy</code>.
+ The format can be customized in the configuration.</documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="variable">
+ <complexType>
+ <annotation>
+ <documentation>Explicit variable declaration.</documentation>
+ </annotation>
+ <sequence>
+ <group ref="tns:wireObjectGroup" minOccurs="0" />
+ </sequence>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>Name of the variable. Must differ from other variable
+ names.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="type" type="string">
+ <annotation>
+ <documentation>Type of the variable.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="init-expr" type="string">
+ <annotation>
+ <documentation></documentation>
+ </annotation>
+ </attribute>
+ <attribute name="history" type="tns:booleanValueType" />
+ </complexType>
+ </element>
+
+ <group name="eventListenerGroup">
+ <choice>
+ <element name="event-listener">
+ <complexType>
+ <complexContent>
+ <extension base="tns:wireObjectType">
+ <attribute name="propagation" type="tns:booleanValueType" />
+ </extension>
+ </complexContent>
+ </complexType>
+ </element>
+ <element name="hql">
+ <complexType>
+ <complexContent>
+ <extension base="tns:qlType">
+ <attribute name="propagation" type="tns:booleanValueType" />
+ </extension>
+ </complexContent>
+ </complexType>
+ </element>
+ <element name="sql">
+ <complexType>
+ <complexContent>
+ <extension base="tns:qlType">
+ <attribute name="propagation" type="tns:booleanValueType" />
+ </extension>
+ </complexContent>
+ </complexType>
+ </element>
+ <element name="java">
+ <complexType>
+ <complexContent>
+ <extension base="tns:javaType">
+ <attribute name="propagation" type="tns:booleanValueType" />
+ </extension>
+ </complexContent>
+ </complexType>
+ </element>
+ <element name="assign">
+ <complexType>
+ <complexContent>
+ <extension base="tns:assignType">
+ <attribute name="propagation" type="tns:booleanValueType" />
+ </extension>
+ </complexContent>
+ </complexType>
+ </element>
+ <element name="script">
+ <complexType>
+ <complexContent>
+ <extension base="tns:scriptType">
+ <attribute name="propagation" type="tns:booleanValueType" />
+ </extension>
+ </complexContent>
+ </complexType>
+ </element>
+ <element name="mail">
+ <complexType>
+ <complexContent>
+ <extension base="tns:mailType">
+ <attribute name="propagation" type="tns:booleanValueType" />
+ </extension>
+ </complexContent>
+ </complexType>
+ </element>
+ </choice>
+ </group>
+
+ <complexType name="mailType">
+ <complexContent>
+ <extension base="tns:wireObjectType">
+ <sequence>
+ <element name="from" type="tns:mailRecipientType" minOccurs="0" />
+ <element name="to" type="tns:mailRecipientType" minOccurs="0" />
+ <element name="cc" type="tns:mailRecipientType" minOccurs="0" />
+ <element name="bcc" type="tns:mailRecipientType" minOccurs="0" />
+ <element name="subject" type="string" minOccurs="0" />
+ <element name="text" type="string" minOccurs="0" />
+ <element name="html" type="string" minOccurs="0" />
+ <element name="attachments" minOccurs="0">
+ <complexType>
+ <sequence>
+ <element name="attachment" maxOccurs="unbounded">
+ <complexType>
+ <attribute name="url" type="string">
+ <annotation>
+ <documentation>Resource in the web.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="resource" type="string">
+ <annotation>
+ <documentation>Resource in the classpath.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="file" type="string">
+ <annotation>
+ <documentation>Path in the file system.</documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+ </sequence>
+ </complexType>
+ </element>
+ </sequence>
+ <attribute name="template" type="tns:templateType" />
+ </extension>
+ </complexContent>
+ </complexType>
+
+ <complexType name="jmsType">
+ <choice minOccurs="1" maxOccurs="1">
+ <element name="object" type="tns:wireObjectType" />
+ <element name="text" type="string" />
+ <element name="map" type="tns:mapType" />
+ </choice>
+ <attribute name="connection-factory" type="string">
+ <annotation>
+ <documentation>JNDI name of the connection factory.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="destination" type="string">
+ <annotation>
+ <documentation>JNDI name of the destination.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="transacted" type="tns:booleanValueType" default="false">
+ <annotation>
+ <documentation>Tells whether the message should be sent in a transaction.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="acknowledge" type="tns:acknowledgeType" default="auto">
+ <annotation>
+ <documentation>Indicates the acknowledgment mode.</documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+
+ <complexType name="mailRecipientType">
+ <attribute name="addresses" type="string">
+ <annotation>
+ <documentation>List of email addresses separated by ',' (comma)
+ or whitespace.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="users" type="string">
+ <annotation>
+ <documentation>List of users, resolved to email addresses thought
+ the configured identity component. Users are separated by ',' (comma)
+ ';' (semicolon) or whitespace.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="groups" type="string">
+ <annotation>
+ <documentation>List of groups, that are resolved to the email address against
+ configured identity component. Groups are separated by ',' (comma)
+ ';' (semicolon) or whitespace</documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+
+ <simpleType name="booleanValueType">
+ <restriction base="string">
+ <enumeration value="true" />
+ <enumeration value="on" />
+ <enumeration value="enabled" />
+ <enumeration value="false" />
+ <enumeration value="off" />
+ <enumeration value="disabled" />
+ </restriction>
+ </simpleType>
+
+ <simpleType name="acknowledgeType">
+ <restriction base="string">
+ <enumeration value="auto" />
+ <enumeration value="client" />
+ <enumeration value="dups-ok" />
+ </restriction>
+ </simpleType>
+
+ <simpleType name="templateType">
+ <annotation>
+ <documentation>Reference to the email template.</documentation>
+ </annotation>
+ <restriction base="string" />
+ </simpleType>
+
+ <element name="migrate-instances">
+ <annotation>
+ <documentation>Information to migrate instances of previously deployed
+ process definitions to the new version.</documentation>
+ </annotation>
+ <complexType>
+ <choice minOccurs="0" maxOccurs="unbounded">
+ <element name="migration-handler">
+ <annotation>
+ <documentation>The migration handler specifies the name of a class to be executed
+ while migrating the process instance.</documentation>
+ </annotation>
+ <complexType>
+ <attribute name="class" />
+ </complexType>
+ </element>
+ <element name="activity-mapping">
+ <annotation>
+ <documentation>One activity mapping will be present for each activity of which the
+ name changed.</documentation>
+ </annotation>
+ <complexType>
+ <attribute name="old-name" type="string" use="required">
+ <annotation>
+ <documentation>Name of the activity in the previously deployed
+ process definition.</documentation>
+ </annotation>
+ </attribute>
+ <attribute name="new-name" type="string" use="required">
+ <annotation>
+ <documentation>Name of the activity in the newly deployed
+ process definition.</documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+ </choice>
+ <attribute name="action" type="tns:migrationActionType" default="migrate" />
+ </complexType>
+ </element>
+
+ <simpleType name="migrationActionType">
+ <restriction base="string">
+ <enumeration value="end" />
+ <enumeration value="migrate" />
+ </restriction>
+ </simpleType>
+</schema>
Modified: jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/hql/HqlTest.java
===================================================================
--- jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/hql/HqlTest.java 2010-08-11 13:43:08 UTC (rev 6573)
+++ jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/hql/HqlTest.java 2010-08-11 13:52:37 UTC (rev 6574)
@@ -40,24 +40,24 @@
String taskLaundryId;
String taskDishesId;
String taskIronId;
-
+
protected void setUp() throws Exception {
super.setUp();
-
+
deploymentId = repositoryService.createDeployment()
.addResourceFromClasspath("org/jbpm/examples/hql/process.jpdl.xml")
.deploy();
-
+
// add task laundry
Task task = taskService.newTask();
task.setName("laundry");
taskLaundryId = taskService.saveTask(task);
-
+
// add task dishes
task = taskService.newTask();
task.setName("dishes");
taskDishesId = taskService.saveTask(task);
-
+
// add task iron
task = taskService.newTask();
task.setName("iron");
@@ -66,11 +66,11 @@
protected void tearDown() throws Exception {
repositoryService.deleteDeploymentCascade(deploymentId);
-
+
taskService.deleteTaskCascade(taskLaundryId);
taskService.deleteTaskCascade(taskDishesId);
taskService.deleteTaskCascade(taskIronId);
-
+
super.tearDown();
}
@@ -81,7 +81,8 @@
Set<String> expectedTaskNames = new HashSet<String>();
expectedTaskNames.add("dishes");
expectedTaskNames.add("iron");
- Collection<String> taskNames = (Collection<String>) executionService.getVariable(processInstanceId, "tasknames with i");
+ Collection<String> taskNames = (Collection<String>) executionService.getVariable(processInstanceId,
+ "tasknames with i");
taskNames = new HashSet<String>(taskNames);
assertEquals(expectedTaskNames, taskNames);
Added: jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/hql/HqlUpdateTest.java
===================================================================
--- jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/hql/HqlUpdateTest.java (rev 0)
+++ jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/hql/HqlUpdateTest.java 2010-08-11 13:52:37 UTC (rev 6574)
@@ -0,0 +1,80 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.jbpm.examples.hql;
+
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.jbpm.api.ProcessInstance;
+import org.jbpm.api.task.Task;
+import org.jbpm.test.JbpmTestCase;
+
+
+/**
+ * @author Huisheng Xu
+ */
+public class HqlUpdateTest extends JbpmTestCase {
+
+ String deploymentId;
+
+ String taskLaundryId;
+ String taskDishesId;
+ String taskIronId;
+
+ protected void setUp() throws Exception {
+ super.setUp();
+
+ deploymentId = repositoryService.createDeployment()
+ .addResourceFromClasspath("org/jbpm/examples/hql/hqlupdate.jpdl.xml")
+ .deploy();
+
+ // add task laundry
+ Task task = taskService.newTask();
+ task.setName("laundry");
+ taskLaundryId = taskService.saveTask(task);
+
+ // add task dishes
+ task = taskService.newTask();
+ task.setName("dishes");
+ taskDishesId = taskService.saveTask(task);
+
+ // add task iron
+ task = taskService.newTask();
+ task.setName("iron");
+ taskIronId = taskService.saveTask(task);
+ }
+
+ protected void tearDown() throws Exception {
+ repositoryService.deleteDeploymentCascade(deploymentId);
+
+ super.tearDown();
+ }
+
+ public void testHql() {
+ ProcessInstance processInstance = executionService.startProcessInstanceByKey("HqlUpdate");
+ String processInstanceId = processInstance.getId();
+
+ Object activities = executionService.getVariable(processInstanceId, "tasks");
+ assertEquals("3", activities.toString());
+ }
+}
Added: jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/sql/SqlUpdateTest.java
===================================================================
--- jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/sql/SqlUpdateTest.java (rev 0)
+++ jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/sql/SqlUpdateTest.java 2010-08-11 13:52:37 UTC (rev 6574)
@@ -0,0 +1,80 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.jbpm.examples.sql;
+
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.jbpm.api.Execution;
+import org.jbpm.api.task.Task;
+import org.jbpm.test.JbpmTestCase;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class SqlUpdateTest extends JbpmTestCase {
+
+ String deploymentId;
+
+ String taskLaundryId;
+ String taskDishesId;
+ String taskIronId;
+
+ protected void setUp() throws Exception {
+ super.setUp();
+
+ deploymentId = repositoryService.createDeployment()
+ .addResourceFromClasspath("org/jbpm/examples/sql/sqlupdate.jpdl.xml")
+ .deploy();
+
+ // add task laundry
+ Task task = taskService.newTask();
+ task.setName("laundry");
+ taskLaundryId = taskService.saveTask(task);
+
+ // add task dishes
+ task = taskService.newTask();
+ task.setName("dishes");
+ taskDishesId = taskService.saveTask(task);
+
+ // add task iron
+ task = taskService.newTask();
+ task.setName("iron");
+ taskIronId = taskService.saveTask(task);
+ }
+
+ protected void tearDown() throws Exception {
+ repositoryService.deleteDeploymentCascade(deploymentId);
+
+ super.tearDown();
+ }
+
+ public void testSql() {
+ Execution execution = executionService.startProcessInstanceByKey("SqlUpdate");
+ String executionId = execution.getId();
+
+ Object activities = executionService.getVariable(executionId, "tasks");
+ assertEquals("3", activities.toString());
+ }
+}
Added: jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/hql/hqlupdate.jpdl.xml
===================================================================
--- jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/hql/hqlupdate.jpdl.xml (rev 0)
+++ jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/hql/hqlupdate.jpdl.xml 2010-08-11 13:52:37 UTC (rev 6574)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<process name="HqlUpdate" xmlns="http://jbpm.org/4.4/jpdl">
+
+ <start g="17,20,48,48">
+ <transition to="delete tasks" />
+ </start>
+
+ <hql name="delete tasks"
+ var="tasks"
+ update="true"
+ g="243,16,95,52">
+ <query>
+ delete from org.jbpm.pvm.internal.task.TaskImpl
+ </query>
+ <transition to="delete task histories" />
+ </hql>
+
+ <hql name="delete task histories"
+ var="tasks"
+ update="true"
+ g="243,16,95,52">
+ <query>
+ delete from org.jbpm.pvm.internal.history.model.HistoryTaskImpl
+ </query>
+ <transition to="wait" />
+ </hql>
+
+ <state name="wait" g="370,18,96,48"/>
+
+</process>
Added: jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/sql/sqlupdate.jpdl.xml
===================================================================
--- jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/sql/sqlupdate.jpdl.xml (rev 0)
+++ jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/sql/sqlupdate.jpdl.xml 2010-08-11 13:52:37 UTC (rev 6574)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<process name="SqlUpdate" xmlns="http://jbpm.org/4.4/jpdl">
+
+ <start g="17,20,48,48">
+ <transition to="delete tasks" />
+ </start>
+
+ <sql name="delete tasks"
+ var="tasks"
+ update="true"
+ g="243,16,95,52">
+ <query>
+ delete from JBPM4_TASK
+ </query>
+ <transition to="delete task histories" />
+ </sql>
+
+ <sql name="delete task histories"
+ var="tasks"
+ update="true"
+ g="243,16,95,52">
+ <query>
+ delete from JBPM4_HIST_TASK
+ </query>
+ <transition to="wait" />
+ </sql>
+
+ <state name="wait" g="370,18,96,48"/>
+
+</process>
Modified: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/HqlActivity.java
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/HqlActivity.java 2010-08-11 13:43:08 UTC (rev 6573)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/HqlActivity.java 2010-08-11 13:52:37 UTC (rev 6574)
@@ -37,15 +37,17 @@
* @author Tom Baeyens
*/
public class HqlActivity extends JpdlAutomaticActivity {
-
+
private static final Log log = Log.getLog(HqlActivity.class.getName());
private static final long serialVersionUID = 1L;
-
+
protected String query;
protected ListDescriptor parametersDescriptor;
protected String resultVariableName;
protected boolean isResultUnique;
+ /** if this flag is set to true, then we will execute update than query. */
+ protected boolean isUpdate;
public void perform(OpenExecution execution) {
EnvironmentImpl environment = EnvironmentImpl.getCurrent();
@@ -53,9 +55,9 @@
throw new JbpmException("no environment for jpdl activity "+HqlBinding.TAG);
}
Session session = environment.get(Session.class);
-
+
Query q = createQuery(session);
-
+
if (parametersDescriptor!=null) {
for (Descriptor valueDescriptor: parametersDescriptor.getValueDescriptors()) {
String parameterName = valueDescriptor.getName();
@@ -63,14 +65,16 @@
applyParameter(q, parameterName, value);
}
}
-
+
Object result = null;
- if (isResultUnique) {
+ if (isUpdate) {
+ result = q.executeUpdate();
+ } else if (isResultUnique) {
result = q.uniqueResult();
} else {
result = q.list();
}
-
+
execution.setVariable(resultVariableName, result);
}
@@ -100,4 +104,7 @@
public void setResultVariableName(String resultVariableName) {
this.resultVariableName = resultVariableName;
}
+ public void setUpdate(boolean isUpdate) {
+ this.isUpdate = isUpdate;
+ }
}
Modified: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/HqlBinding.java
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/HqlBinding.java 2010-08-11 13:43:08 UTC (rev 6573)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/HqlBinding.java 2010-08-11 13:52:37 UTC (rev 6574)
@@ -43,35 +43,41 @@
public HqlBinding() {
super(TAG);
}
-
+
protected HqlBinding(String tagName) {
super(tagName);
}
public Object parseJpdl(Element element, Parse parse, JpdlParser parser) {
HqlActivity hqlActivity = createHqlActivity();
-
+
Element queryElement = XmlUtil.element(element, "query", parse);
- if (queryElement!=null) {
+ if (queryElement != null) {
String query = XmlUtil.getContentText(queryElement);
hqlActivity.setQuery(query);
}
-
+
Boolean resultUnique = XmlUtil.attributeBoolean(element, "unique", parse);
- if (resultUnique!=null) {
+ if (resultUnique != null) {
hqlActivity.setResultUnique(resultUnique);
}
-
+
+ Boolean update = XmlUtil.attributeBoolean(element, "update", parse);
+ if (update != null) {
+ hqlActivity.setUpdate(update);
+ }
+
String variableName = XmlUtil.attribute(element, "var", parse);
hqlActivity.setResultVariableName(variableName);
-
+
Element parametersElement = XmlUtil.element(element, "parameters");
List<Element> paramElements = XmlUtil.elements(parametersElement);
if (!paramElements.isEmpty()) {
List<Descriptor> parametersDescriptor = new ArrayList<Descriptor>();
for (Element paramElement: paramElements) {
WireParser wireParser = WireParser.getInstance();
- Descriptor paramDescriptor = (Descriptor) wireParser.parseElement(paramElement, parse, WireParser.CATEGORY_DESCRIPTOR);
+ Descriptor paramDescriptor = (Descriptor) wireParser.parseElement(paramElement,
+ parse, WireParser.CATEGORY_DESCRIPTOR);
parametersDescriptor.add(paramDescriptor);
}
@@ -79,7 +85,7 @@
parametersListDescriptor.setValueDescriptors(parametersDescriptor);
hqlActivity.setParametersDescriptor(parametersListDescriptor);
}
-
+
return hqlActivity;
}
13 years, 10 months
JBoss JBPM SVN: r6573 - jbpm4/trunk/modules/distro/scripts.
by do-not-reply@jboss.org
Author: rebody
Date: 2010-08-11 09:43:08 -0400 (Wed, 11 Aug 2010)
New Revision: 6573
Modified:
jbpm4/trunk/modules/distro/scripts/assembly-distro.xml
Log:
JBPM-2788 copy bpmn source to distribution.
Modified: jbpm4/trunk/modules/distro/scripts/assembly-distro.xml
===================================================================
--- jbpm4/trunk/modules/distro/scripts/assembly-distro.xml 2010-08-11 12:38:50 UTC (rev 6572)
+++ jbpm4/trunk/modules/distro/scripts/assembly-distro.xml 2010-08-11 13:43:08 UTC (rev 6573)
@@ -129,11 +129,11 @@
<outputDirectory>src</outputDirectory>
</fileSet>
<fileSet>
- <directory>../task/src/main/java</directory>
+ <directory>../bpmn/src/main/java</directory>
<outputDirectory>src</outputDirectory>
</fileSet>
<fileSet>
- <directory>../task/src/main/resources</directory>
+ <directory>../bpmn/src/main/resources</directory>
<outputDirectory>src</outputDirectory>
</fileSet>
<fileSet>
13 years, 10 months
JBoss JBPM SVN: r6572 - in jbpm3/branches/jbpm-3.2-soa/modules/core/src: main/java/org/jbpm/configuration and 8 other directories.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2010-08-11 08:38:50 -0400 (Wed, 11 Aug 2010)
New Revision: 6572
Added:
jbpm3/branches/jbpm-3.2-soa/modules/core/src/test/java/org/jbpm/jbpm2605/
jbpm3/branches/jbpm-3.2-soa/modules/core/src/test/java/org/jbpm/jbpm2605/JBPM2605Test.java
Modified:
jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/JbpmConfiguration.java
jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/JbpmContext.java
jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/AbstractObjectInfo.java
jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/BeanInfo.java
jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/BooleanInfo.java
jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/CharacterInfo.java
jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/ConstructorInfo.java
jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/DoubleInfo.java
jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/FieldInfo.java
jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/FloatInfo.java
jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/IntegerInfo.java
jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/JbpmContextInfo.java
jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/JbpmTypeObjectInfo.java
jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/ListInfo.java
jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/LongInfo.java
jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/MapInfo.java
jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/NullInfo.java
jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/ObjectFactory.java
jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/ObjectFactoryImpl.java
jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/ObjectFactoryParser.java
jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/ObjectInfo.java
jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/PropertyInfo.java
jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/RefInfo.java
jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/StringInfo.java
jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/ValueInfo.java
jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/context/exe/converter/SerializableToByteArrayConverter.java
jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/db/AbstractDbTestCase.java
jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/persistence/db/DbPersistenceService.java
jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/persistence/db/DbPersistenceServiceFactory.java
jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/svc/Services.java
jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/util/ClassLoaderUtil.java
jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/util/XmlUtil.java
jbpm3/branches/jbpm-3.2-soa/modules/core/src/test/java/org/jbpm/JbpmConfigurationTest.java
jbpm3/branches/jbpm-3.2-soa/modules/core/src/test/java/org/jbpm/configuration/JbpmContextTest.java
Log:
JBPM-2605 do not close SessionFactory if DbPersistenceServiceFactory did not open it
Modified: jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/JbpmConfiguration.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/JbpmConfiguration.java 2010-08-11 09:01:40 UTC (rev 6571)
+++ jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/JbpmConfiguration.java 2010-08-11 12:38:50 UTC (rev 6572)
@@ -22,6 +22,7 @@
package org.jbpm;
import java.io.ByteArrayInputStream;
+import java.io.IOException;
import java.io.InputStream;
import java.io.Serializable;
import java.util.ArrayList;
@@ -35,7 +36,6 @@
import org.jbpm.configuration.ObjectFactory;
import org.jbpm.configuration.ObjectFactoryImpl;
import org.jbpm.configuration.ObjectFactoryParser;
-import org.jbpm.configuration.ObjectInfo;
import org.jbpm.configuration.ValueInfo;
import org.jbpm.graph.def.ProcessDefinition;
import org.jbpm.instantiation.DefaultProcessClassLoaderFactory;
@@ -238,18 +238,19 @@
private static final long serialVersionUID = 1L;
private static final String DEFAULT_RESOURCE = "jbpm.cfg.xml";
+ static final String OBJECT_NAME = "jbpm.configuration";
private static ObjectFactory defaultObjectFactory;
private static final Map instances = new HashMap();
- private static final ThreadLocal jbpmConfigurationStacks = new StackThreadLocal();
+ private static final ThreadLocal threadLocalConfigurationStack = new ThreadLocalStack();
private final ObjectFactory objectFactory;
private final String resourceName;
+ private transient final ThreadLocal threadLocalContextStack = new ThreadLocalStack();
private JobExecutor jobExecutor;
private boolean isClosed;
- private final ThreadLocal jbpmContextStacks = new StackThreadLocal();
- static class StackThreadLocal extends ThreadLocal {
+ static class ThreadLocalStack extends ThreadLocal {
protected Object initialValue() {
return new ArrayList();
}
@@ -260,6 +261,8 @@
}
private JbpmConfiguration(ObjectFactory objectFactory, String resourceName) {
+ if (objectFactory == null) throw new IllegalArgumentException("object factory is null");
+
this.objectFactory = objectFactory;
this.resourceName = resourceName;
}
@@ -316,19 +319,30 @@
protected static ObjectFactory parseObjectFactory(InputStream inputStream) {
ObjectFactoryParser objectFactoryParser = new ObjectFactoryParser();
- ObjectFactoryImpl objectFactoryImpl = new ObjectFactoryImpl();
- objectFactoryParser.parseElementsFromResource("org/jbpm/default.jbpm.cfg.xml", objectFactoryImpl);
+ ObjectFactoryImpl objectFactory = new ObjectFactoryImpl();
+ objectFactoryParser.load("org/jbpm/default.jbpm.cfg.xml", objectFactory);
if (inputStream != null) {
- objectFactoryParser.parseElementsStream(inputStream, objectFactoryImpl);
+ objectFactoryParser.load(inputStream, objectFactory);
}
- return objectFactoryImpl;
+ return objectFactory;
}
+ private static ObjectFactory loadDefaultObjectFactory() {
+ log.info("loading default configuration");
+ return ObjectFactoryParser.parseResource("org/jbpm/default.jbpm.cfg.xml");
+ }
+
public static JbpmConfiguration parseXmlString(String xml) {
- log.info("configuring from xml string");
- InputStream inputStream = xml != null ? new ByteArrayInputStream(xml.getBytes()) : null;
- ObjectFactory objectFactory = parseObjectFactory(inputStream);
+ ObjectFactory objectFactory;
+ if (xml != null) {
+ log.info("configuring from xml string");
+ InputStream inputStream = new ByteArrayInputStream(xml.getBytes());
+ objectFactory = parseObjectFactory(inputStream);
+ }
+ else {
+ objectFactory = loadDefaultObjectFactory();
+ }
return createJbpmConfiguration(objectFactory);
}
@@ -339,11 +353,11 @@
private static JbpmConfiguration createJbpmConfiguration(ObjectFactory objectFactory,
String resourceName) {
JbpmConfiguration jbpmConfiguration = new JbpmConfiguration(objectFactory, resourceName);
- // make the bean jbpm.configuration always available
+ // make the configuration available to other objects
if (objectFactory instanceof ObjectFactoryImpl) {
ObjectFactoryImpl objectFactoryImpl = (ObjectFactoryImpl) objectFactory;
- ObjectInfo jbpmConfigurationInfo = new ValueInfo("jbpmConfiguration", jbpmConfiguration);
- objectFactoryImpl.addObjectInfo(jbpmConfigurationInfo);
+ objectFactoryImpl.addObjectInfo(new ValueInfo("jbpmConfiguration", jbpmConfiguration));
+ objectFactoryImpl.addObjectInfo(new ValueInfo(OBJECT_NAME, jbpmConfiguration));
}
// honor hide stale state exceptions setting
if (getHideStaleObjectExceptions(objectFactory)) {
@@ -361,16 +375,36 @@
}
public static JbpmConfiguration parseInputStream(InputStream inputStream) {
- log.info("configuring from input stream");
- ObjectFactory objectFactory = parseObjectFactory(inputStream);
+ ObjectFactory objectFactory;
+ if (inputStream != null) {
+ log.info("configuring from " + inputStream);
+ objectFactory = parseObjectFactory(inputStream);
+ }
+ else {
+ objectFactory = loadDefaultObjectFactory();
+ }
return createJbpmConfiguration(objectFactory);
}
public static JbpmConfiguration parseResource(String resource) {
- log.info("configuring from resource: " + resource);
- InputStream inputStream = resource != null ? ClassLoaderUtil.getStream(resource, false)
- : null;
- ObjectFactory objectFactory = parseObjectFactory(inputStream);
+ ObjectFactory objectFactory;
+ if (resource != null) {
+ log.info("configuring from resource: " + resource);
+ InputStream inputStream = ClassLoaderUtil.getStream(resource, false);
+ if (inputStream == null) {
+ throw new IllegalArgumentException("resource not found: " + resource);
+ }
+ objectFactory = parseObjectFactory(inputStream);
+ try {
+ inputStream.close();
+ }
+ catch (IOException e) {
+ log.warn("failed to close resource: " + resource, e);
+ }
+ }
+ else {
+ objectFactory = loadDefaultObjectFactory();
+ }
return createJbpmConfiguration(objectFactory, resource);
}
@@ -379,11 +413,14 @@
}
public JbpmContext createJbpmContext(String name) {
+ // note that this call ends up in createJbpmContext(name, services)
+ return (JbpmContext) objectFactory.createObject(name);
+ }
+
+ public JbpmContext createJbpmContext(String name, Services services) {
ensureOpen();
- JbpmContext jbpmContext = (JbpmContext) objectFactory.createObject(name);
- jbpmContext.setName(name);
- jbpmContext.setJbpmConfiguration(this);
+ JbpmContext jbpmContext = new JbpmContext(name, services, this);
pushJbpmContext(jbpmContext);
return jbpmContext;
}
@@ -403,7 +440,8 @@
}
private DbPersistenceServiceFactory getPersistenceServiceFactory(String jbpmContextName) {
- return (DbPersistenceServiceFactory) getServiceFactory(Services.SERVICENAME_PERSISTENCE, jbpmContextName);
+ return (DbPersistenceServiceFactory) getServiceFactory(Services.SERVICENAME_PERSISTENCE,
+ jbpmContextName);
}
public static ClassLoader getProcessClassLoader(ProcessDefinition processDefinition) {
@@ -418,8 +456,7 @@
}
/**
- * gives the jbpm domain model access to configuration information via the current
- * JbpmContext.
+ * access to configuration information through the current {@link JbpmContext}
*/
public static class Configs {
@@ -504,36 +541,57 @@
}
public void close(String jbpmContextName) {
- // prevent configuration from being closed more than once
- if (isClosed) return;
+ synchronized (this) {
+ // prevent configuration from being closed more than once
+ if (isClosed) return;
- // stop job executor
- if (jobExecutor != null) {
- jobExecutor.stop();
- jobExecutor = null;
- }
+ // stop job executor
+ if (jobExecutor != null) {
+ try {
+ jobExecutor.stopAndJoin();
+ }
+ catch (InterruptedException e) {
+ // reassert interruption and continue
+ Thread.currentThread().interrupt();
+ }
+ jobExecutor = null;
+ }
- // close service factories
- JbpmContext jbpmContext = createJbpmContext(jbpmContextName);
- try {
- Map serviceFactories = jbpmContext.getServices().getServiceFactories();
- if (serviceFactories != null) {
- for (Iterator i = serviceFactories.values().iterator(); i.hasNext();) {
- ServiceFactory serviceFactory = (ServiceFactory) i.next();
- serviceFactory.close();
+ // close remaining contexts
+ List contextStack = getJbpmContextStack();
+ if (!contextStack.isEmpty()) {
+ log.warn("closing " + contextStack.size() + " open contexts;"
+ + " make sure to close JbpmContext after use");
+
+ // copy to array because JbpmContext.close() pops the context off the stack
+ JbpmContext[] jbpmContexts = (JbpmContext[]) contextStack.toArray(new JbpmContext[contextStack.size()]);
+ for (int i = 0; i < jbpmContexts.length; i++) {
+ jbpmContexts[i].close();
}
}
- }
- finally {
- jbpmContext.close();
- }
- // closing service factories requires open configuration
- isClosed = true;
+ // close service factories
+ JbpmContext jbpmContext = createJbpmContext(jbpmContextName);
+ try {
+ Map serviceFactories = jbpmContext.getServices().getServiceFactories();
+ if (serviceFactories != null) {
+ for (Iterator i = serviceFactories.values().iterator(); i.hasNext();) {
+ ServiceFactory serviceFactory = (ServiceFactory) i.next();
+ serviceFactory.close();
+ }
+ }
+ }
+ finally {
+ jbpmContext.close();
+ }
- // release context stack
- jbpmContextStacks.set(null);
+ // release thread-local context stack
+ threadLocalContextStack.set(null);
+ // closing service factories requires open configuration
+ isClosed = true;
+ }
+
// remove from configuration cache
if (resourceName != null) {
synchronized (instances) {
@@ -548,7 +606,7 @@
}
private static List getJbpmConfigurationStack() {
- return (List) jbpmConfigurationStacks.get();
+ return (List) threadLocalConfigurationStack.get();
}
static void clearInstances() {
@@ -563,7 +621,7 @@
}
private List getJbpmContextStack() {
- return (List) jbpmContextStacks.get();
+ return (List) threadLocalContextStack.get();
}
void pushJbpmContext(JbpmContext jbpmContext) {
@@ -607,11 +665,11 @@
if (threadSafetyFlag) {
log.warn(jbpmContext + " was not closed in the thread that created it;"
- + " JbpmContext is not safe for access from multiple threads!");
+ + " JbpmContext is not safe for access from multiple threads!");
}
else if (creationOrderFlag) {
log.warn(jbpmContext + " was not closed in a block-structured manner;"
- + " check your try-finally clauses around JbpmContext blocks");
+ + " check try-finally clauses around JbpmContext blocks");
}
}
Modified: jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/JbpmContext.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/JbpmContext.java 2010-08-11 09:01:40 UTC (rev 6571)
+++ jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/JbpmContext.java 2010-08-11 12:38:50 UTC (rev 6572)
@@ -41,7 +41,6 @@
import org.jbpm.graph.exe.Token;
import org.jbpm.persistence.PersistenceService;
import org.jbpm.persistence.db.DbPersistenceService;
-import org.jbpm.security.AuthenticationService;
import org.jbpm.svc.ServiceFactory;
import org.jbpm.svc.Services;
import org.jbpm.taskmgmt.exe.TaskInstance;
@@ -50,8 +49,8 @@
/**
* is used to surround persistent operations to processes.
* <p>
- * Obtain a JbpmContext via {@link org.jbpm.JbpmConfiguration#createJbpmContext()} and
- * manipulate it inside a try-finally block as follows.
+ * Obtain a JbpmContext via {@link JbpmConfiguration#createJbpmContext()} and manipulate it
+ * inside a try-finally block as follows.
* </p>
*
* <pre>
@@ -101,37 +100,83 @@
public static final String DEFAULT_JBPM_CONTEXT_NAME = "default.jbpm.context";
- private String name;
- private ObjectFactory objectFactory;
- private Services services;
- private JbpmConfiguration jbpmConfiguration;
+ private final String name;
+ private final Services services;
+ private final JbpmConfiguration jbpmConfiguration;
private List autoSaveProcessInstances;
+ private boolean isClosed;
/**
- * normally, JbpmContext object are created via a {@link JbpmConfiguration}.
+ * @deprecated call {@link JbpmConfiguration#createJbpmContext(String, Services)} instead
*/
public JbpmContext(Services services, ObjectFactory objectFactory) {
+ if (services == null) throw new IllegalArgumentException("null services");
+
+ name = DEFAULT_JBPM_CONTEXT_NAME;
this.services = services;
- this.objectFactory = objectFactory;
+ jbpmConfiguration = new JbpmConfiguration(objectFactory);
}
+ JbpmContext(String name, Services services, JbpmConfiguration jbpmConfiguration) {
+ if (services == null) throw new IllegalArgumentException("null services");
+ if (jbpmConfiguration == null) throw new IllegalArgumentException("configuration is null");
+
+ this.name = name;
+ this.services = services;
+ this.jbpmConfiguration = jbpmConfiguration;
+ }
+
+ private void ensureOpen() {
+ if (isClosed) throw new JbpmException(this + " is closed");
+ }
+
+ public boolean isClosed() {
+ return isClosed;
+ }
+
/**
- * make sure you close your JbpmContext in a finally block.
+ * make sure to close this context in a finally block.
*/
public void close() {
- try {
- if (services != null) {
- try {
- autoSave();
+ if (isClosed) return;
+
+ RuntimeException saveException = autoSave();
+ if (saveException != null) {
+ closeServices();
+ throw saveException;
+ }
+
+ RuntimeException serviceException = closeServices();
+ if (serviceException != null) throw serviceException;
+ }
+
+ private RuntimeException autoSave() {
+ if (autoSaveProcessInstances != null) {
+ try {
+ for (Iterator iter = autoSaveProcessInstances.iterator(); iter.hasNext();) {
+ ProcessInstance processInstance = (ProcessInstance) iter.next();
+ save(processInstance);
}
- finally {
- services.close();
- }
}
+ catch (RuntimeException e) {
+ return e;
+ }
}
+ return null;
+ }
+
+ private RuntimeException closeServices() {
+ try {
+ services.close();
+ }
+ catch (RuntimeException e) {
+ return e;
+ }
finally {
- if (jbpmConfiguration != null) jbpmConfiguration.popJbpmContext(this);
+ isClosed = true;
+ jbpmConfiguration.popJbpmContext(this);
}
+ return null;
}
/**
@@ -144,12 +189,8 @@
* </p>
*/
public static JbpmContext getCurrentJbpmContext() {
- JbpmContext currentJbpmContext = null;
- JbpmConfiguration currentJbpmConfiguration = JbpmConfiguration.getCurrentJbpmConfiguration();
- if (currentJbpmConfiguration != null) {
- currentJbpmContext = currentJbpmConfiguration.getCurrentJbpmContext();
- }
- return currentJbpmContext;
+ JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getCurrentJbpmConfiguration();
+ return jbpmConfiguration != null ? jbpmConfiguration.getCurrentJbpmContext() : null;
}
// convenience methods //////////////////////////////////////////////////////
@@ -392,7 +433,8 @@
*/
public ProcessInstance getProcessInstanceForUpdate(ProcessDefinition processDefinition,
String key) {
- ProcessInstance processInstance = getGraphSession().getProcessInstance(processDefinition, key);
+ ProcessInstance processInstance = getGraphSession().getProcessInstance(processDefinition,
+ key);
if (processInstance != null) {
addAutoSaveProcessInstance(processInstance);
}
@@ -406,7 +448,8 @@
*/
public ProcessInstance loadProcessInstanceForUpdate(ProcessDefinition processDefinition,
String key) {
- ProcessInstance processInstance = getGraphSession().loadProcessInstance(processDefinition, key);
+ ProcessInstance processInstance = getGraphSession().loadProcessInstance(processDefinition,
+ key);
if (processInstance != null) {
addAutoSaveProcessInstance(processInstance);
}
@@ -441,9 +484,8 @@
* saves the process instance.
*/
public void save(ProcessInstance processInstance) {
- if (services != null) {
- services.save(processInstance, this);
- }
+ ensureOpen();
+ services.save(processInstance, this);
}
/**
@@ -465,7 +507,9 @@
* operation will then perform a rollback.
*/
public void setRollbackOnly() {
- TxService txService = (services != null ? services.getTxService() : null);
+ ensureOpen();
+
+ TxService txService = services.getTxService();
if (txService != null) {
txService.setRollbackOnly();
}
@@ -488,26 +532,17 @@
}
/**
- * gives access to the object factory containing the configuration to create the service
- * factories.
+ * gives access to the object factory that builds the service factories.
*/
public ObjectFactory getObjectFactory() {
- return objectFactory;
+ return jbpmConfiguration.getObjectFactory();
}
- /** give access to the configuration that created this jbpm context */
+ /** gives access to the configuration that created this context. */
public JbpmConfiguration getJbpmConfiguration() {
return jbpmConfiguration;
}
- void setJbpmConfiguration(JbpmConfiguration jbpmConfiguration) {
- this.jbpmConfiguration = jbpmConfiguration;
- }
-
- void setName(String name) {
- this.name = name;
- }
-
// persistence methods //////////////////////////////////////////////////////
/**
@@ -518,8 +553,11 @@
*/
public SessionFactory getSessionFactory() {
PersistenceService persistenceService = getPersistenceService();
- return persistenceService instanceof DbPersistenceService ? ((DbPersistenceService) persistenceService).getSessionFactory()
- : null;
+ if (persistenceService instanceof DbPersistenceService) {
+ DbPersistenceService dbPersistenceService = (DbPersistenceService) persistenceService;
+ return dbPersistenceService.getSessionFactory();
+ }
+ return null;
}
/**
@@ -543,8 +581,11 @@
*/
public Session getSession() {
PersistenceService persistenceService = getPersistenceService();
- return persistenceService instanceof DbPersistenceService ? ((DbPersistenceService) persistenceService).getSession()
- : null;
+ if (persistenceService instanceof DbPersistenceService) {
+ DbPersistenceService dbPersistenceService = (DbPersistenceService) persistenceService;
+ return dbPersistenceService.getSession();
+ }
+ return null;
}
/**
@@ -568,8 +609,11 @@
*/
public Connection getConnection() {
PersistenceService persistenceService = getPersistenceService();
- return persistenceService instanceof DbPersistenceService ? ((DbPersistenceService) persistenceService).getConnection()
- : null;
+ if (persistenceService instanceof DbPersistenceService) {
+ DbPersistenceService dbPersistenceService = (DbPersistenceService) persistenceService;
+ return dbPersistenceService.getConnection();
+ }
+ return null;
}
/**
@@ -599,7 +643,7 @@
*/
public LoggingSession getLoggingSession() {
PersistenceService persistenceService = getPersistenceService();
- return (persistenceService != null ? persistenceService.getLoggingSession() : null);
+ return persistenceService != null ? persistenceService.getLoggingSession() : null;
}
/**
@@ -607,7 +651,7 @@
*/
public JobSession getJobSession() {
PersistenceService persistenceService = getPersistenceService();
- return (persistenceService != null ? persistenceService.getJobSession() : null);
+ return persistenceService != null ? persistenceService.getJobSession() : null;
}
/**
@@ -615,7 +659,7 @@
*/
public GraphSession getGraphSession() {
PersistenceService persistenceService = getPersistenceService();
- return (persistenceService != null ? persistenceService.getGraphSession() : null);
+ return persistenceService != null ? persistenceService.getGraphSession() : null;
}
/**
@@ -623,7 +667,7 @@
*/
public TaskMgmtSession getTaskMgmtSession() {
PersistenceService persistenceService = getPersistenceService();
- return (persistenceService != null ? persistenceService.getTaskMgmtSession() : null);
+ return persistenceService != null ? persistenceService.getTaskMgmtSession() : null;
}
// authentication methods ///////////////////////////////////////////////////
@@ -639,11 +683,12 @@
* sets the currently authenticated actorId.
*/
public void setActorId(String actorId) {
- AuthenticationService authenticationService = services.getAuthenticationService();
- authenticationService.setActorId(actorId);
+ ensureOpen();
+ services.getAuthenticationService().setActorId(actorId);
}
public void addAutoSaveProcessInstance(ProcessInstance processInstance) {
+ ensureOpen();
if (autoSaveProcessInstances == null) autoSaveProcessInstances = new ArrayList();
autoSaveProcessInstances.add(processInstance);
}
@@ -658,18 +703,9 @@
// private methods //////////////////////////////////////////////////////////
- private void autoSave() {
- if (autoSaveProcessInstances != null) {
- for (Iterator iter = autoSaveProcessInstances.iterator(); iter.hasNext();) {
- ProcessInstance processInstance = (ProcessInstance) iter.next();
- save(processInstance);
- }
- autoSaveProcessInstances.clear();
- }
- }
-
private PersistenceService getPersistenceService() {
- return services != null ? services.getPersistenceService() : null;
+ ensureOpen();
+ return services.getPersistenceService();
}
public String toString() {
Modified: jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/AbstractObjectInfo.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/AbstractObjectInfo.java 2010-08-11 09:01:40 UTC (rev 6571)
+++ jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/AbstractObjectInfo.java 2010-08-11 12:38:50 UTC (rev 6572)
@@ -28,8 +28,8 @@
private static final long serialVersionUID = 1L;
- String name = null;
- boolean isSingleton = false;
+ String name;
+ boolean isSingleton;
public AbstractObjectInfo() {
}
@@ -37,7 +37,6 @@
public AbstractObjectInfo(Element element, ObjectFactoryParser objectFactoryParser) {
if (element.hasAttribute("name")) {
name = element.getAttribute("name");
- objectFactoryParser.addNamedObjectInfo(name, this);
}
if ("true".equalsIgnoreCase(element.getAttribute("singleton"))) {
isSingleton = true;
Modified: jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/BeanInfo.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/BeanInfo.java 2010-08-11 09:01:40 UTC (rev 6571)
+++ jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/BeanInfo.java 2010-08-11 12:38:50 UTC (rev 6572)
@@ -75,7 +75,7 @@
propertyInfos = (PropertyInfo[]) propertyInfoList.toArray(new PropertyInfo[propertyInfoList.size()]);
}
- public Object createObject(ObjectFactoryImpl objectFactory) {
+ public Object createObject(ObjectFactory objectFactory) {
Object object;
if (constructorInfo == null) {
Modified: jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/BooleanInfo.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/BooleanInfo.java 2010-08-11 09:01:40 UTC (rev 6571)
+++ jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/BooleanInfo.java 2010-08-11 12:38:50 UTC (rev 6572)
@@ -41,7 +41,7 @@
b = Boolean.valueOf(s);
}
}
- public Object createObject(ObjectFactoryImpl objectFactory) {
+ public Object createObject(ObjectFactory objectFactory) {
return b;
}
}
Modified: jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/CharacterInfo.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/CharacterInfo.java 2010-08-11 09:01:40 UTC (rev 6571)
+++ jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/CharacterInfo.java 2010-08-11 12:38:50 UTC (rev 6572)
@@ -40,7 +40,7 @@
value = new Character(valueString.charAt(0));
}
- public Object createObject(ObjectFactoryImpl objectFactory) {
+ public Object createObject(ObjectFactory objectFactory) {
return value;
}
Modified: jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/ConstructorInfo.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/ConstructorInfo.java 2010-08-11 09:01:40 UTC (rev 6571)
+++ jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/ConstructorInfo.java 2010-08-11 12:38:50 UTC (rev 6572)
@@ -94,7 +94,7 @@
}
}
- public Object createObject(ObjectFactoryImpl objectFactory) {
+ public Object createObject(ObjectFactory objectFactory) {
Object[] args = getArgs(objectFactory);
Class[] parameterTypes = getParameterTypes(objectFactory);
@@ -154,7 +154,7 @@
}
}
- protected Class[] getParameterTypes(ObjectFactoryImpl objectFactory) {
+ protected Class[] getParameterTypes(ObjectFactory objectFactory) {
int nbrOfParameters = parameterClassNames != null ? parameterClassNames.length : 0;
Class[] parameterTypes = new Class[nbrOfParameters];
for (int i = 0; i < nbrOfParameters; i++) {
@@ -169,7 +169,7 @@
return parameterTypes;
}
- protected Object[] getArgs(ObjectFactoryImpl objectFactory) {
+ protected Object[] getArgs(ObjectFactory objectFactory) {
int nbrOfParameters = (parameterClassNames != null ? parameterClassNames.length : 0);
Object[] args = new Object[nbrOfParameters];
for (int i = 0; i < nbrOfParameters; i++) {
Modified: jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/DoubleInfo.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/DoubleInfo.java 2010-08-11 09:01:40 UTC (rev 6571)
+++ jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/DoubleInfo.java 2010-08-11 12:38:50 UTC (rev 6572)
@@ -34,7 +34,7 @@
value = new Double(getValueString(doubleElement));
}
- public Object createObject(ObjectFactoryImpl objectFactory) {
+ public Object createObject(ObjectFactory objectFactory) {
return value;
}
Modified: jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/FieldInfo.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/FieldInfo.java 2010-08-11 09:01:40 UTC (rev 6571)
+++ jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/FieldInfo.java 2010-08-11 12:38:50 UTC (rev 6572)
@@ -35,7 +35,7 @@
super(fieldElement, configParser);
}
- public void injectProperty(Object object, ObjectFactoryImpl objectFactory) {
+ public void injectProperty(Object object, ObjectFactory objectFactory) {
Field field = findField(object.getClass());
field.setAccessible(true);
Object value = objectFactory.getObject(getPropertyValueInfo());
Modified: jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/FloatInfo.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/FloatInfo.java 2010-08-11 09:01:40 UTC (rev 6571)
+++ jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/FloatInfo.java 2010-08-11 12:38:50 UTC (rev 6572)
@@ -34,7 +34,7 @@
value = new Float(getValueString(floatElement));
}
- public Object createObject(ObjectFactoryImpl objectFactory) {
+ public Object createObject(ObjectFactory objectFactory) {
return value;
}
Modified: jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/IntegerInfo.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/IntegerInfo.java 2010-08-11 09:01:40 UTC (rev 6571)
+++ jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/IntegerInfo.java 2010-08-11 12:38:50 UTC (rev 6572)
@@ -34,7 +34,7 @@
value = new Integer(getValueString(integerElement));
}
- public Object createObject(ObjectFactoryImpl objectFactory) {
+ public Object createObject(ObjectFactory objectFactory) {
return value;
}
Modified: jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/JbpmContextInfo.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/JbpmContextInfo.java 2010-08-11 09:01:40 UTC (rev 6571)
+++ jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/JbpmContextInfo.java 2010-08-11 12:38:50 UTC (rev 6572)
@@ -22,11 +22,11 @@
package org.jbpm.configuration;
import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
+import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
+import org.jbpm.JbpmConfiguration;
import org.jbpm.JbpmContext;
import org.jbpm.svc.Services;
import org.jbpm.util.XmlUtil;
@@ -36,104 +36,114 @@
private static final long serialVersionUID = 1L;
- private Map serviceFactoryObjectInfos;
+ private ObjectInfo[] serviceFactoryInfos;
private Map serviceFactories;
- private List serviceNames;
- private ObjectInfo[] saveOperationObjectInfos;
+ private ObjectInfo[] saveOperationInfos;
private List saveOperations;
public JbpmContextInfo(Element jbpmContextElement, ObjectFactoryParser objectFactoryParser) {
super(verifyDefaultName(jbpmContextElement), objectFactoryParser);
if (jbpmContextElement.hasAttribute("singleton")) {
- throw new ConfigurationException("attribute 'singleton' is not allowed in element 'jbpm-context'");
+ throw new ConfigurationException("attribute singleton is not allowed in element jbpm-context");
}
// parse the services
- serviceFactoryObjectInfos = new HashMap();
- serviceNames = new ArrayList();
- for (Iterator iter = XmlUtil.elementIterator(jbpmContextElement, "service"); iter.hasNext();) {
- Element serviceElement = (Element) iter.next();
- if (!serviceElement.hasAttribute("name")) {
+ List serviceElements = XmlUtil.elements(jbpmContextElement, "service");
+ serviceFactoryInfos = new ObjectInfo[serviceElements.size()];
+
+ for (int i = 0; i < serviceFactoryInfos.length; i++) {
+ Element serviceElement = (Element) serviceElements.get(i);
+
+ String serviceName = serviceElement.getAttribute("name");
+ if (serviceName.length() == 0) {
throw new ConfigurationException("service has no name");
}
- String serviceName = serviceElement.getAttribute("name");
- serviceNames.add(serviceName);
- ObjectInfo serviceFactoryObjectInfo;
+
+ ObjectInfo serviceFactoryInfo;
Element factoryElement = XmlUtil.element(serviceElement, "factory");
if (factoryElement != null) {
Element factoryBeanElement = XmlUtil.element(factoryElement);
if (factoryBeanElement == null) {
- throw new ConfigurationException("element 'factory' requires either a bean or ref element");
+ throw new ConfigurationException("element factory requires either a bean or ref subelement");
}
- serviceFactoryObjectInfo = objectFactoryParser.parse(factoryBeanElement);
+ factoryBeanElement.setAttribute("name", serviceName);
+ serviceFactoryInfo = objectFactoryParser.parse(factoryBeanElement);
}
else if (serviceElement.hasAttribute("factory")) {
- String factoryClassName = serviceElement.getAttribute("factory");
BeanInfo beanInfo = new BeanInfo();
- beanInfo.setClassName(factoryClassName);
- serviceFactoryObjectInfo = beanInfo;
+ beanInfo.setName(serviceName);
+ beanInfo.setClassName(serviceElement.getAttribute("factory"));
+ serviceFactoryInfo = beanInfo;
}
else {
- throw new ConfigurationException("element 'service' requires either a factory attribute or a factory element");
+ throw new ConfigurationException("element service requires either a factory attribute or a factory subelement");
}
- serviceFactoryObjectInfos.put(serviceName, serviceFactoryObjectInfo);
+ serviceFactoryInfos[i] = serviceFactoryInfo;
}
// parse the save operations
Element saveOperationsElement = XmlUtil.element(jbpmContextElement, "save-operations");
if (saveOperationsElement != null) {
List saveOperationElements = XmlUtil.elements(saveOperationsElement, "save-operation");
- saveOperationObjectInfos = new ObjectInfo[saveOperationElements.size()];
- for (int i = 0; i < saveOperationElements.size(); i++) {
+ saveOperationInfos = new ObjectInfo[saveOperationElements.size()];
+
+ for (int i = 0; i < saveOperationInfos.length; i++) {
Element saveOperationElement = (Element) saveOperationElements.get(i);
if (saveOperationElement.hasAttribute("class")) {
String saveOperationClassName = saveOperationElement.getAttribute("class");
BeanInfo beanInfo = new BeanInfo();
beanInfo.setClassName(saveOperationClassName);
- saveOperationObjectInfos[i] = beanInfo;
+ saveOperationInfos[i] = beanInfo;
}
else {
Element saveOperationBeanElement = XmlUtil.element(saveOperationElement);
if (saveOperationBeanElement == null) {
- throw new ConfigurationException("element 'save-operation' requires either a class attribute or an element of type 'bean' or 'ref'");
+ throw new ConfigurationException("element save-operation requires either a class attribute or a bean or ref subelement");
}
- saveOperationObjectInfos[i] = objectFactoryParser.parse(saveOperationBeanElement);
+ saveOperationInfos[i] = objectFactoryParser.parse(saveOperationBeanElement);
}
}
}
}
- static Element verifyDefaultName(Element jbpmContextElement) {
+ private static Element verifyDefaultName(Element jbpmContextElement) {
if (!jbpmContextElement.hasAttribute("name")) {
jbpmContextElement.setAttribute("name", JbpmContext.DEFAULT_JBPM_CONTEXT_NAME);
}
return jbpmContextElement;
}
- public synchronized Object createObject(ObjectFactoryImpl objectFactory) {
- if (serviceFactories == null) {
- serviceFactories = new HashMap();
- for (Iterator iter = serviceFactoryObjectInfos.entrySet().iterator(); iter.hasNext();) {
- Map.Entry entry = (Map.Entry) iter.next();
- String serviceName = (String) entry.getKey();
- ObjectInfo serviceFactoryObjectInfo = (ObjectInfo) entry.getValue();
- serviceFactories.put(serviceName, serviceFactoryObjectInfo.createObject(objectFactory));
+ public Object createObject(ObjectFactory objectFactory) {
+ synchronized (this) {
+ if (serviceFactories == null) {
+ serviceFactories = new LinkedHashMap(serviceFactoryInfos.length);
+ for (int i = 0; i < serviceFactoryInfos.length; i++) {
+ ObjectInfo serviceFactoryInfo = serviceFactoryInfos[i];
+ Object serviceFactory = serviceFactoryInfo.createObject(objectFactory);
+ serviceFactories.put(serviceFactoryInfo.getName(), serviceFactory);
+ }
+
+ if (saveOperationInfos != null) {
+ saveOperations = new ArrayList(saveOperationInfos.length);
+ for (int i = 0; i < saveOperationInfos.length; i++) {
+ Object saveOperation = saveOperationInfos[i].createObject(objectFactory);
+ saveOperations.add(saveOperation);
+ }
+ }
}
}
- if (saveOperations == null && saveOperationObjectInfos != null) {
- saveOperations = new ArrayList();
- for (int i = 0; i < saveOperationObjectInfos.length; i++) {
- Object saveOperation = saveOperationObjectInfos[i].createObject(objectFactory);
- saveOperations.add(saveOperation);
- }
+ Services services = new Services(serviceFactories, saveOperations);
+ if (objectFactory.hasObject("jbpm.configuration")) {
+ JbpmConfiguration configuration = (JbpmConfiguration) objectFactory.createObject("jbpm.configuration");
+ return configuration.createJbpmContext(name, services);
}
-
- Services services = new Services(serviceFactories, serviceNames, saveOperations);
- return new JbpmContext(services, objectFactory);
+ else {
+ return new JbpmContext(services, objectFactory);
+ }
}
}
Modified: jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/JbpmTypeObjectInfo.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/JbpmTypeObjectInfo.java 2010-08-11 09:01:40 UTC (rev 6571)
+++ jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/JbpmTypeObjectInfo.java 2010-08-11 12:38:50 UTC (rev 6572)
@@ -95,7 +95,7 @@
return true;
}
- public Object createObject(ObjectFactoryImpl objectFactory) {
+ public Object createObject(ObjectFactory objectFactory) {
return new JbpmTypeMatcher() {
private static final long serialVersionUID = 1L;
@@ -110,7 +110,7 @@
}
}
- public Object createObject(ObjectFactoryImpl objectFactory) {
+ public Object createObject(ObjectFactory objectFactory) {
JbpmTypeMatcher jbpmTypeMatcher = (JbpmTypeMatcher) objectFactory.createObject(typeMatcherObjectInfo);
return new JbpmType(jbpmTypeMatcher, converter, variableInstanceClass);
}
Modified: jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/ListInfo.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/ListInfo.java 2010-08-11 09:01:40 UTC (rev 6571)
+++ jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/ListInfo.java 2010-08-11 12:38:50 UTC (rev 6572)
@@ -44,7 +44,7 @@
}
}
- public Object createObject(ObjectFactoryImpl objectFactory) {
+ public Object createObject(ObjectFactory objectFactory) {
List list = new ArrayList();
if (elementInfos != null) {
for (int i = 0; i < elementInfos.length; i++) {
Modified: jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/LongInfo.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/LongInfo.java 2010-08-11 09:01:40 UTC (rev 6571)
+++ jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/LongInfo.java 2010-08-11 12:38:50 UTC (rev 6572)
@@ -34,7 +34,7 @@
value = new Long(getValueString(longElement));
}
- public Object createObject(ObjectFactoryImpl objectFactory) {
+ public Object createObject(ObjectFactory objectFactory) {
return value;
}
Modified: jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/MapInfo.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/MapInfo.java 2010-08-11 09:01:40 UTC (rev 6571)
+++ jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/MapInfo.java 2010-08-11 12:38:50 UTC (rev 6572)
@@ -50,7 +50,7 @@
}
}
- public Object createObject(ObjectFactoryImpl objectFactory) {
+ public Object createObject(ObjectFactory objectFactory) {
Map map = new HashMap();
if (keyInfos != null) {
for (int i = 0; i < keyInfos.length; i++) {
Modified: jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/NullInfo.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/NullInfo.java 2010-08-11 09:01:40 UTC (rev 6571)
+++ jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/NullInfo.java 2010-08-11 12:38:50 UTC (rev 6572)
@@ -31,7 +31,7 @@
super(nullElement, configParser);
}
- public Object createObject(ObjectFactoryImpl objectFactory) {
+ public Object createObject(ObjectFactory objectFactory) {
return null;
}
}
Modified: jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/ObjectFactory.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/ObjectFactory.java 2010-08-11 09:01:40 UTC (rev 6571)
+++ jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/ObjectFactory.java 2010-08-11 12:38:50 UTC (rev 6572)
@@ -24,7 +24,14 @@
import java.io.Serializable;
public interface ObjectFactory extends Serializable {
-
+
+ boolean hasObject(String name);
+
Object createObject(String name);
- boolean hasObject(String name);
+ Object createObject(ObjectInfo objectInfo);
+
+ Object getObject(String name);
+ Object getObject(ObjectInfo objectInfo);
+
+ Class classForName(String className) throws ClassNotFoundException;
}
Modified: jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/ObjectFactoryImpl.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/ObjectFactoryImpl.java 2010-08-11 09:01:40 UTC (rev 6571)
+++ jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/ObjectFactoryImpl.java 2010-08-11 12:38:50 UTC (rev 6572)
@@ -113,7 +113,7 @@
* create an object of the given name. If the object was created before, that object is
* returned from the registry.
*/
- Object getObject(String name) {
+ public Object getObject(String name) {
Object object = null;
ObjectInfo objectInfo = (ObjectInfo) namedObjectInfos.get(name);
if (objectInfo != null) {
@@ -130,7 +130,7 @@
* create an object for the given {@link ObjectInfo}. If the object was created before, that
* object is returned from the registry.
*/
- Object getObject(ObjectInfo objectInfo) {
+ public Object getObject(ObjectInfo objectInfo) {
Object object = null;
Object registryKey = getRegistryKey(objectInfo);
@@ -158,7 +158,7 @@
return object;
}
- Class classForName(String className) throws ClassNotFoundException {
+ public Class classForName(String className) throws ClassNotFoundException {
if (classLoader == null) {
classLoader = ClassLoaderUtil.getClassLoader();
}
Modified: jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/ObjectFactoryParser.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/ObjectFactoryParser.java 2010-08-11 09:01:40 UTC (rev 6571)
+++ jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/ObjectFactoryParser.java 2010-08-11 12:38:50 UTC (rev 6572)
@@ -25,110 +25,120 @@
import java.io.Serializable;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
-import java.util.List;
import java.util.Map;
import org.jbpm.JbpmException;
import org.jbpm.util.XmlUtil;
+import org.w3c.dom.Document;
import org.w3c.dom.Element;
public class ObjectFactoryParser implements Serializable {
private static final long serialVersionUID = 1L;
- private static Map defaultMappings;
+ private static final Class[] constructorParameterTypes = {
+ Element.class, ObjectFactoryParser.class
+ };
+ private static final Map defaultMappings = getDefaultMappings();
+
public static Map getDefaultMappings() {
- if (defaultMappings == null) {
- defaultMappings = new HashMap();
- addMapping(defaultMappings, "bean", BeanInfo.class);
- addMapping(defaultMappings, "ref", RefInfo.class);
- addMapping(defaultMappings, "list", ListInfo.class);
- addMapping(defaultMappings, "map", MapInfo.class);
- addMapping(defaultMappings, "string", StringInfo.class);
- addMapping(defaultMappings, "int", IntegerInfo.class);
- addMapping(defaultMappings, "integer", IntegerInfo.class);
- addMapping(defaultMappings, "long", LongInfo.class);
- addMapping(defaultMappings, "float", FloatInfo.class);
- addMapping(defaultMappings, "double", DoubleInfo.class);
- addMapping(defaultMappings, "char", CharacterInfo.class);
- addMapping(defaultMappings, "character", CharacterInfo.class);
- addMapping(defaultMappings, "boolean", BooleanInfo.class);
- addMapping(defaultMappings, "true", BooleanInfo.class);
- addMapping(defaultMappings, "false", BooleanInfo.class);
- addMapping(defaultMappings, "null", NullInfo.class);
- addMapping(defaultMappings, "jbpm-context", JbpmContextInfo.class);
- addMapping(defaultMappings, "jbpm-type", JbpmTypeObjectInfo.class);
- }
- return defaultMappings;
+ Map mappings = new HashMap();
+ addMapping(mappings, "bean", BeanInfo.class);
+ addMapping(mappings, "ref", RefInfo.class);
+ addMapping(mappings, "list", ListInfo.class);
+ addMapping(mappings, "map", MapInfo.class);
+ addMapping(mappings, "string", StringInfo.class);
+ addMapping(mappings, "int", IntegerInfo.class);
+ addMapping(mappings, "integer", IntegerInfo.class);
+ addMapping(mappings, "long", LongInfo.class);
+ addMapping(mappings, "float", FloatInfo.class);
+ addMapping(mappings, "double", DoubleInfo.class);
+ addMapping(mappings, "char", CharacterInfo.class);
+ addMapping(mappings, "character", CharacterInfo.class);
+ addMapping(mappings, "boolean", BooleanInfo.class);
+ addMapping(mappings, "true", BooleanInfo.class);
+ addMapping(mappings, "false", BooleanInfo.class);
+ addMapping(mappings, "null", NullInfo.class);
+ addMapping(mappings, "jbpm-context", JbpmContextInfo.class);
+ addMapping(mappings, "jbpm-type", JbpmTypeObjectInfo.class);
+ return mappings;
}
- private static final Class[] constructorParameterTypes = {
- Element.class, ObjectFactoryParser.class
- };
-
private static void addMapping(Map mappings, String elementTagName, Class objectInfoClass) {
try {
Constructor constructor = objectInfoClass.getDeclaredConstructor(constructorParameterTypes);
mappings.put(elementTagName, constructor);
}
catch (NoSuchMethodException e) {
- throw new JbpmException("couldn't add mapping for element '" + elementTagName
- + "': constructor(" + Element.class.getName() + ","
- + ObjectFactoryParser.class.getName() + ") was missing for class '"
- + objectInfoClass.getName() + "'", e);
+ throw new JbpmException("could not add mapping for element '" + elementTagName
+ + "', constructor(" + Element.class.getName() + ","
+ + ObjectFactoryParser.class.getName() + ") missing from " + objectInfoClass, e);
}
}
public static ObjectFactoryImpl parseXmlString(String xml) {
- Element rootElement = XmlUtil.parseXmlText(xml).getDocumentElement();
- return createObjectFactory(rootElement);
+ return createObjectFactory(XmlUtil.parseXmlText(xml));
}
- public static ObjectFactoryImpl parseInputStream(InputStream xmlInputStream) {
- Element rootElement = XmlUtil.parseXmlInputStream(xmlInputStream).getDocumentElement();
- return createObjectFactory(rootElement);
+ public static ObjectFactoryImpl parseInputStream(InputStream inputStream) {
+ return createObjectFactory(XmlUtil.parseXmlInputStream(inputStream));
}
public static ObjectFactoryImpl parseResource(String resource) {
- Element rootElement = XmlUtil.parseXmlResource(resource, false).getDocumentElement();
- return createObjectFactory(rootElement);
+ return createObjectFactory(XmlUtil.parseXmlResource(resource, false));
}
- public static ObjectFactoryImpl createObjectFactory(Element rootElement) {
- ObjectFactoryParser objectFactoryParser = new ObjectFactoryParser();
- List objectInfos = new ArrayList();
- for (Iterator iter = XmlUtil.elementIterator(rootElement); iter.hasNext();) {
- Element topLevelElement = (Element) iter.next();
- ObjectInfo objectInfo = objectFactoryParser.parse(topLevelElement);
- objectInfos.add(objectInfo);
- }
- return new ObjectFactoryImpl(objectFactoryParser.namedObjectInfos, objectInfos);
+ public static ObjectFactoryImpl createObjectFactory(Document document) {
+ return createObjectFactory(document.getDocumentElement());
}
- public void parseElementsFromResource(String resource, ObjectFactoryImpl objectFactoryImpl) {
- Element rootElement = XmlUtil.parseXmlResource(resource, false).getDocumentElement();
- parseElements(rootElement, objectFactoryImpl);
+ public static ObjectFactoryImpl createObjectFactory(Element infosElement) {
+ ObjectFactoryImpl objectFactory = new ObjectFactoryImpl();
+ new ObjectFactoryParser().load(infosElement, objectFactory);
+ return objectFactory;
}
- public void parseElementsStream(InputStream inputStream, ObjectFactoryImpl objectFactoryImpl) {
- Element rootElement = XmlUtil.parseXmlInputStream(inputStream).getDocumentElement();
- parseElements(rootElement, objectFactoryImpl);
+ /** @deprecated use {@link #load(String, ObjectFactoryImpl)} instead */
+ public void parseElementsFromResource(String resource, ObjectFactoryImpl objectFactory) {
+ load(resource, objectFactory);
}
- public void parseElements(Element element, ObjectFactoryImpl objectFactoryImpl) {
- for (Iterator iter = XmlUtil.elementIterator(element); iter.hasNext();) {
- Element objectInfoElement = (Element) iter.next();
- ObjectInfo objectInfo = parse(objectInfoElement);
- objectFactoryImpl.addObjectInfo(objectInfo);
+ public void load(String resource, ObjectFactoryImpl objectFactory) {
+ load(XmlUtil.parseXmlResource(resource, false), objectFactory);
+ }
+
+ /**
+ * @deprecated use {@link #load(InputStream,ObjectFactoryImpl)} instead
+ */
+ public void parseElementsStream(InputStream inputStream, ObjectFactoryImpl objectFactory) {
+ load(inputStream, objectFactory);
+ }
+
+ public void load(InputStream inputStream, ObjectFactoryImpl objectFactory) {
+ load(XmlUtil.parseXmlInputStream(inputStream), objectFactory);
+ }
+
+ public void load(Document document, ObjectFactoryImpl objectFactory) {
+ load(document.getDocumentElement(), objectFactory);
+ }
+
+ /** @deprecated use {@link #load(Element, ObjectFactoryImpl)} instead */
+ public void parseElements(Element infosElement, ObjectFactoryImpl objectFactory) {
+ load(infosElement, objectFactory);
+ }
+
+ public void load(Element infosElement, ObjectFactoryImpl objectFactory) {
+ for (Iterator iter = XmlUtil.elementIterator(infosElement); iter.hasNext();) {
+ Element infoElement = (Element) iter.next();
+ ObjectInfo objectInfo = parse(infoElement);
+ objectFactory.addObjectInfo(objectInfo);
}
}
private Map mappings;
- private Map namedObjectInfos;
public ObjectFactoryParser() {
this(getDefaultMappings());
@@ -136,7 +146,6 @@
public ObjectFactoryParser(Map mappings) {
this.mappings = mappings;
- this.namedObjectInfos = new HashMap();
}
public ObjectInfo parse(Element element) {
@@ -146,7 +155,9 @@
throw new JbpmException("no ObjectInfo class specified for element: " + tagName);
}
try {
- return (ObjectInfo) constructor.newInstance(new Object[] { element, this });
+ return (ObjectInfo) constructor.newInstance(new Object[] {
+ element, this
+ });
}
catch (InstantiationException e) {
throw new JbpmException("failed to instantiate " + constructor.getDeclaringClass(), e);
@@ -159,13 +170,13 @@
}
}
+ /** @deprecated */
public void addNamedObjectInfo(String name, ObjectInfo objectInfo) {
- namedObjectInfos.put(name, objectInfo);
}
public void addMapping(String elementName, Class objectInfoClass) {
- if (mappings == getDefaultMappings()) {
- mappings = new HashMap(getDefaultMappings());
+ if (mappings == defaultMappings) {
+ mappings = new HashMap(defaultMappings);
}
addMapping(mappings, elementName, objectInfoClass);
}
Modified: jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/ObjectInfo.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/ObjectInfo.java 2010-08-11 09:01:40 UTC (rev 6571)
+++ jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/ObjectInfo.java 2010-08-11 12:38:50 UTC (rev 6572)
@@ -29,5 +29,5 @@
String getName();
boolean isSingleton();
- Object createObject(ObjectFactoryImpl objectFactory);
+ Object createObject(ObjectFactory objectFactory);
}
Modified: jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/PropertyInfo.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/PropertyInfo.java 2010-08-11 09:01:40 UTC (rev 6571)
+++ jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/PropertyInfo.java 2010-08-11 12:38:50 UTC (rev 6572)
@@ -55,7 +55,7 @@
propertyValueInfo = configParser.parse(propertyValueElement);
}
- public void injectProperty(Object object, ObjectFactoryImpl objectFactory) {
+ public void injectProperty(Object object, ObjectFactory objectFactory) {
Method setterMethod = findSetter(object.getClass());
setterMethod.setAccessible(true);
Object value = objectFactory.getObject(propertyValueInfo);
Modified: jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/RefInfo.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/RefInfo.java 2010-08-11 09:01:40 UTC (rev 6571)
+++ jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/RefInfo.java 2010-08-11 12:38:50 UTC (rev 6572)
@@ -40,7 +40,7 @@
bean = refElement.getAttribute("bean");
}
- public Object createObject(ObjectFactoryImpl objectFactory) {
+ public Object createObject(ObjectFactory objectFactory) {
return objectFactory.getObject(bean);
}
}
Modified: jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/StringInfo.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/StringInfo.java 2010-08-11 09:01:40 UTC (rev 6571)
+++ jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/StringInfo.java 2010-08-11 12:38:50 UTC (rev 6572)
@@ -34,7 +34,7 @@
s = getValueString(stringElement);
}
- public Object createObject(ObjectFactoryImpl objectFactory) {
+ public Object createObject(ObjectFactory objectFactory) {
return s;
}
}
Modified: jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/ValueInfo.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/ValueInfo.java 2010-08-11 09:01:40 UTC (rev 6571)
+++ jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/configuration/ValueInfo.java 2010-08-11 12:38:50 UTC (rev 6572)
@@ -3,16 +3,16 @@
public class ValueInfo implements ObjectInfo {
private static final long serialVersionUID = 1L;
-
- String name;
- Object value;
-
+
+ private final String name;
+ private final Object value;
+
public ValueInfo(String name, Object value) {
this.name = name;
this.value = value;
}
- public Object createObject(ObjectFactoryImpl objectFactory) {
+ public Object createObject(ObjectFactory objectFactory) {
return value;
}
@@ -21,10 +21,10 @@
}
public boolean hasName() {
- return (name!=null);
+ return name != null;
}
public boolean isSingleton() {
- return false;
+ return true;
}
}
Modified: jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/context/exe/converter/SerializableToByteArrayConverter.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/context/exe/converter/SerializableToByteArrayConverter.java 2010-08-11 09:01:40 UTC (rev 6571)
+++ jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/context/exe/converter/SerializableToByteArrayConverter.java 2010-08-11 12:38:50 UTC (rev 6572)
@@ -38,56 +38,55 @@
public class SerializableToByteArrayConverter implements Converter {
- private static final long serialVersionUID = 1L;
+ private static final long serialVersionUID = 1L;
- public boolean supports(Object value) {
- if(value == null)
- return true;
- return Serializable.class.isAssignableFrom(value.getClass());
- }
+ public boolean supports(Object value) {
+ return value == null || value instanceof Serializable;
+ }
- public Object convert(Object o) {
- byte[] bytes = null;
- try {
- ByteArrayOutputStream memoryStream = new ByteArrayOutputStream();
- ObjectOutputStream objectStream = new ObjectOutputStream(memoryStream);
- objectStream.writeObject(o);
- objectStream.flush();
- bytes = memoryStream.toByteArray();
- }
- catch(IOException e) {
- throw new JbpmException("couldn't serialize '" + o + "'", e);
- }
- return new ByteArray(bytes);
- }
+ public Object convert(Object o) {
+ byte[] bytes = null;
+ try {
+ ByteArrayOutputStream memoryStream = new ByteArrayOutputStream();
+ ObjectOutputStream objectStream = new ObjectOutputStream(memoryStream);
+ objectStream.writeObject(o);
+ objectStream.flush();
+ bytes = memoryStream.toByteArray();
+ }
+ catch (IOException e) {
+ throw new JbpmException("failed to serialize: " + o, e);
+ }
+ return new ByteArray(bytes);
+ }
- public Object revert(Object o) {
- ByteArray byteArray = (ByteArray) o;
- InputStream memoryStream = new ByteArrayInputStream(byteArray.getBytes());
- try {
- ObjectInputStream objectStream = new ObjectInputStream(memoryStream);
- return objectStream.readObject();
- }
- catch(IOException ex) {
- throw new JbpmException("failed to read object", ex);
- }
- catch(ClassNotFoundException ex) {
- throw new JbpmException("serialized object class not found", ex);
- }
- }
+ public Object revert(Object o) {
+ ByteArray byteArray = (ByteArray) o;
+ InputStream memoryStream = new ByteArrayInputStream(byteArray.getBytes());
+ try {
+ ObjectInputStream objectStream = new ObjectInputStream(memoryStream);
+ return objectStream.readObject();
+ }
+ catch (IOException ex) {
+ throw new JbpmException("failed to read object", ex);
+ }
+ catch (ClassNotFoundException ex) {
+ throw new JbpmException("serialized object class not found", ex);
+ }
+ }
- public Object revert(Object o, ProcessDefinition processDefinition) {
- ByteArray byteArray = (ByteArray) o;
- InputStream memoryStream = new ByteArrayInputStream(byteArray.getBytes());
- try {
- ObjectInputStream objectStream = new CustomLoaderObjectInputStream(memoryStream, JbpmConfiguration.getProcessClassLoader(processDefinition));
- return objectStream.readObject();
- }
- catch(IOException ex) {
- throw new JbpmException("failed to read object", ex);
- }
- catch(ClassNotFoundException ex) {
- throw new JbpmException("serialized object class not found", ex);
- }
- }
+ public Object revert(Object o, ProcessDefinition processDefinition) {
+ ByteArray byteArray = (ByteArray) o;
+ InputStream memoryStream = new ByteArrayInputStream(byteArray.getBytes());
+ try {
+ ObjectInputStream objectStream = new CustomLoaderObjectInputStream(memoryStream,
+ JbpmConfiguration.getProcessClassLoader(processDefinition));
+ return objectStream.readObject();
+ }
+ catch (IOException ex) {
+ throw new JbpmException("failed to read object", ex);
+ }
+ catch (ClassNotFoundException ex) {
+ throw new JbpmException("serialized object class not found", ex);
+ }
+ }
}
Modified: jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/db/AbstractDbTestCase.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/db/AbstractDbTestCase.java 2010-08-11 09:01:40 UTC (rev 6571)
+++ jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/db/AbstractDbTestCase.java 2010-08-11 12:38:50 UTC (rev 6572)
@@ -74,7 +74,7 @@
}
catch (Exception e) {
// prevent unsafe use of the session after an exception occurs
- jbpmContext.setRollbackOnly();
+ if (!jbpmContext.isClosed()) jbpmContext.setRollbackOnly();
throw e;
}
}
Modified: jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/persistence/db/DbPersistenceService.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/persistence/db/DbPersistenceService.java 2010-08-11 09:01:40 UTC (rev 6571)
+++ jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/persistence/db/DbPersistenceService.java 2010-08-11 12:38:50 UTC (rev 6572)
@@ -124,6 +124,7 @@
public void beginTransaction() {
transaction = session.beginTransaction();
+ // commit does a flush anyway
mustSessionBeFlushed = false;
}
@@ -161,7 +162,7 @@
}
catch (SQLException e) {
// NOTE that Errors are not caught because that might halt the JVM
- // and mask the original Error.
+ // and mask the original Error
throw new JbpmPersistenceException("connection to data source failed", e);
}
}
@@ -179,10 +180,8 @@
*/
Configuration configuration = persistenceServiceFactory.getConfiguration();
String releaseMode = configuration.getProperty(Environment.RELEASE_CONNECTIONS);
- if ("after_statement".equals(releaseMode)
- || ("auto".equals(releaseMode) && isJtaOrCmtStrategy(configuration))) {
- mustConnectionBeClosed = true;
- }
+ mustConnectionBeClosed = "after_statement".equals(releaseMode)
+ || ("auto".equals(releaseMode) && isJtaOrCmtStrategy(configuration));
}
}
}
@@ -211,12 +210,12 @@
public void close() {
Exception flushException = flushSession();
if (flushException != null) {
- // JBPM-1465: here the transaction is already committed or rolled back
- // alternatively, the transaction is managed externally
- // hence rolling back is redundant and possibly dangerous
+ // JBPM-1465: enabling transaction disables flush, see beginTransaction()
+ // alternatively, transaction is managed externally
+ // in either case, rolling back is unnecessary and possibly disruptive
closeSession();
closeConnection();
- throw new JbpmPersistenceException("hibernate flush session failed", flushException);
+ throw new JbpmPersistenceException("failed to flush hibernate session", flushException);
}
endTransaction();
@@ -224,12 +223,14 @@
Exception closeSessionException = closeSession();
if (closeSessionException != null) {
closeConnection();
- throw new JbpmPersistenceException("hibernate close session failed", closeSessionException);
+ throw new JbpmPersistenceException("failed to close hibernate session",
+ closeSessionException);
}
Exception closeConnectionException = closeConnection();
if (closeConnectionException != null) {
- throw new JbpmPersistenceException("hibernate close connection failed", closeConnectionException);
+ throw new JbpmPersistenceException("failed to close hibernate connection",
+ closeConnectionException);
}
}
@@ -265,12 +266,17 @@
private Exception flushSession() {
if (mustSessionBeFlushed) {
- try {
- session.flush();
+ if (session != null) {
+ try {
+ session.flush();
+ }
+ catch (HibernateException e) {
+ // avoid log and throw antipattern
+ return e;
+ }
}
- catch (HibernateException e) {
- // avoid log and throw antipattern
- return e;
+ else {
+ log.warn("no hibernate session to flush");
}
}
return null;
@@ -278,7 +284,7 @@
private Exception closeSession() {
if (mustSessionBeClosed) {
- if (session.isOpen()) {
+ if (session != null) {
try {
session.close();
}
@@ -288,7 +294,7 @@
}
}
else {
- log.warn("hibernate session was already closed");
+ log.warn("no hibernate session to close");
}
}
return null;
@@ -374,13 +380,9 @@
if (customSession != null) return customSession;
}
try {
- Constructor constructor = sessionClass.getConstructor(new Class[] {
- Session.class
- });
+ Constructor constructor = sessionClass.getConstructor(new Class[] { Session.class });
try {
- Object customSession = constructor.newInstance(new Object[] {
- session
- });
+ Object customSession = constructor.newInstance(new Object[] { session });
customSessions.put(sessionClass, customSession);
return customSession;
}
@@ -395,11 +397,8 @@
}
}
catch (NoSuchMethodException e) {
- throw new JbpmException("constructor not found: "
- + sessionClass.getName()
- + '('
- + Session.class.getName()
- + ')', e);
+ throw new JbpmException("constructor not found: " + sessionClass.getName() + '('
+ + Session.class.getName() + ')', e);
}
}
Modified: jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/persistence/db/DbPersistenceServiceFactory.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/persistence/db/DbPersistenceServiceFactory.java 2010-08-11 09:01:40 UTC (rev 6571)
+++ jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/persistence/db/DbPersistenceServiceFactory.java 2010-08-11 12:38:50 UTC (rev 6572)
@@ -23,6 +23,8 @@
import javax.sql.DataSource;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;
import org.hibernate.tool.hbm2ddl.SchemaExport;
@@ -48,7 +50,9 @@
boolean isTransactionEnabled = true;
boolean isCurrentSessionEnabled;
- /** @deprecated use {@link #jbpmSchema} instead */
+ boolean mustSessionFactoryBeClosed;
+
+ /** @deprecated replaced by {@link #jbpmSchema} */
private SchemaExport schemaExport;
private JbpmSchema jbpmSchema;
@@ -92,9 +96,11 @@
if (sessionFactory == null) {
if (sessionFactoryJndiName != null) {
sessionFactory = (SessionFactory) JndiUtil.lookup(sessionFactoryJndiName, SessionFactory.class);
+ mustSessionFactoryBeClosed = false;
}
else {
sessionFactory = getConfiguration().buildSessionFactory();
+ mustSessionFactoryBeClosed = true;
}
}
return sessionFactory;
@@ -132,13 +138,17 @@
}
public void close() {
- if (sessionFactory != null) sessionFactory.close();
+ if (mustSessionFactoryBeClosed) {
+ if (sessionFactory != null) {
+ sessionFactory.close();
+ }
+ else {
+ Log log = LogFactory.getLog(DbPersistenceServiceFactory.class);
+ log.warn("no session factory to close");
+ }
+ }
}
- public void finalize() throws Throwable {
- close();
- }
-
public String getDataSourceJndiName() {
return dataSourceJndiName;
}
@@ -169,6 +179,7 @@
public void setSessionFactory(SessionFactory sessionFactory) {
this.sessionFactory = sessionFactory;
+ mustSessionFactoryBeClosed = false;
}
public boolean isTransactionEnabled() {
Modified: jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/svc/Services.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/svc/Services.java 2010-08-11 09:01:40 UTC (rev 6571)
+++ jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/svc/Services.java 2010-08-11 12:38:50 UTC (rev 6572)
@@ -26,6 +26,7 @@
import java.util.Arrays;
import java.util.HashMap;
import java.util.Iterator;
+import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
@@ -78,7 +79,6 @@
}
private final Map serviceFactories;
- private final List serviceNames;
private final Map services;
private List saveOperations = defaultSaveOperations;
@@ -99,19 +99,32 @@
}
public Services(Map serviceFactories) {
- this(serviceFactories, new ArrayList(serviceFactories.keySet()), null);
+ this(serviceFactories, null);
}
- public Services(Map serviceFactories, List serviceNames, List saveOperations) {
+ public Services(Map serviceFactories, List saveOperations) {
if (serviceFactories == null) {
- throw new IllegalArgumentException("service factories map is null");
+ throw new IllegalArgumentException("null service factories");
}
this.serviceFactories = serviceFactories;
- this.serviceNames = serviceNames;
this.services = new HashMap(serviceFactories.size());
if (saveOperations != null) this.saveOperations = saveOperations;
}
+ /** @deprecated use {@link #Services(Map, List)} instead */
+ public Services(Map serviceFactories, List serviceNames, List saveOperations) {
+ this(orderedMap(serviceFactories, serviceNames), saveOperations);
+ }
+
+ private static Map orderedMap(Map map, List orderedKeys) {
+ Map orderedMap = new LinkedHashMap(map.size());
+ for (Iterator iter = orderedKeys.iterator(); iter.hasNext();) {
+ Object key = iter.next();
+ orderedMap.put(key, map.get(key));
+ }
+ return orderedMap;
+ }
+
public void setSaveOperations(List saveOperations) {
if (saveOperations == null) {
throw new IllegalArgumentException("save operations list is null");
@@ -224,7 +237,7 @@
public void close() {
RuntimeException firstException = null;
- for (Iterator iter = serviceNames.iterator(); iter.hasNext();) {
+ for (Iterator iter = serviceFactories.keySet().iterator(); iter.hasNext();) {
String serviceName = (String) iter.next();
Service service = (Service) services.get(serviceName);
if (service == null) continue;
Modified: jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/util/ClassLoaderUtil.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/util/ClassLoaderUtil.java 2010-08-11 09:01:40 UTC (rev 6571)
+++ jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/util/ClassLoaderUtil.java 2010-08-11 12:38:50 UTC (rev 6572)
@@ -25,6 +25,7 @@
import java.io.InputStream;
import java.util.Properties;
+import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jbpm.JbpmConfiguration;
@@ -32,7 +33,7 @@
import org.jbpm.configuration.ObjectFactory;
/**
- * provides centralized classloader lookup.
+ * centralized class loader access.
*/
public class ClassLoaderUtil {
@@ -68,7 +69,7 @@
return Class.forName(className, false, Thread.currentThread().getContextClassLoader());
}
catch (ClassNotFoundException e) {
- // try the class loader of the current class
+ // fall back on the loader of this class
return Class.forName(className, false, ClassLoaderUtil.class.getClassLoader());
}
}
@@ -91,17 +92,17 @@
ObjectFactory objectFactory = JbpmConfiguration.Configs.getObjectFactory();
if (objectFactory.hasObject("jbpm.class.loader")) {
String classLoader = (String) objectFactory.createObject("jbpm.class.loader");
-
+
if ("jbpm".equals(classLoader)) {
// use class loader that loaded the jbpm classes
return ClassLoaderUtil.class.getClassLoader();
}
-
+
if (classLoader.equals("context")) {
// use the context class loader
return Thread.currentThread().getContextClassLoader();
}
-
+
// interpret value as a reference to a class loader bean
return (ClassLoader) objectFactory.createObject(classLoader);
}
@@ -116,26 +117,24 @@
}
/**
- * Loads resource as stream. If <code>useConfiguredLoader</code> is <code>true</code>, this
- * method searches for the resource in the context class loader, if not found it searches in
- * the class loader of this class.
- * <p>
- * This method helps bootstrap jBPM because the class loader used for locating the
- * configuration resource cannot be configured in the configuration itself.
- * </p>
+ * Returns a stream for reading the specified resource. This method helps bootstrap jBPM
+ * because the class loader used for locating the configuration resource cannot be configured
+ * in the configuration itself.
*
+ * @param useConfiguredLoader if <code>true</code>, this method searches for the resource in
+ * the context class loader, if not found it falls back on the loader of this class
* @return a stream for reading the resource, or <code>null</code> if the resource was not
* found
*/
public static InputStream getStream(String resource, boolean useConfiguredLoader) {
if (useConfiguredLoader) return getStream(resource);
- // try context class loader first, allowing applications to hide the provided resources
+ // try context class loader first, allowing applications to override built-in resources
InputStream stream = Thread.currentThread()
.getContextClassLoader()
.getResourceAsStream(resource);
if (stream == null) {
- // try class loader of the current class
+ // fall back on the loader of this class
stream = ClassLoaderUtil.class.getClassLoader().getResourceAsStream(resource);
}
return stream;
@@ -157,8 +156,8 @@
inStream.close();
}
catch (IOException e) {
- LogFactory.getLog(ClassLoaderUtil.class)
- .warn("failed to close resource: " + resource, e);
+ Log log = LogFactory.getLog(ClassLoaderUtil.class);
+ log.warn("failed to close resource: " + resource, e);
}
}
}
Modified: jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/util/XmlUtil.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/util/XmlUtil.java 2010-08-11 09:01:40 UTC (rev 6571)
+++ jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/util/XmlUtil.java 2010-08-11 12:38:50 UTC (rev 6572)
@@ -22,6 +22,7 @@
package org.jbpm.util;
import java.io.ByteArrayInputStream;
+import java.io.IOException;
import java.io.InputStream;
import java.io.StringWriter;
import java.util.ArrayList;
@@ -30,7 +31,6 @@
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.FactoryConfigurationError;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.Result;
import javax.xml.transform.Source;
@@ -48,9 +48,20 @@
import org.w3c.dom.Node;
import org.w3c.dom.Text;
import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
public class XmlUtil {
+ private static final DocumentBuilderFactory documentBuilderFactory = createDocumentBuilderFactory();
+
+ private static DocumentBuilderFactory createDocumentBuilderFactory() {
+ DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+ factory.setNamespaceAware(true);
+ factory.setCoalescing(true);
+ factory.setIgnoringComments(true);
+ return factory;
+ }
+
private XmlUtil() {
// hide default constructor to prevent instantiation
}
@@ -61,14 +72,14 @@
}
/**
- * @param useConfiguredLoader specifies if the resource should be loaded with the "limited"
- * bootstrap class loader for jbpm config.
+ * @param useConfiguredLoader if <code>true</code>, this method searches for the resource in
+ * the context class loader, if not found it falls back on the class loader of this class
+ * @see <a href="https://jira.jboss.org/jira/browse/JBPM-1148">JBPM-1148</a>
*/
public static Document parseXmlResource(String resource, boolean useConfiguredLoader) {
- // see https://jira.jboss.org/jira/browse/JBPM-1148
InputStream inputStream = ClassLoaderUtil.getStream(resource, useConfiguredLoader);
if (inputStream == null) {
- throw new IllegalArgumentException("Cannot load resource: " + resource);
+ throw new IllegalArgumentException("resource not found: " + resource);
}
InputSource inputSource = new InputSource(inputStream);
return parseXmlInputSource(inputSource);
@@ -79,9 +90,12 @@
try {
document = getDocumentBuilder().parse(inputStream);
}
- catch (Exception e) {
- throw new XmlException("couldn't parse xml", e);
+ catch (IOException e) {
+ throw new XmlException("could not read input", e);
}
+ catch (SAXException e) {
+ throw new XmlException("failed to parse xml", e);
+ }
return document;
}
@@ -90,16 +104,22 @@
try {
document = getDocumentBuilder().parse(inputSource);
}
- catch (Exception e) {
- throw new XmlException("couldn't parse xml", e);
+ catch (IOException e) {
+ throw new XmlException("could not read input", e);
}
+ catch (SAXException e) {
+ throw new XmlException("failed to parse xml", e);
+ }
return document;
}
- public static DocumentBuilder getDocumentBuilder() throws FactoryConfigurationError,
- ParserConfigurationException {
- DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
- return factory.newDocumentBuilder();
+ public synchronized static DocumentBuilder getDocumentBuilder() {
+ try {
+ return documentBuilderFactory.newDocumentBuilder();
+ }
+ catch (ParserConfigurationException e) {
+ throw new XmlException("failed to create document builder", e);
+ }
}
public static String attribute(Element element, String attrName) {
Modified: jbpm3/branches/jbpm-3.2-soa/modules/core/src/test/java/org/jbpm/JbpmConfigurationTest.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/core/src/test/java/org/jbpm/JbpmConfigurationTest.java 2010-08-11 09:01:40 UTC (rev 6571)
+++ jbpm3/branches/jbpm-3.2-soa/modules/core/src/test/java/org/jbpm/JbpmConfigurationTest.java 2010-08-11 12:38:50 UTC (rev 6572)
@@ -26,6 +26,8 @@
import org.jbpm.configuration.ObjectFactory;
import org.jbpm.configuration.ObjectFactoryImpl;
import org.jbpm.configuration.ObjectFactoryParser;
+import org.jbpm.configuration.ObjectInfo;
+import org.jbpm.util.ClassLoaderUtil;
import org.jbpm.util.XmlException;
public class JbpmConfigurationTest extends AbstractJbpmTestCase {
@@ -146,13 +148,31 @@
private static final long serialVersionUID = 1L;
+ public boolean hasObject(String name) {
+ return "myproperty".equals(name);
+ }
+
public Object createObject(String name) {
return "myproperty".equals(name) ? "mycustomfactoriedvalue" : null;
}
- public boolean hasObject(String name) {
- return "myproperty".equals(name);
+ public Object createObject(ObjectInfo objectInfo) {
+ String name = objectInfo.getName();
+ return hasObject(name) ? createObject(name) : objectInfo.createObject(this);
}
+
+ public Object getObject(String name) {
+ return "myproperty".equals(name) ? "mycustomfactoriedvalue" : null;
+ }
+
+ public Object getObject(ObjectInfo objectInfo) {
+ String name = objectInfo.getName();
+ return hasObject(name) ? getObject(name) : objectInfo.createObject(this);
+ }
+
+ public Class classForName(String className) throws ClassNotFoundException {
+ return ClassLoaderUtil.classForName(className);
+ }
}
public void testDomainModelConfigsWithCustomObjectFactory() {
Modified: jbpm3/branches/jbpm-3.2-soa/modules/core/src/test/java/org/jbpm/configuration/JbpmContextTest.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/core/src/test/java/org/jbpm/configuration/JbpmContextTest.java 2010-08-11 09:01:40 UTC (rev 6571)
+++ jbpm3/branches/jbpm-3.2-soa/modules/core/src/test/java/org/jbpm/configuration/JbpmContextTest.java 2010-08-11 12:38:50 UTC (rev 6572)
@@ -21,82 +21,81 @@
*/
package org.jbpm.configuration;
+import java.util.Iterator;
+import java.util.Map;
+
import org.jbpm.AbstractJbpmTestCase;
import org.jbpm.JbpmContext;
import org.jbpm.svc.Service;
import org.jbpm.svc.ServiceFactory;
-import org.jbpm.svc.Services;
public class JbpmContextTest extends AbstractJbpmTestCase {
- protected ObjectFactoryImpl objectFactory = null;
-
- protected void parse(String xml) {
- objectFactory = ObjectFactoryParser.parseXmlString(xml);
+ private static ObjectFactory parse(String xml) {
+ return ObjectFactoryParser.parseXmlString(xml);
}
public void testEmptyJbpmContext() {
- parse(
- "<jbpm-configuration>" +
- " <jbpm-context name='mycontext' />" +
- "</jbpm-configuration>"
- );
-
+ ObjectFactory objectFactory = parse("<jbpm-configuration>"
+ + " <jbpm-context name='mycontext' />"
+ + "</jbpm-configuration>");
+
JbpmContext jbpmContext = (JbpmContext) objectFactory.createObject("mycontext");
- assertNotNull(jbpmContext);
assertNotNull(jbpmContext.getServices());
- assertNotNull(jbpmContext.getServices());
}
-
+
public static class MyServiceFactory implements ServiceFactory {
private static final long serialVersionUID = 1L;
+
public Service openService() {
return null;
}
+
public void close() {
}
}
public void testJbpmContextWithBeanServiceFactory() {
- parse(
- "<jbpm-configuration>" +
- " <jbpm-context name='mycontext'>" +
- " <service name='myservice' factory='org.jbpm.configuration.JbpmContextTest$MyServiceFactory' />" +
- " </jbpm-context>" +
- "</jbpm-configuration>"
- );
-
+ ObjectFactory objectFactory = parse("<jbpm-configuration>"
+ + " <jbpm-context name='mycontext'>"
+ + " <service name='myservice' factory='"
+ + MyServiceFactory.class.getName()
+ + "' />"
+ + " </jbpm-context>"
+ + "</jbpm-configuration>");
+
JbpmContext jbpmContext = (JbpmContext) objectFactory.createObject("mycontext");
- assertNotNull(jbpmContext);
- assertEquals(1, jbpmContext.getServices().getServiceFactories().size());
- assertTrue(jbpmContext.getServices().getServiceFactories().containsKey("myservice"));
+ Map serviceFactories = jbpmContext.getServices().getServiceFactories();
+ assertEquals(1, serviceFactories.size());
+ assertEquals("myservice", serviceFactories.keySet().iterator().next());
}
public void testJbpmContextWithTwoServiceFactories() {
- parse(
- "<jbpm-configuration>" +
- " <bean name='myservicebean' class='org.jbpm.configuration.JbpmContextTest$MyServiceFactory' />" +
- " <jbpm-context name='mycontext'>" +
- " <service name='myservice'>" +
- " <factory>" +
- " <ref bean='myservicebean' />" +
- " </factory>" +
- " </service>" +
- " <service name='mysecondservice'>" +
- " <factory>" +
- " <ref bean='myservicebean' />" +
- " </factory>" +
- " </service>" +
- " </jbpm-context>" +
- "</jbpm-configuration>"
- );
-
+ ObjectFactory objectFactory = parse("<jbpm-configuration>"
+ + " <bean name='myservicebean' class='"
+ + MyServiceFactory.class.getName()
+ + "' />"
+ + " <jbpm-context name='mycontext'>"
+ + " <service name='myservice'>"
+ + " <factory>"
+ + " <ref bean='myservicebean' />"
+ + " </factory>"
+ + " </service>"
+ + " <service name='myservice2'>"
+ + " <factory>"
+ + " <ref bean='myservicebean' />"
+ + " </factory>"
+ + " </service>"
+ + " </jbpm-context>"
+ + "</jbpm-configuration>");
+
JbpmContext jbpmContext = (JbpmContext) objectFactory.createObject("mycontext");
- assertNotNull(jbpmContext);
- Services services = jbpmContext.getServices();
- assertEquals(2, services.getServiceFactories().size());
- assertTrue(services.getServiceFactories().containsKey("myservice"));
- assertTrue(services.getServiceFactories().containsKey("mysecondservice"));
- assertSame(services.getServiceFactory("myservice"), services.getServiceFactory("mysecondservice"));
+ Map serviceFactories = jbpmContext.getServices().getServiceFactories();
+ assertEquals(2, serviceFactories.size());
+ // iteration order is guaranteed!
+ Iterator serviceNames = serviceFactories.keySet().iterator();
+ assertEquals("myservice", serviceNames.next());
+ assertEquals("myservice2", serviceNames.next());
+ assertSame(serviceFactories.get("myservice"), serviceFactories.get("myservice2"));
}
}
Added: jbpm3/branches/jbpm-3.2-soa/modules/core/src/test/java/org/jbpm/jbpm2605/JBPM2605Test.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/core/src/test/java/org/jbpm/jbpm2605/JBPM2605Test.java (rev 0)
+++ jbpm3/branches/jbpm-3.2-soa/modules/core/src/test/java/org/jbpm/jbpm2605/JBPM2605Test.java 2010-08-11 12:38:50 UTC (rev 6572)
@@ -0,0 +1,65 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.jbpm.jbpm2605;
+
+import org.hibernate.SessionFactory;
+import org.hibernate.cfg.Configuration;
+import org.jbpm.db.AbstractDbTestCase;
+import org.jbpm.graph.def.ProcessDefinition;
+import org.jbpm.persistence.db.DbPersistenceServiceFactory;
+
+/**
+ * {@link DbPersistenceServiceFactory} should not close {@link SessionFactory} if it did not
+ * open it.
+ *
+ * @see <a href="https://jira.jboss.org/browse/JBPM-2605">JBPM-2605</a>
+ * @author Alejandro Guizar
+ */
+public class JBPM2605Test extends AbstractDbTestCase {
+
+ private SessionFactory sessionFactory;
+
+ protected void setUp() throws Exception {
+ super.setUp();
+ sessionFactory = new Configuration().configure().buildSessionFactory();
+ jbpmContext.setSessionFactory(sessionFactory);
+ }
+
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ sessionFactory.close();
+ }
+
+ public void testExternalSessionFactory() {
+ deployProcessDefinition(new ProcessDefinition(getName()));
+ closeJbpmContext();
+ try {
+ jbpmConfiguration.close();
+ jbpmConfiguration = null;
+ assertFalse("expected external session factory to remain open", sessionFactory.isClosed());
+ }
+ finally {
+ createJbpmContext();
+ jbpmContext.setSessionFactory(sessionFactory);
+ }
+ }
+}
Property changes on: jbpm3/branches/jbpm-3.2-soa/modules/core/src/test/java/org/jbpm/jbpm2605/JBPM2605Test.java
___________________________________________________________________
Name: svn:eol-style
+ native
13 years, 10 months
JBoss JBPM SVN: r6571 - projects/jsf-console/branches/jsf-console-3.2-soa and 1 other directories.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2010-08-11 05:01:40 -0400 (Wed, 11 Aug 2010)
New Revision: 6571
Removed:
projects/jsf-console/branches/jsf-console-3.2-soa/jbpm4jsf/jbpm3-jbpm4jsf.iml
projects/jsf-console/branches/jsf-console-3.2-soa/jsf-console.iml
Modified:
jbpm3/branches/jbpm-3.2-soa/pom.xml
projects/jsf-console/branches/jsf-console-3.2-soa/pom.xml
Log:
update jboss maven repository configuration;
remove stale idea module files
Modified: jbpm3/branches/jbpm-3.2-soa/pom.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/pom.xml 2010-08-11 07:09:44 UTC (rev 6570)
+++ jbpm3/branches/jbpm-3.2-soa/pom.xml 2010-08-11 09:01:40 UTC (rev 6571)
@@ -410,8 +410,8 @@
<version>1.4</version>
</plugin>
<plugin>
- <artifactId>maven-assembly-plugin</artifactId>
- <version>2.2-beta-3</version>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>2.2-beta-3</version>
</plugin>
</plugins>
</pluginManagement>
@@ -421,14 +421,15 @@
<repositories>
<repository>
<id>jboss-public-repository-group</id>
- <name>JBoss Public Maven Repository Group</name>
- <url>http://repository.jboss.org/nexus/content/groups/public/</url>
+ <name>JBoss Public Repository Group</name>
+ <url>http://repository.jboss.org/nexus/content/groups/public</url>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>true</enabled>
+ <updatePolicy>never</updatePolicy>
</snapshots>
</repository>
</repositories>
@@ -436,11 +437,10 @@
<pluginRepositories>
<pluginRepository>
<id>jboss-public-repository-group</id>
- <name>JBoss Public Maven Repository Group</name>
- <url>http://repository.jboss.org/nexus/content/groups/public/</url>
+ <name>JBoss Public Repository Group</name>
+ <url>http://repository.jboss.org/nexus/content/groups/public</url>
<releases>
<enabled>true</enabled>
- <updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>true</enabled>
@@ -736,8 +736,8 @@
</profile>
<!--
- Name: SOA
- Descr: For SOA-P productization
+ Name: SOA
+ Desc: SOA-P Productization
-->
<profile>
<id>soa</id>
@@ -763,15 +763,15 @@
</execution>
</executions>
</plugin>
+
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
- <skipTests>true</skipTests>
+ <skipTests>true</skipTests>
</configuration>
</plugin>
</plugins>
</build>
</profile>
-
- </profiles>
+ </profiles>
</project>
Deleted: projects/jsf-console/branches/jsf-console-3.2-soa/jbpm4jsf/jbpm3-jbpm4jsf.iml
===================================================================
--- projects/jsf-console/branches/jsf-console-3.2-soa/jbpm4jsf/jbpm3-jbpm4jsf.iml 2010-08-11 07:09:44 UTC (rev 6570)
+++ projects/jsf-console/branches/jsf-console-3.2-soa/jbpm4jsf/jbpm3-jbpm4jsf.iml 2010-08-11 09:01:40 UTC (rev 6571)
@@ -1,369 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module version="4" relativePaths="true" type="JAVA_MODULE">
- <component name="ModuleRootManager" />
- <component name="NewModuleRootManager" inherit-compiler-output="true">
- <exclude-output />
- <content url="file://$MODULE_DIR$">
- <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
- <sourceFolder url="file://$MODULE_DIR$/src/main/resources" isTestSource="false" />
- </content>
- <orderEntry type="inheritedJdk" />
- <orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="module" module-name="jbpm3-core" exported="" />
- <orderEntry type="module-library" exported="">
- <library name="M2 Dep: concurrent:concurrent:jar:1.3.4:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/concurrent/concurrent/1.3.4/concurrent-1.3.4.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
- <library name="M2 Dep: org.apache.jackrabbit:jackrabbit-core:jar:1.4.5:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/apache/jackrabbit/jackrabbit-core/1.4.5/jackrabbit-core-1.4.5.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
- <library name="M2 Dep: javax.transaction:jta:jar:1.0.1B:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/javax/transaction/jta/1.0.1B/jta-1.0.1B.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
- <library name="M2 Dep: com.sun.facelets:jsf-facelets:jar:1.1.14:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/com/sun/facelets/jsf-facelets/1.1.14/jsf-facelets-1.1.14.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
- <library name="M2 Dep: junit:junit:jar:3.8.1:test">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
- <library name="M2 Dep: org.apache.ant:ant:jar:1.7.0:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/apache/ant/ant/1.7.0/ant-1.7.0.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
- <library name="M2 Dep: commons-logging:commons-logging:jar:1.1.1:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
- <library name="M2 Dep: nekohtml:nekohtml:jar:0.9.4:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/nekohtml/nekohtml/0.9.4/nekohtml-0.9.4.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
- <library name="M2 Dep: org.hibernate:hibernate:jar:3.2.6.ga:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/hibernate/hibernate/3.2.6.ga/hibernate-3.2.6.ga.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
- <library name="M2 Dep: org.apache.derby:derby:jar:10.2.1.6:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/apache/derby/derby/10.2.1.6/derby-10.2.1.6.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
- <library name="M2 Dep: javax.faces:jsf-api:jar:1.2_03:provided">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/javax/faces/jsf-api/1.2_03/jsf-api-1.2_03.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
- <library name="M2 Dep: bsh:bsh:jar:1.3.0:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/bsh/bsh/1.3.0/bsh-1.3.0.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
- <library name="M2 Dep: antlr:antlr:jar:2.7.6:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/antlr/antlr/2.7.6/antlr-2.7.6.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
- <library name="M2 Dep: org.jboss.gravel:gravel:jar:1.0.0.GA:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/jboss/gravel/gravel/1.0.0.GA/gravel-1.0.0.GA.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
- <library name="M2 Dep: javax.servlet:servlet-api:jar:2.5:provided">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/javax/servlet/servlet-api/2.5/servlet-api-2.5.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
- <library name="M2 Dep: asm:asm:jar:1.5.3:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/asm/asm/1.5.3/asm-1.5.3.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
- <library name="M2 Dep: pdfbox:pdfbox:jar:0.6.4:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/pdfbox/pdfbox/0.6.4/pdfbox-0.6.4.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
- <library name="M2 Dep: org.apache.poi:poi:jar:3.0.2-FINAL:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/apache/poi/poi/3.0.2-FINAL/poi-3.0.2-FINAL.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
- <library name="M2 Dep: org.slf4j:slf4j-api:jar:1.5.5:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/slf4j/slf4j-api/1.5.5/slf4j-api-1.5.5.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
- <library name="M2 Dep: xml-apis:xml-apis:jar:1.3.03:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/xml-apis/xml-apis/1.3.03/xml-apis-1.3.03.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
- <library name="M2 Dep: hsqldb:hsqldb:jar:1.8.0.7:test">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/hsqldb/hsqldb/1.8.0.7/hsqldb-1.8.0.7.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
- <library name="M2 Dep: net.sf.ehcache:ehcache:jar:1.2.3:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/net/sf/ehcache/ehcache/1.2.3/ehcache-1.2.3.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
- <library name="M2 Dep: javax.el:el-api:jar:1.2:provided">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/javax/el/el-api/1.2/el-api-1.2.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
- <library name="M2 Dep: org.jbpm.jbpm3:jbpm-identity:jar:3.3.0-SNAPSHOT:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/jbpm/jbpm3/jbpm-identity/3.3.0-SNAPSHOT/jbpm-identity-3.3.0-SNAPSHOT.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/jbpm/jbpm3/jbpm-identity/3.3.0-SNAPSHOT/jbpm-identity-3.3.0-SNAPSHOT-sources.jar!/" />
- </SOURCES>
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
- <library name="M2 Dep: xerces:xercesImpl:jar:2.8.1:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/xerces/xercesImpl/2.8.1/xercesImpl-2.8.1.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
- <library name="M2 Dep: dom4j:dom4j:jar:1.6.1:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
- <library name="M2 Dep: org.apache.jackrabbit:jackrabbit-text-extractors:jar:1.4:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/apache/jackrabbit/jackrabbit-text-extractors/1.4/jackrabbit-text-extractors-1.4.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
- <library name="M2 Dep: cglib:cglib:jar:2.1_3:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/cglib/cglib/2.1_3/cglib-2.1_3.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
- <library name="M2 Dep: asm:asm-attrs:jar:1.5.3:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/asm/asm-attrs/1.5.3/asm-attrs-1.5.3.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
- <library name="M2 Dep: org.apache.jackrabbit:jackrabbit-api:jar:1.4:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/apache/jackrabbit/jackrabbit-api/1.4/jackrabbit-api-1.4.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
- <library name="M2 Dep: org.apache.jackrabbit:jackrabbit-jcr-commons:jar:1.4:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/apache/jackrabbit/jackrabbit-jcr-commons/1.4/jackrabbit-jcr-commons-1.4.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
- <library name="M2 Dep: commons-collections:commons-collections:jar:2.1.1:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/commons-collections/commons-collections/2.1.1/commons-collections-2.1.1.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
- <library name="M2 Dep: org.apache.lucene:lucene-core:jar:2.2.0:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/apache/lucene/lucene-core/2.2.0/lucene-core-2.2.0.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
- <library name="M2 Dep: javax.faces:jsf-impl:jar:1.2_03:runtime">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/javax/faces/jsf-impl/1.2_03/jsf-impl-1.2_03.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
- <library name="M2 Dep: org.textmining:tm-extractors:jar:0.4:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/textmining/tm-extractors/0.4/tm-extractors-0.4.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
- <library name="M2 Dep: org.apache.jackrabbit:jackrabbit-spi-commons:jar:1.4:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/apache/jackrabbit/jackrabbit-spi-commons/1.4/jackrabbit-spi-commons-1.4.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
- <library name="M2 Dep: log4j:log4j:jar:1.2.14:test">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/log4j/log4j/1.2.14/log4j-1.2.14.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
- <library name="M2 Dep: org.apache.ant:ant-launcher:jar:1.7.0:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/apache/ant/ant-launcher/1.7.0/ant-launcher-1.7.0.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
- <library name="M2 Dep: org.apache.jackrabbit:jackrabbit-spi:jar:1.4:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/apache/jackrabbit/jackrabbit-spi/1.4/jackrabbit-spi-1.4.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntryProperties />
- </component>
-</module>
-
Deleted: projects/jsf-console/branches/jsf-console-3.2-soa/jsf-console.iml
===================================================================
--- projects/jsf-console/branches/jsf-console-3.2-soa/jsf-console.iml 2010-08-11 07:09:44 UTC (rev 6570)
+++ projects/jsf-console/branches/jsf-console-3.2-soa/jsf-console.iml 2010-08-11 09:01:40 UTC (rev 6571)
@@ -1,386 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module version="4" relativePaths="true" type="JAVA_MODULE">
- <component name="ModuleRootManager" />
- <component name="NewModuleRootManager" inherit-compiler-output="true">
- <exclude-output />
- <content url="file://$MODULE_DIR$">
- <sourceFolder url="file://$MODULE_DIR$/console/src/main/java" isTestSource="false" />
- <sourceFolder url="file://$MODULE_DIR$/console/src/main/resources" isTestSource="false" />
- <sourceFolder url="file://$MODULE_DIR$/jbpm4jsf/src/main/java" isTestSource="false" />
- <sourceFolder url="file://$MODULE_DIR$/jbpm4jsf/src/main/resources" isTestSource="false" />
- </content>
- <orderEntry type="inheritedJdk" />
- <orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="module-library" exported="">
- <library name="M2 Dep: junit:junit:jar:3.8.1:test">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
- <library name="M2 Dep: log4j:log4j:jar:1.2.14:test">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/log4j/log4j/1.2.14/log4j-1.2.14.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library name="M2 Dep: concurrent:concurrent:jar:1.3.4:provided">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/concurrent/concurrent/1.3.4/concurrent-1.3.4.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library name="M2 Dep: org.apache.jackrabbit:jackrabbit-core:jar:1.4.5:provided">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/apache/jackrabbit/jackrabbit-core/1.4.5/jackrabbit-core-1.4.5.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library name="M2 Dep: javax.transaction:jta:jar:1.0.1B:provided">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/javax/transaction/jta/1.0.1B/jta-1.0.1B.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library name="M2 Dep: com.sun.facelets:jsf-facelets:jar:1.1.14:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/com/sun/facelets/jsf-facelets/1.1.14/jsf-facelets-1.1.14.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library name="M2 Dep: org.apache.ant:ant:jar:1.7.0:provided">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/apache/ant/ant/1.7.0/ant-1.7.0.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library name="M2 Dep: commons-logging:commons-logging:jar:1.1.1:provided">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library name="M2 Dep: nekohtml:nekohtml:jar:0.9.4:provided">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/nekohtml/nekohtml/0.9.4/nekohtml-0.9.4.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library name="M2 Dep: javax.faces:jsf-api:jar:1.2_03:provided">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/javax/faces/jsf-api/1.2_03/jsf-api-1.2_03.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library name="M2 Dep: org.hibernate:hibernate:jar:3.2.6.ga:provided">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/hibernate/hibernate/3.2.6.ga/hibernate-3.2.6.ga.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library name="M2 Dep: org.apache.derby:derby:jar:10.2.1.6:provided">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/apache/derby/derby/10.2.1.6/derby-10.2.1.6.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library name="M2 Dep: bsh:bsh:jar:1.3.0:provided">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/bsh/bsh/1.3.0/bsh-1.3.0.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library name="M2 Dep: poi:poi:jar:2.5.1-final-20040804:provided">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/poi/poi/2.5.1-final-20040804/poi-2.5.1-final-20040804.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library name="M2 Dep: antlr:antlr:jar:2.7.6:provided">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/antlr/antlr/2.7.6/antlr-2.7.6.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library name="M2 Dep: org.jboss.gravel:gravel:jar:1.0.0.GA:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/jboss/gravel/gravel/1.0.0.GA/gravel-1.0.0.GA.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library name="M2 Dep: commons-fileupload:commons-fileupload:jar:1.2.1:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/commons-fileupload/commons-fileupload/1.2.1/commons-fileupload-1.2.1.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library name="M2 Dep: javax.servlet:servlet-api:jar:2.5:provided">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/javax/servlet/servlet-api/2.5/servlet-api-2.5.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library name="M2 Dep: asm:asm:jar:1.5.3:provided">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/asm/asm/1.5.3/asm-1.5.3.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library name="M2 Dep: org.slf4j:slf4j-api:jar:1.3.0:provided">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/slf4j/slf4j-api/1.3.0/slf4j-api-1.3.0.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library name="M2 Dep: pdfbox:pdfbox:jar:0.6.4:provided">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/pdfbox/pdfbox/0.6.4/pdfbox-0.6.4.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library name="M2 Dep: net.sf.ehcache:ehcache:jar:1.2.3:provided">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/net/sf/ehcache/ehcache/1.2.3/ehcache-1.2.3.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library name="M2 Dep: javax.el:el-api:jar:1.2:provided">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/javax/el/el-api/1.2/el-api-1.2.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library name="M2 Dep: xerces:xercesImpl:jar:2.8.1:provided">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/xerces/xercesImpl/2.8.1/xercesImpl-2.8.1.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library name="M2 Dep: dom4j:dom4j:jar:1.6.1:provided">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library name="M2 Dep: org.apache.jackrabbit:jackrabbit-text-extractors:jar:1.4:provided">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/apache/jackrabbit/jackrabbit-text-extractors/1.4/jackrabbit-text-extractors-1.4.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library name="M2 Dep: cglib:cglib:jar:2.1_3:provided">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/cglib/cglib/2.1_3/cglib-2.1_3.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library name="M2 Dep: asm:asm-attrs:jar:1.5.3:provided">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/asm/asm-attrs/1.5.3/asm-attrs-1.5.3.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library name="M2 Dep: org.apache.jackrabbit:jackrabbit-api:jar:1.4:provided">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/apache/jackrabbit/jackrabbit-api/1.4/jackrabbit-api-1.4.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library name="M2 Dep: org.apache.jackrabbit:jackrabbit-jcr-commons:jar:1.4:provided">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/apache/jackrabbit/jackrabbit-jcr-commons/1.4/jackrabbit-jcr-commons-1.4.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library name="M2 Dep: org.jbpm.jbpm3:jbpm-core:jar:3.3.0.CR1:provided">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/jbpm/jbpm3/jbpm-core/3.3.0.CR1/jbpm-core-3.3.0.CR1.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library name="M2 Dep: commons-io:commons-io:jar:1.4:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/commons-io/commons-io/1.4/commons-io-1.4.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library name="M2 Dep: commons-collections:commons-collections:jar:2.1.1:provided">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/commons-collections/commons-collections/2.1.1/commons-collections-2.1.1.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library name="M2 Dep: javax.faces:jsf-impl:jar:1.2_03:runtime">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/javax/faces/jsf-impl/1.2_03/jsf-impl-1.2_03.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library name="M2 Dep: org.apache.lucene:lucene-core:jar:2.2.0:provided">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/apache/lucene/lucene-core/2.2.0/lucene-core-2.2.0.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library name="M2 Dep: org.textmining:tm-extractors:jar:0.4:provided">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/textmining/tm-extractors/0.4/tm-extractors-0.4.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library name="M2 Dep: org.apache.jackrabbit:jackrabbit-spi-commons:jar:1.4:provided">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/apache/jackrabbit/jackrabbit-spi-commons/1.4/jackrabbit-spi-commons-1.4.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library name="M2 Dep: xml-apis:xml-apis:jar:1.0.b2:provided">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library name="M2 Dep: org.jbpm.jbpm3:jbpm-identity:jar:3.3.0.CR1:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/jbpm/jbpm3/jbpm-identity/3.3.0.CR1/jbpm-identity-3.3.0.CR1.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library name="M2 Dep: org.apache.ant:ant-launcher:jar:1.7.0:provided">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/apache/ant/ant-launcher/1.7.0/ant-launcher-1.7.0.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library name="M2 Dep: org.apache.jackrabbit:jackrabbit-spi:jar:1.4:provided">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/apache/jackrabbit/jackrabbit-spi/1.4/jackrabbit-spi-1.4.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntryProperties />
- </component>
-</module>
-
Modified: projects/jsf-console/branches/jsf-console-3.2-soa/pom.xml
===================================================================
--- projects/jsf-console/branches/jsf-console-3.2-soa/pom.xml 2010-08-11 07:09:44 UTC (rev 6570)
+++ projects/jsf-console/branches/jsf-console-3.2-soa/pom.xml 2010-08-11 09:01:40 UTC (rev 6571)
@@ -142,8 +142,8 @@
<repositories>
<repository>
<id>jboss-public-repository-group</id>
- <name>JBoss Public Maven Repository Group</name>
- <url>https://repository.jboss.org/nexus/content/groups/public</url>
+ <name>JBoss Public Repository Group</name>
+ <url>http://repository.jboss.org/nexus/content/groups/public</url>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
@@ -158,8 +158,8 @@
<pluginRepositories>
<pluginRepository>
<id>jboss-public-repository-group</id>
- <name>JBoss Public Maven Repository Group</name>
- <url>https://repository.jboss.org/nexus/content/groups/public</url>
+ <name>JBoss Public Repository Group</name>
+ <url>http://repository.jboss.org/nexus/content/groups/public</url>
<releases>
<enabled>true</enabled>
</releases>
13 years, 10 months
JBoss JBPM SVN: r6570 - in projects/jsf-console/branches/jsf-console-3.2-soa: soa-distribution and 5 other directories.
by do-not-reply@jboss.org
Author: ryanzhang
Date: 2010-08-11 03:09:44 -0400 (Wed, 11 Aug 2010)
New Revision: 6570
Added:
projects/jsf-console/branches/jsf-console-3.2-soa/soa-distribution/build.xml
projects/jsf-console/branches/jsf-console-3.2-soa/soa-distribution/post-patch/
projects/jsf-console/branches/jsf-console-3.2-soa/soa-distribution/post-patch/patch_gpd_deployer_ui.xml
projects/jsf-console/branches/jsf-console-3.2-soa/soa-distribution/post-patch/patch_jbpm_console_ui.xml
projects/jsf-console/branches/jsf-console-3.2-soa/soa-distribution/resource/
projects/jsf-console/branches/jsf-console-3.2-soa/soa-distribution/resource/gpd-console/
projects/jsf-console/branches/jsf-console-3.2-soa/soa-distribution/resource/gpd-console/jboss-web.xml
projects/jsf-console/branches/jsf-console-3.2-soa/soa-distribution/resource/gpd-console/web.xml
projects/jsf-console/branches/jsf-console-3.2-soa/soa-distribution/resource/jbpm-console/
projects/jsf-console/branches/jsf-console-3.2-soa/soa-distribution/resource/jbpm-console/JBossLogo.jpg
projects/jsf-console/branches/jsf-console-3.2-soa/soa-distribution/resource/jbpm-console/WEB-INF/
projects/jsf-console/branches/jsf-console-3.2-soa/soa-distribution/resource/jbpm-console/WEB-INF/jboss-web.xml
projects/jsf-console/branches/jsf-console-3.2-soa/soa-distribution/resource/jbpm-console/WEB-INF/web.xml
projects/jsf-console/branches/jsf-console-3.2-soa/soa-distribution/resource/jbpm-console/login.jsp
projects/jsf-console/branches/jsf-console-3.2-soa/soa-distribution/resource/jbpm-console/web.xml
Removed:
projects/jsf-console/branches/jsf-console-3.2-soa/soa-distribution/src/
Modified:
projects/jsf-console/branches/jsf-console-3.2-soa/console/pom.xml
projects/jsf-console/branches/jsf-console-3.2-soa/soa-distribution/pom.xml
Log:
Refactor soa profile, Put soa overlay into a seperate module soa-distribution
Modified: projects/jsf-console/branches/jsf-console-3.2-soa/console/pom.xml
===================================================================
--- projects/jsf-console/branches/jsf-console-3.2-soa/console/pom.xml 2010-08-11 06:42:58 UTC (rev 6569)
+++ projects/jsf-console/branches/jsf-console-3.2-soa/console/pom.xml 2010-08-11 07:09:44 UTC (rev 6570)
@@ -51,65 +51,4 @@
</dependency>
</dependencies>
- <profiles>
- <profile>
- <id>soa</id>
- <dependencies>
- <dependency>
- <groupId>org.jbpm.jbpm3</groupId>
- <artifactId>soa-webapp</artifactId>
- <version>${project.version}</version>
- <type>war</type>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-war-plugin</artifactId>
-
- <executions>
- <execution>
- <id>default-war</id>
- <goals>
- <goal>war</goal>
- </goals>
- <configuration>
- <overlays>
- <overlay>
- <groupId>org.jbpm.jbpm3</groupId>
- <artifactId>soa-webapp</artifactId>
- <skip>true</skip>
- </overlay>
- </overlays>
- </configuration>
- </execution>
-
- <execution>
- <id>soa-war</id>
- <goals>
- <goal>war</goal>
- </goals>
- <configuration>
- <classifier>soa</classifier>
- <primaryArtifact>false</primaryArtifact>
- <webappDirectory>
- ${project.build.directory}/${project.build.finalName}-soa
- </webappDirectory>
- <overlays>
- <overlay>
- <groupId>org.jbpm.jbpm3</groupId>
- <artifactId>soa-webapp</artifactId>
- </overlay>
- <!-- empty groupId/artifactId means the current build -->
- <overlay />
- </overlays>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
</project>
Added: projects/jsf-console/branches/jsf-console-3.2-soa/soa-distribution/build.xml
===================================================================
--- projects/jsf-console/branches/jsf-console-3.2-soa/soa-distribution/build.xml (rev 0)
+++ projects/jsf-console/branches/jsf-console-3.2-soa/soa-distribution/build.xml 2010-08-11 07:09:44 UTC (rev 6570)
@@ -0,0 +1,34 @@
+<project name="SOA jbpm console builder">
+
+ <target name="build">
+ <copy todir="${module_base_dir}/target/work" file="${module_base_dir}/../console/target/jsf-console-${project.version}.war" />
+ <unzip src="${module_base_dir}/target/work/jsf-console-${project.version}.war" dest="${module_base_dir}/target/work/console-war"/>
+ <delete file="${module_base_dir}/target/work/console-war/WEB-INF/web.xml" />
+ <copy todir="${module_base_dir}/target/work/console-war/" >
+ <fileset dir="${module_base_dir}/resource/jbpm-console/" includes="**/*" excludes="web.xml" />
+ </copy>
+ <copy todir="${module_base_dir}/target/work/console-war/WEB-INF" file="resource/jbpm-console/web.xml" />
+ <unzip src="../gpd-deployer/target/gpd-deployer-${project.version}.war" dest="${module_base_dir}/target/work/gpd-war"/>
+ <delete file="${module_base_dir}/target/work/gpd-war/WEB-INF/web.xml" />
+ <copy todir="${module_base_dir}/target/work/gpd-war/WEB-INF" file="${module_base_dir}/resource/gpd-console/web.xml" />
+
+ </target>
+ <target name="assemble">
+ <copy preservelastmodified="true" todir="${module_base_dir}/target/dist/jbpm-console.war">
+ <fileset dir="${module_base_dir}/target/work/console-war" includes="**/*" />
+ </copy>
+
+ <copy preservelastmodified="true" todir="${module_base_dir}/target/dist/gpd-deployer.war">
+ <fileset dir="${module_base_dir}/target/work/gpd-war" includes="**/*" />
+ </copy>
+
+ <war destfile="${module_base_dir}/target/${module_build_finalName}.war" webxml="${module_base_dir}/target/dist/jbpm-console.war/WEB-INF/web.xml">
+ <fileset dir="${module_base_dir}/target/dist/jbpm-console.war" includes="**/*" />
+ </war>
+
+ <zip destfile="${module_base_dir}/target/${module_build_finalName}.zip" >
+ <zipfileset dir="${module_base_dir}/target/dist" prefix="jbpm-console" includes="**/*" />
+ </zip>
+
+ </target>
+</project>
Modified: projects/jsf-console/branches/jsf-console-3.2-soa/soa-distribution/pom.xml
===================================================================
--- projects/jsf-console/branches/jsf-console-3.2-soa/soa-distribution/pom.xml 2010-08-11 06:42:58 UTC (rev 6569)
+++ projects/jsf-console/branches/jsf-console-3.2-soa/soa-distribution/pom.xml 2010-08-11 07:09:44 UTC (rev 6570)
@@ -13,7 +13,7 @@
<name>jBPM3 - Build SOA-P distribution</name>
<groupId>org.jbpm.jbpm3</groupId>
<artifactId>jsf-console-soa</artifactId>
- <packaging>war</packaging>
+ <packaging>pom</packaging>
<!-- Parent -->
<parent>
@@ -22,4 +22,130 @@
<version>3.2.10-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
+
+ <properties>
+ <soa_common_build_src.groupId>org.jboss.jbosssoa</soa_common_build_src.groupId>
+ <soa_common_build_src.artifactId>soa-common-build-src</soa_common_build_src.artifactId>
+ <soa_common_build_src.version>1.0.0</soa_common_build_src.version>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>${soa_common_build_src.groupId}</groupId>
+ <artifactId>${soa_common_build_src.artifactId}</artifactId>
+ <version>${soa_common_build_src.version}</version>
+ <type>zip</type>
+ </dependency>
+ </dependencies>
+
+ <!-- Plugins -->
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>unpack-soa-common-build-src</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>unpack</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>${project.basedir}</outputDirectory>
+ <artifactItems>
+ <artifactItem>
+ <groupId>${soa_common_build_src.groupId}</groupId>
+ <artifactId>${soa_common_build_src.artifactId}</artifactId>
+ <version>${soa_common_build_src.version}</version>
+ <type>zip</type>
+ </artifactItem>
+ </artifactItems>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.3</version>
+ <configuration>
+ <source>1.6</source>
+ <target>1.6</target>
+ </configuration>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant</artifactId>
+ <version>1.7.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant-nodeps</artifactId>
+ <version>1.7.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant-launcher</artifactId>
+ <version>1.7.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant-trax</artifactId>
+ <version>1.7.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.groovy</groupId>
+ <artifactId>groovy-all</artifactId>
+ <version>1.7.0</version>
+ </dependency>
+ </dependencies>
+
+ <executions>
+ <execution>
+ <id>SOA build process</id>
+ <phase>process-classes</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <ant antfile="build-common.xml" target="soa.routine.build" dir="${project.basedir}" inheritAll="false">
+ <property name="module_base_dir" value="${project.basedir}"/>
+ <property name="module_build_finalName" value="${project.build.finalName}"/>
+ <property name="project.version" value="${project.version}"/>
+ <property name="groovy.path" value="${maven.dependency.org.codehaus.groovy.groovy-all.jar.path}" />
+ </ant>
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <version>1.2</version>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>attach-artifact</goal>
+ </goals>
+ <configuration>
+ <artifacts>
+ <artifact>
+ <file>${project.build.directory}/${project.build.finalName}.zip</file>
+ <type>zip</type>
+ </artifact>
+ <artifact>
+ <file>${project.build.directory}/${project.build.finalName}.war</file>
+ <type>war</type>
+ </artifact>
+ </artifacts>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
</project>
Added: projects/jsf-console/branches/jsf-console-3.2-soa/soa-distribution/post-patch/patch_gpd_deployer_ui.xml
===================================================================
--- projects/jsf-console/branches/jsf-console-3.2-soa/soa-distribution/post-patch/patch_gpd_deployer_ui.xml (rev 0)
+++ projects/jsf-console/branches/jsf-console-3.2-soa/soa-distribution/post-patch/patch_gpd_deployer_ui.xml 2010-08-11 07:09:44 UTC (rev 6570)
@@ -0,0 +1,23 @@
+<project name="patchname" default="apply.patch">
+ <!-- change logo and make style unify with soa platform -->
+ <property name="gpd_war_dir" location="${module_base_dir}/target/work/gpd-war" />
+
+ <target name="apply.patch">
+ <delete file="${gpd_war_dir}/jbpm.css" />
+ <replace file="${gpd_war_dir}/index.html" >
+ <replacetoken><![CDATA[jbpm.css]]></replacetoken>
+ <replacevalue><![CDATA[/css/soa.css]]></replacevalue>
+ </replace>
+ <replace file="${gpd_war_dir}/index.html" >
+ <replacetoken><![CDATA[<body>]]></replacetoken>
+ <replacevalue><![CDATA[<body><script language="javascript" type="text/javascript" src="/css/header.js" ></script>]]></replacevalue>
+ </replace>
+ <replace file="${gpd_war_dir}/index.html" >
+ <replacetoken><![CDATA[</body>]]></replacetoken>
+ <replacevalue><![CDATA[</body><script language="javascript" type="text/javascript" src="/css/footer.js" ></script>]]></replacevalue>
+ </replace>
+
+ <delete file="${gpd_war_dir}/WEB-INF/jboss-web.xml" />
+ <copy todir="${gpd_war_dir}/WEB-INF" file="${module_base_dir}/resource/gpd-console/jboss-web.xml" />
+ </target>
+</project>
Added: projects/jsf-console/branches/jsf-console-3.2-soa/soa-distribution/post-patch/patch_jbpm_console_ui.xml
===================================================================
--- projects/jsf-console/branches/jsf-console-3.2-soa/soa-distribution/post-patch/patch_jbpm_console_ui.xml (rev 0)
+++ projects/jsf-console/branches/jsf-console-3.2-soa/soa-distribution/post-patch/patch_jbpm_console_ui.xml 2010-08-11 07:09:44 UTC (rev 6570)
@@ -0,0 +1,63 @@
+<project name="patchname" default="apply.patch">
+ <!-- change logo and make style unify with soa platform -->
+ <target name="apply.patch">
+ <replace file="${module_base_dir}/target/work/console-war/login.jsp" >
+ <replacetoken><![CDATA[<a href="/"><img src="/console-war/JBossLogo.jpg" alt="JBoss SOA Platform"/></a>
+]]></replacetoken>
+ <replacevalue></replacevalue>
+ </replace>
+ <replace file="${module_base_dir}/target/work/console-war/login.jsp" >
+ <replacetoken><![CDATA[</head>]]></replacetoken>
+ <replacevalue><![CDATA[<link href="/css/soa.css" rel="stylesheet" type="text/css"/>
+ </head>]]></replacevalue>
+ </replace>
+
+ <replace file="${module_base_dir}/target/work/console-war/login.jsp">
+ <replacetoken><![CDATA[<body>]]></replacetoken>
+ <replacevalue><![CDATA[<body><script language="javascript" type="text/javascript" src="/css/header.js" ></script>]]>
+ </replacevalue>
+ </replace>
+ <replace file="${module_base_dir}/target/work/console-war/login.jsp">
+ <replacetoken><![CDATA[</body>]]></replacetoken>
+ <replacevalue><![CDATA[<script language="javascript" type="text/javascript" src="/css/footer.js" ></script></body>]]>
+ </replacevalue>
+ </replace>
+
+ <replace file="${module_base_dir}/target/work/console-war/login.jsp">
+ <replacetoken><![CDATA[background: #ff8c00;]]></replacetoken>
+ <replacevalue><![CDATA[background: #cc0000; color: white;]]></replacevalue>
+ </replace>
+ <replace file="${module_base_dir}/target/work/console-war/login.jsp">
+ <replacetoken><![CDATA[Invalid Login/Password]]></replacetoken>
+ <replacevalue><![CDATA[Invalid User Name/Password]]></replacevalue>
+ </replace>
+ <replace file="${module_base_dir}/target/work/console-war/login.jsp">
+ <replacetoken><![CDATA[background-color: gainsboro;]]></replacetoken>
+ <replacevalue><![CDATA[background-color: #cccccc;]]></replacevalue>
+ </replace>
+
+ <replace file="${module_base_dir}/target/work/console-war/ua/t_base.xhtml" >
+ <replacetoken><![CDATA[</head>]]></replacetoken>
+ <replacevalue><![CDATA[<link href="/css/soa.css" rel="stylesheet" type="text/css"/>
+ </head>]]></replacevalue>
+ </replace>
+
+ <replace file="${module_base_dir}/target/work/console-war/ua/t_base.xhtml" >
+ <replacetoken><![CDATA[<ui:insert name="top"/>
+ <img src="../images/background.gif" alt=""/>]]></replacetoken>
+ <replacevalue><![CDATA[<script language="javascript" type="text/javascript" src="/css/header.js" ></script>
+ <ui:insert name="top"/>]]></replacevalue>
+ </replace>
+ <replace file="${module_base_dir}/target/work/console-war/ua/t_base.xhtml" >
+ <replacetoken><![CDATA[<tr>
+ <td colspan="2" class="layoutfooter"><h:outputText value="#{msgs['title']}"/></td>
+ </tr>
+ </tbody>
+ </table>
+]]></replacetoken>
+ <replacevalue><![CDATA[</tbody>
+ </table>
+ <script language="javascript" type="text/javascript" src="/css/footer.js" ></script>]]></replacevalue>
+ </replace>
+ </target>
+</project>
Added: projects/jsf-console/branches/jsf-console-3.2-soa/soa-distribution/resource/gpd-console/jboss-web.xml
===================================================================
--- projects/jsf-console/branches/jsf-console-3.2-soa/soa-distribution/resource/gpd-console/jboss-web.xml (rev 0)
+++ projects/jsf-console/branches/jsf-console-3.2-soa/soa-distribution/resource/gpd-console/jboss-web.xml 2010-08-11 07:09:44 UTC (rev 6570)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE jboss-web PUBLIC
+ "-//JBoss//DTD Web Application 2.4//EN"
+ "http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">
+
+<jboss-web>
+ <!--
+ Specify the security domain to use. This will be java:/jaas/<name> where
+ <name> is one of the names configured in your login-config.xml.
+ -->
+ <security-domain>java:/jaas/soa</security-domain>
+
+</jboss-web>
Added: projects/jsf-console/branches/jsf-console-3.2-soa/soa-distribution/resource/gpd-console/web.xml
===================================================================
--- projects/jsf-console/branches/jsf-console-3.2-soa/soa-distribution/resource/gpd-console/web.xml (rev 0)
+++ projects/jsf-console/branches/jsf-console-3.2-soa/soa-distribution/resource/gpd-console/web.xml 2010-08-11 07:09:44 UTC (rev 6570)
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+ <servlet>
+ <description>Server counterpart for the Graphical Process Designer
+ deployment feature.</description>
+ <servlet-name>GPD Deployer Servlet</servlet-name>
+ <servlet-class>org.jbpm.web.ProcessUploadServlet</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>GPD Deployer Servlet</servlet-name>
+ <url-pattern>/upload/*</url-pattern>
+ </servlet-mapping>
+
+ <security-role>
+ <description>This role list should be changed to include all the relevant
+ roles for your environment.</description>
+ <role-name>admin</role-name>
+ </security-role>
+
+ <security-constraint>
+ <web-resource-collection>
+ <web-resource-name>Secure Area</web-resource-name>
+ <description>If you are deploying to JBoss AS, be sure to specify the
+ security domain in jboss-web.xml.</description>
+ <url-pattern>/*</url-pattern>
+ <http-method>GET</http-method>
+ <http-method>POST</http-method>
+ </web-resource-collection>
+ <auth-constraint>
+ <description>Optionally customize the role name to require a login before
+ access is allowed to the application.</description>
+ <role-name>JBossAdmin</role-name>
+ </auth-constraint>
+ </security-constraint>
+
+ <login-config>
+ <auth-method>BASIC</auth-method>
+ <realm-name>jBPM GPD Deployer</realm-name>
+ </login-config>
+
+ <security-role>
+ <role-name>JBossAdmin</role-name>
+ </security-role>
+</web-app>
Added: projects/jsf-console/branches/jsf-console-3.2-soa/soa-distribution/resource/jbpm-console/JBossLogo.jpg
===================================================================
(Binary files differ)
Property changes on: projects/jsf-console/branches/jsf-console-3.2-soa/soa-distribution/resource/jbpm-console/JBossLogo.jpg
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: projects/jsf-console/branches/jsf-console-3.2-soa/soa-distribution/resource/jbpm-console/WEB-INF/jboss-web.xml
===================================================================
--- projects/jsf-console/branches/jsf-console-3.2-soa/soa-distribution/resource/jbpm-console/WEB-INF/jboss-web.xml (rev 0)
+++ projects/jsf-console/branches/jsf-console-3.2-soa/soa-distribution/resource/jbpm-console/WEB-INF/jboss-web.xml 2010-08-11 07:09:44 UTC (rev 6570)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.4//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">
+
+<jboss-web>
+ <!--
+ Specify the security domain to use. This will be java:/jaas/<name> where
+ <name> is one of the names configured in your login-config.xml.
+ -->
+ <security-domain>java:/jaas/soa</security-domain>
+ <context-root>jbpm-console</context-root>
+
+ <resource-ref>
+ <res-ref-name>jdbc/JbpmDataSource</res-ref-name>
+ <jndi-name>java:/JbpmDS</jndi-name>
+ </resource-ref>
+
+ <resource-ref>
+ <res-ref-name>jms/JbpmConnectionFactory</res-ref-name>
+ <jndi-name>java:JmsXA</jndi-name>
+ </resource-ref>
+
+ <ejb-local-ref>
+ <ejb-ref-name>ejb/TimerEntityBean</ejb-ref-name>
+ <local-jndi-name>java:jbpm/TimerEntityBean</local-jndi-name>
+ </ejb-local-ref>
+
+ <!-- workaround for "mapped-name is required" exception in JBoss 5.0.0.CR1 -->
+ <message-destination-ref>
+ <message-destination-ref-name>jms/JobQueue</message-destination-ref-name>
+ <jndi-name>queue/JbpmJobQueue</jndi-name>
+ </message-destination-ref>
+
+</jboss-web>
Added: projects/jsf-console/branches/jsf-console-3.2-soa/soa-distribution/resource/jbpm-console/WEB-INF/web.xml
===================================================================
--- projects/jsf-console/branches/jsf-console-3.2-soa/soa-distribution/resource/jbpm-console/WEB-INF/web.xml (rev 0)
+++ projects/jsf-console/branches/jsf-console-3.2-soa/soa-distribution/resource/jbpm-console/WEB-INF/web.xml 2010-08-11 07:09:44 UTC (rev 6570)
@@ -0,0 +1,148 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+
+ <servlet>
+ <description>Enable the JSF servlet. See faces-config.xml for Faces-specific configuration.</description>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+
+ <!-- Mapping for all plain pages. -->
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.jsf</url-pattern>
+ </servlet-mapping>
+
+ <!-- This mapping is for the process images. -->
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>/app/pi/*</url-pattern>
+ </servlet-mapping>
+
+ <context-param>
+ <description>Use Documents Saved as *.xhtml</description>
+ <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
+ <param-value>.xhtml</param-value>
+ </context-param>
+
+ <context-param>
+ <description>Facelets debug output</description>
+ <param-name>facelets.DEVELOPMENT</param-name>
+ <param-value>false</param-value>
+ </context-param>
+
+ <!-- A simple JSP to redirect to the basic search page. -->
+ <welcome-file-list>
+ <welcome-file>index.jsp</welcome-file>
+ </welcome-file-list>
+
+ <!--
+ This role list should be changed to include all the relevant roles for your
+ environment.
+ -->
+ <security-role>
+ <role-name>admin</role-name>
+ </security-role>
+ <security-role>
+ <role-name>user</role-name>
+ </security-role>
+
+ <!--
+ Security constraints - optionally customize the role name to require a login
+ before access is allowed. Also, be sure to edit jboss-web.xml to configure
+ the security domain if you are deploying inside JBoss AS.
+ -->
+ <security-constraint>
+ <web-resource-collection>
+ <web-resource-name>Secure Area</web-resource-name>
+ <url-pattern>/app/*</url-pattern>
+ <http-method>GET</http-method>
+ <http-method>POST</http-method>
+ </web-resource-collection>
+ <auth-constraint>
+ <role-name>user</role-name>
+ </auth-constraint>
+ </security-constraint>
+
+ <!-- SOA-P Login page -->
+ <login-config>
+ <auth-method>FORM</auth-method>
+ <form-login-config>
+ <form-login-page>/login.jsp</form-login-page>
+ <form-error-page>/login.jsp?error=1</form-error-page>
+ </form-login-config>
+ </login-config>
+
+ <!-- Login configuration option #1 - use the login page ==>
+ <login-config>
+ <auth-method>FORM</auth-method>
+ <form-login-config>
+ <form-login-page>/ua/login.jsf</form-login-page>
+ <form-error-page>/ua/login.jsf?error=true</form-error-page>
+ </form-login-config>
+ </login-config>
+ <!== Login configuration option #1 -->
+
+ <!-- Login configuration option #2 - use basic auth ==>
+ <login-config>
+ <auth-method>BASIC</auth-method>
+ <realm-name>jBPM Administration Console</realm-name>
+ </login-config>
+ <!== Login configuration option #2 -->
+
+ <!-- Job executor launcher ==>
+ <listener>
+ <description>
+ Starts the job executor on initialization and stops it on destruction.
+ </description>
+ <listener-class>org.jbpm.web.JobExecutorLauncher</listener-class>
+ </listener>
+ <!== Job executor launcher -->
+
+ <listener>
+ <description>Closes the jBPM configuration on destruction, releasing resources.
+ This listener should appear after the job executor launcher,
+ to avoid reopening the configuration.</description>
+ <listener-class>org.jbpm.web.JbpmConfigurationCloser</listener-class>
+ </listener>
+
+ <resource-ref>
+ <description>Logical name of the data source that provides connections to the persistence service.
+ Must match the hibernate.connection.datasource property in the Hibernate
+ configuration file.</description>
+ <res-ref-name>jdbc/JbpmDataSource</res-ref-name>
+ <res-type>javax.sql.DataSource</res-type>
+ <res-auth>Container</res-auth>
+ </resource-ref>
+
+ <resource-ref>
+ <description>Logical name of the factory that provides JMS connections to the message service.
+ Required for processes that contain asynchronous continuations.</description>
+ <res-ref-name>jms/JbpmConnectionFactory</res-ref-name>
+ <res-type>javax.jms.ConnectionFactory</res-type>
+ <res-auth>Container</res-auth>
+ </resource-ref>
+
+ <ejb-local-ref>
+ <description>Link to the local entity bean that implements the scheduler service.
+ Required for processes that contain timers.</description>
+ <ejb-ref-name>ejb/TimerEntityBean</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <local-home>org.jbpm.ejb.LocalTimerEntityHome</local-home>
+ <local>org.jbpm.ejb.LocalTimerEntity</local>
+ </ejb-local-ref>
+
+ <message-destination-ref>
+ <description>The message service sends job messages to the queue referenced here. To ensure
+ this is the same queue from which the JobListenerBean receives messages, the
+ message-destination-link element points to a common logical destination, JobQueue.</description>
+ <message-destination-ref-name>jms/JobQueue</message-destination-ref-name>
+ <message-destination-type>javax.jms.Queue</message-destination-type>
+ <message-destination-usage>Produces</message-destination-usage>
+ <message-destination-link>JobQueue</message-destination-link>
+ </message-destination-ref>
+
+</web-app>
Added: projects/jsf-console/branches/jsf-console-3.2-soa/soa-distribution/resource/jbpm-console/login.jsp
===================================================================
--- projects/jsf-console/branches/jsf-console-3.2-soa/soa-distribution/resource/jbpm-console/login.jsp (rev 0)
+++ projects/jsf-console/branches/jsf-console-3.2-soa/soa-distribution/resource/jbpm-console/login.jsp 2010-08-11 07:09:44 UTC (rev 6570)
@@ -0,0 +1,100 @@
+<%
+ if (request.getRemoteUser() != null) {
+ response.sendRedirect("app/");
+ return;
+ }
+ // System.out.println("PATH: " + request.getRequestURI());
+
+%>
+<html>
+<head>
+ <title>JBoss SOA Login</title>
+
+ <style type="text/css">
+ body {
+ font-family: sans-serif;
+ margin-left: 0;
+ margin-right: 0;
+
+ padding-left: 0;
+ padding-right: 0;
+
+ }
+
+ img {
+ border: 0;
+ }
+
+ #content {
+ padding: 15px;
+ }
+
+ h3 {
+ color: #8c8c8c;
+ }
+
+ a:link, a:visited, a {
+ font-weight: bold;
+ color: #333333;
+ }
+
+ a:hover {
+ color: slategray;
+ }
+
+ #topsep {
+ width: 100%;
+ background: url( '/Gradient.jpg' );
+ }
+
+ #footer {
+ text-align: center;
+ font-size: 10px;
+ }
+
+ </style>
+
+</head>
+<body>
+<a href="/"><img src="/jbpm-console/JBossLogo.jpg" alt="JBoss SOA Platform"/></a>
+
+<div id="topsep"> </div>
+
+<div style="border: 1px solid darkgray; background: #ff8c00; font-weight: bold; padding: 10px; margin: 5px">
+ You must provide security credentials to access this management console.
+</div>
+
+<% if ("1".equals(request.getParameter("error"))) { %>
+<div style="border: 1px solid darkgray; color: white; background: darkred; font-weight: bold; padding: 10px; margin: 5px">
+ Invalid Login/Password. Please Try Again.
+</div>
+<% }%>
+
+<div align="center" style="border: 1px solid darkgray; background-color: gainsboro; font-size: 11px; padding: 15px;">
+ <form name="loginform" method="post" action="j_security_check">
+ <table class="leftmenu">
+ <tbody>
+ <tr class="leftmenu">
+ <th>User Name</th>
+ <td>
+ <input name="j_username" type="text"/>
+ </td>
+ </tr>
+ <tr class="leftmenu">
+ <th>Password</th>
+ <td>
+ <input name="j_password" type="password"/>
+ </td>
+ </tr>
+ <tr class="leftmenu">
+ <th/>
+ <td>
+ <input type="submit" value="Log In"/>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </form>
+</div>
+</body>
+</html>
\ No newline at end of file
Added: projects/jsf-console/branches/jsf-console-3.2-soa/soa-distribution/resource/jbpm-console/web.xml
===================================================================
--- projects/jsf-console/branches/jsf-console-3.2-soa/soa-distribution/resource/jbpm-console/web.xml (rev 0)
+++ projects/jsf-console/branches/jsf-console-3.2-soa/soa-distribution/resource/jbpm-console/web.xml 2010-08-11 07:09:44 UTC (rev 6570)
@@ -0,0 +1,157 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+
+ <servlet>
+ <description>Enable the JSF servlet. See faces-config.xml for Faces-specific configuration.</description>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+
+ <!-- Mapping for all plain pages. -->
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.jsf</url-pattern>
+ </servlet-mapping>
+
+ <!-- This mapping is for the process images. -->
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>/app/pi/*</url-pattern>
+ </servlet-mapping>
+
+ <context-param>
+ <description> Use Documents Saved as *.xhtml </description>
+ <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
+ <param-value>.xhtml</param-value>
+ </context-param>
+
+ <context-param>
+ <description> Facelets debug output </description>
+ <param-name>facelets.DEVELOPMENT</param-name>
+ <param-value>false</param-value>
+ </context-param>
+
+ <!-- A simple JSP to redirect to the basic search page. -->
+ <welcome-file-list>
+ <welcome-file>index.jsp</welcome-file>
+ </welcome-file-list>
+
+ <!--
+ This role list should be changed to include all the relevant roles for your
+ environment.
+ -->
+ <security-role>
+ <role-name>admin</role-name>
+ </security-role>
+ <security-role>
+ <role-name>user</role-name>
+ </security-role>
+
+ <!--
+ Security constraints - optionally customize the role name to require a login
+ before access is allowed. Also, be sure to edit jboss-web.xml to configure
+ the security domain if you are deploying inside JBoss AS.
+ -->
+ <security-constraint>
+ <web-resource-collection>
+ <web-resource-name>Secure Area</web-resource-name>
+ <url-pattern>/app/*</url-pattern>
+ <http-method>GET</http-method>
+ <http-method>POST</http-method>
+ </web-resource-collection>
+ <auth-constraint>
+ <role-name>user</role-name>
+ </auth-constraint>
+ </security-constraint>
+
+ <!-- Example Login page - lists sample users -->
+ <login-config>
+ <auth-method>FORM</auth-method>
+ <form-login-config>
+ <form-login-page>/login.jsp</form-login-page>
+ <form-error-page>/login.jsp?error=1</form-error-page>
+ </form-login-config>
+ </login-config>
+
+ <!-- Login configuration option #1 - use the login page ==>
+ <login-config>
+ <auth-method>FORM</auth-method>
+ <form-login-config>
+ <form-login-page>/ua/login.jsf</form-login-page>
+ <form-error-page>/ua/login.jsf?error=true</form-error-page>
+ </form-login-config>
+ </login-config>
+ <!== Login configuration option #1 -->
+
+ <!-- Login configuration option #2 - use basic auth ==>
+ <login-config>
+ <auth-method>BASIC</auth-method>
+ <realm-name>jBPM Administration Console</realm-name>
+ </login-config>
+ <!== Login configuration option #2 -->
+
+ <!-- Job executor launcher ==>
+ <listener>
+ <description>
+ Starts the job executor on initialization and stops it on destruction.
+ </description>
+ <listener-class>org.jbpm.web.JobExecutorLauncher</listener-class>
+ </listener>
+ <!== Job executor launcher -->
+
+ <!-- listener>
+ <description>
+ <description>Closes the jBPM configuration on destruction, releasing resources.
+ This listener should appear after the job executor launcher,
+ to avoid reopening the configuration.</description>
+ <listener-class>org.jbpm.web.JbpmConfigurationCloser</listener-class>
+ </listener -->
+
+ <!--
+ <resource-ref>
+ <description>Logical name of the data source that provides connections to the persistence service.
+ Must match the hibernate.connection.datasource property in the Hibernate
+ configuration file.</description>
+ <res-ref-name>jdbc/JbpmDataSource</res-ref-name>
+ <res-type>javax.sql.DataSource</res-type>
+ <res-auth>Container</res-auth>
+ </resource-ref>
+ -->
+
+ <!--
+ <resource-ref>
+ <description>Logical name of the factory that provides JMS connections to the message service.
+ Required for processes that contain asynchronous continuations.</description>
+ <res-ref-name>jms/JbpmConnectionFactory</res-ref-name>
+ <res-type>javax.jms.ConnectionFactory</res-type>
+ <res-auth>Container</res-auth>
+ </resource-ref>
+ -->
+
+ <!--
+ <ejb-local-ref>
+ <description>Link to the local entity bean that implements the scheduler service.
+ Required for processes that contain timers.</description>
+ <ejb-ref-name>ejb/TimerEntityBean</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <local-home>org.jbpm.ejb.LocalTimerEntityHome</local-home>
+ <local>org.jbpm.ejb.LocalTimerEntity</local>
+ </ejb-local-ref>
+ -->
+
+ <!--
+ <message-destination-ref>
+ <description>The message service sends job messages to the queue referenced here. To ensure
+ this is the same queue from which the JobListenerBean receives messages, the
+ message-destination-link element points to a common logical destination, JobQueue.</description>
+ <message-destination-ref-name>jms/JobQueue</message-destination-ref-name>
+ <message-destination-type>javax.jms.Queue</message-destination-type>
+ <message-destination-usage>Produces</message-destination-usage>
+ <message-destination-link>JobQueue</message-destination-link>
+ </message-destination-ref>
+ -->
+
+</web-app>
13 years, 10 months
JBoss JBPM SVN: r6569 - in jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution: post-patch and 1 other directory.
by do-not-reply@jboss.org
Author: ryanzhang
Date: 2010-08-11 02:42:58 -0400 (Wed, 11 Aug 2010)
New Revision: 6569
Added:
jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/post-patch/overlay_jsf_console.xml
Modified:
jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/pom.xml
Log:
1)rename soa-distribution module artifact name from soa-jbpm to jbpm-soa, 2)add overlay_jsf_console patch into soa-distribution module
Modified: jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/pom.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/pom.xml 2010-08-11 06:22:58 UTC (rev 6568)
+++ jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/pom.xml 2010-08-11 06:42:58 UTC (rev 6569)
@@ -14,7 +14,7 @@
<modelVersion>4.0.0</modelVersion>
<name>jBPM3- Build distribution for SOA-P </name>
<groupId>org.jbpm.jbpm3</groupId>
- <artifactId>soa-jbpm</artifactId>
+ <artifactId>jbpm-soa</artifactId>
<packaging>pom</packaging>
<!-- Parent -->
Added: jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/post-patch/overlay_jsf_console.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/post-patch/overlay_jsf_console.xml (rev 0)
+++ jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/post-patch/overlay_jsf_console.xml 2010-08-11 06:42:58 UTC (rev 6569)
@@ -0,0 +1,15 @@
+<project name="overlay_jsf_console" default="apply.patch">
+
+ <target name="apply.patch" >
+ <delete>
+ <fileset dir="${module_base_dir}/target/work/jbpm-installed/lib">
+ <include name="jsf-console.war"/>
+ </fileset>
+ </delete>
+ <copy tofile="${module_base_dir}/target/work/jbpm-installed/lib/jsf-console.war" overwrite="yes" >
+ <fileset dir="${module_base_dir}/target/dependency/">
+ <include name="jsf-console*.war"/>
+ </fileset>
+ </copy>
+ </target>
+</project>
13 years, 10 months
JBoss JBPM SVN: r6568 - in projects/jsf-console/branches/jsf-console-3.2-soa: soa-distribution and 1 other directory.
by do-not-reply@jboss.org
Author: ryanzhang
Date: 2010-08-11 02:22:58 -0400 (Wed, 11 Aug 2010)
New Revision: 6568
Added:
projects/jsf-console/branches/jsf-console-3.2-soa/soa-distribution/
Removed:
projects/jsf-console/branches/jsf-console-3.2-soa/soa-distribution/
Modified:
projects/jsf-console/branches/jsf-console-3.2-soa/pom.xml
projects/jsf-console/branches/jsf-console-3.2-soa/soa-distribution/pom.xml
Log:
Update soa profile and rename soa module as soa-distribution, put soa overlay patch into the module
Modified: projects/jsf-console/branches/jsf-console-3.2-soa/pom.xml
===================================================================
--- projects/jsf-console/branches/jsf-console-3.2-soa/pom.xml 2010-08-11 06:19:56 UTC (rev 6567)
+++ projects/jsf-console/branches/jsf-console-3.2-soa/pom.xml 2010-08-11 06:22:58 UTC (rev 6568)
@@ -174,7 +174,7 @@
<profile>
<id>soa</id>
<modules>
- <module>soa</module>
+ <module>soa-distribution</module>
</modules>
</profile>
</profiles>
Copied: projects/jsf-console/branches/jsf-console-3.2-soa/soa-distribution (from rev 6558, projects/jsf-console/branches/jsf-console-3.2-soa/soa)
Modified: projects/jsf-console/branches/jsf-console-3.2-soa/soa-distribution/pom.xml
===================================================================
--- projects/jsf-console/branches/jsf-console-3.2-soa/soa/pom.xml 2010-08-10 08:03:43 UTC (rev 6558)
+++ projects/jsf-console/branches/jsf-console-3.2-soa/soa-distribution/pom.xml 2010-08-11 06:22:58 UTC (rev 6568)
@@ -10,9 +10,9 @@
<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>
- <name>jBPM3 - SOA Overlay</name>
+ <name>jBPM3 - Build SOA-P distribution</name>
<groupId>org.jbpm.jbpm3</groupId>
- <artifactId>soa-webapp</artifactId>
+ <artifactId>jsf-console-soa</artifactId>
<packaging>war</packaging>
<!-- Parent -->
13 years, 10 months
JBoss JBPM SVN: r6567 - jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution.
by do-not-reply@jboss.org
Author: ryanzhang
Date: 2010-08-11 02:19:56 -0400 (Wed, 11 Aug 2010)
New Revision: 6567
Modified:
jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/pom.xml
Log:
Update soa profile, Replace jsf-console with SOA overlay jsf-console
Modified: jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/pom.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/pom.xml 2010-08-11 05:15:33 UTC (rev 6566)
+++ jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/pom.xml 2010-08-11 06:19:56 UTC (rev 6567)
@@ -70,6 +70,24 @@
</artifactItems>
</configuration>
</execution>
+ <execution>
+ <id>cp-jsf-console-soa</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>copy</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.jbpm.jbpm3</groupId>
+ <artifactId>jsf-console</artifactId>
+ <version>3.2.10-SNAPSHOT</version>
+ <classifier>soa</classifier>
+ <type>war</type>
+ </artifactItem>
+ </artifactItems>
+ </configuration>
+ </execution>
</executions>
</plugin>
@@ -79,6 +97,13 @@
<version>1.3</version>
<dependencies>
<dependency>
+ <groupId>org.jbpm.jbpm3</groupId>
+ <artifactId>jsf-console</artifactId>
+ <version>3.2.10-SNAPSHOT</version>
+ <classifier>soa</classifier>
+ <type>war</type>
+ </dependency>
+ <dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
<version>1.7.1</version>
@@ -110,11 +135,11 @@
<phase>package</phase>
<configuration>
<tasks>
- <ant antfile="build-common.xml" target="soa.routine.build" dir="${project.basedir}" inheritAll="false">
- <property name="module_base_dir" value="${project.basedir}"/>
- <property name="module_build_finalName" value="${project.build.finalName}"/>
- <property name="project.version" value="${project.version}"/>
- <property name="groovy.path" value="${maven.dependency.org.codehaus.groovy.groovy-all.jar.path}" />
+ <ant antfile="build-common.xml" target="soa.routine.build" dir="${project.basedir}" inheritAll="false">
+ <property name="module_base_dir" value="${project.basedir}"/>
+ <property name="module_build_finalName" value="${project.build.finalName}"/>
+ <property name="project.version" value="${project.version}"/>
+ <property name="groovy.path" value="${maven.dependency.org.codehaus.groovy.groovy-all.jar.path}" />
</ant>
</tasks>
</configuration>
13 years, 10 months
JBoss JBPM SVN: r6566 - in jbpm3/branches/jbpm-3.2-soa: modules and 4 other directories.
by do-not-reply@jboss.org
Author: ryanzhang
Date: 2010-08-11 01:15:33 -0400 (Wed, 11 Aug 2010)
New Revision: 6566
Added:
jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/
jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/build-common.xml
jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/build.xml
jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/pom.xml
jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/post-patch/
jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/post-patch/overlay_database_sql.xml
jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/post-patch/overlay_hibernate_conf.xml
jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/post-patch/remove_uninstaller.xml
jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/post-patch/remove_unneeded_docs.xml
jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/resource/
jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/resource/autosetup.xml
Removed:
jbpm3/branches/jbpm-3.2-soa/modules/prod-soa-dist/
Modified:
jbpm3/branches/jbpm-3.2-soa/modules/distribution/pom.xml
jbpm3/branches/jbpm-3.2-soa/pom.xml
Log:
Update soa profile and add soa-distribution module in order to put SOA-P productization patches into the project
Modified: jbpm3/branches/jbpm-3.2-soa/modules/distribution/pom.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/distribution/pom.xml 2010-08-11 00:10:54 UTC (rev 6565)
+++ jbpm3/branches/jbpm-3.2-soa/modules/distribution/pom.xml 2010-08-11 05:15:33 UTC (rev 6566)
@@ -234,41 +234,4 @@
</plugins>
</build>
- <profiles>
- <profile>
- <id>soa</id>
- <dependencies>
- <dependency>
- <groupId>org.jbpm.jbpm3</groupId>
- <artifactId>jsf-console</artifactId>
- <classifier>soa</classifier>
- <type>war</type>
- </dependency>
- </dependencies>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <id>soa-console</id>
- <phase>package</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <tasks>
- <!-- replace jsf-console.war with the SOA platform build -->
- <property name="project.build.assembly.lib" value="${assemblyDirectory}/lib" />
- <copy file="${project.build.assembly.lib}/jsf-console-soa.war"
- tofile="${project.build.assembly.lib}/jsf-console.war" overwrite="yes" />
- </tasks>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
</project>
Copied: jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution (from rev 6565, jbpm3/branches/jbpm-3.2-soa/modules/prod-soa-dist)
Added: jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/build-common.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/build-common.xml (rev 0)
+++ jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/build-common.xml 2010-08-11 05:15:33 UTC (rev 6566)
@@ -0,0 +1,103 @@
+<!-- Common routines for SOA builders
+ ++ $Id: build-common.xml 6165 2010-07-27 11:37:02Z rzhang(a)REDHAT.COM $
+ ++
+ -->
+<project name="SOA common routines">
+ <taskdef name="groovy" classname="org.codehaus.groovy.ant.Groovy" classpath="${groovy.path}"/>
+ <!-- Routine build
+ ++ Call with parameters:
+ ++ module
+ -->
+ <target name="soa.routine.build">
+ <groovy>
+ def ant=new AntBuilder()
+ <!-- build -->
+ ant.ant(antfile:"build.xml", dir:properties['module_base_dir'], target:"build"){
+ property(name:"module_base_dir", value:properties['module_base_dir'])
+ property(name:"project.version", value:properties['project.version'])
+ }
+ <!-- post-patch -->
+ println("hello, post-patch")
+ f=new File(properties['module_base_dir'] + "/post-patch")
+ if (f.exists()){
+ f.eachFileMatch(~/.*\.xml/){
+ println "patch:"+it
+ ant.ant(antfile:it, target:"apply.patch"){
+ property(name:"module_base_dir", value:properties['module_base_dir'])
+ }
+ }
+ }
+
+ <!-- assemble-->
+ ant.ant(antfile:"build.xml", dir:properties['module_base_dir'], target:"assemble"){
+ property(name:"module_base_dir", value:properties['module_base_dir'])
+ property(name:"module_build_finalName", value:properties['module_build_finalName'])
+ property(name:"project.version", value:properties['project.version'])
+ }
+ </groovy>
+ </target>
+
+ <!-- Place version settings in run.jar
+ ++ Call with parameters:
+ ++ run_jar
+ ++ resource_dir
+ ++ version.major
+ ++ version.minor
+ ++ version.revision
+ ++ version.designation
+ ++ build_version
+ -->
+ <target name="version.stamp" >
+ <!-- See SOA-911 for "Implementation-Version:" details" -->
+ <tstamp>
+ <format property="build-day" pattern="MMMM d yyyy" />
+ </tstamp>
+ <property name="tmp_run_jar_dir" location="${module_work_dir}/jar" />
+ <mkdir dir="${tmp_run_jar_dir}" />
+ <unzip src="${run_jar}" dest="${tmp_run_jar_dir}" />
+ <delete file="${tmp_run_jar_dir}/org/jboss/version.properties" />
+ <delete file="${tmp_run_jar_dir}/META-INF/MANIFEST.MF" />
+ <delete file="${tmp_run_jar_dir}/MANIFEST.MF" />
+
+ <copy todir="${module_work_dir}">
+ <fileset dir="${resource_dir}" includes="version.properties,MANIFEST.MF" />
+ <filterset>
+ <filter token="version.major" value="${version.major}" />
+ <filter token="version.minor" value="${version.minor}" />
+ <filter token="version.revision" value="${version.revision}" />
+ <filter token="version.designation" value="${version.designation}" />
+ <filter token="build_version" value="${build_version}" />
+ <filter token="cvstag" value="${build_version}_SOA" />
+ <filter token="build-date" value="${DSTAMP}" />
+ <filter token="build-time" value="${TSTAMP}" />
+ <filter token="build-day" value="${build-day}" />
+ <filter token="java.version" value="${java.version}" />
+ <filter token="java.vendor" value="${java.vendor}" />
+ <filter token="java.vm.specification.version" value="${java.vm.specification.version}" />
+ <filter token="java.vm.version" value="${java.vm.version}" />
+ <filter token="java.vm.name" value="${java.vm.name}" />
+ <filter token="java.vm.info" value="${java.vm.info}" />
+ <filter token="java.specification.version" value="${java.specification.version}" />
+ <filter token="java.class.version" value="${java.class.version}" />
+ <filter token="os.name" value="${os.name}" />
+ <filter token="os.arch" value="${os.arch}" />
+ <filter token="os.version" value="${os.version}" />
+ </filterset>
+ </copy>
+
+ <move file="${module_work_dir}/version.properties" todir="${tmp_run_jar_dir}/org/jboss" />
+ <jar destfile="${module_work_dir}/run.jar" basedir="${tmp_run_jar_dir}"
+ manifest="${module_work_dir}/MANIFEST.MF" />
+
+ <!-- now produce one for the standalone -->
+ <replace file="${module_work_dir}/MANIFEST.MF/" token="SOA"
+ value="SOA_STANDALONE" />
+ <replace file="${tmp_run_jar_dir}/org/jboss/version.properties"
+ token="SOA" value="SOA_STANDALONE" />
+ <jar destfile="${module_work_dir}/standalone-run.jar" basedir="${tmp_run_jar_dir}"
+ manifest="${module_work_dir}/MANIFEST.MF" />
+
+ <delete dir="${tmp_run_jar_dir}" />
+ <delete file="${module_work_dir}/MANIFEST.MF" />
+ </target>
+</project>
Added: jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/build.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/build.xml (rev 0)
+++ jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/build.xml 2010-08-11 05:15:33 UTC (rev 6566)
@@ -0,0 +1,75 @@
+<project name="jBPM SOA Sub-Builder" default="default">
+
+ <!--
+ !! Define convenience variables for this build file here. Avoid duplicate properties existed in dependencies!
+ !!-->
+ <property name="jbpm_install_path" location="${module_base_dir}/target/work/jbpm-installed"/>
+
+ <target name="build">
+ <mkdir dir="${jbpm_install_path}"/>
+ <mkdir dir="${module_base_dir}/target/work/jboss"/>
+
+ <copy todir="${module_base_dir}/../distribution/target/" overwrite="true">
+ <fileset dir="${module_base_dir}/resource" includes="autosetup.xml"/>
+ <filterset>
+ <filter token="JBPM_INSTALL_PATH" value="${jbpm_install_path}"/>
+ <filter token="JBOSS_INSTALL_PATH" value="${module_base_dir}/target/work/jboss"/>
+ </filterset>
+ </copy>
+
+ <java jar="${module_base_dir}/../distribution/target/jbpm-distribution-${project.version}-installer.jar"
+ fork="true">
+ <arg value="${module_base_dir}/../distribution/target/autosetup.xml"/>
+ </java>
+
+ <copy todir="${module_base_dir}/target/work/jbpm-jpdl" overwrite="true">
+ <fileset dir="${jbpm_install_path}"/>
+ </copy>
+
+ <copy todir="${module_base_dir}/target/work/jbpm-jpdl/deploy" overwrite="true">
+ <fileset dir="${module_base_dir}/target/work/jboss"/>
+ </copy>
+ </target>
+
+ <target name="assemble">
+ <copy todir="${module_base_dir}/target/dist/jbpm-config" overwrite="true">
+ <fileset dir="${jbpm_install_path}/lib">
+ <include name="jbpm-jpdl.jar"/>
+ <include name="jbpm-identity.jar"/>
+ </fileset>
+ <fileset dir="${jbpm_install_path}/config">
+ <include name="jbpm.mail.templates.xml"/>
+ <include name="hibernate.cfg.xml"/>
+ </fileset>
+ </copy>
+
+ <copy todir="${module_base_dir}/target/dist/jbpm-jpdl" overwrite="true">
+ <fileset dir="${module_base_dir}/target/work/jbpm-jpdl"/>
+ </copy>
+
+ <copy todir="${module_base_dir}/target/dist/jbpm-sql" overwrite="true">
+ <fileset dir="${jbpm_install_path}/database">
+ <include name="*.sql"/>
+ <exclude name="*.drop.sql"/>
+ </fileset>
+
+ </copy>
+ <!-- src is in the jbpm-jpdl.zip so don't need to do anything for src -->
+ <!--
+ <copy file="${soa_work_dir}/jbpm/dist/jbpm-jpdl.zip"
+ tofile="jbpm-jpdl-soa.${build_version}.zip"/>
+ <checksum file="jbpm-jpdl-soa.${build_version}.zip"/>
+ -->
+ <!-- unpack the javadocs -->
+ <mkdir dir="${module_base_dir}/target/dist/javadocs"/>
+ <unzip src="${jbpm_install_path}/docs/jbpm-enterprise-javadoc.jar"
+ dest="${module_base_dir}/target/dist/javadocs/enterprise"/>
+ <unzip src="${jbpm_install_path}/docs/jbpm-identity-javadoc.jar" dest="${module_base_dir}/target/dist/javadocs/identity"/>
+ <unzip src="${jbpm_install_path}/docs/jbpm-jpdl-javadoc.jar" dest="${module_base_dir}/target/dist/javadocs/jbpm-jpdl"/>
+
+ <zip destfile="${module_base_dir}/target/${module_build_finalName}.zip" >
+ <zipfileset dir="${module_base_dir}/target/dist" prefix="jbpm" includes="**/*" />
+ </zip>
+ </target>
+
+</project>
Added: jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/pom.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/pom.xml (rev 0)
+++ jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/pom.xml 2010-08-11 05:15:33 UTC (rev 6566)
@@ -0,0 +1,151 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ====================================================================== -->
+<!-- jBPM: Workflow in Java -->
+<!-- -->
+<!-- Distributable under LGPL license. -->
+<!-- See terms of license at http://www.gnu.org. -->
+<!-- ====================================================================== -->
+
+<!-- $Id: pom.xml 7412 2008-06-06 13:42:30Z thomas.diesler(a)jboss.com $ -->
+
+<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>
+ <name>jBPM3- Build distribution for SOA-P </name>
+ <groupId>org.jbpm.jbpm3</groupId>
+ <artifactId>soa-jbpm</artifactId>
+ <packaging>pom</packaging>
+
+ <!-- Parent -->
+ <parent>
+ <groupId>org.jbpm.jbpm3</groupId>
+ <artifactId>jbpm</artifactId>
+ <version>3.2.10-SNAPSHOT</version>
+ <relativePath>../../pom.xml</relativePath>
+ </parent>
+
+ <properties>
+ <soa_common_build_src.groupId>org.jboss.jbosssoa</soa_common_build_src.groupId>
+ <soa_common_build_src.artifactId>soa-common-build-src</soa_common_build_src.artifactId>
+ <soa_common_build_src.version>1.0.0</soa_common_build_src.version>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>${soa_common_build_src.groupId}</groupId>
+ <artifactId>${soa_common_build_src.artifactId}</artifactId>
+ <version>${soa_common_build_src.version}</version>
+ <type>zip</type>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.groovy</groupId>
+ <artifactId>groovy-all</artifactId>
+ <version>1.7.0</version>
+ </dependency>
+ </dependencies>
+
+ <!-- Plugins -->
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>unpack-soa-common-build-src</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>unpack</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>${project.basedir}</outputDirectory>
+ <artifactItems>
+ <artifactItem>
+ <groupId>${soa_common_build_src.groupId}</groupId>
+ <artifactId>${soa_common_build_src.artifactId}</artifactId>
+ <version>${soa_common_build_src.version}</version>
+ <type>zip</type>
+ </artifactItem>
+ </artifactItems>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.3</version>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant</artifactId>
+ <version>1.7.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant-nodeps</artifactId>
+ <version>1.7.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant-launcher</artifactId>
+ <version>1.7.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant-trax</artifactId>
+ <version>1.7.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.groovy</groupId>
+ <artifactId>groovy-all</artifactId>
+ <version>1.7.0</version>
+ </dependency>
+ </dependencies>
+ <executions>
+ <execution>
+ <id>SOA-P build process</id>
+ <phase>package</phase>
+ <configuration>
+ <tasks>
+ <ant antfile="build-common.xml" target="soa.routine.build" dir="${project.basedir}" inheritAll="false">
+ <property name="module_base_dir" value="${project.basedir}"/>
+ <property name="module_build_finalName" value="${project.build.finalName}"/>
+ <property name="project.version" value="${project.version}"/>
+ <property name="groovy.path" value="${maven.dependency.org.codehaus.groovy.groovy-all.jar.path}" />
+ </ant>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <version>1.2</version>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>attach-artifact</goal>
+ </goals>
+ <configuration>
+ <artifacts>
+ <artifact>
+ <file>${project.build.directory}/${project.build.finalName}.zip</file>
+ <type>zip</type>
+ </artifact>
+ </artifacts>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
Added: jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/post-patch/overlay_database_sql.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/post-patch/overlay_database_sql.xml (rev 0)
+++ jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/post-patch/overlay_database_sql.xml 2010-08-11 05:15:33 UTC (rev 6566)
@@ -0,0 +1,14 @@
+<project name="overlay_database_sql" default="apply.patch">
+
+ <target name="apply.patch" >
+ <delete>
+ <fileset dir="${module_base_dir}/target/work/jbpm-installed/database">
+ <include name="**/jbpm.jpdl.*.update322.sql"/>
+ </fileset>
+ <fileset dir="${module_base_dir}/target/work/jbpm-jpdl/database">
+ <include name="**/jbpm.jpdl.*.update322.sql"/>
+ </fileset>
+ </delete>
+
+ </target>
+</project>
Added: jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/post-patch/overlay_hibernate_conf.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/post-patch/overlay_hibernate_conf.xml (rev 0)
+++ jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/post-patch/overlay_hibernate_conf.xml 2010-08-11 05:15:33 UTC (rev 6566)
@@ -0,0 +1,43 @@
+<project name="overlay_hibernate_conf" default="apply.patch">
+
+ <target name="apply.patch" >
+ <!-- SOA platform version -->
+ <replace file="${module_base_dir}/target/work/jbpm-installed/config/hibernate.cfg.xml">
+ <replacefilter token="JDBC connection properties (begin) -->"
+ value="JDBC connection properties (begin) ==="/>
+ <replacefilter token="<!-- JDBC connection properties (end)"
+ value="==== JDBC connection properties (end)"/>
+ <replacefilter token=" DataSource properties (begin) ==="
+ value=" DataSource properties (begin) -->"/>
+ <replacefilter token="java:comp/env/jdbc/JbpmDataSource"
+ value="java:/JbpmDS"/>
+ <replacefilter token="==== DataSource properties (end)"
+ value="<!-- DataSource properties (end)"/>
+
+ <!-- "JTA transaction properties (begin)" is handled below -->
+ <replacefilter token="==== JTA transaction properties (end)"
+ value="<!-- JTA transaction properties (end)"/>
+ <replacefilter token="Automatic schema creation (begin) -->"
+ value="Automatic schema creation (begin) ==="/>
+ <replacefilter token="<!-- Automatic schema creation (end)"
+ value="==== Automatic schema creation (end)"/>
+ </replace>
+
+ <!-- SOA-959 - set name of transaction -->
+ <replace file="${module_base_dir}/target/work/jbpm-installed/config/hibernate.cfg.xml">
+ <replacetoken><![CDATA[JTA transaction properties (begin) ===]]></replacetoken>
+ <replacevalue><![CDATA[JTA transaction properties (begin) -->
+ <property name="jta.UserTransaction">UserTransaction</property>
+ <property name="hibernate.current_session_context_class">jta</property>]]></replacevalue>
+ </replace>
+
+ <!-- jBPM framework version -->
+ <!-- SOA-959 - set name of transaction -->
+ <replace file="${module_base_dir}/target/work/jbpm-jpdl/config/hibernate.cfg.xml">
+ <replacetoken><![CDATA[JTA transaction properties (begin) ===]]></replacetoken>
+ <replacevalue><![CDATA[JTA transaction properties (begin) ===
+ <property name="jta.UserTransaction">UserTransaction</property>
+ <property name="hibernate.current_session_context_class">jta</property>]]></replacevalue>
+ </replace>
+</target>
+</project>
Added: jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/post-patch/remove_uninstaller.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/post-patch/remove_uninstaller.xml (rev 0)
+++ jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/post-patch/remove_uninstaller.xml 2010-08-11 05:15:33 UTC (rev 6566)
@@ -0,0 +1,7 @@
+<project name="remove_uninstall" default="apply.patch">
+ <target name="apply.patch" >
+ <!-- Remove redundant installer leftovers -->
+ <delete dir="${module_base_dir}/target/work/jbpm-jpdl/Uninstaller"/>
+ <delete file="${module_base_dir}/target/work/jbpm-jpdl/.installationinformation"/>
+ </target>
+</project>
Added: jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/post-patch/remove_unneeded_docs.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/post-patch/remove_unneeded_docs.xml (rev 0)
+++ jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/post-patch/remove_unneeded_docs.xml 2010-08-11 05:15:33 UTC (rev 6566)
@@ -0,0 +1,9 @@
+<project name="patchname" default="apply.patch">
+
+ <property name="package_root" value="${module_base_dir}/target/work/jbpm-jpdl" />
+ <target name="apply.patch">
+ <!-- SOA-1585 -->
+ <delete dir="${package_root}/docs"/>
+
+ </target>
+</project>
Added: jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/resource/autosetup.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/resource/autosetup.xml (rev 0)
+++ jbpm3/branches/jbpm-3.2-soa/modules/soa-distribution/resource/autosetup.xml 2010-08-11 05:15:33 UTC (rev 6566)
@@ -0,0 +1,33 @@
+<AutomatedInstallation langpack="eng">
+ <com.izforge.izpack.panels.HelloPanel />
+ <com.izforge.izpack.panels.TargetPanel>
+ <installpath>@JBPM_INSTALL_PATH@</installpath>
+ </com.izforge.izpack.panels.TargetPanel>
+ <com.izforge.izpack.panels.TreePacksPanel>
+ <pack name="jBPM3 Standalone" index="0" selected="true"/>
+ <pack name="jBPM3 JBoss Integration" index="1" selected="true"/>
+ <pack name="JSF-Console" index="2" selected="true"/>
+ <pack name="Optional Components" index="3" selected="false"/>
+ <pack name="Download JBoss-5.0.0" index="4" selected="false"/>
+ <pack name="Download Eclipse-3.4.0" index="5" selected="false"/>
+ </com.izforge.izpack.panels.TreePacksPanel>
+ <com.izforge.izpack.panels.UserInputPanel>
+ <userInput>
+ <entry key="jbossTargetServer" value="default" />
+ <entry key="jbossSelection" value="jboss423" />
+ </userInput>
+ </com.izforge.izpack.panels.UserInputPanel>
+ <com.izforge.izpack.panels.UserInputPanel>
+ <userInput>
+ <entry key="dbSelection" value="hsqldb"/>
+ </userInput>
+ </com.izforge.izpack.panels.UserInputPanel>
+ <com.izforge.izpack.panels.UserInputPanel>
+ <userInput>
+ <entry key="jbossInstallPath" value="@JBOSS_INSTALL_PATH@" />
+ </userInput>
+ </com.izforge.izpack.panels.UserInputPanel>
+ <com.izforge.izpack.panels.SummaryPanel />
+ <com.izforge.izpack.panels.InstallPanel />
+ <com.izforge.izpack.panels.FinishPanel />
+</AutomatedInstallation>
Modified: jbpm3/branches/jbpm-3.2-soa/pom.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/pom.xml 2010-08-11 00:10:54 UTC (rev 6565)
+++ jbpm3/branches/jbpm-3.2-soa/pom.xml 2010-08-11 05:15:33 UTC (rev 6566)
@@ -734,5 +734,44 @@
</repository>
</repositories>
</profile>
- </profiles>
+
+ <!--
+ Name: SOA
+ Descr: For SOA-P productization
+ -->
+ <profile>
+ <id>soa</id>
+ <modules>
+ <module>modules/db</module>
+ <module>modules/userguide</module>
+ <module>modules/distribution</module>
+ <module>modules/soa-distribution</module>
+ </modules>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <configuration>
+ <quiet>true</quiet>
+ </configuration>
+ <executions>
+ <execution>
+ <id>attach-javadocs</id>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skipTests>true</skipTests>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ </profiles>
</project>
13 years, 10 months