JBoss JBPM SVN: r6302 - in jbpm4/trunk/modules: distro/src/main/files/install/src/jboss/datasources and 5 other directories.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2010-05-06 01:31:48 -0400 (Thu, 06 May 2010)
New Revision: 6302
Added:
jbpm4/trunk/modules/integration/.project
Modified:
jbpm4/trunk/modules/distro/src/main/files/install/build.xml
jbpm4/trunk/modules/distro/src/main/files/install/src/jboss/datasources/jbpm-hsqldb-ds.xml
jbpm4/trunk/modules/integration/console/pom.xml
jbpm4/trunk/modules/integration/pom.xml
jbpm4/trunk/modules/integration/report/pom.xml
jbpm4/trunk/modules/integration/tomcat/pom.xml
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/script/JuelScriptEngineFactory.java
Log:
introduce hsql.bind.address property in data source
clean up a few poms
Modified: jbpm4/trunk/modules/distro/src/main/files/install/build.xml
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/install/build.xml 2010-05-05 23:19:51 UTC (rev 6301)
+++ jbpm4/trunk/modules/distro/src/main/files/install/build.xml 2010-05-06 05:31:48 UTC (rev 6302)
@@ -321,6 +321,9 @@
<include name="jbpm-${database}-ds.xml" />
</fileset>
</copy>
+ <replace file="${jboss.server.config.dir}/deploy/jbpm/jbpm-${database}-ds.xml"
+ token="$${hsql.bind.address}"
+ value="${hsql.bind.address}" />
<!-- unzip console.war -->
<mkdir dir="${jboss.server.config.dir}/deploy/jbpm/gwt-console-jbpm.war" />
@@ -420,9 +423,11 @@
<arg value="-b" />
<arg value="${jboss.bind.address}" />
</exec>
- <waitfor maxwait="5" maxwaitunit="minute" checkevery="30" checkeveryunit="second">
+ <waitfor maxwait="5" maxwaitunit="minute" checkevery="30" checkeveryunit="second"
+ timeoutproperty="jboss.timeout">
<socket server="${jboss.bind.address}" port="8080" />
</waitfor>
+ <fail if="jboss.timeout" message="jboss did not start within 5 minutes"/>
</target>
<!-- ### STOP JBOSS ################################################### -->
@@ -623,9 +628,11 @@
<arg value="-dbname.0" />
<arg value="jbpmDatabase" />
</java>
- <waitfor maxwait="1" maxwaitunit="minute" checkevery="10" checkeveryunit="second">
+ <waitfor maxwait="1" maxwaitunit="minute" checkevery="10" checkeveryunit="second"
+ timeoutproperty="hsqldb.timeout">
<socket server="${hsql.bind.address}" port="1701" />
</waitfor>
+ <fail if="hsqldb.timeout" message="hsqldb server did not start within one minute" />
</target>
<!-- ### SHUTDOWN HSQLDB SERVER ################################################ -->
Modified: jbpm4/trunk/modules/distro/src/main/files/install/src/jboss/datasources/jbpm-hsqldb-ds.xml
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/install/src/jboss/datasources/jbpm-hsqldb-ds.xml 2010-05-05 23:19:51 UTC (rev 6301)
+++ jbpm4/trunk/modules/distro/src/main/files/install/src/jboss/datasources/jbpm-hsqldb-ds.xml 2010-05-06 05:31:48 UTC (rev 6302)
@@ -4,10 +4,10 @@
<local-tx-datasource>
<jndi-name>JbpmDS</jndi-name>
- <connection-url>jdbc:hsqldb:hsql://localhost:1701</connection-url>
+ <connection-url>@jdbc.url@</connection-url>
<driver-class>org.hsqldb.jdbcDriver</driver-class>
- <user-name>sa</user-name>
- <password></password>
+ <user-name>@jdbc.username@</user-name>
+ <password>@jdbc.password@</password>
<!-- connection pool parameters -->
<min-pool-size>1</min-pool-size>
Added: jbpm4/trunk/modules/integration/.project
===================================================================
--- jbpm4/trunk/modules/integration/.project (rev 0)
+++ jbpm4/trunk/modules/integration/.project 2010-05-06 05:31:48 UTC (rev 6302)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>jbpm-integration</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
+ </natures>
+</projectDescription>
Modified: jbpm4/trunk/modules/integration/console/pom.xml
===================================================================
--- jbpm4/trunk/modules/integration/console/pom.xml 2010-05-05 23:19:51 UTC (rev 6301)
+++ jbpm4/trunk/modules/integration/console/pom.xml 2010-05-06 05:31:48 UTC (rev 6302)
@@ -1,61 +1,59 @@
<?xml version="1.0" encoding="UTF-8"?>
-<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>
+<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>jBPM 4 - Integration Console</name>
- <description>JBoss jBPM - GWT console integration</description>
+ <name>jBPM 4 - Integration Console</name>
+ <description>JBoss jBPM - GWT console integration</description>
+ <groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm-console-integration</artifactId>
+ <packaging>jar</packaging>
+
+ <parent>
<groupId>org.jbpm.jbpm4</groupId>
- <artifactId>jbpm-console-integration</artifactId>
- <packaging>jar</packaging>
+ <artifactId>jbpm-integration</artifactId>
+ <version>4.4-SNAPSHOT</version>
+ </parent>
- <parent>
- <groupId>org.jbpm.jbpm4</groupId>
- <artifactId>jbpm-integration</artifactId>
- <version>4.4-SNAPSHOT</version>
- </parent>
+ <!-- Properties -->
+ <properties>
+ <javax.jaxb.version>2.1</javax.jaxb.version>
+ </properties>
- <!-- Properties -->
- <properties>
- <javax.jaxb.version>2.1</javax.jaxb.version>
+ <!-- Dependencies -->
+ <dependencies>
+ <dependency>
+ <groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm-api</artifactId>
+ <version>${project.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm-pvm</artifactId>
+ <version>${project.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.bpm</groupId>
+ <artifactId>gwt-console-server-integration</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.xml.bind</groupId>
+ <artifactId>jaxb-api</artifactId>
+ <version>${javax.jaxb.version}</version>
+ <scope>provided</scope>
+ </dependency>
- </properties>
-
- <!-- Dependencies -->
- <dependencies>
- <dependency>
- <groupId>org.jbpm.jbpm4</groupId>
- <artifactId>jbpm-api</artifactId>
- <version>${project.version}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.jbpm.jbpm4</groupId>
- <artifactId>jbpm-pvm</artifactId>
- <version>${project.version}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.bpm</groupId>
- <artifactId>gwt-console-server-integration</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.xml.bind</groupId>
- <artifactId>jaxb-api</artifactId>
- <version>${javax.jaxb.version}</version>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.errai</groupId>
- <artifactId>errai-common</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jboss.errai</groupId>
- <artifactId>errai-bus</artifactId>
- </dependency>
-
- </dependencies>
-
+ <dependency>
+ <groupId>org.jboss.errai</groupId>
+ <artifactId>errai-common</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.errai</groupId>
+ <artifactId>errai-bus</artifactId>
+ </dependency>
+ </dependencies>
</project>
Modified: jbpm4/trunk/modules/integration/pom.xml
===================================================================
--- jbpm4/trunk/modules/integration/pom.xml 2010-05-05 23:19:51 UTC (rev 6301)
+++ jbpm4/trunk/modules/integration/pom.xml 2010-05-06 05:31:48 UTC (rev 6302)
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<name>jBPM 4 - Integration</name>
@@ -30,11 +31,10 @@
<!-- Dependecy Management -->
<dependencyManagement>
<dependencies>
-
<dependency>
<groupId>org.jbpm.jbpm4</groupId>
<artifactId>jbpm-jpdl</artifactId>
- <version>${version}</version>
+ <version>${project.version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
@@ -112,7 +112,6 @@
<artifactId>slf4j-log4j12</artifactId>
<version>${slf4j.version}</version>
</dependency>
-
</dependencies>
</dependencyManagement>
@@ -123,5 +122,4 @@
<module>report</module>
<module>tomcat</module>
</modules>
-
</project>
Modified: jbpm4/trunk/modules/integration/report/pom.xml
===================================================================
--- jbpm4/trunk/modules/integration/report/pom.xml 2010-05-05 23:19:51 UTC (rev 6301)
+++ jbpm4/trunk/modules/integration/report/pom.xml 2010-05-06 05:31:48 UTC (rev 6302)
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<name>jBPM 4 - Integration Reports</name>
@@ -14,10 +15,4 @@
<artifactId>jbpm-integration</artifactId>
<version>4.4-SNAPSHOT</version>
</parent>
-
- <!-- Dependencies -->
- <dependencies>
-
- </dependencies>
-
</project>
Modified: jbpm4/trunk/modules/integration/tomcat/pom.xml
===================================================================
--- jbpm4/trunk/modules/integration/tomcat/pom.xml 2010-05-05 23:19:51 UTC (rev 6301)
+++ jbpm4/trunk/modules/integration/tomcat/pom.xml 2010-05-06 05:31:48 UTC (rev 6302)
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<name>jBPM 4 - Integration Tomcat 6</name>
@@ -15,10 +16,6 @@
<version>4.4-SNAPSHOT</version>
</parent>
- <!-- Properties -->
- <properties>
- </properties>
-
<!-- Dependencies -->
<dependencies>
<dependency>
@@ -28,5 +25,4 @@
<scope>provided</scope>
</dependency>
</dependencies>
-
</project>
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/script/JuelScriptEngineFactory.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/script/JuelScriptEngineFactory.java 2010-05-05 23:19:51 UTC (rev 6301)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/script/JuelScriptEngineFactory.java 2010-05-06 05:31:48 UTC (rev 6302)
@@ -24,7 +24,6 @@
import javax.script.ScriptEngineFactory;
import javax.script.ScriptEngine;
import java.util.List;
-import java.util.ArrayList;
import java.util.Collections;
/**
@@ -32,156 +31,102 @@
*
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
-public class JuelScriptEngineFactory implements ScriptEngineFactory
-{
+public class JuelScriptEngineFactory implements ScriptEngineFactory {
- private static List<String> names = new ArrayList(1);
- private static List<String> extensions;
- private static List<String> mimeTypes;
+ private static List<String> names = Collections.singletonList("juel");
+ private static List<String> extensions = names;
+ private static List<String> mimeTypes = Collections.emptyList();
- public JuelScriptEngineFactory()
- {
- super();
- }
-
- static
- {
- names.add("juel");
-
- names = Collections.unmodifiableList(names);
-
- extensions = names;
-
- mimeTypes = new ArrayList(0);
-
- mimeTypes = Collections.unmodifiableList(mimeTypes);
- }
-
- public String getEngineName()
- {
+ public String getEngineName() {
return "juel";
}
- public String getEngineVersion()
- {
+ public String getEngineVersion() {
return de.odysseus.el.ExpressionFactoryImpl.class.getPackage().getImplementationVersion();
}
- public List<String> getExtensions()
- {
+ public List<String> getExtensions() {
return extensions;
}
- public String getLanguageName()
- {
+ public String getLanguageName() {
return "JSP 2.1 EL";
}
- public String getLanguageVersion()
- {
+ public String getLanguageVersion() {
return "2.1";
}
- public String getMethodCallSyntax(String obj, String m, String[] args)
- {
+ public String getMethodCallSyntax(String obj, String m, String... args) {
throw new UnsupportedOperationException("getMethodCallSyntax");
}
- public List<String> getMimeTypes()
- {
+ public List<String> getMimeTypes() {
return mimeTypes;
}
- public List<String> getNames()
- {
+ public List<String> getNames() {
return names;
}
- public String getOutputStatement(String toDisplay)
- {
+ public String getOutputStatement(String toDisplay) {
StringBuilder statement = new StringBuilder();
-
statement.append("out:print(\"");
- int len = toDisplay.length();
-
- for (int i = 0; i < len; ++i)
- {
+ for (int i = 0, len = toDisplay.length(); i < len; ++i) {
char ch = toDisplay.charAt(i);
-
- switch (ch)
- {
- case '"':
- statement.append("\\\"");
-
- break;
- case '\\':
- statement.append("\\\\");
-
- break;
- default:
- statement.append(ch);
+ switch (ch) {
+ case '"':
+ statement.append("\\\"");
+ break;
+ case '\\':
+ statement.append("\\\\");
+ break;
+ default:
+ statement.append(ch);
}
-
}
- statement.append("\")");
-
- return statement.toString();
+ return statement.append("\")").toString();
}
- public String getParameter(String key)
- {
- if (key.equals("javax.script.name"))
- {
+ public String getParameter(String key) {
+ if (key.equals("javax.script.name")) {
return getLanguageName();
}
- if (key.equals("javax.script.engine"))
- {
+ if (key.equals("javax.script.engine")) {
return getEngineName();
}
- if (key.equals("javax.script.engine_version"))
- {
+ if (key.equals("javax.script.engine_version")) {
return getEngineVersion();
}
- if (key.equals("javax.script.language"))
- {
+ if (key.equals("javax.script.language")) {
return getLanguageName();
}
- if (key.equals("javax.script.language_version"))
- {
+ if (key.equals("javax.script.language_version")) {
return getLanguageVersion();
}
- if (key.equals("THREADING"))
- {
+ if (key.equals("THREADING")) {
return "MULTITHREADED";
}
return null;
}
- public String getProgram(String[] statements)
- {
+ public String getProgram(String... statements) {
StringBuilder program = new StringBuilder();
- if (statements.length != 0)
- {
- for (int i = 0; i < statements.length; ++i)
- {
+ if (statements.length != 0) {
+ for (int i = 0; i < statements.length; ++i) {
program.append("${");
-
program.append(statements[i]);
-
program.append("} ");
}
-
}
-
return program.toString();
}
- public ScriptEngine getScriptEngine()
- {
+ public ScriptEngine getScriptEngine() {
return new JuelScriptEngine(this);
}
}
14 years
JBoss JBPM SVN: r6301 - in jbpm3/branches/jbpm-3.2-soa/modules: core/src/main/java/org/jbpm/jcr/jndi and 7 other directories.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2010-05-05 19:19:51 -0400 (Wed, 05 May 2010)
New Revision: 6301
Modified:
jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/db/JbpmSessionFactory.java
jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/jcr/jndi/JndiJcrServiceFactory.java
jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/persistence/jta/JtaDbPersistenceServiceFactory.java
jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/util/JndiUtil.java
jbpm3/branches/jbpm-3.2-soa/modules/core/src/test/java/org/jbpm/SerializabilityTest.java
jbpm3/branches/jbpm-3.2-soa/modules/core/src/test/java/org/jbpm/mock/Jndi.java
jbpm3/branches/jbpm-3.2-soa/modules/enterprise/src/main/java/org/jbpm/ejb/impl/CommandListenerBean.java
jbpm3/branches/jbpm-3.2-soa/modules/enterprise/src/main/java/org/jbpm/ejb/impl/CommandServiceBean.java
jbpm3/branches/jbpm-3.2-soa/modules/enterprise/src/main/java/org/jbpm/ejb/impl/JobListenerBean.java
jbpm3/branches/jbpm-3.2-soa/modules/enterprise/src/main/java/org/jbpm/ejb/impl/TimerEntityBean.java
jbpm3/branches/jbpm-3.2-soa/modules/enterprise/src/main/java/org/jbpm/msg/jms/JmsMessageServiceFactory.java
jbpm3/branches/jbpm-3.2-soa/modules/enterprise/src/main/java/org/jbpm/scheduler/ejbtimer/EjbSchedulerServiceFactory.java
jbpm3/branches/jbpm-3.2-soa/modules/enterprise/src/main/java/org/jbpm/scheduler/ejbtimer/EntitySchedulerServiceFactory.java
jbpm3/branches/jbpm-3.2-soa/modules/enterprise/src/main/java/org/jbpm/scheduler/ejbtimer/TimerServiceBean.java
Log:
prevent serializability test from failing when code source location is not a file
synchronize initialization of jndi resources in service factories
Modified: jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/db/JbpmSessionFactory.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/db/JbpmSessionFactory.java 2010-05-05 09:13:37 UTC (rev 6300)
+++ jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/db/JbpmSessionFactory.java 2010-05-05 23:19:51 UTC (rev 6301)
@@ -29,9 +29,6 @@
import java.util.Iterator;
import java.util.Properties;
-import javax.naming.InitialContext;
-import javax.rmi.PortableRemoteObject;
-
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.HibernateException;
@@ -41,9 +38,11 @@
import org.hibernate.mapping.PersistentClass;
import org.hibernate.type.LongType;
import org.hibernate.type.StringType;
+
import org.jbpm.JbpmConfiguration;
import org.jbpm.JbpmException;
import org.jbpm.util.ClassLoaderUtil;
+import org.jbpm.util.JndiUtil;
/**
* creates JbpmSessions. Obtain a JbpmSessionFactory with
@@ -85,18 +84,11 @@
if (instance == null) {
// if there is a JNDI name configured
if (jndiName != null) {
- try {
- // fetch the JbpmSessionFactory from JNDI
- if (log.isDebugEnabled()) {
- log.debug("fetching JbpmSessionFactory from " + jndiName);
- }
- InitialContext initialContext = new InitialContext();
- Object o = initialContext.lookup(jndiName);
- instance = (JbpmSessionFactory) PortableRemoteObject.narrow(o, JbpmSessionFactory.class);
+ // fetch the JbpmSessionFactory from JNDI
+ if (log.isDebugEnabled()) {
+ log.debug("fetching JbpmSessionFactory from " + jndiName);
}
- catch (Exception e) {
- throw new JbpmException("couldn't fetch JbpmSessionFactory from " + jndiName);
- }
+ instance = (JbpmSessionFactory) JndiUtil.lookup(jndiName, JbpmSessionFactory.class);
}
// else there is no JNDI name configured
else {
Modified: jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/jcr/jndi/JndiJcrServiceFactory.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/jcr/jndi/JndiJcrServiceFactory.java 2010-05-05 09:13:37 UTC (rev 6300)
+++ jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/jcr/jndi/JndiJcrServiceFactory.java 2010-05-05 23:19:51 UTC (rev 6301)
@@ -22,29 +22,22 @@
package org.jbpm.jcr.jndi;
import javax.jcr.Repository;
-import javax.naming.InitialContext;
-import javax.rmi.PortableRemoteObject;
-import org.jbpm.JbpmException;
import org.jbpm.jcr.impl.AbstractJcrServiceFactory;
+import org.jbpm.util.JndiUtil;
public class JndiJcrServiceFactory extends AbstractJcrServiceFactory {
private static final long serialVersionUID = 1L;
-
- String jndiName = null;
- protected Repository getRepository() {
- Repository jcrRepository;
- try {
- InitialContext initialContext = new InitialContext();
- Object o = initialContext.lookup(jndiName);
- jcrRepository = (Repository) PortableRemoteObject.narrow(o, Repository.class);
- } catch (Exception e) {
- // NOTE that Error's are not caught because that might halt the JVM and mask the original Error.
- throw new JbpmException("couldn't fetch JCR repository from JNDI with name '"+jndiName+"'", e);
+ String jndiName;
+ private Repository repository;
+
+ protected synchronized Repository getRepository() {
+ if (repository == null) {
+ repository = (Repository) JndiUtil.lookup(jndiName, Repository.class);
}
- return jcrRepository;
+ return repository;
}
}
Modified: jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/persistence/jta/JtaDbPersistenceServiceFactory.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/persistence/jta/JtaDbPersistenceServiceFactory.java 2010-05-05 09:13:37 UTC (rev 6300)
+++ jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/persistence/jta/JtaDbPersistenceServiceFactory.java 2010-05-05 23:19:51 UTC (rev 6301)
@@ -21,18 +21,16 @@
*/
package org.jbpm.persistence.jta;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
import javax.transaction.UserTransaction;
-import org.jbpm.JbpmException;
import org.jbpm.persistence.db.DbPersistenceServiceFactory;
import org.jbpm.svc.Service;
+import org.jbpm.util.JndiUtil;
/**
* The JTA persistence service enables jBPM to participate in JTA transactions. If an existing
- * transaction is underway, {@link JtaDbPersistenceService} clings to it; otherwise it starts a new
- * transaction.
+ * transaction is underway, {@link JtaDbPersistenceService} clings to it; otherwise it starts a
+ * new transaction.
*
* <h3>Configuration</h3>
*
@@ -63,15 +61,15 @@
return new JtaDbPersistenceService(this);
}
- public UserTransaction getUserTransaction() {
+ public synchronized UserTransaction getUserTransaction() {
if (userTransaction == null) {
String jndiName = getConfiguration().getProperty("jta.UserTransaction");
if (jndiName == null) {
/*
- * EJB 2.1 section 20.9 The container must make the UserTransaction interface available to
- * the enterprise beans that are allowed to use this interface (only session and message-
- * driven beans with bean-managed transaction demarcation are allowed to use this interface)
- * in JNDI under the name java:comp/UserTransaction.
+ * EJB 2.1 section 20.9 The container must make the UserTransaction interface available
+ * to the enterprise beans that are allowed to use this interface (only session and
+ * message- driven beans with bean-managed transaction demarcation are allowed to use
+ * this interface) in JNDI under the name java:comp/UserTransaction.
*/
/*
* J2EE 1.4 section 4.2.1.1 The J2EE platform must provide an object implementing the
@@ -80,12 +78,7 @@
*/
jndiName = "java:comp/UserTransaction";
}
- try {
- userTransaction = (UserTransaction) new InitialContext().lookup(jndiName);
- }
- catch (NamingException e) {
- throw new JbpmException("could not retrieve user transaction with name " + jndiName, e);
- }
+ userTransaction = (UserTransaction) JndiUtil.lookup(jndiName, UserTransaction.class);
}
return userTransaction;
}
Modified: jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/util/JndiUtil.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/util/JndiUtil.java 2010-05-05 09:13:37 UTC (rev 6300)
+++ jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/java/org/jbpm/util/JndiUtil.java 2010-05-05 23:19:51 UTC (rev 6301)
@@ -21,6 +21,7 @@
*/
package org.jbpm.util;
+import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.rmi.PortableRemoteObject;
@@ -33,12 +34,20 @@
public static Object lookup(String jndiName, Class type) {
try {
- InitialContext initialContext = new InitialContext();
- Object object = initialContext.lookup(jndiName);
- return PortableRemoteObject.narrow(object, type);
+ return PortableRemoteObject.narrow(lookup(jndiName), type);
}
catch (NamingException e) {
throw new JndiLookupException("could not retrieve: " + jndiName, e);
}
}
+
+ private static Object lookup(String jndiName) throws NamingException {
+ Context initialContext = new InitialContext();
+ try {
+ return initialContext.lookup(jndiName);
+ }
+ finally {
+ initialContext.close();
+ }
+ }
}
Modified: jbpm3/branches/jbpm-3.2-soa/modules/core/src/test/java/org/jbpm/SerializabilityTest.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/core/src/test/java/org/jbpm/SerializabilityTest.java 2010-05-05 09:13:37 UTC (rev 6300)
+++ jbpm3/branches/jbpm-3.2-soa/modules/core/src/test/java/org/jbpm/SerializabilityTest.java 2010-05-05 23:19:51 UTC (rev 6301)
@@ -25,7 +25,9 @@
import java.io.Serializable;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
+import java.net.URI;
import java.net.URISyntaxException;
+import java.net.URL;
import org.jbpm.util.ClassLoaderUtil;
@@ -81,24 +83,25 @@
};
public void testForNonSerializableClasses() throws URISyntaxException {
- File classDir = new File(ClassLoaderUtil.class.getProtectionDomain()
- .getCodeSource()
- .getLocation()
- .getPath());
+ URL location = ClassLoaderUtil.class.getProtectionDomain().getCodeSource().getLocation();
+ File classDir = new File(new URI(location.toString()));
File[] files = classDir.listFiles();
+ if (files == null) return;
+
+ // scan top level packages
for (int i = 0; i < files.length; i++) {
File file = files[i];
- String fileName = file.getName();
if (file.isDirectory()) {
- scanForClasses(file, fileName);
+ scanForClasses(file, file.getName());
}
- // no classes in the anonymous package
}
}
private static void scanForClasses(File classDir, String packageName) {
File[] files = classDir.listFiles();
+ if (files == null) return;
+
for (int i = 0; i < files.length; i++) {
File file = files[i];
String fileName = file.getName();
@@ -117,8 +120,10 @@
Class clazz = Class.forName(className);
if (!Serializable.class.isAssignableFrom(clazz)
- && !Modifier.isAbstract(clazz.getModifiers()) && !isAnonymous(clazz)
- && !isUtility(clazz) && !isExcused(className)) {
+ && !Modifier.isAbstract(clazz.getModifiers())
+ && !isAnonymous(clazz)
+ && !isUtility(clazz)
+ && !isExcused(className)) {
fail(className + " is NOT Serializable");
}
}
Modified: jbpm3/branches/jbpm-3.2-soa/modules/core/src/test/java/org/jbpm/mock/Jndi.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/core/src/test/java/org/jbpm/mock/Jndi.java 2010-05-05 09:13:37 UTC (rev 6300)
+++ jbpm3/branches/jbpm-3.2-soa/modules/core/src/test/java/org/jbpm/mock/Jndi.java 2010-05-05 23:19:51 UTC (rev 6301)
@@ -27,6 +27,7 @@
import javax.naming.Context;
import javax.naming.Name;
+import javax.naming.NameAlreadyBoundException;
import javax.naming.NameParser;
import javax.naming.NamingEnumeration;
import javax.naming.NamingException;
@@ -34,7 +35,7 @@
public class Jndi {
- static Map repository = null;
+ static Map repository;
public static void initialize() {
System.setProperty("java.naming.factory.initial", "org.jbpm.mock.Jndi$MockInitialContextFactory");
@@ -64,17 +65,18 @@
repository.remove(name);
}
public void bind(String name, Object obj) throws NamingException {
+ if (repository.containsKey(name)) {
+ throw new NameAlreadyBoundException(name);
+ }
repository.put(name, obj);
}
-
public void rebind(String name, Object obj) throws NamingException {
repository.put(name, obj);
}
-
-
public void close() throws NamingException {
- throw new UnsupportedOperationException();
+ repository.clear();
}
+
public String getNameInNamespace() throws NamingException {
throw new UnsupportedOperationException();
}
Modified: jbpm3/branches/jbpm-3.2-soa/modules/enterprise/src/main/java/org/jbpm/ejb/impl/CommandListenerBean.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/enterprise/src/main/java/org/jbpm/ejb/impl/CommandListenerBean.java 2010-05-05 09:13:37 UTC (rev 6300)
+++ jbpm3/branches/jbpm-3.2-soa/modules/enterprise/src/main/java/org/jbpm/ejb/impl/CommandListenerBean.java 2010-05-05 23:19:51 UTC (rev 6301)
@@ -41,6 +41,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+
import org.jbpm.command.Command;
import org.jbpm.ejb.LocalCommandService;
import org.jbpm.ejb.LocalCommandServiceHome;
@@ -96,14 +97,14 @@
private static final long serialVersionUID = 1L;
- MessageDrivenContext messageDrivenContext;
- LocalCommandService commandService;
+ private MessageDrivenContext messageDrivenContext;
+ private LocalCommandService commandService;
- Destination deadLetterQueue;
- ConnectionFactory jmsConnectionFactory;
- Connection jmsConnection;
+ private Destination deadLetterQueue;
+ private ConnectionFactory jmsConnectionFactory;
+ private Connection jmsConnection;
- transient final Log log = LogFactory.getLog(getClass());
+ private static final Log log = LogFactory.getLog(CommandListenerBean.class);
public void onMessage(Message message) {
try {
@@ -160,27 +161,21 @@
private void discard(Message message) throws JMSException {
if (deadLetterQueue == null) {
- // lookup dead letter queue
+ if (log.isDebugEnabled()) {
+ log.debug("dead letter queue not available, rejecting: " + message);
+ }
+ messageDrivenContext.setRollbackOnly();
+ }
+ else {
+ // send message to dead letter queue
+ Session jmsSession = createSession();
try {
- Context jndiContext = new InitialContext();
- deadLetterQueue = (Destination) jndiContext.lookup("java:comp/env/jms/DeadLetterQueue");
+ jmsSession.createProducer(deadLetterQueue).send(message);
}
- catch (NamingException e) {
- if (log.isDebugEnabled()) {
- log.debug("failed to retrieve dead letter queue, rejecting: " + message);
- }
- messageDrivenContext.setRollbackOnly();
- return;
+ finally {
+ jmsSession.close();
}
}
- // send message to dead letter queue
- Session jmsSession = createSession();
- try {
- jmsSession.createProducer(deadLetterQueue).send(message);
- }
- finally {
- jmsSession.close();
- }
}
private void sendResult(Serializable result, Destination destination, String correlationId)
@@ -233,11 +228,18 @@
public void ejbCreate() {
try {
Context jndiContext = new InitialContext();
+ jmsConnectionFactory = (ConnectionFactory) jndiContext.lookup("java:comp/env/jms/JbpmConnectionFactory");
LocalCommandServiceHome commandServiceHome = (LocalCommandServiceHome) jndiContext.lookup("java:comp/env/ejb/LocalCommandServiceBean");
commandService = commandServiceHome.create();
- jmsConnectionFactory = (ConnectionFactory) jndiContext.lookup("java:comp/env/jms/JbpmConnectionFactory");
+ try {
+ deadLetterQueue = (Destination) jndiContext.lookup("java:comp/env/jms/DeadLetterQueue");
+ }
+ catch (NamingException e) {
+ // dead letter queue will not be available
+ }
+ jndiContext.close();
}
catch (NamingException e) {
throw new EJBException("error retrieving command service home", e);
Modified: jbpm3/branches/jbpm-3.2-soa/modules/enterprise/src/main/java/org/jbpm/ejb/impl/CommandServiceBean.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/enterprise/src/main/java/org/jbpm/ejb/impl/CommandServiceBean.java 2010-05-05 09:13:37 UTC (rev 6300)
+++ jbpm3/branches/jbpm-3.2-soa/modules/enterprise/src/main/java/org/jbpm/ejb/impl/CommandServiceBean.java 2010-05-05 23:19:51 UTC (rev 6301)
@@ -112,15 +112,17 @@
* default jbpm configuration file will be used (jbpm.cfg.xml).
*/
public void ejbCreate() throws CreateException {
- String jbpmCfgResource = null;
+ String jbpmCfgResource;
try {
- Context initial = new InitialContext();
- jbpmCfgResource = (String) initial.lookup("java:comp/env/JbpmCfgResource");
+ Context jndiContext = new InitialContext();
+ jbpmCfgResource = (String) jndiContext.lookup("java:comp/env/JbpmCfgResource");
}
catch (NamingException e) {
if (log.isDebugEnabled()) {
- log.debug("could not fetch configuration resource from jndi: " + e.getMessage());
+ log.debug("could not fetch configuration resource: " + e.getMessage());
}
+ // use default configuration resource
+ jbpmCfgResource = null;
}
jbpmConfiguration = JbpmConfiguration.getInstance(jbpmCfgResource);
Modified: jbpm3/branches/jbpm-3.2-soa/modules/enterprise/src/main/java/org/jbpm/ejb/impl/JobListenerBean.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/enterprise/src/main/java/org/jbpm/ejb/impl/JobListenerBean.java 2010-05-05 09:13:37 UTC (rev 6300)
+++ jbpm3/branches/jbpm-3.2-soa/modules/enterprise/src/main/java/org/jbpm/ejb/impl/JobListenerBean.java 2010-05-05 23:19:51 UTC (rev 6301)
@@ -3,21 +3,23 @@
import javax.jms.JMSException;
import javax.jms.Message;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
import org.jbpm.command.Command;
/**
- * Message-driven bean that listens for {@link Message messages} containing a
- * reference to a pending {@linkplain Job job}. to support asynchronous
- * continuations.
+ * Message-driven bean that listens for {@link Message messages} containing a reference to a
+ * pending {@linkplain Job job}. to support asynchronous continuations.
*
- * The message must have a property called <code>jobId</code> of type
- * <code>long</code> which references a pending <literal>Job</literal> in the
- * database. The message body, if any, is ignored.
+ * The message must have a property called <code>jobId</code> of type <code>long</code> which
+ * references a pending <literal>Job</literal> in the database. The message body, if any, is
+ * ignored.
*
* <h3>Environment</h3>
*
- * This bean extends the {@link CommandListenerBean} and inherits its
- * environment entries and resources available for customization.
+ * This bean extends the {@link CommandListenerBean} and inherits its environment entries and
+ * resources available for customization.
*
* @author Tom Baeyens
* @author Alejandro Guizar
@@ -25,6 +27,7 @@
public class JobListenerBean extends CommandListenerBean {
private static final long serialVersionUID = 1L;
+ private static final Log log = LogFactory.getLog(JobListenerBean.class);
protected Command extractCommand(Message message) throws JMSException {
// checking for jobId property
Modified: jbpm3/branches/jbpm-3.2-soa/modules/enterprise/src/main/java/org/jbpm/ejb/impl/TimerEntityBean.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/enterprise/src/main/java/org/jbpm/ejb/impl/TimerEntityBean.java 2010-05-05 09:13:37 UTC (rev 6300)
+++ jbpm3/branches/jbpm-3.2-soa/modules/enterprise/src/main/java/org/jbpm/ejb/impl/TimerEntityBean.java 2010-05-05 23:19:51 UTC (rev 6301)
@@ -9,12 +9,10 @@
import javax.ejb.EntityContext;
import javax.ejb.TimedObject;
import javax.ejb.TimerService;
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+
import org.jbpm.ejb.LocalCommandService;
import org.jbpm.ejb.LocalCommandServiceHome;
import org.jbpm.graph.exe.ProcessInstance;
@@ -22,6 +20,7 @@
import org.jbpm.job.Timer;
import org.jbpm.scheduler.ejbtimer.ExecuteTimerCommand;
import org.jbpm.scheduler.ejbtimer.TimerInfo;
+import org.jbpm.util.JndiUtil;
/**
* Entity bean that interacts with the EJB timer service to schedule jBPM {@linkplain Timer
@@ -81,14 +80,10 @@
public void ejbActivate() {
try {
- Context initial = new InitialContext();
- LocalCommandServiceHome commandServiceHome =
- (LocalCommandServiceHome) initial.lookup("java:comp/env/ejb/LocalCommandServiceBean");
+ LocalCommandServiceHome commandServiceHome = (LocalCommandServiceHome) JndiUtil
+ .lookup("java:comp/env/ejb/LocalCommandServiceBean", LocalCommandServiceHome.class);
commandService = commandServiceHome.create();
}
- catch (NamingException e) {
- throw new EJBException("failed to retrieve command service home", e);
- }
catch (CreateException e) {
throw new EJBException("command service creation failed", e);
}
@@ -169,7 +164,11 @@
Collection timers = entityContext.getTimerService().getTimers();
boolean debug = log.isDebugEnabled();
if (debug) {
- log.debug("retrieved " + timers.size() + " ejb timer(s) by name '" + timerName + "' for "
+ log.debug("retrieved "
+ + timers.size()
+ + " ejb timer(s) by name '"
+ + timerName
+ + "' for "
+ token);
}
Modified: jbpm3/branches/jbpm-3.2-soa/modules/enterprise/src/main/java/org/jbpm/msg/jms/JmsMessageServiceFactory.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/enterprise/src/main/java/org/jbpm/msg/jms/JmsMessageServiceFactory.java 2010-05-05 09:13:37 UTC (rev 6300)
+++ jbpm3/branches/jbpm-3.2-soa/modules/enterprise/src/main/java/org/jbpm/msg/jms/JmsMessageServiceFactory.java 2010-05-05 23:19:51 UTC (rev 6301)
@@ -24,18 +24,16 @@
import javax.jms.ConnectionFactory;
import javax.jms.Destination;
import javax.jms.JMSException;
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
import org.jbpm.JbpmException;
import org.jbpm.ejb.impl.JobListenerBean;
import org.jbpm.svc.Service;
import org.jbpm.svc.ServiceFactory;
+import org.jbpm.util.JndiUtil;
/**
- * The JMS message service leverages the reliable communication infrastructure available through JMS
- * interfaces to deliver asynchronous continuation messages to the {@link JobListenerBean}.
+ * The JMS message service leverages the reliable communication infrastructure available through
+ * JMS interfaces to deliver asynchronous continuation messages to the {@link JobListenerBean}.
*
* <h3>Configuration</h3>
*
@@ -64,26 +62,16 @@
private ConnectionFactory connectionFactory;
private Destination destination;
- public ConnectionFactory getConnectionFactory() {
+ public synchronized ConnectionFactory getConnectionFactory() {
if (connectionFactory == null) {
- try {
- connectionFactory = (ConnectionFactory) lookup(connectionFactoryJndiName);
- }
- catch (NamingException e) {
- throw new JbpmException("could not retrieve message connection factory", e);
- }
+ connectionFactory = (ConnectionFactory) JndiUtil.lookup(connectionFactoryJndiName, ConnectionFactory.class);
}
return connectionFactory;
}
- public Destination getDestination() {
+ public synchronized Destination getDestination() {
if (destination == null) {
- try {
- destination = (Destination) lookup(destinationJndiName);
- }
- catch (NamingException e) {
- throw new JbpmException("could not retrieve job destination", e);
- }
+ destination = (Destination) JndiUtil.lookup(destinationJndiName, Destination.class);
}
return destination;
}
@@ -92,16 +80,6 @@
return isCommitEnabled;
}
- private static Object lookup(String name) throws NamingException {
- Context initial = new InitialContext();
- try {
- return initial.lookup(name);
- }
- finally {
- initial.close();
- }
- }
-
public Service openService() {
try {
return new JmsMessageService(this);
Modified: jbpm3/branches/jbpm-3.2-soa/modules/enterprise/src/main/java/org/jbpm/scheduler/ejbtimer/EjbSchedulerServiceFactory.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/enterprise/src/main/java/org/jbpm/scheduler/ejbtimer/EjbSchedulerServiceFactory.java 2010-05-05 09:13:37 UTC (rev 6300)
+++ jbpm3/branches/jbpm-3.2-soa/modules/enterprise/src/main/java/org/jbpm/scheduler/ejbtimer/EjbSchedulerServiceFactory.java 2010-05-05 23:19:51 UTC (rev 6301)
@@ -1,12 +1,9 @@
package org.jbpm.scheduler.ejbtimer;
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-
-import org.jbpm.JbpmException;
+import org.jbpm.ejb.LocalTimerEntityHome;
import org.jbpm.svc.Service;
import org.jbpm.svc.ServiceFactory;
+import org.jbpm.util.JndiUtil;
/**
* @author Tom Baeyens
@@ -20,27 +17,13 @@
private LocalTimerServiceHome timerServiceHome;
- public LocalTimerServiceHome getTimerServiceHome() {
+ public synchronized LocalTimerServiceHome getTimerServiceHome() {
if (timerServiceHome == null) {
- try {
- timerServiceHome = (LocalTimerServiceHome) lookup(timerServiceHomeJndiName);
- } catch (NamingException e) {
- throw new JbpmException("ejb timer service lookup problem", e);
- }
+ timerServiceHome = (LocalTimerServiceHome) JndiUtil.lookup(timerServiceHomeJndiName, LocalTimerEntityHome.class);
}
return timerServiceHome;
}
- private static Object lookup(String name) throws NamingException {
- Context initial = new InitialContext();
- try {
- return initial.lookup(name);
- }
- finally {
- initial.close();
- }
- }
-
public Service openService() {
return new EjbSchedulerService(getTimerServiceHome());
}
Modified: jbpm3/branches/jbpm-3.2-soa/modules/enterprise/src/main/java/org/jbpm/scheduler/ejbtimer/EntitySchedulerServiceFactory.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/enterprise/src/main/java/org/jbpm/scheduler/ejbtimer/EntitySchedulerServiceFactory.java 2010-05-05 09:13:37 UTC (rev 6300)
+++ jbpm3/branches/jbpm-3.2-soa/modules/enterprise/src/main/java/org/jbpm/scheduler/ejbtimer/EntitySchedulerServiceFactory.java 2010-05-05 23:19:51 UTC (rev 6301)
@@ -9,11 +9,11 @@
import org.jbpm.job.Timer;
import org.jbpm.svc.Service;
import org.jbpm.svc.ServiceFactory;
+import org.jbpm.util.JndiUtil;
/**
- * The entity scheduler service builds on the transactional notification
- * service for timed events provided by the EJB container to schedule business
- * process {@linkplain Timer timers}.
+ * The entity scheduler service builds on the transactional notification service for timed
+ * events provided by the EJB container to schedule business process {@linkplain Timer timers}.
*
* <h3>Configuration</h3>
*
@@ -24,7 +24,7 @@
* </ul>
*
* Refer to the jBPM manual for details.
- *
+ *
* @author Tom Baeyens
* @author Alejandro Guizar
* @author Fady Matar
@@ -37,27 +37,13 @@
private LocalTimerEntityHome timerEntityHome;
- public LocalTimerEntityHome getTimerEntityHome() {
+ public synchronized LocalTimerEntityHome getTimerEntityHome() {
if (timerEntityHome == null) {
- try {
- timerEntityHome = (LocalTimerEntityHome) lookup(timerEntityHomeJndiName);
- } catch (NamingException e) {
- throw new JbpmException("ejb timer entity lookup problem", e);
- }
+ timerEntityHome = (LocalTimerEntityHome) JndiUtil.lookup(timerEntityHomeJndiName, LocalTimerEntityHome.class);
}
return timerEntityHome;
}
- private static Object lookup(String name) throws NamingException {
- Context initial = new InitialContext();
- try {
- return initial.lookup(name);
- }
- finally {
- initial.close();
- }
- }
-
public Service openService() {
return new EntitySchedulerService(getTimerEntityHome());
}
Modified: jbpm3/branches/jbpm-3.2-soa/modules/enterprise/src/main/java/org/jbpm/scheduler/ejbtimer/TimerServiceBean.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/enterprise/src/main/java/org/jbpm/scheduler/ejbtimer/TimerServiceBean.java 2010-05-05 09:13:37 UTC (rev 6300)
+++ jbpm3/branches/jbpm-3.2-soa/modules/enterprise/src/main/java/org/jbpm/scheduler/ejbtimer/TimerServiceBean.java 2010-05-05 23:19:51 UTC (rev 6301)
@@ -31,9 +31,6 @@
import javax.ejb.SessionContext;
import javax.ejb.TimedObject;
import javax.ejb.TimerService;
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -44,6 +41,7 @@
import org.jbpm.graph.exe.ProcessInstance;
import org.jbpm.graph.exe.Token;
import org.jbpm.job.Timer;
+import org.jbpm.util.JndiUtil;
/**
* Session bean that interacts with the EJB timer service to schedule jBPM {@linkplain Timer
@@ -60,13 +58,10 @@
public void ejbCreate() {
try {
- Context initial = new InitialContext();
- LocalCommandServiceHome commandServiceHome = (LocalCommandServiceHome) initial.lookup("java:comp/env/ejb/LocalCommandServiceBean");
+ LocalCommandServiceHome commandServiceHome = (LocalCommandServiceHome) JndiUtil
+ .lookup("java:comp/env/ejb/LocalCommandServiceBean", LocalCommandServiceHome.class);
commandService = commandServiceHome.create();
}
- catch (NamingException e) {
- throw new EJBException("failed to retrieve command service home", e);
- }
catch (CreateException e) {
throw new EJBException("command service creation failed", e);
}
14 years
JBoss JBPM SVN: r6300 - in jbpm4/trunk: modules/test-cactus and 1 other directories.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2010-05-05 05:13:37 -0400 (Wed, 05 May 2010)
New Revision: 6300
Modified:
jbpm4/trunk/modules/test-cactus/pom.xml
jbpm4/trunk/pom.xml
jbpm4/trunk/qa/hudson-jbpm4-enterprise.sh
jbpm4/trunk/qa/hudson-jbpm4-jboss.sh
jbpm4/trunk/qa/hudson-jbpm4-tomcat.sh
Log:
manage subethasmtp-smtp dependency
fix maven/ant options in hudson scripts
Modified: jbpm4/trunk/modules/test-cactus/pom.xml
===================================================================
--- jbpm4/trunk/modules/test-cactus/pom.xml 2010-05-05 08:24:30 UTC (rev 6299)
+++ jbpm4/trunk/modules/test-cactus/pom.xml 2010-05-05 09:13:37 UTC (rev 6300)
@@ -129,11 +129,6 @@
<version>1.1</version>
</artifactItem>
<artifactItem>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- <version>1.1</version>
- </artifactItem>
- <artifactItem>
<groupId>org.jbpm.jbpm4</groupId>
<artifactId>jbpm-examples</artifactId>
<classifier>tests</classifier>
@@ -206,11 +201,6 @@
<version>1.1</version>
</artifactItem>
<artifactItem>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- <version>1.1</version>
- </artifactItem>
- <artifactItem>
<groupId>org.jbpm.jbpm4</groupId>
<artifactId>jbpm-examples</artifactId>
<classifier>tests</classifier>
Modified: jbpm4/trunk/pom.xml
===================================================================
--- jbpm4/trunk/pom.xml 2010-05-05 08:24:30 UTC (rev 6299)
+++ jbpm4/trunk/pom.xml 2010-05-05 09:13:37 UTC (rev 6300)
@@ -397,6 +397,11 @@
<version>${spring.version}</version>
</dependency>
<dependency>
+ <groupId>org.subethamail</groupId>
+ <artifactId>subethasmtp-smtp</artifactId>
+ <version>${wiser.version}</version>
+ </dependency>
+ <dependency>
<groupId>org.subethamail</groupId>
<artifactId>subethasmtp-wiser</artifactId>
<version>${wiser.version}</version>
Modified: jbpm4/trunk/qa/hudson-jbpm4-enterprise.sh
===================================================================
--- jbpm4/trunk/qa/hudson-jbpm4-enterprise.sh 2010-05-05 08:24:30 UTC (rev 6299)
+++ jbpm4/trunk/qa/hudson-jbpm4-enterprise.sh 2010-05-05 09:13:37 UTC (rev 6300)
@@ -3,7 +3,9 @@
# runs the jboss integration test suite
MAVEN_OPTS="-Xmx512M -Djboss.bind.address=$JBOSS_BINDADDR"
-ANT_OPTS="-Djboss.version=$JBOSS_VERSION -Djbpm.parent.dir=$WORKSPACE -Djboss.distro.dir=$SOURCE_REPO/jboss -Djboss.bind.address=$JBOSS_BINDADDR"
+ANT_OPTS="-Djboss.version=$JBOSS_VERSION -Djbpm.parent.dir=$WORKSPACE \
+-Djboss.distro.dir=$SOURCE_REPO/jboss -Djboss.bind.address=$JBOSS_BINDADDR \
+-Dhsql.bind.address=$JBOSS_BINDADDR"
mvn -U -Pdistro,enterprise clean install
ant -f qa/build.xml testsuite.enterprise.setup
Modified: jbpm4/trunk/qa/hudson-jbpm4-jboss.sh
===================================================================
--- jbpm4/trunk/qa/hudson-jbpm4-jboss.sh 2010-05-05 08:24:30 UTC (rev 6299)
+++ jbpm4/trunk/qa/hudson-jbpm4-jboss.sh 2010-05-05 09:13:37 UTC (rev 6300)
@@ -2,10 +2,10 @@
#
# runs the jboss integration test suite
-MAVEN_OPTS=-Xmx512M -Djboss.bind.address=$JBOSS_BINDADDR
-ANT_OPTS=-Djboss.version=$JBOSS_VERSION -Djbpm.parent.dir=$WORKSPACE\
--Djboss.distro.dir=$SOURCE_REPO/jboss -Djboss.bind.address=$JBOSS_BINDADDR\
--Dhsql.bind.address=$JBOSS_BINDADDR
+MAVEN_OPTS="-Xmx512M -Djboss.bind.address=$JBOSS_BINDADDR"
+ANT_OPTS="-Djboss.version=$JBOSS_VERSION -Djbpm.parent.dir=$WORKSPACE \
+-Djboss.distro.dir=$SOURCE_REPO/jboss -Djboss.bind.address=$JBOSS_BINDADDR \
+-Dhsql.bind.address=$JBOSS_BINDADDR"
# just in case the previous run didnt complete ok, we stop jboss
ant -f modules/distro/src/main/files/install/build.xml reinstall.jboss
Modified: jbpm4/trunk/qa/hudson-jbpm4-tomcat.sh
===================================================================
--- jbpm4/trunk/qa/hudson-jbpm4-tomcat.sh 2010-05-05 08:24:30 UTC (rev 6299)
+++ jbpm4/trunk/qa/hudson-jbpm4-tomcat.sh 2010-05-05 09:13:37 UTC (rev 6300)
@@ -2,8 +2,9 @@
#
# runs the jboss integration test suite
-MAVEN_OPTS="-Xmx512M"
-ANT_OPTS="-Djbpm.parent.dir=$WORKSPACE -Djboss.distro.dir=$SOURCE_REPO/jboss -Dtomcat.distro.dir=tomcat.downloads"
+MAVEN_OPTS="-Xmx512M -Dtomcat.bind.address=$TOMCAT_BINDADDR"
+ANT_OPTS="-Djbpm.parent.dir=$WORKSPACE -Djboss.distro.dir=$SOURCE_REPO/jboss \
+-Dtomcat.distro.dir=tomcat.downloads -Dtomcat.bind.address=$TOMCAT_BINDADDR"
mvn -U -Pdistro,integration clean install
ant -f qa/build.xml reinstall.jbpm
14 years
JBoss JBPM SVN: r6299 - in jbpm4/trunk: modules/distro/src/main/files/install/jdbc and 4 other directories.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2010-05-05 04:24:30 -0400 (Wed, 05 May 2010)
New Revision: 6299
Modified:
jbpm4/trunk/modules/distro/src/main/files/install/build.xml
jbpm4/trunk/modules/distro/src/main/files/install/jdbc/hsqldb.properties
jbpm4/trunk/modules/examples/src/test/config/jndi.properties
jbpm4/trunk/modules/test-cactus/src/test/resources/jndi.properties
jbpm4/trunk/qa/hudson-jbpm4-jboss.sh
jbpm4/trunk/qa/jdbc/hsqldb.properties
Log:
introduce hsql.bind.addresss property
Modified: jbpm4/trunk/modules/distro/src/main/files/install/build.xml
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/install/build.xml 2010-05-05 06:09:41 UTC (rev 6298)
+++ jbpm4/trunk/modules/distro/src/main/files/install/build.xml 2010-05-05 08:24:30 UTC (rev 6299)
@@ -22,6 +22,7 @@
<property name="install.src.dir" value="${jbpm.home}/install/src" />
<property name="mail.cfg" value="default" />
+ <property name="hsql.bind.address" value="localhost" />
<property name="jdbc.properties.dir" value="${jbpm.home}/install/jdbc" />
<property file="${jdbc.properties.dir}/${database}.properties" />
@@ -186,8 +187,8 @@
<filterset filtersfile="${jdbc.properties.dir}/${database}.properties" />
</copy>
<replace file="${cfg.dest.dir}/jbpm.hibernate.cfg.xml"
- token="jboss.bind.address"
- value="${jboss.bind.address}" />
+ token="$${hsql.bind.address}"
+ value="${hsql.bind.address}" />
<copy todir="${cfg.dest.dir}" overwrite="true">
<fileset dir="${install.src.dir}/cfg/logging/${logging}" />
</copy>
@@ -616,14 +617,14 @@
<java classname="org.hsqldb.Server">
<classpath location="${hsqldb.server.install.dir}/hsqldb.jar" />
<arg value="-address" />
- <arg value="${jboss.bind.address}" />
+ <arg value="${hsql.bind.address}" />
<arg value="-port" />
<arg value="1701" />
<arg value="-dbname.0" />
<arg value="jbpmDatabase" />
</java>
<waitfor maxwait="1" maxwaitunit="minute" checkevery="10" checkeveryunit="second">
- <socket server="${jboss.bind.address}" port="1701" />
+ <socket server="${hsql.bind.address}" port="1701" />
</waitfor>
</target>
@@ -758,7 +759,7 @@
<target name="hsqldb.databasemanager" description="start the hsqldb database manager">
<java classname="org.hsqldb.util.DatabaseManager" fork="true">
<arg value="-url" />
- <arg value="jdbc:hsqldb:hsql://${jboss.bind.address}:1701" />
+ <arg value="jdbc:hsqldb:hsql://${hsql.bind.address}:1701" />
<classpath>
<fileset dir="${jbpm.home}/lib">
<include name="hsqldb.jar" />
Modified: jbpm4/trunk/modules/distro/src/main/files/install/jdbc/hsqldb.properties
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/install/jdbc/hsqldb.properties 2010-05-05 06:09:41 UTC (rev 6298)
+++ jbpm4/trunk/modules/distro/src/main/files/install/jdbc/hsqldb.properties 2010-05-05 08:24:30 UTC (rev 6299)
@@ -1,4 +1,4 @@
jdbc.driver=org.hsqldb.jdbcDriver
-jdbc.url=jdbc:hsqldb:hsql://@jboss.bind.address@:1701
+jdbc.url=jdbc\:hsqldb\:hsql\://${hsql.bind.address}\:1701
jdbc.username=sa
jdbc.password=
Modified: jbpm4/trunk/modules/examples/src/test/config/jndi.properties
===================================================================
--- jbpm4/trunk/modules/examples/src/test/config/jndi.properties 2010-05-05 06:09:41 UTC (rev 6298)
+++ jbpm4/trunk/modules/examples/src/test/config/jndi.properties 2010-05-05 08:24:30 UTC (rev 6299)
@@ -1,3 +1,3 @@
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
-java.naming.provider.url=jnp\://${jboss.bind.address}\:1099
+java.naming.factory.url.pkgs=org.jboss.naming\:org.jnp.interfaces
+java.naming.provider.url=jnp\://@jboss.bind.address@\:1099
Modified: jbpm4/trunk/modules/test-cactus/src/test/resources/jndi.properties
===================================================================
--- jbpm4/trunk/modules/test-cactus/src/test/resources/jndi.properties 2010-05-05 06:09:41 UTC (rev 6298)
+++ jbpm4/trunk/modules/test-cactus/src/test/resources/jndi.properties 2010-05-05 08:24:30 UTC (rev 6299)
@@ -1,3 +1,3 @@
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
-java.naming.provider.url=jnp://@jboss.bind.address@:1099
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.factory.url.pkgs=org.jboss.naming\:org.jnp.interfaces
+java.naming.provider.url=jnp\://@jboss.bind.address@\:1099
Modified: jbpm4/trunk/qa/hudson-jbpm4-jboss.sh
===================================================================
--- jbpm4/trunk/qa/hudson-jbpm4-jboss.sh 2010-05-05 06:09:41 UTC (rev 6298)
+++ jbpm4/trunk/qa/hudson-jbpm4-jboss.sh 2010-05-05 08:24:30 UTC (rev 6299)
@@ -2,8 +2,10 @@
#
# runs the jboss integration test suite
-MAVEN_OPTS="-Xmx512M -Djboss.bind.address=$JBOSS_BINDADDR"
-ANT_OPTS="-Djboss.version=$JBOSS_VERSION -Djbpm.parent.dir=$WORKSPACE -Djboss.distro.dir=$SOURCE_REPO/jboss -Djboss.bind.address=$JBOSS_BINDADDR"
+MAVEN_OPTS=-Xmx512M -Djboss.bind.address=$JBOSS_BINDADDR
+ANT_OPTS=-Djboss.version=$JBOSS_VERSION -Djbpm.parent.dir=$WORKSPACE\
+-Djboss.distro.dir=$SOURCE_REPO/jboss -Djboss.bind.address=$JBOSS_BINDADDR\
+-Dhsql.bind.address=$JBOSS_BINDADDR
# just in case the previous run didnt complete ok, we stop jboss
ant -f modules/distro/src/main/files/install/build.xml reinstall.jboss
Modified: jbpm4/trunk/qa/jdbc/hsqldb.properties
===================================================================
--- jbpm4/trunk/qa/jdbc/hsqldb.properties 2010-05-05 06:09:41 UTC (rev 6298)
+++ jbpm4/trunk/qa/jdbc/hsqldb.properties 2010-05-05 08:24:30 UTC (rev 6299)
@@ -1,4 +1,4 @@
jdbc.driver=org.hsqldb.jdbcDriver
-jdbc.url=jdbc:hsqldb:hsql://localhost:1701
+jdbc.url=jdbc\:hsqldb\:hsql\://${hsql.bind.address}\:1701
jdbc.username=sa
jdbc.password=
14 years
JBoss JBPM SVN: r6298 - jbpm4/trunk/modules/distro/src/main/files/install.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2010-05-05 02:09:41 -0400 (Wed, 05 May 2010)
New Revision: 6298
Modified:
jbpm4/trunk/modules/distro/src/main/files/install/build.xml
Log:
spawn executables from install buildfile as appropriate
Modified: jbpm4/trunk/modules/distro/src/main/files/install/build.xml
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/install/build.xml 2010-05-04 08:19:53 UTC (rev 6297)
+++ jbpm4/trunk/modules/distro/src/main/files/install/build.xml 2010-05-05 06:09:41 UTC (rev 6298)
@@ -185,8 +185,9 @@
overwrite="true">
<filterset filtersfile="${jdbc.properties.dir}/${database}.properties" />
</copy>
- <replace file="${cfg.dest.dir}/jbpm.hibernate.cfg.xml" token="jboss.bind.address"
- value="${jboss.bind.address}" />
+ <replace file="${cfg.dest.dir}/jbpm.hibernate.cfg.xml"
+ token="jboss.bind.address"
+ value="${jboss.bind.address}" />
<copy todir="${cfg.dest.dir}" overwrite="true">
<fileset dir="${install.src.dir}/cfg/logging/${logging}" />
</copy>
@@ -409,11 +410,12 @@
<target name="start.jboss"
description="starts jboss and waits till jboss is booted, then lets jboss run in the background">
<exec executable="${jboss.home}/bin/run.bat"
+ spawn="yes"
os="Windows 7,Windows Vista,Windows XP,Windows 2000">
<arg value="-b" />
<arg value="${jboss.bind.address}" />
</exec>
- <exec executable="${jboss.home}/bin/run.sh" os="Linux,Mac OS X">
+ <exec executable="${jboss.home}/bin/run.sh" spawn="yes" os="Linux,Mac OS X">
<arg value="-b" />
<arg value="${jboss.bind.address}" />
</exec>
@@ -659,11 +661,13 @@
description="Signals Tomcat to stop, but doesn't wait till its finished">
<exec executable="${tomcat.home}/bin/catalina.bat"
dir="${tomcat.home}/bin"
+ spawn="yes"
os="Windows 7,Windows Vista,Windows XP,Windows 2000">
<arg value="stop" />
</exec>
<exec executable="${tomcat.home}/bin/catalina.sh"
dir="${tomcat.home}/bin"
+ spawn="yes"
os="Linux,Mac OS X">
<arg value="stop" />
</exec>
@@ -785,10 +789,9 @@
<!-- ### START ECLIPSE ################################################## -->
<target name="start.eclipse" description="starts eclipse">
<!-- Windows -->
- <exec executable="cmd" os="Windows 7,Windows Vista,Windows XP,Windows 2000">
- <arg value="/C" />
- <arg value="start" />
- <arg value="${jbpm.home}/eclipse/eclipse.exe" />
+ <exec executable="${jbpm.home}/eclipse/eclipse.exe"
+ spawn="yes"
+ os="Windows 7,Windows Vista,Windows XP,Windows 2000">
<arg value="-data" />
<arg value="${jbpm.home}/workspace" />
</exec>
@@ -797,21 +800,18 @@
<fileset dir="${jbpm.home}/eclipse">
<filename name="eclipse" />
</fileset>
- <fileset dir="${jbpm.home}/eclipse/Eclipse.app/Contents/MacOS/"> <!-- Path is different for OS X -->
+ <!-- Path is different for OS X -->
+ <fileset dir="${jbpm.home}/eclipse/Eclipse.app/Contents/MacOS/">
<filename name="eclipse" />
</fileset>
</chmod>
- <exec executable="/bin/bash" os="Linux">
- <arg value="-c" />
- <arg value="${jbpm.home}/eclipse/eclipse" />
+ <exec executable="${jbpm.home}/eclipse/eclipse" os="Linux">
<arg value="-data" />
<arg value="${jbpm.home}/workspace" />
</exec>
- <exec executable="/bin/bash" os="Mac OS X">
- <arg value="-c" />
- <arg value="${jbpm.home}/eclipse/Eclipse.app/Contents/MacOS/eclipse" />
+ <exec executable="${jbpm.home}/eclipse/Eclipse.app/Contents/MacOS/eclipse" os="Mac OS X">
<arg value="-data" />
- <arg value="${jbpm.home}/workspace"/>
+ <arg value="${jbpm.home}/workspace" />
</exec>
</target>
14 years
JBoss JBPM SVN: r6297 - jbpm4/trunk/modules/distro/src/main/files/install.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2010-05-04 04:19:53 -0400 (Tue, 04 May 2010)
New Revision: 6297
Modified:
jbpm4/trunk/modules/distro/src/main/files/install/build.xml
Log:
register bind address in stop hsqldb server;
pass jnp interfaces file to jboss
Modified: jbpm4/trunk/modules/distro/src/main/files/install/build.xml
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/install/build.xml 2010-05-04 07:45:59 UTC (rev 6296)
+++ jbpm4/trunk/modules/distro/src/main/files/install/build.xml 2010-05-04 08:19:53 UTC (rev 6297)
@@ -427,9 +427,13 @@
description="signals jboss to stop, but doesn't wait till its finished">
<exec executable="${jboss.home}/bin/shutdown.bat"
os="Windows 7,Windows Vista,Windows XP,Windows 2000">
+ <arg value="-s" />
+ <arg value="jnp://${jboss.bind.address}:1099" />
<arg value="-S" />
</exec>
<exec executable="${jboss.home}/bin/shutdown.sh" os="Linux,Mac OS X">
+ <arg value="-s" />
+ <arg value="jnp://${jboss.bind.address}:1099" />
<arg value="-S" />
</exec>
</target>
@@ -607,14 +611,15 @@
<!-- ### START HSQLDB SERVER ################################################ -->
<target name="start.hsqldb.server" if="is.hsqldb">
- <exec executable="${hsqldb.server.install.dir}/start-hsqldb-server.bat"
- os="Windows 7,Windows Vista,Windows XP,Windows 2000">
- <env key="JBOSS_BINDADDR" value="${jboss.bind.address}" />
- </exec>
- <exec executable="${hsqldb.server.install.dir}/start-hsqldb-server.sh"
- os="Linux,Mac OS X">
- <env key="JBOSS_BINDADDR" value="${jboss.bind.address}" />
- </exec>
+ <java classname="org.hsqldb.Server">
+ <classpath location="${hsqldb.server.install.dir}/hsqldb.jar" />
+ <arg value="-address" />
+ <arg value="${jboss.bind.address}" />
+ <arg value="-port" />
+ <arg value="1701" />
+ <arg value="-dbname.0" />
+ <arg value="jbpmDatabase" />
+ </java>
<waitfor maxwait="1" maxwaitunit="minute" checkevery="10" checkeveryunit="second">
<socket server="${jboss.bind.address}" port="1701" />
</waitfor>
14 years
JBoss JBPM SVN: r6296 - in jbpm4/trunk/modules/distro/src/main/files/install: jdbc and 1 other directory.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2010-05-04 03:45:59 -0400 (Tue, 04 May 2010)
New Revision: 6296
Modified:
jbpm4/trunk/modules/distro/src/main/files/install/build.xml
jbpm4/trunk/modules/distro/src/main/files/install/jdbc/hsqldb.properties
Log:
substitute bind address in hsqldb properties
Modified: jbpm4/trunk/modules/distro/src/main/files/install/build.xml
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/install/build.xml 2010-05-04 06:41:09 UTC (rev 6295)
+++ jbpm4/trunk/modules/distro/src/main/files/install/build.xml 2010-05-04 07:45:59 UTC (rev 6296)
@@ -185,6 +185,8 @@
overwrite="true">
<filterset filtersfile="${jdbc.properties.dir}/${database}.properties" />
</copy>
+ <replace file="${cfg.dest.dir}/jbpm.hibernate.cfg.xml" token="jboss.bind.address"
+ value="${jboss.bind.address}" />
<copy todir="${cfg.dest.dir}" overwrite="true">
<fileset dir="${install.src.dir}/cfg/logging/${logging}" />
</copy>
@@ -204,7 +206,6 @@
</or>
</condition>
<antcall target="internal.copy.spring.applicationContext" />
-
</target>
<target name="internal.copy.spring.applicationContext" if="is.spring.environment">
@@ -334,6 +335,7 @@
<fileset dir="${jbpm.home}">
<include name="jbpm.jar" />
</fileset>
+
<fileset dir="${jbpm.home}/lib">
<include name="antlr-runtime.jar" />
<!-- include name="core.jar" /-->
@@ -352,7 +354,6 @@
<include name="joda-time.jar" />
<include name="juel*.jar" />
<include name="livetribe-jsr223.jar" />
-
</fileset>
</copy>
@@ -495,7 +496,6 @@
<target name="install.jbpm.into.tomcat"
depends="create.cfg"
description="Installs jBPM into tomcat">
-
<property name="is.tomcat" value="true" />
<!-- create the jbpm configuration jar file and drop in /lib -->
@@ -673,7 +673,7 @@
file="${install.src.dir}/cfg/jbpm/standalone.testsuite.jbpm.cfg.xml"
overwrite="true" />
<java classname="org.jbpm.db.Create" fork="true">
- <arg line="${database}" />
+ <arg value="${database}" />
<classpath>
<pathelement location="${jbpm.home}/install/generated/cfg" />
<pathelement location="${jbpm.home}/install/src/db" />
@@ -696,7 +696,7 @@
file="${install.src.dir}/cfg/jbpm/standalone.testsuite.jbpm.cfg.xml"
overwrite="true" />
<java classname="org.jbpm.db.Upgrade" fork="true">
- <arg line="${database}" />
+ <arg value="${database}" />
<classpath>
<pathelement location="${jbpm.home}/install/generated/cfg" />
<pathelement location="${jbpm.home}/install/src/db" />
@@ -748,7 +748,8 @@
<!-- ### START HSQLDB DATABASE MGR ##################################### -->
<target name="hsqldb.databasemanager" description="start the hsqldb database manager">
<java classname="org.hsqldb.util.DatabaseManager" fork="true">
- <arg line="-url jdbc:hsqldb:hsql://localhost:1701" />
+ <arg value="-url" />
+ <arg value="jdbc:hsqldb:hsql://${jboss.bind.address}:1701" />
<classpath>
<fileset dir="${jbpm.home}/lib">
<include name="hsqldb.jar" />
Modified: jbpm4/trunk/modules/distro/src/main/files/install/jdbc/hsqldb.properties
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/install/jdbc/hsqldb.properties 2010-05-04 06:41:09 UTC (rev 6295)
+++ jbpm4/trunk/modules/distro/src/main/files/install/jdbc/hsqldb.properties 2010-05-04 07:45:59 UTC (rev 6296)
@@ -1,4 +1,4 @@
jdbc.driver=org.hsqldb.jdbcDriver
-jdbc.url=jdbc:hsqldb:hsql://localhost:1701
+jdbc.url=jdbc:hsqldb:hsql://@jboss.bind.address@:1701
jdbc.username=sa
jdbc.password=
14 years
JBoss JBPM SVN: r6295 - jbpm4/trunk/modules/distro/src/main/files/install.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2010-05-04 02:41:09 -0400 (Tue, 04 May 2010)
New Revision: 6295
Modified:
jbpm4/trunk/modules/distro/src/main/files/install/build.xml
Log:
replace osfamily attribute in exec tasks with os; ant versions older than 1.7 do not support osfamily
Modified: jbpm4/trunk/modules/distro/src/main/files/install/build.xml
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/install/build.xml 2010-05-04 06:16:51 UTC (rev 6294)
+++ jbpm4/trunk/modules/distro/src/main/files/install/build.xml 2010-05-04 06:41:09 UTC (rev 6295)
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
-
<project name="jbpm.install">
<!-- DEVELOPER SPECIFIC CONFIGURATIONS -->
@@ -287,8 +286,8 @@
depends="get.jboss"
description="Downloads jboss to ${jboss.distro.dir} if its not available and then unzips jboss">
<unzip src="${jboss.distro.path}" dest="${jboss.parent.dir}" />
- <chmod perm="a+x" file="${jboss.home}/bin/run.sh" os="Linux, Mac OS X" />
- <chmod perm="a+x" file="${jboss.home}/bin/shutdown.sh" os="Linux, Mac OS X" />
+ <chmod perm="a+x" file="${jboss.home}/bin/run.sh" />
+ <chmod perm="a+x" file="${jboss.home}/bin/shutdown.sh" />
</target>
<!-- ### GET JBOSS ###################################################### -->
@@ -409,11 +408,11 @@
<target name="start.jboss"
description="starts jboss and waits till jboss is booted, then lets jboss run in the background">
<exec executable="${jboss.home}/bin/run.bat"
- osfamily="windows">
+ os="Windows 7,Windows Vista,Windows XP,Windows 2000">
<arg value="-b" />
<arg value="${jboss.bind.address}" />
</exec>
- <exec executable="${jboss.home}/bin/run.sh" osfamily="unix">
+ <exec executable="${jboss.home}/bin/run.sh" os="Linux,Mac OS X">
<arg value="-b" />
<arg value="${jboss.bind.address}" />
</exec>
@@ -425,10 +424,11 @@
<!-- ### STOP JBOSS ################################################### -->
<target name="stop.jboss"
description="signals jboss to stop, but doesn't wait till its finished">
- <exec executable="${jboss.home}/bin/shutdown.bat" osfamily="windows">
+ <exec executable="${jboss.home}/bin/shutdown.bat"
+ os="Windows 7,Windows Vista,Windows XP,Windows 2000">
<arg value="-S" />
</exec>
- <exec executable="${jboss.home}/bin/shutdown.sh" osfamily="unix">
+ <exec executable="${jboss.home}/bin/shutdown.sh" os="Linux,Mac OS X">
<arg value="-S" />
</exec>
</target>
@@ -476,7 +476,7 @@
</target>
<target name="install.tomcat.linuxandmac" if="is.linux.unix.or.mac">
- <chmod perm="a+x" os="Linux, Mac OS X">
+ <chmod perm="a+x">
<fileset dir="${tomcat.home}/bin">
<include name="*.sh" />
</fileset>
@@ -598,7 +598,7 @@
<copy todir="${hsqldb.server.install.dir}">
<fileset dir="${hsqldb.server.source.dir}" />
</copy>
- <chmod perm="a+x" os="Linux, Mac OS X">
+ <chmod perm="a+x">
<fileset dir="${hsqldb.server.install.dir}">
<include name="*.sh" />
</fileset>
@@ -607,10 +607,12 @@
<!-- ### START HSQLDB SERVER ################################################ -->
<target name="start.hsqldb.server" if="is.hsqldb">
- <exec executable="${hsqldb.server.install.dir}/start-hsqldb-server.bat" osfamily="windows">
+ <exec executable="${hsqldb.server.install.dir}/start-hsqldb-server.bat"
+ os="Windows 7,Windows Vista,Windows XP,Windows 2000">
<env key="JBOSS_BINDADDR" value="${jboss.bind.address}" />
</exec>
- <exec executable="${hsqldb.server.install.dir}/start-hsqldb-server.sh" osfamily="unix">
+ <exec executable="${hsqldb.server.install.dir}/start-hsqldb-server.sh"
+ os="Linux,Mac OS X">
<env key="JBOSS_BINDADDR" value="${jboss.bind.address}" />
</exec>
<waitfor maxwait="1" maxwaitunit="minute" checkevery="10" checkeveryunit="second">
@@ -652,12 +654,12 @@
description="Signals Tomcat to stop, but doesn't wait till its finished">
<exec executable="${tomcat.home}/bin/catalina.bat"
dir="${tomcat.home}/bin"
- osfamily="windows">
+ os="Windows 7,Windows Vista,Windows XP,Windows 2000">
<arg value="stop" />
</exec>
<exec executable="${tomcat.home}/bin/catalina.sh"
dir="${tomcat.home}/bin"
- osfamily="unix">
+ os="Linux,Mac OS X">
<arg value="stop" />
</exec>
</target>
@@ -777,7 +779,7 @@
<!-- ### START ECLIPSE ################################################## -->
<target name="start.eclipse" description="starts eclipse">
<!-- Windows -->
- <exec executable="cmd" osfamily="windows">
+ <exec executable="cmd" os="Windows 7,Windows Vista,Windows XP,Windows 2000">
<arg value="/C" />
<arg value="start" />
<arg value="${jbpm.home}/eclipse/eclipse.exe" />
14 years
JBoss JBPM SVN: r6294 - in jbpm4/trunk: modules/distro/src/main/files/install/src/hsqldb-server and 3 other directories.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2010-05-04 02:16:51 -0400 (Tue, 04 May 2010)
New Revision: 6294
Added:
jbpm4/trunk/modules/test-cactus/src/test/resources/jndi.properties
Modified:
jbpm4/trunk/modules/distro/src/main/files/install/build.xml
jbpm4/trunk/modules/distro/src/main/files/install/src/hsqldb-server/start-hsqldb-server.sh
jbpm4/trunk/modules/test-cactus/pom.xml
jbpm4/trunk/qa/hudson-jbpm4-enterprise.sh
jbpm4/trunk/qa/hudson-jbpm4-jboss.sh
jbpm4/trunk/qa/hudson-jbpm4-tomcat.sh
jbpm4/trunk/qa/hudson-jbpm4-upgrade.sh
Log:
pass bind address to hsqldb server;
specify jndi properties in test-cactus module;
fix maven/ant options in shell scripts
Modified: jbpm4/trunk/modules/distro/src/main/files/install/build.xml
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/install/build.xml 2010-05-04 04:20:24 UTC (rev 6293)
+++ jbpm4/trunk/modules/distro/src/main/files/install/build.xml 2010-05-04 06:16:51 UTC (rev 6294)
@@ -409,12 +409,12 @@
<target name="start.jboss"
description="starts jboss and waits till jboss is booted, then lets jboss run in the background">
<exec executable="${jboss.home}/bin/run.bat"
- os="Windows Vista, Windows XP,Windows 2000,Windows 98">
- <arg value="-c" />
+ osfamily="windows">
+ <arg value="-b" />
<arg value="${jboss.bind.address}" />
</exec>
- <exec executable="${jboss.home}/bin/run.sh" os="Linux, Unix, Mac">
- <arg value="-c" />
+ <exec executable="${jboss.home}/bin/run.sh" osfamily="unix">
+ <arg value="-b" />
<arg value="${jboss.bind.address}" />
</exec>
<waitfor maxwait="5" maxwaitunit="minute" checkevery="30" checkeveryunit="second">
@@ -425,12 +425,11 @@
<!-- ### STOP JBOSS ################################################### -->
<target name="stop.jboss"
description="signals jboss to stop, but doesn't wait till its finished">
- <exec executable="${jboss.home}/bin/shutdown.bat"
- os="Windows Vista, Windows XP,Windows 2000,Windows 98">
- <arg line="-S" />
+ <exec executable="${jboss.home}/bin/shutdown.bat" osfamily="windows">
+ <arg value="-S" />
</exec>
- <exec executable="${jboss.home}/bin/shutdown.sh" os="Linux, Unix, Mac">
- <arg line="-S" />
+ <exec executable="${jboss.home}/bin/shutdown.sh" osfamily="unix">
+ <arg value="-S" />
</exec>
</target>
@@ -608,15 +607,15 @@
<!-- ### START HSQLDB SERVER ################################################ -->
<target name="start.hsqldb.server" if="is.hsqldb">
- <taskdef name="start-hsqldb-server"
- classname="org.jbpm.pvm.internal.ant.StartHsqldbServerTask">
- <classpath>
- <fileset dir="${jbpm.home}">
- <include name="jbpm.jar" />
- </fileset>
- </classpath>
- </taskdef>
- <start-hsqldb-server hsqldbServerHome="${hsqldb.server.install.dir}" />
+ <exec executable="${hsqldb.server.install.dir}/start-hsqldb-server.bat" osfamily="windows">
+ <env key="JBOSS_BINDADDR" value="${jboss.bind.address}" />
+ </exec>
+ <exec executable="${hsqldb.server.install.dir}/start-hsqldb-server.sh" osfamily="unix">
+ <env key="JBOSS_BINDADDR" value="${jboss.bind.address}" />
+ </exec>
+ <waitfor maxwait="1" maxwaitunit="minute" checkevery="10" checkeveryunit="second">
+ <socket server="${jboss.bind.address}" port="1701" />
+ </waitfor>
</target>
<!-- ### SHUTDOWN HSQLDB SERVER ################################################ -->
@@ -653,13 +652,13 @@
description="Signals Tomcat to stop, but doesn't wait till its finished">
<exec executable="${tomcat.home}/bin/catalina.bat"
dir="${tomcat.home}/bin"
- os="Windows Vista, Windows XP,Windows 2000,Windows 98">
- <arg line="stop" />
+ osfamily="windows">
+ <arg value="stop" />
</exec>
<exec executable="${tomcat.home}/bin/catalina.sh"
dir="${tomcat.home}/bin"
- os="Linux, Unix, Mac">
- <arg line="stop" />
+ osfamily="unix">
+ <arg value="stop" />
</exec>
</target>
@@ -778,8 +777,12 @@
<!-- ### START ECLIPSE ################################################## -->
<target name="start.eclipse" description="starts eclipse">
<!-- Windows -->
- <exec executable="cmd" os="Windows Vista, Windows XP,Windows 2000,Windows 98">
- <arg line="/C start "${jbpm.home}/eclipse/eclipse.exe" "-data" "${jbpm.home}/workspace"" />
+ <exec executable="cmd" osfamily="windows">
+ <arg value="/C" />
+ <arg value="start" />
+ <arg value="${jbpm.home}/eclipse/eclipse.exe" />
+ <arg value="-data" />
+ <arg value="${jbpm.home}/workspace" />
</exec>
<!-- Unix -->
<chmod perm="+x">
@@ -791,10 +794,16 @@
</fileset>
</chmod>
<exec executable="/bin/bash" os="Linux">
- <arg line="-c "${jbpm.home}/eclipse/eclipse" "-data" "${jbpm.home}/workspace"" />
+ <arg value="-c" />
+ <arg value="${jbpm.home}/eclipse/eclipse" />
+ <arg value="-data" />
+ <arg value="${jbpm.home}/workspace" />
</exec>
<exec executable="/bin/bash" os="Mac OS X">
- <arg line="-c "${jbpm.home}/eclipse/Eclipse.app/Contents/MacOS/eclipse" "-data" "${jbpm.home}/workspace"" />
+ <arg value="-c" />
+ <arg value="${jbpm.home}/eclipse/Eclipse.app/Contents/MacOS/eclipse" />
+ <arg value="-data" />
+ <arg value="${jbpm.home}/workspace"/>
</exec>
</target>
Modified: jbpm4/trunk/modules/distro/src/main/files/install/src/hsqldb-server/start-hsqldb-server.sh
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/install/src/hsqldb-server/start-hsqldb-server.sh 2010-05-04 04:20:24 UTC (rev 6293)
+++ jbpm4/trunk/modules/distro/src/main/files/install/src/hsqldb-server/start-hsqldb-server.sh 2010-05-04 06:16:51 UTC (rev 6294)
@@ -1 +1,3 @@
-java -cp hsqldb.jar org.hsqldb.Server -address localhost -port 1701 -dbname.0 jbpmDatabase
\ No newline at end of file
+#!/bin/sh
+[ -z "$JBOSS_BINDADDR" ] && JBOSS_BINDADDR=localhost
+java -cp hsqldb.jar org.hsqldb.Server -address $JBOSS_BINDADDR -port 1701 -dbname.0 jbpmDatabase
\ No newline at end of file
Modified: jbpm4/trunk/modules/test-cactus/pom.xml
===================================================================
--- jbpm4/trunk/modules/test-cactus/pom.xml 2010-05-04 04:20:24 UTC (rev 6293)
+++ jbpm4/trunk/modules/test-cactus/pom.xml 2010-05-04 06:16:51 UTC (rev 6294)
@@ -1,15 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
- <!-- ====================================================================== -->
- <!-- -->
- <!-- JBoss, the OpenSource J2EE webOS -->
- <!-- -->
- <!-- Distributable under LGPL license. -->
- <!-- See terms of license at http://www.gnu.org. -->
- <!-- -->
- <!-- ====================================================================== -->
+<!-- ====================================================================== -->
+<!-- -->
+<!-- JBoss, the OpenSource J2EE webOS -->
+<!-- -->
+<!-- Distributable under LGPL license. -->
+<!-- See terms of license at http://www.gnu.org. -->
+<!-- -->
+<!-- ====================================================================== -->
- <!-- $Id: pom.xml 5319 2009-07-17 10:03:46Z tom.baeyens(a)jboss.com $ -->
+<!-- $Id: pom.xml 5319 2009-07-17 10:03:46Z tom.baeyens(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">
Added: jbpm4/trunk/modules/test-cactus/src/test/resources/jndi.properties
===================================================================
--- jbpm4/trunk/modules/test-cactus/src/test/resources/jndi.properties (rev 0)
+++ jbpm4/trunk/modules/test-cactus/src/test/resources/jndi.properties 2010-05-04 06:16:51 UTC (rev 6294)
@@ -0,0 +1,3 @@
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
+java.naming.provider.url=jnp://@jboss.bind.address@:1099
Modified: jbpm4/trunk/qa/hudson-jbpm4-enterprise.sh
===================================================================
--- jbpm4/trunk/qa/hudson-jbpm4-enterprise.sh 2010-05-04 04:20:24 UTC (rev 6293)
+++ jbpm4/trunk/qa/hudson-jbpm4-enterprise.sh 2010-05-04 06:16:51 UTC (rev 6294)
@@ -2,15 +2,14 @@
#
# runs the jboss integration test suite
-MAVEN_OPTS="-Xms1024M -Xmx1024M"
-ANT_PROPERTIES="-Djboss.version=$JBOSS_VERSION -Djbpm.parent.dir=$WORKSPACE -Djboss.distro.dir=$SOURCE_REPO/jboss"
-echo ANT_PROPERTIES=${ANT_PROPERTIES}
+MAVEN_OPTS="-Xmx512M -Djboss.bind.address=$JBOSS_BINDADDR"
+ANT_OPTS="-Djboss.version=$JBOSS_VERSION -Djbpm.parent.dir=$WORKSPACE -Djboss.distro.dir=$SOURCE_REPO/jboss -Djboss.bind.address=$JBOSS_BINDADDR"
mvn -U -Pdistro,enterprise clean install
-ant -f qa/build.xml $ANT_PROPERTIES testsuite.enterprise.setup
+ant -f qa/build.xml testsuite.enterprise.setup
cd modules/test-enterprise/test-enterprise-suite
mvn -Pruntest test
cd ../../..
-ant -f qa/build.xml $ANT_PROPERTIES testsuite.enterprise.teardown
+ant -f qa/build.xml testsuite.enterprise.teardown
Modified: jbpm4/trunk/qa/hudson-jbpm4-jboss.sh
===================================================================
--- jbpm4/trunk/qa/hudson-jbpm4-jboss.sh 2010-05-04 04:20:24 UTC (rev 6293)
+++ jbpm4/trunk/qa/hudson-jbpm4-jboss.sh 2010-05-04 06:16:51 UTC (rev 6294)
@@ -2,18 +2,18 @@
#
# runs the jboss integration test suite
-MAVEN_OPTS="-Xms256M -Xmx1024M"
-ANT_PROPERTIES="-Djboss.version=$JBOSS_VERSION -Djbpm.parent.dir=$WORKSPACE -Djboss.distro.dir=$SOURCE_REPO/jboss -Djboss.bind.address=$JBOSS_BINDADDR"
+MAVEN_OPTS="-Xmx512M -Djboss.bind.address=$JBOSS_BINDADDR"
+ANT_OPTS="-Djboss.version=$JBOSS_VERSION -Djbpm.parent.dir=$WORKSPACE -Djboss.distro.dir=$SOURCE_REPO/jboss -Djboss.bind.address=$JBOSS_BINDADDR"
# just in case the previous run didnt complete ok, we stop jboss
-ant -f modules/distro/src/main/files/install/build.xml $ANT_PROPERTIES stop.jboss
-ant -f modules/distro/src/main/files/install/build.xml $ANT_PROPERTIES reinstall.jboss
+ant -f modules/distro/src/main/files/install/build.xml reinstall.jboss
+ant -f modules/distro/src/main/files/install/build.xml stop.jboss
mvn -U -Pdistro,integration clean install
-ant -f qa/build.xml $ANT_PROPERTIES testsuite.jboss.setup
+ant -f qa/build.xml testsuite.jboss.setup
cd modules/test-cactus
-mvn -Pruntest -Djboss.bind.address=$JBOSS_BINDADDR test
+mvn -Pruntest test
cd ../..
-ant -f qa/build.xml $ANT_PROPERTIES testsuite.jboss.teardown
+ant -f qa/build.xml testsuite.jboss.teardown
Modified: jbpm4/trunk/qa/hudson-jbpm4-tomcat.sh
===================================================================
--- jbpm4/trunk/qa/hudson-jbpm4-tomcat.sh 2010-05-04 04:20:24 UTC (rev 6293)
+++ jbpm4/trunk/qa/hudson-jbpm4-tomcat.sh 2010-05-04 06:16:51 UTC (rev 6294)
@@ -2,16 +2,15 @@
#
# runs the jboss integration test suite
-MAVEN_OPTS="-Xms1024M -Xmx1024M"
+MAVEN_OPTS="-Xmx512M"
+ANT_OPTS="-Djbpm.parent.dir=$WORKSPACE -Djboss.distro.dir=$SOURCE_REPO/jboss -Dtomcat.distro.dir=tomcat.downloads"
-ANT_PROPERTIES="-Djbpm.parent.dir=$WORKSPACE -Djboss.distro.dir=$SOURCE_REPO/jboss -Dtomcat.distro.dir=tomcat.downloads"
-
mvn -U -Pdistro,integration clean install
-ant -f qa/build.xml $ANT_PROPERTIES reinstall.jbpm
-ant -f qa/build.xml $ANT_PROPERTIES testsuite.tomcat.setup
+ant -f qa/build.xml reinstall.jbpm
+ant -f qa/build.xml testsuite.tomcat.setup
cd modules/test-cactus
mvn -Pruntest test
cd ../..
-ant -f qa/build.xml $ANT_PROPERTIES testsuite.tomcat.teardown
+ant -f qa/build.xml testsuite.tomcat.teardown
Modified: jbpm4/trunk/qa/hudson-jbpm4-upgrade.sh
===================================================================
--- jbpm4/trunk/qa/hudson-jbpm4-upgrade.sh 2010-05-04 04:20:24 UTC (rev 6293)
+++ jbpm4/trunk/qa/hudson-jbpm4-upgrade.sh 2010-05-04 06:16:51 UTC (rev 6294)
@@ -2,19 +2,18 @@
#
# runs the upgrade tests
-MAVEN_OPTS="-Xms1024M -Xmx1024M"
-ANT_PROPERTIES="-Dold.jbpm.version=$OLD_JBPM_VERSION -Ddatabase=$DATABASE -Djbpm.parent.dir=$WORKSPACE"
-echo ANT_PROPERTIES=${ANT_PROPERTIES}
+MAVEN_OPTS="-Xmx512M"
+ANT_OPTS="-Dold.jbpm.version=$OLD_JBPM_VERSION -Ddatabase=$DATABASE -Djbpm.parent.dir=$WORKSPACE"
cd qa/upgrade
-mvn $ANT_PROPERTIES dependency:copy
+mvn $ANT_OPTS dependency:copy
cd ../..
mvn -U -Pdistro,integration clean install
-ant -f qa/build.xml $ANT_PROPERTIES testsuite.upgrade.setup
+ant -f qa/build.xml testsuite.upgrade.setup
cd modules/test-upgrade
-mvn $ANT_PROPERTIES clean test
+mvn $ANT_OPTS clean test
cd ../..
-ant -f qa/build.xml $ANT_PROPERTIES testsuite.upgrade.teardown
+ant -f qa/build.xml testsuite.upgrade.teardown
14 years
JBoss JBPM SVN: r6293 - in jbpm4/trunk: modules/pvm/src/main/java/org/jbpm/pvm/internal/ant and 3 other directories.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2010-05-04 00:20:24 -0400 (Tue, 04 May 2010)
New Revision: 6293
Modified:
jbpm4/trunk/modules/distro/src/main/files/install/build.xml
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/ant/StartJBossTask.java
jbpm4/trunk/modules/test-cactus/pom.xml
jbpm4/trunk/modules/test-cactus/src/test/resources/cactus.properties
jbpm4/trunk/qa/hudson-jbpm4-jboss.sh
Log:
pass jboss bind address to test-cactus module
Modified: jbpm4/trunk/modules/distro/src/main/files/install/build.xml
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/install/build.xml 2010-05-04 02:05:34 UTC (rev 6292)
+++ jbpm4/trunk/modules/distro/src/main/files/install/build.xml 2010-05-04 04:20:24 UTC (rev 6293)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="jbpm.install">
-
+
<!-- DEVELOPER SPECIFIC CONFIGURATIONS -->
<property file="${user.home}/.jbpm4/build.properties" />
@@ -25,40 +25,46 @@
<property name="jdbc.properties.dir" value="${jbpm.home}/install/jdbc" />
<property file="${jdbc.properties.dir}/${database}.properties" />
-
- <property name="examples.file" value="${jbpm.home}/examples/target/examples.jar"/>
-
+
+ <property name="examples.file" value="${jbpm.home}/examples/target/examples.jar" />
+
<property name="tomcat.version" value="6.0.20" />
<property name="tomcat.parent.dir" value="${jbpm.home}" />
<property name="tomcat.home" value="${tomcat.parent.dir}/apache-tomcat-${tomcat.version}" />
<property name="tomcat.filename" value="apache-tomcat-${tomcat.version}.zip" />
<property name="tomcat.distro.dir" value="downloads" />
- <property name="tomcat.distro.url" value="http://www.apache.org/dist/tomcat/tomcat-6/v${tomcat.version}/bin/${tomca..." />
+ <property name="tomcat.distro.url"
+ value="http://www.apache.org/dist/tomcat/tomcat-6/v${tomcat.version}/bin/${tomca..." />
<property name="tomcat.distro.path" value="${tomcat.distro.dir}/${tomcat.filename}" />
<property name="tomcat.lib.dir" value="${tomcat.home}/lib" />
<property name="tomcat.webapps.dir" value="${tomcat.home}/webapps" />
-
- <property name="hsqldb.server.install.dir" value="${jbpm.home}/hsqldb-server"/>
+
+ <property name="hsqldb.server.install.dir" value="${jbpm.home}/hsqldb-server" />
<property name="hsqldb.server.source.dir" value="${jbpm.home}/install/src/hsqldb-server" />
<property name="jboss.version" value="5.0.0.GA" />
<property name="jboss.parent.dir" value="${jbpm.home}" />
<property name="jboss.home" value="${jboss.parent.dir}/jboss-${jboss.version}" />
+ <property name="jboss.bind.address" value="localhost" />
<property name="jboss.filename" value="jboss-${jboss.version}.zip" />
<property name="jboss.distro.dir" value="downloads" />
- <property name="jboss.distro.url" value="http://downloads.sourceforge.net/jboss/${jboss.filename}" />
+ <property name="jboss.distro.url"
+ value="http://downloads.sourceforge.net/jboss/${jboss.filename}" />
<property name="jboss.distro.path" value="${jboss.distro.dir}/${jboss.filename}" />
<property name="jboss.server.configuration" value="default" />
- <property name="jboss.server.config.dir" value="${jboss.home}/server/${jboss.server.configuration}" />
- <property name="jboss.server.data.dir" value="${jboss.home}/server/${jboss.server.configuration}/data" />
- <property name="jboss.server.deploy.dir" value="${jboss.home}/server/${jboss.server.configuration}/deploy" />
+ <property name="jboss.server.config.dir"
+ value="${jboss.home}/server/${jboss.server.configuration}" />
+ <property name="jboss.server.data.dir"
+ value="${jboss.home}/server/${jboss.server.configuration}/data" />
+ <property name="jboss.server.deploy.dir"
+ value="${jboss.home}/server/${jboss.server.configuration}/deploy" />
<property name="signavio.war.file.name" value="jbpmeditor.war" />
<property name="signavio.src.dir" value="${jbpm.home}/install/src/signavio" />
- <property name="signavio.tmp.dir" value="${jbpm.home}/install/generated/signavio-war" />
+ <property name="signavio.tmp.dir" value="${jbpm.home}/install/generated/signavio-war" />
<property name="signavio.repo.dir.name" value="signavio-repository" />
-
- <!-- GENERAL CONDITIONS -->
+
+ <!-- GENERAL CONDITIONS -->
<condition property="is.jboss.distro.available">
<available file="${jboss.distro.path}" />
</condition>
@@ -75,27 +81,27 @@
<condition property="is.hsqldb">
<equals arg1="${database}" arg2="hsqldb" />
</condition>
-
+
<!-- OS CONDITIONS -->
<condition property="is.windows">
- <os family="windows"/>
+ <os family="windows" />
</condition>
<condition property="is.not.windows">
<not>
<isset property="is.windows" />
</not>
</condition>
-
- <condition property="is.mac">
- <os family="mac" />
- </condition>
+ <condition property="is.mac">
+ <os family="mac" />
+ </condition>
+
<condition property="is.jboss.500">
- <equals arg1="${jboss.version}" arg2="5.0.0.GA"/>
+ <equals arg1="${jboss.version}" arg2="5.0.0.GA" />
</condition>
<condition property="is.jboss.510">
- <equals arg1="${jboss.version}" arg2="5.1.0.GA"/>
+ <equals arg1="${jboss.version}" arg2="5.1.0.GA" />
</condition>
<!-- ECLIPSE RELATED CONDITIONS -->
@@ -126,7 +132,7 @@
</condition>
<condition property="eclipse.tarfilename" value="eclipse-jee-galileo-linux-gtk-x86_64.tar">
<and>
- <contains string="${os.name}" casesensitive="false" substring="linux" />
+ <contains string="${os.name}" casesensitive="false" substring="linux" />
<contains string="${os.arch}" casesensitive="false" substring="64" />
</and>
</condition>
@@ -136,14 +142,15 @@
<contains string="${os.arch}" casesensitive="false" substring="64" />
</and>
</condition>
- <property name="eclipse.distro.url" value="http://mirror.cc.vt.edu/pub/eclipse/technology/epp/downloads/release/gali..." />
- <property name="eclipse.distro.dir" value="downloads" />
+ <property name="eclipse.distro.url"
+ value="http://mirror.cc.vt.edu/pub/eclipse/technology/epp/downloads/release/gali..." />
+ <property name="eclipse.distro.dir" value="downloads" />
<property name="eclipse.parent.dir" value="${jbpm.home}" />
<property name="eclipse.distro.path" value="${eclipse.distro.dir}/${eclipse.filename}" />
<!-- ### DEMO SETUP JBOSS ##################################################### -->
- <target name="demo.setup.jboss"
- depends="install.jboss, install.jbpm.into.jboss"
+ <target name="demo.setup.jboss"
+ depends="install.jboss, install.jbpm.into.jboss"
description="installs jboss, installs jbpm into jboss, starts jboss, creates the jBPM DB schema, deploys examples, loads example identities, installs and starts eclipse">
<antcall target="internal.enable.jboss.debug.jboss500" />
<antcall target="internal.enable.jboss.debug.jboss510" />
@@ -158,56 +165,56 @@
</target>
<!-- ### DEMO TEARDOWN JBOSS ##################################################### -->
- <target name="demo.teardown.jboss"
- description="drops the jbpm db schema and stops jboss">
+ <target name="demo.teardown.jboss" description="drops the jbpm db schema and stops jboss">
<ant antfile="${jbpm.home}/db/build.xml" target="drop.jbpm.schema" />
<antcall target="stop.jboss" />
</target>
-
+
<!-- ### CLEAN CONFIGURATION DIR ########################################### -->
<target name="clean.cfg.dir" description="Deletes the ${cfg.dest.dir}">
<delete dir="${cfg.dest.dir}" />
</target>
-
+
<!-- ### CREATE CONFIGURATION ########################################### -->
<target name="create.cfg" description="Creates a configuration in ${cfg.dest.dir}">
<mkdir dir="${cfg.dest.dir}" />
- <copy tofile="${cfg.dest.dir}/jbpm.cfg.xml"
+ <copy tofile="${cfg.dest.dir}/jbpm.cfg.xml"
file="${install.src.dir}/cfg/jbpm/${tx}.jbpm.cfg.xml"
overwrite="true" />
- <copy tofile="${cfg.dest.dir}/jbpm.hibernate.cfg.xml"
+ <copy tofile="${cfg.dest.dir}/jbpm.hibernate.cfg.xml"
file="${install.src.dir}/cfg/hibernate/${hibernate.connection.type}/${database}.hibernate.cfg.xml"
overwrite="true">
<filterset filtersfile="${jdbc.properties.dir}/${database}.properties" />
</copy>
- <copy todir="${cfg.dest.dir}"
- overwrite="true">
+ <copy todir="${cfg.dest.dir}" overwrite="true">
<fileset dir="${install.src.dir}/cfg/logging/${logging}" />
</copy>
- <copy tofile="${cfg.dest.dir}/jbpm.mail.properties"
- file="${install.src.dir}/cfg/mail/jbpm.mail.${mail.cfg}.properties"
+ <copy tofile="${cfg.dest.dir}/jbpm.mail.properties"
+ file="${install.src.dir}/cfg/mail/jbpm.mail.${mail.cfg}.properties"
overwrite="true">
<filterset>
<filter token="mail.smtp.host" value="${mail.smtp.host}" />
</filterset>
</copy>
-
- <!-- If the target environment uses Spring, also copy the applicationContext.xml file-->
- <condition property="is.spring.environment">
- <or>
- <equals arg1="${tx}" arg2="spring" />
- <equals arg1="${tx}" arg2="spring.testsuite" />
- </or>
- </condition>
- <antcall target="internal.copy.spring.applicationContext" />
-
+
+ <!-- If the target environment uses Spring, also copy the applicationContext.xml file-->
+ <condition property="is.spring.environment">
+ <or>
+ <equals arg1="${tx}" arg2="spring" />
+ <equals arg1="${tx}" arg2="spring.testsuite" />
+ </or>
+ </condition>
+ <antcall target="internal.copy.spring.applicationContext" />
+
</target>
-
- <target name="internal.copy.spring.applicationContext" if="is.spring.environment">
- <copy todir="${cfg.dest.dir}" overwrite="true" file="${install.src.dir}/cfg/spring/applicationContext.xml">
+
+ <target name="internal.copy.spring.applicationContext" if="is.spring.environment">
+ <copy todir="${cfg.dest.dir}"
+ overwrite="true"
+ file="${install.src.dir}/cfg/spring/applicationContext.xml">
<filterset filtersfile="${jdbc.properties.dir}/${database}.properties" />
</copy>
- </target>
+ </target>
<!-- ### CREATE USER WEBAPP ########################################## -->
<target name="create.user.webapp"
@@ -217,7 +224,7 @@
<mkdir dir="${jbpm.home}/install/generated/user-webapp/WEB-INF/classes" />
<mkdir dir="${jbpm.home}/install/generated/user-webapp/WEB-INF/lib" />
<copy todir="${jbpm.home}/install/generated/user-webapp">
- <fileset dir="${install.src.dir}/user-webapp"/>
+ <fileset dir="${install.src.dir}/user-webapp" />
</copy>
<copy todir="${jbpm.home}/install/generated/user-webapp/WEB-INF/classes">
<fileset dir="${cfg.dest.dir}">
@@ -253,51 +260,50 @@
<include name="slf4j-jdk14.jar" />
</fileset>
</copy>
-
+
<!-- copy database driver -->
- <property name="database.driver.destination.dir" value="${jbpm.home}/install/generated/user-webapp/WEB-INF/lib" />
+ <property name="database.driver.destination.dir"
+ value="${jbpm.home}/install/generated/user-webapp/WEB-INF/lib" />
<property name="is.tomcat" value="true" />
<antcall target="internal.copy.database.driver" />
</target>
<!-- ### REINSTALL JBOSS ################################################ -->
- <target name="reinstall.jboss"
- depends="delete.jboss, install.jboss"
+ <target name="reinstall.jboss"
+ depends="delete.jboss, install.jboss"
description="Deletes the previous jboss installation and re-installs jboss" />
- <target name="reinstall.jboss.and.jbpm"
- depends="delete.jboss, install.jboss, install.jbpm.into.jboss"
+ <target name="reinstall.jboss.and.jbpm"
+ depends="delete.jboss, install.jboss, install.jbpm.into.jboss"
description="Deletes the previous jboss installation and re-installs jboss and installs jbpm in it" />
<!-- ### DELETE JBOSS ################################################### -->
- <target name="delete.jboss"
- description="Deletes jboss installation">
+ <target name="delete.jboss" description="Deletes jboss installation">
<delete dir="${jboss.home}" />
</target>
<!-- ### INSTALL JBOSS ################################################## -->
- <target name="install.jboss"
+ <target name="install.jboss"
depends="get.jboss"
description="Downloads jboss to ${jboss.distro.dir} if its not available and then unzips jboss">
<unzip src="${jboss.distro.path}" dest="${jboss.parent.dir}" />
<chmod perm="a+x" file="${jboss.home}/bin/run.sh" os="Linux, Mac OS X" />
<chmod perm="a+x" file="${jboss.home}/bin/shutdown.sh" os="Linux, Mac OS X" />
</target>
-
+
<!-- ### GET JBOSS ###################################################### -->
- <target name="get.jboss"
+ <target name="get.jboss"
unless="is.jboss.distro.available"
description="Downloads jboss into ${jboss.distro.dir}">
<mkdir dir="${jboss.distro.dir}" />
<get src="${jboss.distro.url}" dest="${jboss.distro.path}" />
</target>
-
+
<!-- ### INSTALL JBPM INTO JBOSS ######################### -->
- <target name="install.jbpm.into.jboss"
- description="Installs jBPM into JBoss">
+ <target name="install.jbpm.into.jboss" description="Installs jBPM into JBoss">
<!-- copy static configuration files -->
<copy todir="${jboss.server.config.dir}" overwrite="true">
- <fileset dir="${jbpm.home}/install/src/jboss/config" />
+ <fileset dir="${jbpm.home}/install/src/jboss/config" />
</copy>
<!-- copy the right hibernate configuration file -->
@@ -310,21 +316,21 @@
<copy todir="${jboss.server.config.dir}/deploy/jbpm" overwrite="true">
<filterset filtersfile="${jdbc.properties.dir}/${database}.properties" />
<fileset dir="${jbpm.home}/install/src/jboss/datasources">
- <include name="jbpm-${database}-ds.xml"/>
+ <include name="jbpm-${database}-ds.xml" />
</fileset>
</copy>
- <!-- unzip console.war -->
- <mkdir dir="${jboss.server.config.dir}/deploy/jbpm/gwt-console-jbpm.war"/>
+ <!-- unzip console.war -->
+ <mkdir dir="${jboss.server.config.dir}/deploy/jbpm/gwt-console-jbpm.war" />
<unzip src="${jbpm.home}/lib/gwt-console-jbpm.war"
- dest="${jboss.server.config.dir}/deploy/jbpm/gwt-console-jbpm.war"/>
+ dest="${jboss.server.config.dir}/deploy/jbpm/gwt-console-jbpm.war" />
<copy todir="${jboss.server.config.dir}/deploy/jbpm" overwrite="true">
- <fileset dir="${jbpm.home}/lib">
+ <fileset dir="${jbpm.home}/lib">
<include name="gwt-console-server-jbpm.war" />
</fileset>
</copy>
-
+
<copy todir="${jboss.server.config.dir}/deploy/jbpm/jbpm-service.sar" overwrite="true">
<fileset dir="${jbpm.home}">
<include name="jbpm.jar" />
@@ -343,7 +349,7 @@
<include name="jbpm-jboss.jar" />
<include name="jbpm-console-integration.jar" />
<include name="jbpm-console-form-plugin.jar" />
- <include name="jbpm-console-graphView-plugin.jar"/>
+ <include name="jbpm-console-graphView-plugin.jar" />
<include name="joda-time.jar" />
<include name="juel*.jar" />
<include name="livetribe-jsr223.jar" />
@@ -351,19 +357,19 @@
</fileset>
</copy>
- <!-- move console libs -->
- <move todir="${jboss.server.config.dir}/deploy/jbpm/jbpm-service.sar" verbose="true">
- <fileset dir="${jboss.server.config.dir}/deploy/jbpm/gwt-console-jbpm.war/WEB-INF/lib">
- <include name="*.jar"/>
- </fileset>
- </move>
+ <!-- move console libs -->
+ <move todir="${jboss.server.config.dir}/deploy/jbpm/jbpm-service.sar" verbose="true">
+ <fileset dir="${jboss.server.config.dir}/deploy/jbpm/gwt-console-jbpm.war/WEB-INF/lib">
+ <include name="*.jar" />
+ </fileset>
+ </move>
- <!-- move errai config -->
- <move todir="${jboss.server.config.dir}/deploy/jbpm/jbpm-service.sar" verbose="true">
- <fileset dir="${jboss.server.config.dir}/deploy/jbpm/gwt-console-jbpm.war/WEB-INF/classes">
- <include name="ErraiService.properties"/>
- </fileset>
- </move>
+ <!-- move errai config -->
+ <move todir="${jboss.server.config.dir}/deploy/jbpm/jbpm-service.sar" verbose="true">
+ <fileset dir="${jboss.server.config.dir}/deploy/jbpm/gwt-console-jbpm.war/WEB-INF/classes">
+ <include name="ErraiService.properties" />
+ </fileset>
+ </move>
<copy todir="${jboss.home}/common/lib" overwrite="true">
<fileset dir="${jbpm.home}/lib">
@@ -377,89 +383,93 @@
</copy>
<!-- reporting -->
- <property name="birt.dir" value="${jboss.server.data.dir}/birt"/>
- <mkdir dir="${birt.dir}"/>
- <unzip src="${jbpm.home}/lib/report-engine.zip" dest="${birt.dir}"/>
- <unzip src="${jbpm.home}/lib/jbpm-console-reports.jar" dest="${birt.dir}"/>
+ <property name="birt.dir" value="${jboss.server.data.dir}/birt" />
+ <mkdir dir="${birt.dir}" />
+ <unzip src="${jbpm.home}/lib/report-engine.zip" dest="${birt.dir}" />
+ <unzip src="${jbpm.home}/lib/jbpm-console-reports.jar" dest="${birt.dir}" />
- <property name="database.driver.destination.dir" value="${jboss.server.config.dir}/deploy/jbpm/jbpm-service.sar" />
+ <property name="database.driver.destination.dir"
+ value="${jboss.server.config.dir}/deploy/jbpm/jbpm-service.sar" />
<antcall target="internal.copy.database.driver" />
-
- <!-- Signavio -->
- <antcall target="install.signavio.into.jboss" />
+
+ <!-- Signavio -->
+ <antcall target="install.signavio.into.jboss" />
</target>
-
- <!-- ### INSTALL EXAMPLES INTO JBOSS ################################################ -->
+
+ <!-- ### INSTALL EXAMPLES INTO JBOSS ################################################ -->
<target name="install.examples.into.jboss">
- <ant antfile="${jbpm.home}/examples/build.xml" target="create.and.deploy.examples" />
- <mkdir dir="${jboss.server.config.dir}/deploy/jbpm/userlibs" />
- <copy file="${examples.file}"
- todir="${jboss.server.config.dir}/deploy/jbpm/userlibs"
- overwrite="true" />
+ <ant antfile="${jbpm.home}/examples/build.xml" target="create.and.deploy.examples" />
+ <mkdir dir="${jboss.server.config.dir}/deploy/jbpm/userlibs" />
+ <copy file="${examples.file}"
+ todir="${jboss.server.config.dir}/deploy/jbpm/userlibs"
+ overwrite="true" />
</target>
<!-- ### START JBOSS ################################################### -->
- <target name="start.jboss"
+ <target name="start.jboss"
description="starts jboss and waits till jboss is booted, then lets jboss run in the background">
- <taskdef name="start-jboss"
- classname="org.jbpm.pvm.internal.ant.StartJBossTask">
- <classpath>
- <fileset dir="${jbpm.home}">
- <include name="jbpm.jar" />
- </fileset>
- </classpath>
- </taskdef>
- <start-jboss jbosshome="${jboss.home}" />
+ <exec executable="${jboss.home}/bin/run.bat"
+ os="Windows Vista, Windows XP,Windows 2000,Windows 98">
+ <arg value="-c" />
+ <arg value="${jboss.bind.address}" />
+ </exec>
+ <exec executable="${jboss.home}/bin/run.sh" os="Linux, Unix, Mac">
+ <arg value="-c" />
+ <arg value="${jboss.bind.address}" />
+ </exec>
+ <waitfor maxwait="5" maxwaitunit="minute" checkevery="30" checkeveryunit="second">
+ <socket server="${jboss.bind.address}" port="8080" />
+ </waitfor>
</target>
<!-- ### STOP JBOSS ################################################### -->
- <target name="stop.jboss"
+ <target name="stop.jboss"
description="signals jboss to stop, but doesn't wait till its finished">
- <exec executable="${jboss.home}/bin/shutdown.bat" os="Windows Vista, Windows XP,Windows 2000,Windows 98">
- <arg line="-S"/>
+ <exec executable="${jboss.home}/bin/shutdown.bat"
+ os="Windows Vista, Windows XP,Windows 2000,Windows 98">
+ <arg line="-S" />
</exec>
<exec executable="${jboss.home}/bin/shutdown.sh" os="Linux, Unix, Mac">
- <arg line="-S"/>
+ <arg line="-S" />
</exec>
</target>
-
- <!-- ### DEMO SETUP TOMCAT ################################################ -->
- <target name="demo.setup.tomcat"
+
+ <!-- ### DEMO SETUP TOMCAT ################################################ -->
+ <target name="demo.setup.tomcat"
depends="delete.tomcat, install.tomcat, install.jbpm.into.tomcat"
description="installs tomcat, installs jbpm into tomcat, starts tomcat, creates the jBPM DB schema, deploys examples, loads example identities, installs and starts eclipse">
- <antcall target="install.hsqldb.server" />
- <antcall target="start.hsqldb.server" />
- <antcall target="create.jbpm.schema" />
- <antcall target="install.examples.into.tomcat" />
- <antcall target="load.example.identities" />
- <antcall target="start.tomcat" />
- <antcall target="install.eclipse" />
- <antcall target="start.eclipse" />
- </target>
+ <antcall target="install.hsqldb.server" />
+ <antcall target="start.hsqldb.server" />
+ <antcall target="create.jbpm.schema" />
+ <antcall target="install.examples.into.tomcat" />
+ <antcall target="load.example.identities" />
+ <antcall target="start.tomcat" />
+ <antcall target="install.eclipse" />
+ <antcall target="start.eclipse" />
+ </target>
- <!-- ### DEMO TEARDOWN TOMCAT ################################################ -->
- <target name="demo.teardown.tomcat"
+ <!-- ### DEMO TEARDOWN TOMCAT ################################################ -->
+ <target name="demo.teardown.tomcat"
depends="stop.tomcat, stop.hsqldb.server"
description="stops tomcat and then the hsqldb server if needed">
</target>
<!-- ### REINSTALL TOMCAT ################################################ -->
- <target name="reinstall.tomcat"
- depends="delete.tomcat, install.tomcat"
+ <target name="reinstall.tomcat"
+ depends="delete.tomcat, install.tomcat"
description="Deletes the previous tomcat installation and re-installs tomcat" />
- <target name="reinstall.tomcat.and.jbpm"
- depends="delete.tomcat, install.tomcat, install.jbpm.into.tomcat"
+ <target name="reinstall.tomcat.and.jbpm"
+ depends="delete.tomcat, install.tomcat, install.jbpm.into.tomcat"
description="Deletes the previous tomcat installation and re-installs tomcat and installs jbpm in it" />
<!-- ### DELETE TOMCAT ################################################### -->
- <target name="delete.tomcat"
- description="Deletes tomcat installation">
+ <target name="delete.tomcat" description="Deletes tomcat installation">
<delete dir="${tomcat.home}" />
</target>
<!-- ### INSTALL TOMCAT ################################################## -->
- <target name="install.tomcat"
+ <target name="install.tomcat"
depends="get.tomcat"
description="Downloads tomcat to ${tomcat.distro.dir} if its not available and then unzips tomcat">
<unzip src="${tomcat.distro.path}" dest="${tomcat.parent.dir}" />
@@ -473,9 +483,9 @@
</fileset>
</chmod>
</target>
-
+
<!-- ### GET TOMCAT ###################################################### -->
- <target name="get.tomcat"
+ <target name="get.tomcat"
unless="is.tomcat.distro.available"
description="Downloads tomcat into ${tomcat.distro.dir} if it is not available">
<mkdir dir="${tomcat.distro.dir}" />
@@ -484,15 +494,15 @@
<!-- ### INSTALL JBPM INTO TOMCAT ####################################### -->
<target name="install.jbpm.into.tomcat"
- depends="create.cfg"
- description="Installs jBPM into tomcat">
-
+ depends="create.cfg"
+ description="Installs jBPM into tomcat">
+
<property name="is.tomcat" value="true" />
<!-- create the jbpm configuration jar file and drop in /lib -->
<jar destfile="${tomcat.home}/lib/jbpm.cfg.jar">
<fileset dir="${jbpm.home}/install/generated/cfg">
- <exclude name="logging.properties"/>
+ <exclude name="logging.properties" />
</fileset>
</jar>
@@ -534,7 +544,7 @@
<include name="gwt-console-rpc.jar" />
<include name="jbpm-console-integration.jar" />
<include name="jbpm-console-form-plugin.jar" />
- <include name="jbpm-console-graphView-plugin.jar"/>
+ <include name="jbpm-console-graphView-plugin.jar" />
</fileset>
</copy>
@@ -545,88 +555,88 @@
<include name="gwt-console-server-jbpm.war" />
</fileset>
</copy>
-
+
<!-- Copy Signavio war into /webapps -->
<antcall target="install.signavio.into.tomcat" />
-
-
+
<!-- Rename wars (the context root is configured by WEB-INF/jboss-web.xml,
which is neglected by Tomcat -->
- <move file="${tomcat.home}/webapps/gwt-console-jbpm.war" tofile="${tomcat.home}/webapps/jbpm-console.war" />
- <move file="${tomcat.home}/webapps/gwt-console-server-jbpm.war" tofile="${tomcat.home}/webapps/gwt-console-server.war" />
-
+ <move file="${tomcat.home}/webapps/gwt-console-jbpm.war"
+ tofile="${tomcat.home}/webapps/jbpm-console.war" />
+ <move file="${tomcat.home}/webapps/gwt-console-server-jbpm.war"
+ tofile="${tomcat.home}/webapps/gwt-console-server.war" />
+
<!-- reporting -->
- <property name="birt.dir" value="${tomcat.home}/birt"/>
- <mkdir dir="${birt.dir}"/>
- <unzip src="${jbpm.home}/lib/report-engine.zip" dest="${birt.dir}"/>
- <unzip src="${jbpm.home}/lib/jbpm-console-reports.jar" dest="${birt.dir}"/>
+ <property name="birt.dir" value="${tomcat.home}/birt" />
+ <mkdir dir="${birt.dir}" />
+ <unzip src="${jbpm.home}/lib/report-engine.zip" dest="${birt.dir}" />
+ <unzip src="${jbpm.home}/lib/jbpm-console-reports.jar" dest="${birt.dir}" />
<!-- copy database driver -->
<property name="database.driver.destination.dir" value="${tomcat.home}/lib" />
<antcall target="internal.copy.database.driver" />
-
+
<!-- tweak the tomcat server config for the security domain -->
<copy file="${install.src.dir}/tomcat/server.xml"
- tofile="${tomcat.home}/conf/server.xml"
+ tofile="${tomcat.home}/conf/server.xml"
overwrite="true">
- <filterset filtersfile="${jdbc.properties.dir}/${database}.properties" />
+ <filterset filtersfile="${jdbc.properties.dir}/${database}.properties" />
</copy>
</target>
-
- <!-- ### INSTALL EXAMPLES INTO TOMCAT ################################################ -->
- <target name="install.examples.into.tomcat"
- description="deploys all the example processes">
+
+ <!-- ### INSTALL EXAMPLES INTO TOMCAT ################################################ -->
+ <target name="install.examples.into.tomcat" description="deploys all the example processes">
<ant antfile="${jbpm.home}/examples/build.xml" target="create.and.deploy.examples" />
- <copy file="${examples.file}"
- todir="${tomcat.home}/lib"
- overwrite="true" />
+ <copy file="${examples.file}" todir="${tomcat.home}/lib" overwrite="true" />
</target>
-
- <!-- ### INSTALL HSQLDB SERVER ################################################ -->
+
+ <!-- ### INSTALL HSQLDB SERVER ################################################ -->
<target name="install.hsqldb.server" if="is.hsqldb">
- <delete dir="${hsqldb.server.install.dir}" /> <!-- Also deletes old data -->
- <mkdir dir="${hsqldb.server.install.dir}"/>
+ <delete dir="${hsqldb.server.install.dir}" />
+ <!-- Also deletes old data -->
+ <mkdir dir="${hsqldb.server.install.dir}" />
<copy file="${jbpm.home}/lib/hsqldb.jar" todir="${hsqldb.server.install.dir}" />
<copy todir="${hsqldb.server.install.dir}">
<fileset dir="${hsqldb.server.source.dir}" />
</copy>
<chmod perm="a+x" os="Linux, Mac OS X">
<fileset dir="${hsqldb.server.install.dir}">
- <include name="*.sh"/>
+ <include name="*.sh" />
</fileset>
</chmod>
</target>
-
+
<!-- ### START HSQLDB SERVER ################################################ -->
<target name="start.hsqldb.server" if="is.hsqldb">
- <taskdef name="start-hsqldb-server" classname="org.jbpm.pvm.internal.ant.StartHsqldbServerTask">
+ <taskdef name="start-hsqldb-server"
+ classname="org.jbpm.pvm.internal.ant.StartHsqldbServerTask">
<classpath>
<fileset dir="${jbpm.home}">
- <include name="jbpm.jar"/>
+ <include name="jbpm.jar" />
</fileset>
</classpath>
</taskdef>
<start-hsqldb-server hsqldbServerHome="${hsqldb.server.install.dir}" />
</target>
-
+
<!-- ### SHUTDOWN HSQLDB SERVER ################################################ -->
<target name="stop.hsqldb.server" if="is.hsqldb">
- <sql driver="${jdbc.driver}"
- password="${jdbc.password}"
- url="${jdbc.url}"
- userid="${jdbc.username}"
- autocommit="true"
- src="${hsqldb.server.install.dir}/shutdown.sql">
+ <sql driver="${jdbc.driver}"
+ password="${jdbc.password}"
+ url="${jdbc.url}"
+ userid="${jdbc.username}"
+ autocommit="true"
+ src="${hsqldb.server.install.dir}/shutdown.sql">
<classpath>
<fileset dir="${hsqldb.server.install.dir}">
- <include name="hsqldb.jar"/>
+ <include name="hsqldb.jar" />
</fileset>
</classpath>
</sql>
</target>
-
+
<!-- ### START TOMCAT ################################################### -->
- <target name="start.tomcat"
+ <target name="start.tomcat"
description="Starts Tomcat and waits till it is booted, then lets Tomcat run in the background">
<taskdef name="start-tomcat" classname="org.jbpm.pvm.internal.ant.StartTomcatTask">
<classpath>
@@ -639,26 +649,26 @@
</target>
<!-- ### STOP TOMCAT ################################################### -->
- <target name="stop.tomcat"
+ <target name="stop.tomcat"
description="Signals Tomcat to stop, but doesn't wait till its finished">
<exec executable="${tomcat.home}/bin/catalina.bat"
dir="${tomcat.home}/bin"
os="Windows Vista, Windows XP,Windows 2000,Windows 98">
- <arg line="stop"/>
+ <arg line="stop" />
</exec>
- <exec executable="${tomcat.home}/bin/catalina.sh"
+ <exec executable="${tomcat.home}/bin/catalina.sh"
dir="${tomcat.home}/bin"
os="Linux, Unix, Mac">
- <arg line="stop"/>
+ <arg line="stop" />
</exec>
</target>
-
+
<!-- ### CREATE JBPM SCHEMA ############################################# -->
- <target name="create.jbpm.schema"
+ <target name="create.jbpm.schema"
depends="create.cfg"
description="creates the jbpm tables in the database">
<echo message="creating jbpm schema..." />
- <copy tofile="${cfg.dest.dir}/jbpm.cfg.xml"
+ <copy tofile="${cfg.dest.dir}/jbpm.cfg.xml"
file="${install.src.dir}/cfg/jbpm/standalone.testsuite.jbpm.cfg.xml"
overwrite="true" />
<java classname="org.jbpm.db.Create" fork="true">
@@ -667,10 +677,10 @@
<pathelement location="${jbpm.home}/install/generated/cfg" />
<pathelement location="${jbpm.home}/install/src/db" />
<fileset dir="${jbpm.home}">
- <include name="jbpm.jar"/>
+ <include name="jbpm.jar" />
</fileset>
<fileset dir="${jbpm.home}/lib">
- <include name="*.jar"/>
+ <include name="*.jar" />
</fileset>
</classpath>
</java>
@@ -678,30 +688,29 @@
<!-- ### UPGRADE JBPM SCHEMA ############################################# -->
<target name="upgrade.jbpm.schema"
- depends="create.cfg"
+ depends="create.cfg"
description="Upgrades the jBPM tables in the database to the current version">
<echo message="upgrading jbpm schema..." />
- <copy tofile="${cfg.dest.dir}/jbpm.cfg.xml"
+ <copy tofile="${cfg.dest.dir}/jbpm.cfg.xml"
file="${install.src.dir}/cfg/jbpm/standalone.testsuite.jbpm.cfg.xml"
overwrite="true" />
<java classname="org.jbpm.db.Upgrade" fork="true">
- <arg line="${database}" />
+ <arg line="${database}" />
<classpath>
- <pathelement location="${jbpm.home}/install/generated/cfg" />
+ <pathelement location="${jbpm.home}/install/generated/cfg" />
<pathelement location="${jbpm.home}/install/src/db" />
<fileset dir="${jbpm.home}">
- <include name="jbpm.jar"/>
+ <include name="jbpm.jar" />
</fileset>
<fileset dir="${jbpm.home}/lib">
- <include name="*.jar"/>
+ <include name="*.jar" />
</fileset>
</classpath>
</java>
</target>
<!-- ### DROP JBPM SCHEMA ############################################### -->
- <target name="drop.jbpm.schema"
- description="drops the jbpm tables from the database">
+ <target name="drop.jbpm.schema" description="drops the jbpm tables from the database">
<echo message="dropping jbpm schema in db ${jdbc.url}" />
<sql driver="${jdbc.driver}"
url="${jdbc.url}"
@@ -711,7 +720,7 @@
src="${jbpm.home}/install/src/db/drop/jbpm.${database}.drop.sql">
<classpath>
<fileset dir="${jbpm.home}/lib">
- <include name="*.jar"/>
+ <include name="*.jar" />
</fileset>
</classpath>
</sql>
@@ -726,41 +735,40 @@
userid="${jdbc.username}"
password="${jdbc.password}"
onerror="continue">
- <transaction src="${jbpm.home}/install/src/demo/example.identities.sql"/>
+ <transaction src="${jbpm.home}/install/src/demo/example.identities.sql" />
<classpath>
<fileset dir="${jbpm.home}/lib">
- <include name="*.jar"/>
+ <include name="*.jar" />
</fileset>
</classpath>
</sql>
</target>
-
+
<!-- ### START HSQLDB DATABASE MGR ##################################### -->
- <target name="hsqldb.databasemanager"
- description="start the hsqldb database manager">
+ <target name="hsqldb.databasemanager" description="start the hsqldb database manager">
<java classname="org.hsqldb.util.DatabaseManager" fork="true">
- <arg line="-url jdbc:hsqldb:hsql://localhost:1701"/>
+ <arg line="-url jdbc:hsqldb:hsql://localhost:1701" />
<classpath>
<fileset dir="${jbpm.home}/lib">
- <include name="hsqldb.jar"/>
+ <include name="hsqldb.jar" />
</fileset>
</classpath>
</java>
</target>
<!-- ### INSTALL ECLIPSE ################################################ -->
- <target name="install.eclipse"
+ <target name="install.eclipse"
depends="get.eclipse"
description="unzips eclipse, downloads eclipse if it is not available in ${eclipse.distro.dir}">
<antcall target="internal.install.eclipse.windows" />
<antcall target="internal.install.eclipse.non.windows" />
</target>
-
+
<!-- ### GET ECLIPSE ##################################################### -->
<condition property="is.eclipse.distro.available">
<available file="${eclipse.distro.path}" />
</condition>
- <target name="get.eclipse"
+ <target name="get.eclipse"
unless="is.eclipse.distro.available"
description="downloads eclipse to ${eclipse.distro.dir}">
<mkdir dir="${eclipse.distro.dir}" />
@@ -768,8 +776,7 @@
</target>
<!-- ### START ECLIPSE ################################################## -->
- <target name="start.eclipse"
- description="starts eclipse">
+ <target name="start.eclipse" description="starts eclipse">
<!-- Windows -->
<exec executable="cmd" os="Windows Vista, Windows XP,Windows 2000,Windows 98">
<arg line="/C start "${jbpm.home}/eclipse/eclipse.exe" "-data" "${jbpm.home}/workspace"" />
@@ -777,52 +784,61 @@
<!-- Unix -->
<chmod perm="+x">
<fileset dir="${jbpm.home}/eclipse">
- <filename name="eclipse"/>
+ <filename name="eclipse" />
</fileset>
- <fileset dir="${jbpm.home}/eclipse/Eclipse.app/Contents/MacOS/"> <!-- Path is different for OS X -->
- <filename name="eclipse"/>
- </fileset>
+ <fileset dir="${jbpm.home}/eclipse/Eclipse.app/Contents/MacOS/"> <!-- Path is different for OS X -->
+ <filename name="eclipse" />
+ </fileset>
</chmod>
<exec executable="/bin/bash" os="Linux">
<arg line="-c "${jbpm.home}/eclipse/eclipse" "-data" "${jbpm.home}/workspace"" />
</exec>
- <exec executable="/bin/bash" os="Mac OS X">
- <arg line="-c "${jbpm.home}/eclipse/Eclipse.app/Contents/MacOS/eclipse" "-data" "${jbpm.home}/workspace"" />
+ <exec executable="/bin/bash" os="Mac OS X">
+ <arg line="-c "${jbpm.home}/eclipse/Eclipse.app/Contents/MacOS/eclipse" "-data" "${jbpm.home}/workspace"" />
</exec>
</target>
- <target name="install.signavio.into.jboss" depends="internal.set.signavio.repo.dir" description="installs signavio into jboss">
+ <target name="install.signavio.into.jboss"
+ depends="internal.set.signavio.repo.dir"
+ description="installs signavio into jboss">
<!-- Current version of Signavio needs to be unpacked in /deploy to work correctly -->
- <unzip src="${signavio.src.dir}/${signavio.war.file.name}" dest="${jboss.server.deploy.dir}/${signavio.war.file.name}" />
+ <unzip src="${signavio.src.dir}/${signavio.war.file.name}"
+ dest="${jboss.server.deploy.dir}/${signavio.war.file.name}" />
</target>
- <target name="install.signavio.into.tomcat" depends="internal.set.signavio.repo.dir" description="installs signavio into tomcat">
- <copy file="${signavio.src.dir}/${signavio.war.file.name}" todir="${tomcat.webapps.dir}"/>
+ <target name="install.signavio.into.tomcat"
+ depends="internal.set.signavio.repo.dir"
+ description="installs signavio into tomcat">
+ <copy file="${signavio.src.dir}/${signavio.war.file.name}" todir="${tomcat.webapps.dir}" />
</target>
-
+
<!-- ######################## -->
<!-- ### INTERNAL TARGETS ### -->
<!-- ######################## -->
- <target name="enable.jboss.debug"
+ <target name="enable.jboss.debug"
depends="internal.enable.jboss.debug.jboss500, internal.enable.jboss.debug.jboss510" />
<target name="internal.enable.jboss.debug.jboss500" if="is.jboss.500">
<echo message="enabling debug on ${jboss.home}" />
- <replace file="${jboss.home}/bin/run.bat"
+ <replace file="${jboss.home}/bin/run.bat"
token="rem set JAVA_OPTS=%JAVA_OPTS% -Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y"
value="set JAVA_OPTS=%JAVA_OPTS% -Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n" />
<echo message="copying customized log file to ${jboss.server.config.dir}/conf" />
- <copy file="${jbpm.home}/install/src/jboss/log/jboss-log4j.xml" todir="${jboss.server.config.dir}/conf" overwrite="true" />
+ <copy file="${jbpm.home}/install/src/jboss/log/jboss-log4j.xml"
+ todir="${jboss.server.config.dir}/conf"
+ overwrite="true" />
</target>
- <target name="internal.enable.jboss.debug.jboss510" if="is.jboss.510">
+ <target name="internal.enable.jboss.debug.jboss510" if="is.jboss.510">
<echo message="enabling debug on ${jboss.home}" />
- <replace file="${jboss.home}/bin/run.conf.bat"
+ <replace file="${jboss.home}/bin/run.conf.bat"
token="rem set "JAVA_OPTS=%JAVA_OPTS% -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n""
- value="set "JAVA_OPTS=%JAVA_OPTS% -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n""/>
+ value="set "JAVA_OPTS=%JAVA_OPTS% -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n"" />
<echo message="copying customized log file to ${jboss.server.config.dir}/conf" />
- <copy file="${jbpm.home}/install/src/jboss/log/jboss-log4j.xml" todir="${jboss.server.config.dir}/conf" overwrite="true" />
+ <copy file="${jbpm.home}/install/src/jboss/log/jboss-log4j.xml"
+ todir="${jboss.server.config.dir}/conf"
+ overwrite="true" />
</target>
<target name="internal.copy.database.driver">
@@ -846,47 +862,58 @@
</condition>
<antcall target="internal.copy.database.driver.if.needed" />
</target>
-
+
<target name="internal.copy.database.driver.if.needed" if="database.driver">
- <available file="${jbpm.home}/lib/${database.driver}" property="database.driver.jar.available" />
- <fail message="please download the ${database} driver jar and put it in the ${jbpm.home}/lib directory" unless="database.driver.jar.available" />
+ <available file="${jbpm.home}/lib/${database.driver}"
+ property="database.driver.jar.available" />
+ <fail message="please download the ${database} driver jar and put it in the ${jbpm.home}/lib directory"
+ unless="database.driver.jar.available" />
<echo message="Copying database driver ${database.driver} to ${database.driver.destination.dir}" />
- <copy file="${jbpm.home}/lib/${database.driver}" todir="${database.driver.destination.dir}" />
+ <copy file="${jbpm.home}/lib/${database.driver}"
+ todir="${database.driver.destination.dir}" />
</target>
<target name="internal.set.signavio.repo.dir">
<mkdir dir="${jbpm.home}/${signavio.repo.dir.name}" />
-
+
<!-- unzip the signavio war -->
<delete dir="${signavio.tmp.dir}" />
<mkdir dir="${signavio.tmp.dir}" />
- <unzip src="${jbpm.home}/install/src/signavio/${signavio.war.file.name}" dest="${signavio.tmp.dir}" />
-
- <!-- Replace Windows backslash with forward slash (see JBPM-2540) -->
- <pathconvert property="signavio.repo.path" targetos="unix">
- <map from="${basedir}/" to='' />
- <map from="${basedir}\\" to='' />
- <path location="${jbpm.home}/${signavio.repo.dir.name}"/>
- </pathconvert>
-
+ <unzip src="${jbpm.home}/install/src/signavio/${signavio.war.file.name}"
+ dest="${signavio.tmp.dir}" />
+
+ <!-- Replace Windows backslash with forward slash (see JBPM-2540) -->
+ <pathconvert property="signavio.repo.path" targetos="unix">
+ <map from="${basedir}/" to='' />
+ <map from="${basedir}\\" to='' />
+ <path location="${jbpm.home}/${signavio.repo.dir.name}" />
+ </pathconvert>
+
<!-- replace the repo dir in he unzipped WEB-INF/web.xml -->
- <replaceregexp file="${signavio.tmp.dir}/WEB-INF/web.xml" flags="s"
+ <replaceregexp file="${signavio.tmp.dir}/WEB-INF/web.xml"
+ flags="s"
match="<param-name>fileSystemRootDirectory</param-name>.*?<param-value>.*?</param-value>"
- replace="<param-name>fileSystemRootDirectory</param-name><param-value>${signavio.repo.path}</param-value>"/>
-
+ replace="<param-name>fileSystemRootDirectory</param-name><param-value>${signavio.repo.path}</param-value>" />
+
<!-- zip it up again and copy it back to the signavio src dir-->
- <zip destfile="${signavio.tmp.dir}/${signavio.war.file.name}" basedir="${signavio.tmp.dir}" />
- <copy file="${signavio.tmp.dir}/${signavio.war.file.name}" todir="${signavio.src.dir}" overwrite="true"/>
+ <zip destfile="${signavio.tmp.dir}/${signavio.war.file.name}"
+ basedir="${signavio.tmp.dir}" />
+ <copy file="${signavio.tmp.dir}/${signavio.war.file.name}"
+ todir="${signavio.src.dir}"
+ overwrite="true" />
</target>
<target name="internal.install.eclipse.windows" if="is.windows">
- <unzip src="${eclipse.distro.dir}/${eclipse.filename}" dest="${jbpm.home}" overwrite="true" />
+ <unzip src="${eclipse.distro.dir}/${eclipse.filename}"
+ dest="${jbpm.home}"
+ overwrite="true" />
</target>
<target name="internal.install.eclipse.non.windows" if="is.not.windows">
<gunzip src="${eclipse.distro.dir}/${eclipse.filename}" dest="${eclipse.distro.dir}" />
- <untar src="${eclipse.distro.dir}/${eclipse.tarfilename}" dest="${jbpm.home}" overwrite="true" />
- <delete file="${eclipse.distro.dir}/${eclipse.tarfilename}"/>
+ <untar src="${eclipse.distro.dir}/${eclipse.tarfilename}"
+ dest="${jbpm.home}"
+ overwrite="true" />
+ <delete file="${eclipse.distro.dir}/${eclipse.tarfilename}" />
</target>
-
</project>
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/ant/StartJBossTask.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/ant/StartJBossTask.java 2010-05-04 02:05:34 UTC (rev 6292)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/ant/StartJBossTask.java 2010-05-04 04:20:24 UTC (rev 6293)
@@ -21,56 +21,70 @@
*/
package org.jbpm.pvm.internal.ant;
+import java.util.ArrayList;
+import java.util.List;
+
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Task;
public class StartJBossTask extends Task {
-
+
private static final String END_MESSAGE = " Started in ";
-
- String configuration = null;
- String jbosshome = null;
+ String configuration;
+ String jbosshome;
+ String bindaddress;
+
public void execute() throws BuildException {
- try {
- // get some environment variableInstances
- String fileSeparator = System.getProperty( "file.separator" );
- String os = getProject().getProperty( "os.name" ).toLowerCase();
-
- // build the command string
- String[] command = null;
- if ( os.indexOf( "windows" ) != -1 ) {
- command = new String[]{getJBossHome() + fileSeparator + "bin" + fileSeparator + "run.bat"};
- } else if ( os.indexOf( "linux" ) != -1 || os.indexOf( "mac" ) != -1) {
- command = new String[]{getJBossHome() + fileSeparator + "bin" + fileSeparator + "run.sh"};
- } else {
- throw new BuildException( "os '" + os + "' not supported in the startjboss task." );
- }
-
- if (configuration!=null) {
- command = new String[]{command[0], "-c "+configuration};
- }
+ // get some environment variableInstances
+ String fileSeparator = System.getProperty("file.separator");
+ String os = getProject().getProperty("os.name").toLowerCase();
+ // build the command string
+ String program;
+ if (os.indexOf("windows") != -1) {
+ program = getJBossHome() + fileSeparator + "bin" + fileSeparator + "run.bat";
+ }
+ else if (os.indexOf("linux") != -1 || os.indexOf("mac") != -1) {
+ program = getJBossHome() + fileSeparator + "bin" + fileSeparator + "run.sh";
+ }
+ else {
+ throw new BuildException("os '" + os + "' not supported in the startjboss task.");
+ }
- // launch the command and wait till the END_MESSAGE appears
- Thread launcher = new Launcher(this, command, END_MESSAGE, null);
- launcher.start();
+ List<String> command = new ArrayList<String>();
+ command.add(program);
+
+ if (configuration != null) {
+ command.add("-c");
+ command.add(configuration);
+ }
+
+ if (bindaddress != null) {
+ command.add("-b");
+ command.add(bindaddress);
+ }
+
+ // launch the command and wait till the END_MESSAGE appears
+ Thread launcher = new Launcher(this, command.toArray(new String[0]), END_MESSAGE, null);
+ launcher.start();
+ try {
launcher.join();
-
- } catch (Exception e) {
+ }
+ catch (InterruptedException e) {
e.printStackTrace();
}
}
-
+
String getJBossHome() {
- if (jbosshome!=null) {
+ if (jbosshome != null) {
return jbosshome;
}
- String jbossHomeSysProp = getProject().getProperty( "jboss.home" );
- if (jbossHomeSysProp!=null) {
+ String jbossHomeSysProp = getProject().getProperty("jboss.home");
+ if (jbossHomeSysProp != null) {
return jbossHomeSysProp;
}
- throw new BuildException("startjboss couldn't figure out which jboss to start: attribute jbosshome not specified and property jboss.home was not set");
+ throw new BuildException("jboss home not specified");
}
public void setConfiguration(String configuration) {
@@ -79,4 +93,8 @@
public void setJbosshome(String jbosshome) {
this.jbosshome = jbosshome;
}
+
+ public void setBindaddress(String bindaddress) {
+ this.bindaddress = bindaddress;
+ }
}
Modified: jbpm4/trunk/modules/test-cactus/pom.xml
===================================================================
--- jbpm4/trunk/modules/test-cactus/pom.xml 2010-05-04 02:05:34 UTC (rev 6292)
+++ jbpm4/trunk/modules/test-cactus/pom.xml 2010-05-04 04:20:24 UTC (rev 6293)
@@ -1,18 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- ====================================================================== -->
-<!-- -->
-<!-- JBoss, the OpenSource J2EE webOS -->
-<!-- -->
-<!-- Distributable under LGPL license. -->
-<!-- See terms of license at http://www.gnu.org. -->
-<!-- -->
-<!-- ====================================================================== -->
+ <!-- ====================================================================== -->
+ <!-- -->
+ <!-- JBoss, the OpenSource J2EE webOS -->
+ <!-- -->
+ <!-- Distributable under LGPL license. -->
+ <!-- See terms of license at http://www.gnu.org. -->
+ <!-- -->
+ <!-- ====================================================================== -->
-<!-- $Id: pom.xml 5319 2009-07-17 10:03:46Z tom.baeyens(a)jboss.com $ -->
+ <!-- $Id: pom.xml 5319 2009-07-17 10:03:46Z tom.baeyens(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">
+ 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>jBPM 4 - Test Cactus</name>
@@ -29,31 +29,38 @@
</parent>
<dependencies>
- <dependency>
- <groupId>org.jbpm.jbpm4</groupId>
- <artifactId>jbpm-jpdl</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jbpm.jbpm4</groupId>
- <artifactId>jbpm-bpmn</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jbpm.jbpm4</groupId>
- <artifactId>jbpm-examples</artifactId>
- <classifier>tests</classifier>
- </dependency>
- <dependency>
- <groupId>org.jbpm.jbpm4</groupId>
- <artifactId>jbpm-test-db</artifactId>
- <classifier>tests</classifier>
- </dependency>
- <dependency>
- <groupId>cactus</groupId>
- <artifactId>cactus.core</artifactId>
- </dependency>
+ <dependency>
+ <groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm-jpdl</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm-bpmn</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm-examples</artifactId>
+ <classifier>tests</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm-test-db</artifactId>
+ <classifier>tests</classifier>
+ </dependency>
+ <dependency>
+ <groupId>cactus</groupId>
+ <artifactId>cactus.core</artifactId>
+ </dependency>
</dependencies>
<build>
+ <testResources>
+ <testResource>
+ <directory>src/test/resources</directory>
+ <filtering>true</filtering>
+ </testResource>
+ </testResources>
+
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
@@ -75,7 +82,7 @@
</configuration>
</execution>
</executions>
- </plugin>
+ </plugin>
</plugins>
</build>
@@ -87,24 +94,24 @@
</properties>
<build>
<plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <execution>
- <id>copy.libs</id>
- <phase>package</phase>
- <goals>
- <goal>copy</goal>
- </goals>
- <configuration>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy.libs</id>
+ <phase>package</phase>
+ <goals>
+ <goal>copy</goal>
+ </goals>
+ <configuration>
<outputDirectory>target/jbpm.test.webapp.libs</outputDirectory>
- <artifactItems>
- <artifactItem>
- <groupId>aspectj</groupId>
- <artifactId>aspectjrt</artifactId>
- </artifactItem>
+ <artifactItems>
<artifactItem>
+ <groupId>aspectj</groupId>
+ <artifactId>aspectjrt</artifactId>
+ </artifactItem>
+ <artifactItem>
<groupId>cactus</groupId>
<artifactId>cactus.core</artifactId>
</artifactItem>
@@ -127,9 +134,9 @@
<version>1.1</version>
</artifactItem>
<artifactItem>
- <groupId>org.jbpm.jbpm4</groupId>
- <artifactId>jbpm-examples</artifactId>
- <classifier>tests</classifier>
+ <groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm-examples</artifactId>
+ <classifier>tests</classifier>
</artifactItem>
<artifactItem>
<groupId>org.jbpm.jbpm4</groupId>
@@ -148,15 +155,15 @@
<groupId>org.subethamail</groupId>
<artifactId>subethasmtp-smtp</artifactId>
</artifactItem>
- </artifactItems>
- </configuration>
- </execution>
- </executions>
- </plugin>
+ </artifactItems>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
</profile>
-
+
<profile>
<id>enterprise</id>
<properties>
@@ -164,24 +171,24 @@
</properties>
<build>
<plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <execution>
- <id>copy.libs</id>
- <phase>package</phase>
- <goals>
- <goal>copy</goal>
- </goals>
- <configuration>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy.libs</id>
+ <phase>package</phase>
+ <goals>
+ <goal>copy</goal>
+ </goals>
+ <configuration>
<outputDirectory>target/jbpm.test.webapp.libs</outputDirectory>
- <artifactItems>
- <artifactItem>
- <groupId>aspectj</groupId>
- <artifactId>aspectjrt</artifactId>
- </artifactItem>
+ <artifactItems>
<artifactItem>
+ <groupId>aspectj</groupId>
+ <artifactId>aspectjrt</artifactId>
+ </artifactItem>
+ <artifactItem>
<groupId>cactus</groupId>
<artifactId>cactus.core</artifactId>
</artifactItem>
@@ -204,9 +211,9 @@
<version>1.1</version>
</artifactItem>
<artifactItem>
- <groupId>org.jbpm.jbpm4</groupId>
- <artifactId>jbpm-examples</artifactId>
- <classifier>tests</classifier>
+ <groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm-examples</artifactId>
+ <classifier>tests</classifier>
</artifactItem>
<artifactItem>
<groupId>org.jbpm.jbpm4</groupId>
@@ -225,15 +232,15 @@
<groupId>org.subethamail</groupId>
<artifactId>subethasmtp-smtp</artifactId>
</artifactItem>
- </artifactItems>
- </configuration>
- </execution>
- </executions>
- </plugin>
+ </artifactItems>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
</profile>
-
+
<profile>
<id>runtest</id>
<dependencies>
@@ -252,55 +259,55 @@
<artifactId>jbpm-test-db</artifactId>
<classifier>tests</classifier>
</dependency>
- <dependency>
- <groupId>cactus</groupId>
- <artifactId>cactus.core</artifactId>
- </dependency>
- <dependency>
- <groupId>cactus</groupId>
- <artifactId>cactus.integration.shared.api</artifactId>
- </dependency>
- <dependency>
- <groupId>cactus</groupId>
- <artifactId>cactus.integration.ant</artifactId>
- </dependency>
- <dependency>
- <groupId>aspectj</groupId>
- <artifactId>aspectjrt</artifactId>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>runtime</scope>
- </dependency>
+ <dependency>
+ <groupId>cactus</groupId>
+ <artifactId>cactus.core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>cactus</groupId>
+ <artifactId>cactus.integration.shared.api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>cactus</groupId>
+ <artifactId>cactus.integration.ant</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>aspectj</groupId>
+ <artifactId>aspectjrt</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>runtime</scope>
+ </dependency>
</dependencies>
<build>
<plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <id>generate-cactus-test-suite</id>
- <phase>generate-test-sources</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <tasks>
- <property name="test_classpath" refid="maven.test.classpath"/>
- <echo message="${test_classpath}" />
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>generate-cactus-test-suite</id>
+ <phase>generate-test-sources</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <property name="test_classpath" refid="maven.test.classpath" />
+ <echo message="${test_classpath}" />
<delete>
<fileset dir=".">
<include name="src/test/java/org/jbpm/test/AllIntegrationTests.java*" />
</fileset>
</delete>
- <java classname="org.jbpm.cactustool.CactusTestGenerator">
- <classpath path="${test_classpath}"/>
- <arg line="src/test/java ../examples/src/test/java ../test-db/src/test/java" />
- </java>
- </tasks>
- </configuration>
- </execution>
+ <java classname="org.jbpm.cactustool.CactusTestGenerator">
+ <classpath path="${test_classpath}" />
+ <arg line="src/test/java ../examples/src/test/java ../test-db/src/test/java" />
+ </java>
+ </tasks>
+ </configuration>
+ </execution>
<execution>
<id>remove-generated-cactus-test</id>
<phase>package</phase>
@@ -317,16 +324,16 @@
</tasks>
</configuration>
</execution>
- </executions>
- </plugin>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <includes>
- <include>org/jbpm/test/AllIntegrationTests.java</include>
- </includes>
- </configuration>
- </plugin>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <includes>
+ <include>org/jbpm/test/AllIntegrationTests.java</include>
+ </includes>
+ </configuration>
+ </plugin>
</plugins>
</build>
</profile>
Modified: jbpm4/trunk/modules/test-cactus/src/test/resources/cactus.properties
===================================================================
--- jbpm4/trunk/modules/test-cactus/src/test/resources/cactus.properties 2010-05-04 02:05:34 UTC (rev 6292)
+++ jbpm4/trunk/modules/test-cactus/src/test/resources/cactus.properties 2010-05-04 04:20:24 UTC (rev 6293)
@@ -1 +1 @@
-cactus.contextURL=http://localhost:8080/jbpm-test-webapp
+cactus.contextURL=http\://@jboss.bind.address@\:8080/jbpm-test-webapp
Modified: jbpm4/trunk/qa/hudson-jbpm4-jboss.sh
===================================================================
--- jbpm4/trunk/qa/hudson-jbpm4-jboss.sh 2010-05-04 02:05:34 UTC (rev 6292)
+++ jbpm4/trunk/qa/hudson-jbpm4-jboss.sh 2010-05-04 04:20:24 UTC (rev 6293)
@@ -2,19 +2,18 @@
#
# runs the jboss integration test suite
-MAVEN_OPTS="-Xms1024M -Xmx1024M"
-ANT_PROPERTIES="-Djboss.version=$JBOSS_VERSION -Djbpm.parent.dir=$WORKSPACE -Djboss.distro.dir=$SOURCE_REPO/jboss"
-echo ANT_PROPERTIES=${ANT_PROPERTIES}
+MAVEN_OPTS="-Xms256M -Xmx1024M"
+ANT_PROPERTIES="-Djboss.version=$JBOSS_VERSION -Djbpm.parent.dir=$WORKSPACE -Djboss.distro.dir=$SOURCE_REPO/jboss -Djboss.bind.address=$JBOSS_BINDADDR"
-echo just in case the previous run didnt complete ok, we stop jboss
-ant -f modules/distro/src/main/files/install/build.xml $ANT_PROPERTIES reinstall.jboss
+# just in case the previous run didnt complete ok, we stop jboss
ant -f modules/distro/src/main/files/install/build.xml $ANT_PROPERTIES stop.jboss
+ant -f modules/distro/src/main/files/install/build.xml $ANT_PROPERTIES reinstall.jboss
mvn -U -Pdistro,integration clean install
ant -f qa/build.xml $ANT_PROPERTIES testsuite.jboss.setup
cd modules/test-cactus
-mvn -Pruntest test
+mvn -Pruntest -Djboss.bind.address=$JBOSS_BINDADDR test
cd ../..
ant -f qa/build.xml $ANT_PROPERTIES testsuite.jboss.teardown
14 years