JBoss JBPM SVN: r6858 - jbpm3/branches/jbpm-3.2-soa/ci.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2010-12-02 20:06:53 -0500 (Thu, 02 Dec 2010)
New Revision: 6858
Modified:
jbpm3/branches/jbpm-3.2-soa/ci/container.sh
jbpm3/branches/jbpm-3.2-soa/ci/standalone.sh
Log:
remove JAVA_HOME switch commands from standalone.sh, JDK 1.4.2 is enough to run maven test goal;
reintroduce surefire.jvm.args property to container.sh due to OOMEs in Hudson build
Modified: jbpm3/branches/jbpm-3.2-soa/ci/container.sh
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/ci/container.sh 2010-12-02 04:35:32 UTC (rev 6857)
+++ jbpm3/branches/jbpm-3.2-soa/ci/container.sh 2010-12-03 01:06:53 UTC (rev 6858)
@@ -63,7 +63,7 @@
[ -z $MAVEN_SETTINGS ] && MAVEN_SETTINGS=ci/settings-qa.xml
# Display Maven version
-mvn -v
+mvn -s $MAVEN_SETTINGS -v
# Determine jBPM version
mvn -s $MAVEN_SETTINGS -Dexpression=project.version help:evaluate > $WORKSPACE/version.txt
@@ -147,25 +147,30 @@
# BEGIN section taken from run.sh
# Force IPv4 on Linux systems since IPv6 doesn't work correctly with jdk5 and lower
-JAVA_OPTS="-Djava.net.preferIPv4Stack=true"
+JAVA_OPTS="$JAVA_OPTS -Djava.net.preferIPv4Stack=true"
# Setup the classpath
runjar="$JBOSS_HOME/bin/run.jar"
if [ ! -f "$runjar" ]; then
die "Missing required file: $runjar"
fi
-JBOSS_CLASSPATH="$runjar"
+JBOSS_BOOT_CLASSPATH="$runjar"
+if [ -z "$JBOSS_CLASSPATH" ]; then
+ JBOSS_CLASSPATH="$JBOSS_BOOT_CLASSPATH"
+else
+ JBOSS_CLASSPATH="$JBOSS_CLASSPATH:$JBOSS_BOOT_CLASSPATH"
+fi
+
# Setup JBoss specific properties
JAVA_OPTS="-Dprogram.name=$PROGNAME $JAVA_OPTS"
-# Setup the java endorsed dirs
-JBOSS_ENDORSED_DIRS="$JBOSS_HOME/lib/endorsed"
-
# Execute the JVM in the background
-$JAVA $JAVA_OPTS -Djava.endorsed.dirs="$JBOSS_ENDORSED_DIRS" -classpath "$JBOSS_CLASSPATH" \
- org.jboss.Main -b $MYTESTIP_1 -c $JBOSS_SERVER -g jbpm3-$CONTAINER-$DATABASE -u $MCAST_ADDR \
- &> /dev/null &
+$JAVA $JAVA_OPTS \
+ -Djava.endorsed.dirs="$JBOSS_HOME/lib/endorsed" \
+ -classpath "$JBOSS_CLASSPATH" \
+ org.jboss.Main -b $MYTESTIP_1 -c $JBOSS_SERVER \
+ -g jbpm3-$CONTAINER-$DATABASE -u $MCAST_ADDR &> /dev/null &
JBOSS_PID=$!
# END section adapted from run.sh
@@ -189,7 +194,7 @@
# Run enterprise test suite
mvn -f enterprise/pom.xml -s $MAVEN_SETTINGS -Djboss.bind.address=$MYTESTIP_1 \
- verify | tee $WORKSPACE/tests.log
+ -Dsurefire.jvm.args=-Xmx256m integration-test | tee $WORKSPACE/tests.log
# Stop JBoss AS
$JBOSS_HOME/bin/shutdown.sh -s jnp://$MYTESTIP_1:1099 -S
Modified: jbpm3/branches/jbpm-3.2-soa/ci/standalone.sh
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/ci/standalone.sh 2010-12-02 04:35:32 UTC (rev 6857)
+++ jbpm3/branches/jbpm-3.2-soa/ci/standalone.sh 2010-12-03 01:06:53 UTC (rev 6858)
@@ -4,30 +4,16 @@
#
# Environment variables
# JAVA_HOME JDK location
-# JAVA_15_HOME JDK 1.5 location; required if JAVA_HOME points to JDK 1.4
# DATABASE one of db2, hsqldb, mssql, mysql, oracle, postgresql
# MAVEN_SETTINGS Maven settings file; optional, defaults to ci/settings-qa.xml
-# Determine Java platform version
-JAVA=$JAVA_HOME/bin/java
-JAVA_VERSION=`$JAVA -version 2>&1 | grep version | awk '{ print substr($3, 2, 3); }'`
-
-if [ $JAVA_VERSION = 1.4 ]; then
- ORIG_JAVA_HOME=$JAVA_HOME
- JAVA=$JAVA_15_HOME/bin/java
- export JAVA_HOME=$JAVA_15_HOME
-else
- ORIG_JAVA_HOME=$JAVA_HOME
-fi
-
# Set up Maven
-export MAVEN_OPTS="-Ddatabase=$DATABASE -Xms16m -Xmx256m"
[ -z $MAVEN_SETTINGS ] && MAVEN_SETTINGS=ci/settings-qa.xml
+export MAVEN_OPTS="-Ddatabase=$DATABASE -Xms16m -Xmx256m"
# Display Maven version
-mvn -v
+mvn -s $MAVEN_SETTINGS -v
# Run standalone test suite
-export JAVA_HOME=$ORIG_JAVA_HOME
-mvn -U -s $MAVEN_SETTINGS -Dsurefire.jvm.args="-Xms64m -Xmx256m" \
- -Dmaven.test.failure.ignore=true clean test
+mvn -s $MAVEN_SETTINGS -U -Dsurefire.jvm.args=-Xmx256m \
+ -Dmaven.test.failure.ignore=true clean test
13 years, 5 months
JBoss JBPM SVN: r6857 - jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/job/executor.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2010-12-01 23:35:32 -0500 (Wed, 01 Dec 2010)
New Revision: 6857
Modified:
jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/job/executor/DispatcherThread.java
jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/job/executor/JobExecutorThread.java
Log:
initialize local variables in various JobExecutorThread and DispatcherThread methods to work around bug in jdk 1.4 bytecode verifier;
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4381996
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/job/executor/DispatcherThread.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/job/executor/DispatcherThread.java 2010-12-02 01:48:28 UTC (rev 6856)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/job/executor/DispatcherThread.java 2010-12-02 04:35:32 UTC (rev 6857)
@@ -98,33 +98,34 @@
}
private Job acquireJob() {
+ Job job = null;
boolean debug = log.isDebugEnabled();
- Job job;
// acquire job executor's monitor before creating context and allocating resources
synchronized (jobExecutor) {
JbpmContext jbpmContext = jobExecutor.getJbpmConfiguration().createJbpmContext();
try {
// look for available job
- job = jbpmContext.getJobSession().getFirstAcquirableJob(null);
+ Job firstJob = jbpmContext.getJobSession().getFirstAcquirableJob(null);
// is there a job?
- if (job != null) {
+ if (firstJob != null) {
// lock job
- job.setLockOwner(getName());
- job.setLockTime(new Date());
+ firstJob.setLockOwner(getName());
+ firstJob.setLockTime(new Date());
// has job failed previously?
- if (job.getException() != null) {
+ if (firstJob.getException() != null) {
// decrease retry count
- int retries = job.getRetries() - 1;
- job.setRetries(retries);
+ int retries = firstJob.getRetries() - 1;
+ firstJob.setRetries(retries);
if (debug) log.debug(job + " has " + retries + " retries remaining");
}
- if (debug) log.debug("acquired " + job);
+ // deliver result
+ if (debug) log.debug("acquired " + firstJob);
+ job = firstJob;
}
else if (debug) log.debug("no acquirable job found");
}
catch (RuntimeException e) {
jbpmContext.setRollbackOnly();
- job = null;
if (debug) log.debug("failed to acquire job", e);
}
catch (Error e) {
@@ -194,21 +195,17 @@
}
private Date getNextDueDate() {
- Date nextDueDate;
+ Date nextDueDate = null;
JbpmContext jbpmContext = jobExecutor.getJbpmConfiguration().createJbpmContext();
try {
Job job = jbpmContext.getJobSession().getFirstDueJob(null, null);
if (job != null) {
nextDueDate = job.getDueDate();
}
- else {
- nextDueDate = null;
- if (log.isDebugEnabled()) log.debug("no due job found");
- }
+ else if (log.isDebugEnabled()) log.debug("no due job found");
}
catch (RuntimeException e) {
jbpmContext.setRollbackOnly();
- nextDueDate = null;
if (log.isDebugEnabled()) log.debug("failed to determine next due date", e);
}
catch (Error e) {
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/job/executor/JobExecutorThread.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/job/executor/JobExecutorThread.java 2010-12-02 01:48:28 UTC (rev 6856)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/job/executor/JobExecutorThread.java 2010-12-02 04:35:32 UTC (rev 6857)
@@ -6,6 +6,7 @@
import java.util.Collections;
import java.util.Date;
import java.util.Iterator;
+import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -65,7 +66,7 @@
/** @deprecated call {@link #acquireJob()} instead **/
protected Collection acquireJobs() {
- Collection jobs;
+ Collection jobs = Collections.EMPTY_LIST;
boolean debug = log.isDebugEnabled();
JbpmContext jbpmContext = jobExecutor.getJbpmConfiguration().createJbpmContext();
try {
@@ -79,33 +80,35 @@
if (firstJob.isExclusive()) {
// find other exclusive jobs
ProcessInstance processInstance = firstJob.getProcessInstance();
- jobs = jobSession.findExclusiveJobs(lockOwner, processInstance);
- if (debug) log.debug("acquiring exclusive " + jobs + " for " + processInstance);
+ List exclusiveJobs = jobSession.findExclusiveJobs(lockOwner, processInstance);
+
+ if (debug) log.debug("acquiring " + exclusiveJobs + " for " + processInstance);
+ Date lockTime = new Date();
+ for (Iterator i = exclusiveJobs.iterator(); i.hasNext();) {
+ Job job = (Job) i.next();
+ job.setLockOwner(lockOwner);
+ job.setLockTime(lockTime);
+ }
+
+ // deliver result
+ if (debug) log.debug("acquired " + exclusiveJobs);
+ jobs = exclusiveJobs;
}
else {
- jobs = Collections.singletonList(firstJob);
if (debug) log.debug("acquiring " + firstJob);
- }
+ firstJob.setLockOwner(lockOwner);
+ firstJob.setLockTime(new Date());
- // acquire jobs
- Date lockTime = new Date();
- for (Iterator i = jobs.iterator(); i.hasNext();) {
- // lock job
- Job job = (Job) i.next();
- job.setLockOwner(lockOwner);
- job.setLockTime(lockTime);
+ // deliver result
+ if (debug) log.debug("acquired " + firstJob);
+ jobs = Collections.singletonList(firstJob);
}
- if (debug) log.debug("acquired " + jobs);
}
- else {
- jobs = Collections.EMPTY_LIST;
- if (debug) log.debug("no acquirable job found");
- }
+ else if (debug) log.debug("no acquirable job found");
}
catch (RuntimeException e) {
jbpmContext.setRollbackOnly();
if (debug) log.debug("failed to acquire jobs", e);
- jobs = Collections.EMPTY_LIST;
}
catch (Error e) {
jbpmContext.setRollbackOnly();
@@ -257,7 +260,7 @@
/** @deprecated moved to {@link DispatcherThread} */
protected Date getNextDueDate() {
- Date nextDueDate;
+ Date nextDueDate = null;
JbpmContext jbpmContext = jobExecutor.getJbpmConfiguration().createJbpmContext();
try {
String lockOwner = getName();
@@ -267,14 +270,10 @@
jobExecutor.addMonitoredJobId(lockOwner, job.getId());
nextDueDate = job.getDueDate();
}
- else {
- nextDueDate = null;
- if (log.isDebugEnabled()) log.debug("no due job found");
- }
+ else if (log.isDebugEnabled()) log.debug("no due job found");
}
catch (RuntimeException e) {
jbpmContext.setRollbackOnly();
- nextDueDate = null;
if (log.isDebugEnabled()) log.debug("failed to determine next due date", e);
}
catch (Error e) {
13 years, 5 months
JBoss JBPM SVN: r6856 - projects/jsf-console/branches/jsf-console-3.2-soa/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2010-12-01 20:48:28 -0500 (Wed, 01 Dec 2010)
New Revision: 6856
Modified:
projects/jsf-console/branches/jsf-console-3.2-soa/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/GetProcessLogsActionListener.java
projects/jsf-console/branches/jsf-console-3.2-soa/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/ListJobsActionListener.java
Log:
fix last warnings about generics in jbpm4jsf
Modified: projects/jsf-console/branches/jsf-console-3.2-soa/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/GetProcessLogsActionListener.java
===================================================================
--- projects/jsf-console/branches/jsf-console-3.2-soa/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/GetProcessLogsActionListener.java 2010-12-02 01:32:15 UTC (rev 6855)
+++ projects/jsf-console/branches/jsf-console-3.2-soa/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/GetProcessLogsActionListener.java 2010-12-02 01:48:28 UTC (rev 6856)
@@ -37,9 +37,6 @@
import javax.faces.context.FacesContext;
import javax.faces.event.ActionEvent;
-/**
- *
- */
public final class GetProcessLogsActionListener implements JbpmActionListener {
private final ValueExpression processInstanceExpression;
private final ValueExpression typeExpression;
@@ -89,7 +86,6 @@
return "getProcessLogs";
}
- @SuppressWarnings ({"unchecked"})
public void handleAction(JbpmJsfContext context, ActionEvent event) {
try {
final FacesContext facesContext = FacesContext.getCurrentInstance();
@@ -103,16 +99,16 @@
context.setError("Error reading process logs", "Attempted to read process logs from something other than a process instance");
return;
}
- final List<ProcessLog> processLogs;
+ final List<?> processLogs;
if (typeExpression != null) {
final Object typeValue = typeExpression.getValue(elContext);
if (typeValue == null) {
context.setError("Error reading process logs", "Null value for type attribute");
return;
}
- final Class type;
+ final Class<?> type;
if (typeValue instanceof Class) {
- type = (Class) typeValue;
+ type = (Class<?>) typeValue;
} else {
final String typeString = typeValue.toString();
if (logTypes.containsKey(typeString)) {
Modified: projects/jsf-console/branches/jsf-console-3.2-soa/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/ListJobsActionListener.java
===================================================================
--- projects/jsf-console/branches/jsf-console-3.2-soa/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/ListJobsActionListener.java 2010-12-02 01:32:15 UTC (rev 6855)
+++ projects/jsf-console/branches/jsf-console-3.2-soa/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/ListJobsActionListener.java 2010-12-02 01:48:28 UTC (rev 6856)
@@ -9,9 +9,6 @@
import javax.faces.context.FacesContext;
import javax.faces.event.ActionEvent;
-/**
- *
- */
public final class ListJobsActionListener implements JbpmActionListener {
private final ValueExpression targetExpression;
@@ -23,12 +20,11 @@
return "listJob";
}
- @SuppressWarnings ({"unchecked"})
public void handleAction(JbpmJsfContext context, ActionEvent event) {
try {
final FacesContext facesContext = FacesContext.getCurrentInstance();
final ELContext elContext = facesContext.getELContext();
- final List jobs = context.getJbpmContext().getSession().createQuery("from org.jbpm.job.Job").list();
+ final List<?> jobs = context.getJbpmContext().getSession().createQuery("from org.jbpm.job.Job").list();
targetExpression.setValue(elContext, jobs);
context.selectOutcome("success");
} catch (Exception ex) {
13 years, 5 months
JBoss JBPM SVN: r6855 - in jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm: svc and 1 other directory.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2010-12-01 20:32:15 -0500 (Wed, 01 Dec 2010)
New Revision: 6855
Modified:
jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/graph/exe/Token.java
jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/svc/Services.java
Log:
skip id assignment during root token construction, process instance is saved shortly afterwards
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/graph/exe/Token.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/graph/exe/Token.java 2010-12-01 23:05:01 UTC (rev 6854)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/graph/exe/Token.java 2010-12-02 01:32:15 UTC (rev 6855)
@@ -98,7 +98,8 @@
this.isTerminationImplicit = processInstance.getProcessDefinition().isTerminationImplicit();
// assign an id to this token before events get fired
- Services.assignId(this);
+ // skip, process instance is saved shortly after constructing root token
+ // Services.assignId(this);
}
/**
@@ -121,10 +122,8 @@
// operations
// ///////////////////////////////////////////////////////////////////////////
- void addChild(Token token) {
- if (children == null) {
- children = new HashMap();
- }
+ private void addChild(Token token) {
+ if (children == null) children = new HashMap();
children.put(token.getName(), token);
}
@@ -136,10 +135,12 @@
if (node == null) {
throw new JbpmException(this + " is not positioned in a node");
}
+
Transition defaultTransition = node.getDefaultLeavingTransition();
if (defaultTransition == null) {
throw new JbpmException(node + " has no default transition");
}
+
signal(defaultTransition, new ExecutionContext(this));
}
@@ -182,7 +183,7 @@
signal(node.getDefaultLeavingTransition(), executionContext);
}
- void signal(Transition transition, ExecutionContext executionContext) {
+ private void signal(Transition transition, ExecutionContext executionContext) {
if (transition == null) {
throw new JbpmException("transition is null");
}
@@ -224,8 +225,7 @@
* resolves to true.
*/
public Set getAvailableTransitions() {
- if (node == null)
- return Collections.EMPTY_SET;
+ if (node == null) return Collections.EMPTY_SET;
Set availableTransitions = new HashSet();
addAvailableTransitionsOfNode(node, availableTransitions);
@@ -245,14 +245,16 @@
if (conditionExpression != null) {
Boolean result = (Boolean) JbpmExpressionEvaluator.evaluate(conditionExpression,
new ExecutionContext(this), Boolean.class);
- if (Boolean.TRUE.equals(result))
+ if (Boolean.TRUE.equals(result)) {
availableTransitions.add(transition);
+ }
}
else {
availableTransitions.add(transition);
}
}
}
+
if (currentNode.getSuperState() != null) {
addAvailableTransitionsOfNode(currentNode.getSuperState(), availableTransitions);
}
@@ -278,8 +280,7 @@
public void end(boolean verifyParentTermination) {
// if already ended, do nothing
if (end != null) {
- if (parent != null)
- log.warn(this + " has ended already");
+ if (parent != null) log.warn(this + " has ended already");
return;
}
@@ -294,8 +295,9 @@
if (children != null) {
for (Iterator iter = children.values().iterator(); iter.hasNext();) {
Token child = (Token) iter.next();
- if (!child.hasEnded())
+ if (!child.hasEnded()) {
child.end();
+ }
}
}
@@ -313,8 +315,7 @@
// if there are tasks associated to this token,
// remove signaling capabilities
TaskMgmtInstance taskMgmtInstance = processInstance.getTaskMgmtInstance();
- if (taskMgmtInstance != null)
- taskMgmtInstance.removeSignalling(this);
+ if (taskMgmtInstance != null) taskMgmtInstance.removeSignalling(this);
if (verifyParentTermination) {
// if this is the last active token of the parent,
@@ -330,8 +331,7 @@
}
public void addComment(Comment comment) {
- if (comments == null)
- comments = new ArrayList();
+ if (comments == null) comments = new ArrayList();
comments.add(comment);
comment.setToken(this);
}
@@ -345,7 +345,7 @@
/**
* notifies a parent that one of its nodeMap has ended.
*/
- void notifyParentOfTokenEnd() {
+ private void notifyParentOfTokenEnd() {
if (isRoot()) {
processInstance.end();
}
@@ -362,8 +362,7 @@
if (children != null) {
for (Iterator iter = children.values().iterator(); iter.hasNext();) {
Token child = (Token) iter.next();
- if (!child.hasEnded())
- return true;
+ if (!child.hasEnded()) return true;
}
}
return false;
@@ -399,8 +398,7 @@
*/
public void endCompositeLog() {
LoggingInstance loggingInstance = processInstance.getLoggingInstance();
- if (loggingInstance != null)
- loggingInstance.endCompositeLog();
+ if (loggingInstance != null) loggingInstance.endCompositeLog();
}
// various information extraction methods ///////////////////////////////////
@@ -443,14 +441,14 @@
return foundChildren;
}
- void getChildrenAtNode(Node aNode, List foundTokens) {
+ private void getChildrenAtNode(Node aNode, List foundTokens) {
if (aNode.equals(node)) {
foundTokens.add(this);
}
- else if (children != null && !children.isEmpty()) {
+ else if (children != null) {
for (Iterator it = children.values().iterator(); it.hasNext();) {
- Token aChild = (Token) it.next();
- aChild.getChildrenAtNode(aNode, foundTokens);
+ Token child = (Token) it.next();
+ child.getChildrenAtNode(aNode, foundTokens);
}
}
}
@@ -507,14 +505,12 @@
public void checkImplicitTermination() {
if (isTerminationImplicit && node.hasNoLeavingTransitions()) {
end();
- if (processInstance.isTerminatedImplicitly())
- processInstance.end();
+ if (processInstance.isTerminatedImplicitly()) processInstance.end();
}
}
public boolean isTerminatedImplicitly() {
- if (end != null)
- return true;
+ if (end != null) return true;
Map leavingTransitions = node.getLeavingTransitionsMap();
if (leavingTransitions != null && !leavingTransitions.isEmpty()) {
@@ -525,8 +521,7 @@
// loop over all active child tokens
for (Iterator iter = getActiveChildren().values().iterator(); iter.hasNext();) {
Token child = (Token) iter.next();
- if (!child.isTerminatedImplicitly())
- return false;
+ if (!child.isTerminatedImplicitly()) return false;
}
// if none of the above, this token is terminated implicitly
return true;
@@ -554,19 +549,17 @@
}
}
- void suspendJobs() {
+ private void suspendJobs() {
JbpmContext jbpmContext = JbpmContext.getCurrentJbpmContext();
if (jbpmContext != null) {
JobSession jobSession = jbpmContext.getJobSession();
- if (jobSession != null)
- jobSession.suspendJobs(this);
+ if (jobSession != null) jobSession.suspendJobs(this);
}
}
- void suspendTaskInstances() {
+ private void suspendTaskInstances() {
TaskMgmtInstance taskMgmtInstance = processInstance.getTaskMgmtInstance();
- if (taskMgmtInstance != null)
- taskMgmtInstance.suspend(this);
+ if (taskMgmtInstance != null) taskMgmtInstance.suspend(this);
}
/**
@@ -587,32 +580,27 @@
}
}
- void resumeJobs() {
+ private void resumeJobs() {
JbpmContext jbpmContext = JbpmContext.getCurrentJbpmContext();
if (jbpmContext != null) {
JobSession jobSession = jbpmContext.getJobSession();
- if (jobSession != null)
- jobSession.resumeJobs(this);
+ if (jobSession != null) jobSession.resumeJobs(this);
}
}
- void resumeTaskInstances() {
+ private void resumeTaskInstances() {
TaskMgmtInstance taskMgmtInstance = processInstance.getTaskMgmtInstance();
- if (taskMgmtInstance != null)
- taskMgmtInstance.resume(this);
+ if (taskMgmtInstance != null) taskMgmtInstance.resume(this);
}
// equals ///////////////////////////////////////////////////////////////////
public boolean equals(Object o) {
- if (o == this)
- return true;
- if (!(o instanceof Token))
- return false;
+ if (o == this) return true;
+ if (!(o instanceof Token)) return false;
Token other = (Token) o;
- if (id != 0 && id == other.getId())
- return true;
+ if (id != 0 && id == other.getId()) return true;
return (name != null ? name.equals(other.getName()) : other.getName() == null)
&& (parent != null ? parent.equals(other.getParent())
@@ -649,13 +637,11 @@
* @see #unlock(String)
*/
public void lock(String lockOwner) {
- if (lockOwner == null)
- throw new JbpmException("lock owner is null");
+ if (lockOwner == null) throw new JbpmException("lock owner is null");
if (lock == null) {
lock = lockOwner;
- if (log.isDebugEnabled())
- log.debug('\'' + lockOwner + "' locked " + this);
+ if (log.isDebugEnabled()) log.debug('\'' + lockOwner + "' locked " + this);
}
else if (!lock.equals(lockOwner)) {
throw new JbpmException('\'' + lockOwner + "' cannot lock " + this + " because '" + lock
@@ -674,8 +660,7 @@
}
lock = null;
- if (log.isDebugEnabled())
- log.debug('\'' + lockOwner + "' unlocked " + this);
+ if (log.isDebugEnabled()) log.debug('\'' + lockOwner + "' unlocked " + this);
}
else {
log.warn(this + " was already unlocked");
@@ -704,8 +689,7 @@
public void forceUnlock() {
if (lock != null) {
lock = null;
- if (log.isDebugEnabled())
- log.debug("forcefully unlocked " + this);
+ if (log.isDebugEnabled()) log.debug("forcefully unlocked " + this);
}
else {
log.warn(this + " was unlocked already");
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/svc/Services.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/svc/Services.java 2010-12-01 23:05:01 UTC (rev 6854)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/svc/Services.java 2010-12-02 01:32:15 UTC (rev 6855)
@@ -32,6 +32,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+
import org.jbpm.JbpmContext;
import org.jbpm.graph.exe.ProcessInstance;
import org.jbpm.logging.LoggingService;
@@ -45,7 +46,6 @@
import org.jbpm.security.AuthorizationService;
import org.jbpm.svc.save.CascadeSaveOperation;
import org.jbpm.svc.save.CheckUnpersistableVariablesOperation;
-import org.jbpm.svc.save.HibernateSaveOperation;
import org.jbpm.svc.save.SaveLogsOperation;
import org.jbpm.svc.save.SaveOperation;
import org.jbpm.tx.TxService;
13 years, 5 months
JBoss JBPM SVN: r6854 - jbpm3/branches/jbpm-3.2-soa/ci.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2010-12-01 18:05:01 -0500 (Wed, 01 Dec 2010)
New Revision: 6854
Modified:
jbpm3/branches/jbpm-3.2-soa/ci/container.sh
Log:
inline run.sh into container.sh to properly capture jbossas pid
Modified: jbpm3/branches/jbpm-3.2-soa/ci/container.sh
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/ci/container.sh 2010-12-01 15:40:02 UTC (rev 6853)
+++ jbpm3/branches/jbpm-3.2-soa/ci/container.sh 2010-12-01 23:05:01 UTC (rev 6854)
@@ -14,6 +14,16 @@
# SOURCE_REPO JBoss distributions directory
# MAVEN_SETTINGS Maven settings file; optional, defaults to ci/settings-qa.xml
+PROGNAME=`basename $0`
+
+#
+# Helper to puke
+#
+die() {
+ echo "$PROGNAME: $*"
+ exit 1
+}
+
# Determine JBoss AS version
case $CONTAINER in
jboss405)
@@ -29,8 +39,7 @@
JBOSS_VERSION=jboss-5.1.0.GA
;;
*)
- echo "ERROR: invalid container: $CONTAINER"
- exit 1
+ die "Invalid container: $CONTAINER"
;;
esac
JBOSS_HOME=$WORKSPACE/$JBOSS_VERSION
@@ -40,13 +49,13 @@
JAVA=$JAVA_HOME/bin/java
JAVA_VERSION=`$JAVA -version 2>&1 | grep version | awk '{ print substr($3, 2, 3); }'`
+ORIG_JAVA=$JAVA
+ORIG_JAVA_HOME=$JAVA_HOME
+
if [ $JAVA_VERSION = 1.4 ]; then
# Switch to JDK 1.5 for building and installing jBPM
- ORIG_JAVA_HOME=$JAVA_HOME
JAVA=$JAVA_15_HOME/bin/java
export JAVA_HOME=$JAVA_15_HOME
-else
- ORIG_JAVA_HOME=$JAVA_HOME
fi
# Set up Maven
@@ -64,8 +73,7 @@
mvn -U -s $MAVEN_SETTINGS -Pdistro -Djbpm.home=$WORKSPACE/jbpm-$JBPM_VERSION \
-Dcontainer=$CONTAINER -Djboss.home=$JBOSS_HOME -Djboss.server=$JBOSS_SERVER clean install
if [ $? -ne 0 ]; then
- echo "ERROR: failed to build distro"
- exit 1
+ die "Failed to build distro"
fi
# Install JBoss AS
@@ -76,8 +84,7 @@
$JAVA -jar distribution/target/jbpm-distribution-$JBPM_VERSION-installer.jar \
distribution/target/classes/auto-install-template.xml
if [ $? -ne 0 ]; then
- echo "ERROR: failed to install distro"
- exit 1
+ die "Failed to install distro"
fi
# Fetch proprietary JDBC drivers
@@ -90,15 +97,13 @@
if [ -f $DB2JCC_JAR ]; then
ln -s $DB2JCC_JAR $JBOSS_HOME/server/$JBOSS_SERVER/lib
else
- echo "ERROR: DB2 driver not found: $DB2JCC_JAR"
- exit 1
+ die "DB2 driver not found: $DB2JCC_JAR"
fi
DB2JCC_LICENSE=~/.m2/repository/com/ibm/db2jcc_license_cu/$DB2JCC_VERSION/db2jcc_license_cu-$DB2JCC_VERSION.jar
if [ -f $DB2JCC_LICENSE ]; then
ln -s $DB2JCC_LICENSE $JBOSS_HOME/server/$JBOSS_SERVER/lib
else
- echo "ERROR: DB2 driver license not found: $DB2JCC_LICENSE"
- exit 1
+ die "DB2 driver license not found: $DB2JCC_LICENSE"
fi
fi
@@ -109,8 +114,7 @@
if [ -f $MSJDBC_JAR ]; then
ln -s $MSJDBC_JAR $JBOSS_HOME/server/$JBOSS_SERVER/lib
else
- echo "ERROR: SQL Server driver not found: $MSJDBC_JAR"
- exit 1
+ die "SQL Server driver not found: $MSJDBC_JAR"
fi
fi
@@ -121,8 +125,7 @@
if [ -f $OJDBC_JAR ]; then
ln -s $OJDBC_JAR $JBOSS_HOME/server/$JBOSS_SERVER/lib
else
- echo "ERROR: Oracle driver not found: $OJDBC_JAR"
- exit 1
+ die "Oracle driver not found: $OJDBC_JAR"
fi
fi
@@ -133,34 +136,60 @@
if [ -f $JCONNECT_JAR ]; then
ln -s $JCONNECT_JAR $JBOSS_HOME/server/$JBOSS_SERVER/lib
else
- echo "ERROR: Sybase driver not found: $JCONNECT_JAR"
- exit 1
+ die "Sybase driver not found: $JCONNECT_JAR"
fi
fi
# Switch back to JDK 1.4 for running test suite
export JAVA_HOME=$ORIG_JAVA_HOME
+JAVA=$ORIG_JAVA
-# Start JBoss AS
-$JBOSS_HOME/bin/run.sh -b $MYTESTIP_1 -c $JBOSS_SERVER -g jbpm3-$CONTAINER-$DATABASE \
- -u $MCAST_ADDR &> /dev/null &
+# BEGIN section taken from run.sh
-# Symlink log files
-ln -sf $JBOSS_HOME/server/$JBOSS_SERVER/log/boot.log $WORKSPACE
+# Force IPv4 on Linux systems since IPv6 doesn't work correctly with jdk5 and lower
+JAVA_OPTS="-Djava.net.preferIPv4Stack=true"
+
+# Setup the classpath
+runjar="$JBOSS_HOME/bin/run.jar"
+if [ ! -f "$runjar" ]; then
+ die "Missing required file: $runjar"
+fi
+JBOSS_CLASSPATH="$runjar"
+
+# Setup JBoss specific properties
+JAVA_OPTS="-Dprogram.name=$PROGNAME $JAVA_OPTS"
+
+# Setup the java endorsed dirs
+JBOSS_ENDORSED_DIRS="$JBOSS_HOME/lib/endorsed"
+
+# Execute the JVM in the background
+$JAVA $JAVA_OPTS -Djava.endorsed.dirs="$JBOSS_ENDORSED_DIRS" -classpath "$JBOSS_CLASSPATH" \
+ org.jboss.Main -b $MYTESTIP_1 -c $JBOSS_SERVER -g jbpm3-$CONTAINER-$DATABASE -u $MCAST_ADDR \
+ &> /dev/null &
+JBOSS_PID=$!
+
+# END section adapted from run.sh
+
+# Symlink server log file
ln -sf $JBOSS_HOME/server/$JBOSS_SERVER/log/server.log $WORKSPACE
# Was it successfully started?
-wget --spider --retry-connrefused --tries=24 --waitretry=24 $MYTESTIP_1:8080
-if [ $? -ne 0 ]; then
- echo '***BOOT LOG***' ; tail -n 100 $WORKSPACE/boot.log
- echo '***SERVER LOG***' ; tail -n 100 $WORKSPACE/server.log
- kill $!
- exit 1
-fi
+for (( TRY=1 ; ; TRY++ )); do
+ curl --head --fail http://$MYTESTIP_1:8080/jbpm-console
+ if [ $? -eq 0 ]; then
+ break
+ elif [ $TRY -lt 5 ]; then
+ sleep 30
+ else
+ tail -n 100 $WORKSPACE/server.log
+ kill $JBOSS_PID
+ die "JBoss AS failed to start"
+ fi
+done
# Run enterprise test suite
mvn -f enterprise/pom.xml -s $MAVEN_SETTINGS -Djboss.bind.address=$MYTESTIP_1 \
- -Dsurefire.jvm.args="-Xms64m -Xmx256m" verify | tee $WORKSPACE/tests.log
+ verify | tee $WORKSPACE/tests.log
# Stop JBoss AS
$JBOSS_HOME/bin/shutdown.sh -s jnp://$MYTESTIP_1:1099 -S
13 years, 5 months
JBoss JBPM SVN: r6853 - jbpm3/branches/jbpm-3.2-soa/ci.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2010-12-01 10:40:02 -0500 (Wed, 01 Dec 2010)
New Revision: 6853
Modified:
jbpm3/branches/jbpm-3.2-soa/ci/container.sh
Log:
kill jboss as process if it fails to start
Modified: jbpm3/branches/jbpm-3.2-soa/ci/container.sh
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/ci/container.sh 2010-12-01 14:59:13 UTC (rev 6852)
+++ jbpm3/branches/jbpm-3.2-soa/ci/container.sh 2010-12-01 15:40:02 UTC (rev 6853)
@@ -90,13 +90,15 @@
if [ -f $DB2JCC_JAR ]; then
ln -s $DB2JCC_JAR $JBOSS_HOME/server/$JBOSS_SERVER/lib
else
- echo "WARNING: DB2 driver not found: $DB2JCC_JAR"
+ echo "ERROR: DB2 driver not found: $DB2JCC_JAR"
+ exit 1
fi
DB2JCC_LICENSE=~/.m2/repository/com/ibm/db2jcc_license_cu/$DB2JCC_VERSION/db2jcc_license_cu-$DB2JCC_VERSION.jar
if [ -f $DB2JCC_LICENSE ]; then
ln -s $DB2JCC_LICENSE $JBOSS_HOME/server/$JBOSS_SERVER/lib
else
- echo "WARNING: DB2 license not found: $DB2JCC_LICENSE"
+ echo "ERROR: DB2 driver license not found: $DB2JCC_LICENSE"
+ exit 1
fi
fi
@@ -107,7 +109,8 @@
if [ -f $MSJDBC_JAR ]; then
ln -s $MSJDBC_JAR $JBOSS_HOME/server/$JBOSS_SERVER/lib
else
- echo "WARNING: SQL Server driver not found: $MSJDBC_JAR"
+ echo "ERROR: SQL Server driver not found: $MSJDBC_JAR"
+ exit 1
fi
fi
@@ -118,7 +121,8 @@
if [ -f $OJDBC_JAR ]; then
ln -s $OJDBC_JAR $JBOSS_HOME/server/$JBOSS_SERVER/lib
else
- echo "WARNING: Oracle driver not found: $OJDBC_JAR"
+ echo "ERROR: Oracle driver not found: $OJDBC_JAR"
+ exit 1
fi
fi
@@ -129,7 +133,8 @@
if [ -f $JCONNECT_JAR ]; then
ln -s $JCONNECT_JAR $JBOSS_HOME/server/$JBOSS_SERVER/lib
else
- echo "WARNING: Sybase driver not found: $JCONNECT_JAR"
+ echo "ERROR: Sybase driver not found: $JCONNECT_JAR"
+ exit 1
fi
fi
@@ -140,11 +145,16 @@
$JBOSS_HOME/bin/run.sh -b $MYTESTIP_1 -c $JBOSS_SERVER -g jbpm3-$CONTAINER-$DATABASE \
-u $MCAST_ADDR &> /dev/null &
+# Symlink log files
+ln -sf $JBOSS_HOME/server/$JBOSS_SERVER/log/boot.log $WORKSPACE
+ln -sf $JBOSS_HOME/server/$JBOSS_SERVER/log/server.log $WORKSPACE
+
# Was it successfully started?
wget --spider --retry-connrefused --tries=24 --waitretry=24 $MYTESTIP_1:8080
if [ $? -ne 0 ]; then
- tail -n 100 $JBOSS_HOME/server/$JBOSS_SERVER/log/server.log
- $JBOSS_HOME/bin/shutdown.sh -s jnp://$MYTESTIP_1:1099 -S
+ echo '***BOOT LOG***' ; tail -n 100 $WORKSPACE/boot.log
+ echo '***SERVER LOG***' ; tail -n 100 $WORKSPACE/server.log
+ kill $!
exit 1
fi
@@ -154,5 +164,3 @@
# Stop JBoss AS
$JBOSS_HOME/bin/shutdown.sh -s jnp://$MYTESTIP_1:1099 -S
-ln -sf $JBOSS_HOME/server/$JBOSS_SERVER/log/boot.log $WORKSPACE
-ln -sf $JBOSS_HOME/server/$JBOSS_SERVER/log/server.log $WORKSPACE
13 years, 5 months
JBoss JBPM SVN: r6852 - in jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm: svc and 1 other directory.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2010-12-01 09:59:13 -0500 (Wed, 01 Dec 2010)
New Revision: 6852
Modified:
jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/persistence/jta/JtaDbPersistenceService.java
jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/svc/Services.java
Log:
remove redundant HibernateSaveOperation from Services.defaultSaveOperations; newly created ProcessInstance objects are persisted during construction via Services.assignId()
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/persistence/jta/JtaDbPersistenceService.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/persistence/jta/JtaDbPersistenceService.java 2010-12-01 14:34:59 UTC (rev 6851)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/persistence/jta/JtaDbPersistenceService.java 2010-12-01 14:59:13 UTC (rev 6852)
@@ -34,9 +34,7 @@
import org.apache.commons.logging.LogFactory;
import org.hibernate.Session;
import org.hibernate.engine.SessionFactoryImplementor;
-
import org.jbpm.JbpmException;
-import org.jbpm.persistence.JbpmPersistenceException;
import org.jbpm.persistence.db.DbPersistenceService;
public class JtaDbPersistenceService extends DbPersistenceService {
@@ -70,15 +68,16 @@
public void beginTransaction() {
try {
- JtaDbPersistenceServiceFactory jtaFactory = (JtaDbPersistenceServiceFactory) persistenceServiceFactory;
+ JtaDbPersistenceServiceFactory jtaFactory =
+ (JtaDbPersistenceServiceFactory) persistenceServiceFactory;
userTransaction = jtaFactory.getUserTransaction();
userTransaction.begin();
}
catch (NotSupportedException e) {
- throw new JbpmException("transaction is already in course", e);
+ throw new JbpmException("transaction already in course", e);
}
catch (SystemException e) {
- throw new JbpmException("transaction begin failed", e);
+ throw new JbpmException("failed to begin transaction", e);
}
}
@@ -142,7 +141,7 @@
else {
TransactionManager transactionManager = getTransactionManager();
if (transactionManager == null) {
- throw new JbpmPersistenceException("cannot honor rollback request in transaction manager absence");
+ throw new JbpmException("cannot honor rollback request without transaction manager");
}
try {
transactionManager.setRollbackOnly();
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/svc/Services.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/svc/Services.java 2010-12-01 14:34:59 UTC (rev 6851)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/main/java/org/jbpm/svc/Services.java 2010-12-01 14:59:13 UTC (rev 6852)
@@ -67,14 +67,12 @@
private static final List defaultSaveOperations = createDefaultSaveOperations();
private static List createDefaultSaveOperations() {
- SaveOperation[] operations = new SaveOperation[4];
+ SaveOperation[] operations = new SaveOperation[3];
operations[0] = new CheckUnpersistableVariablesOperation();
- // first, save the execution data (process instance)
- operations[1] = new HibernateSaveOperation();
- // then, insert the logs, which may have references to the execution data
- operations[2] = new SaveLogsOperation();
- // last, save subprocess instances in cascade
- operations[3] = new CascadeSaveOperation();
+ // insert the logs, which may have references to the execution data
+ operations[1] = new SaveLogsOperation();
+ // save subprocess instances in cascade
+ operations[2] = new CascadeSaveOperation();
return Arrays.asList(operations);
}
13 years, 5 months
JBoss JBPM SVN: r6851 - jbpm3/branches/jbpm-3.2-soa/soa-distribution.
by do-not-reply@jboss.org
Author: jcoleman(a)redhat.com
Date: 2010-12-01 09:34:59 -0500 (Wed, 01 Dec 2010)
New Revision: 6851
Removed:
jbpm3/branches/jbpm-3.2-soa/soa-distribution/build-common.xml
Log:
Remove build-common.xml. This comes from soa-common.
Deleted: jbpm3/branches/jbpm-3.2-soa/soa-distribution/build-common.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/soa-distribution/build-common.xml 2010-12-01 14:33:51 UTC (rev 6850)
+++ jbpm3/branches/jbpm-3.2-soa/soa-distribution/build-common.xml 2010-12-01 14:34:59 UTC (rev 6851)
@@ -1,191 +0,0 @@
-<!-- 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()
- <!-- pre-patch -->
- f=new File(properties['module_base_dir'] + "/pre-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'])
- property(name:"groovy.path", value:properties['groovy.path'])
- }
- }
- }
-
- <!-- 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 -->
- 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'])
- property(name:"groovy.path", value:properties['groovy.path'])
- }
- }
- }
-
- <!-- 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>
-
- <!-- Fetch URL to cache directory and do the checksum
- ++ Call with parameters:
- ++ base_url
- ++ filename
- ++ cache_dir
- ++ username (optional)
- ++ password (optional)
- ++ md5_sum (optional)
- -->
- <target name="url.fetch">
- <groovy>
- def u_base_url=properties['base_url']
- def u_filename=properties['filename']
- def u_cache_dir=properties['cache_dir']
- def u_username=properties['username']
- def u_password=properties['password']
-
- def u_cache_file="${u_cache_dir}/${u_filename}"
- def u_cache_file_md5="${u_cache_dir}/${u_filename}.MD5"
- def u_url_md5="${u_base_url}/${u_filename}.MD5"
- def u_url_md5_l="${u_base_url}/${u_filename}.md5"
- def u_url_md5_all="${u_base_url}/MD5SUM"
-
- def ant=new AntBuilder()
-
- if(properties['md5_sum'] != null && (properties['md5_sum'].toBoolean() == true))
- do_md5_sum=true
- else
- do_md5_sum=false
- if(!(new File(properties['cache_dir']).exists())){
- ant.mkdir(dir:properties['cache_dir'])
- }
- if(do_md5_sum && !new File("${u_cache_file_md5}").exists()){
-printf("username is %s\n", "${u_username}");
- if ("${u_username}" == "null" || "${u_username}" == "") {
- ant.get(src:"${u_url_md5_all}", dest:"${u_cache_file_md5}", verbose:"no", ignoreerrors:"yes")
- ant.get(src:"${u_url_md5_l}", dest:"${u_cache_file_md5}", verbose:"no", ignoreerrors:"yes")
- ant.get(src:"${u_url_md5}", dest:"${u_cache_file_md5}", verbose:"no", ignoreerrors:"yes")
- } else {
- ant.get(src:"${u_url_md5_all}", dest:"${u_cache_file_md5}", verbose:"no", username:"${u_username}", password:"${u_password}", ignoreerrors:"yes")
- ant.get(src:"${u_url_md5_l}", dest:"${u_cache_file_md5}", verbose:"no", username:"${u_username}", password:"${u_password}", ignoreerrors:"yes")
- ant.get(src:"${u_url_md5}", dest:"${u_cache_file_md5}", verbose:"no", username:"${u_username}", password:"${u_password}", ignoreerrors:"yes")
- }
- }
-
- if(!new File("${u_cache_file}").exists()){
- if ("${u_username}" == "null" || "${u_username}" == "") {
- ant.get(src:"${u_base_url}/${u_filename}", dest:"${u_cache_file}", verbose:"no")
-printf("Null\n");
- } else {
- ant.get(src:"${u_base_url}/${u_filename}", dest:"${u_cache_file}", verbose:"no", username:"${u_username}", password:"${u_password}")
-printf("Full\n");
- }
- }
-
- if (do_md5_sum) {
- printf("Checksumming file : %s\n", u_filename)
- def fmd5=new File("${u_cache_file_md5}")
- def md5Value=""
- fmd5.eachLine(){
- if (it.contains("${u_filename}")) {
- md5Value=(it.split())[0]
- } else if (!it.contains(" ")) {
- md5Value=it;
- }
- }
- printf("Expecting checksum : %s\n", md5Value)
- ant.checksum(file:"${u_cache_file}", algorithm:"md5", property:"antmd5Value")
- printf("Received checksum : %s\n", ant.getProject().getProperty('antmd5Value'))
- if(ant.getProject().getProperty('antmd5Value') != md5Value){
- ant.fail(message:"${u_cache_file} checksum verification failed!")
- }
- }
- </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>
13 years, 5 months
JBoss JBPM SVN: r6850 - in jbpm3/branches/jbpm-3.2-soa/soa-distribution: resource and 1 other directory.
by do-not-reply@jboss.org
Author: jcoleman(a)redhat.com
Date: 2010-12-01 09:33:51 -0500 (Wed, 01 Dec 2010)
New Revision: 6850
Modified:
jbpm3/branches/jbpm-3.2-soa/soa-distribution/build.xml
jbpm3/branches/jbpm-3.2-soa/soa-distribution/resource/autosetup.xml
Log:
Update our installation template and builder to catch up with the changes to
the installation template in the distribution directory.
Modified: jbpm3/branches/jbpm-3.2-soa/soa-distribution/build.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/soa-distribution/build.xml 2010-11-29 16:50:28 UTC (rev 6849)
+++ jbpm3/branches/jbpm-3.2-soa/soa-distribution/build.xml 2010-12-01 14:33:51 UTC (rev 6850)
@@ -63,12 +63,6 @@
<fileset dir="${module_base_dir}/target/work/javadocs" includes="**/*" />
</copy>
- <!-- add files required for JBDS -->
- <mkdir dir="${module_base_dir}/target/dist/jbpm-jpdl/src/resources/gpd" />
- <copy todir="${module_base_dir}/target/dist/jbpm-jpdl/src/resources/gpd" file="${module_base_dir}/../distribution/src/main/etc/version.info.xml" />
- <copy todir="${module_base_dir}/target/dist/jbpm-jpdl/src" file="${module_base_dir}/../distribution/target/assembly-modules/src/jbpm-jpdl-sources.jar" />
- <copy todir="${module_base_dir}/target/dist/jbpm-jpdl/src" file="${module_base_dir}/../distribution/target/assembly-modules/src/jbpm-identity-sources.jar" />
-
<zip destfile="${module_base_dir}/target/${module_build_finalName}.zip" >
<zipfileset dir="${module_base_dir}/target/dist" prefix="jbpm" includes="**/*" />
</zip>
Modified: jbpm3/branches/jbpm-3.2-soa/soa-distribution/resource/autosetup.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/soa-distribution/resource/autosetup.xml 2010-11-29 16:50:28 UTC (rev 6849)
+++ jbpm3/branches/jbpm-3.2-soa/soa-distribution/resource/autosetup.xml 2010-12-01 14:33:51 UTC (rev 6850)
@@ -1,3 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
<AutomatedInstallation langpack="eng">
<com.izforge.izpack.panels.HelloPanel />
<com.izforge.izpack.panels.TargetPanel>
@@ -4,29 +6,44 @@
<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"/>
+ <pack name="jBPM Standalone" index="0" selected="true" />
+ <pack name="Process Engine" index="1" selected="true" />
+ <pack name="Documentation" index="2" selected="true" />
+ <pack name="Eclipse Designer" index="3" selected="true" />
+ <pack name="JBoss AS Integration" index="4" selected="false" />
+ <pack name="jBPM Service" index="5" selected="false" />
+ <pack name="JSF Console" index="6" selected="false" />
+ <pack name="Tomcat Integration" index="7" selected="false" />
+ <pack name="Optional Downloads" index="8" selected="false" />
+ <pack name="JBoss AS" index="9" selected="false" />
+ <pack name="Eclipse" index="10" selected="false" />
</com.izforge.izpack.panels.TreePacksPanel>
<com.izforge.izpack.panels.UserInputPanel>
<userInput>
+ <entry key="jbossSelection" value="jboss423" />
<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"/>
+ <entry key="jbossInstallPath" value="@JBOSS_INSTALL_PATH@" />
</userInput>
</com.izforge.izpack.panels.UserInputPanel>
<com.izforge.izpack.panels.UserInputPanel>
<userInput>
- <entry key="jbossInstallPath" value="@JBOSS_INSTALL_PATH@" />
+ <entry key="tomcatSelection" value="${container}" />
</userInput>
</com.izforge.izpack.panels.UserInputPanel>
+ <com.izforge.izpack.panels.UserInputPanel>
+ <userInput>
+ <entry key="tomcatInstallPath" value="${tomcat.home}" />
+ </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.SummaryPanel />
<com.izforge.izpack.panels.InstallPanel />
<com.izforge.izpack.panels.FinishPanel />
13 years, 5 months