[jbpm-commits] JBoss JBPM SVN: r3814 - in jbpm4/trunk: modules/db and 6 other directories.
do-not-reply at jboss.org
do-not-reply at jboss.org
Mon Feb 9 10:07:41 EST 2009
Author: heiko.braun at jboss.com
Date: 2009-02-09 10:07:40 -0500 (Mon, 09 Feb 2009)
New Revision: 3814
Added:
jbpm4/trunk/modules/enterprise/src/main/java/org/jbpm/enterprise/mgmt/
jbpm4/trunk/modules/enterprise/src/main/java/org/jbpm/enterprise/mgmt/CommandDelegate.java
jbpm4/trunk/modules/enterprise/src/main/java/org/jbpm/enterprise/mgmt/ManagementFactoryImpl.java
jbpm4/trunk/modules/enterprise/src/main/java/org/jbpm/enterprise/mgmt/ProcessManagementImpl.java
jbpm4/trunk/modules/enterprise/src/main/java/org/jbpm/enterprise/mgmt/ServiceLocator.java
Modified:
jbpm4/trunk/modules/db/jbpm4-db.iml
jbpm4/trunk/modules/enterprise/jbpm4-enterprise.iml
jbpm4/trunk/modules/enterprise/pom.xml
jbpm4/trunk/modules/examples/jbpm4-examples.iml
jbpm4/trunk/modules/jpdl/pom.xml
jbpm4/trunk/modules/test-db/jpm4-test-db.iml
jbpm4/trunk/pom.xml
Log:
Begin work on GWT console integration
Modified: jbpm4/trunk/modules/db/jbpm4-db.iml
===================================================================
--- jbpm4/trunk/modules/db/jbpm4-db.iml 2009-02-09 14:56:37 UTC (rev 3813)
+++ jbpm4/trunk/modules/db/jbpm4-db.iml 2009-02-09 15:07:40 UTC (rev 3814)
@@ -8,11 +8,10 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="module" module-name="jbpm4-toplevel" exported="" />
- <orderEntry type="module" module-name="jbpm4-pvm" exported="" />
- <orderEntry type="module" module-name="jbpm4-task" exported="" />
- <orderEntry type="module" module-name="jbpm4-jpdl" exported="" />
- <orderEntry type="module" module-name="jbpm4-test-base" exported="" />
+ <orderEntry type="module" module-name="jbpm4-toplevel" />
+ <orderEntry type="module" module-name="jbpm4-test-base" />
+ <orderEntry type="module" module-name="jbpm4-jpdl" />
+ <orderEntry type="module" module-name="jbpm4-pvm" />
<orderEntry type="module-library" exported="">
<library name="M2 Dep: javax.transaction:jta:jar:1.0.1B:compile">
<CLASSES>
Modified: jbpm4/trunk/modules/enterprise/jbpm4-enterprise.iml
===================================================================
--- jbpm4/trunk/modules/enterprise/jbpm4-enterprise.iml 2009-02-09 14:56:37 UTC (rev 3813)
+++ jbpm4/trunk/modules/enterprise/jbpm4-enterprise.iml 2009-02-09 15:07:40 UTC (rev 3814)
@@ -11,9 +11,9 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="module" module-name="jbpm4-pvm" />
<orderEntry type="module" module-name="jbpm4-toplevel" />
<orderEntry type="module" module-name="jbpm4-test-base" />
+ <orderEntry type="module" module-name="jbpm4-pvm" />
<orderEntry type="module-library">
<library name="M2 Dep: cargo:cargo:jar:0.5:test">
<CLASSES>
Modified: jbpm4/trunk/modules/enterprise/pom.xml
===================================================================
--- jbpm4/trunk/modules/enterprise/pom.xml 2009-02-09 14:56:37 UTC (rev 3813)
+++ jbpm4/trunk/modules/enterprise/pom.xml 2009-02-09 15:07:40 UTC (rev 3814)
@@ -40,6 +40,11 @@
<artifactId>jbpm-pvm</artifactId>
<version>${version}</version>
</dependency>
+ <dependency>
+ <groupId>org.jboss.bpm</groupId>
+ <artifactId>gwt-console-server-integration</artifactId>
+ <scope>compile</scope>
+ </dependency>
<!-- Test Dependencies -->
<dependency>
Added: jbpm4/trunk/modules/enterprise/src/main/java/org/jbpm/enterprise/mgmt/CommandDelegate.java
===================================================================
--- jbpm4/trunk/modules/enterprise/src/main/java/org/jbpm/enterprise/mgmt/CommandDelegate.java (rev 0)
+++ jbpm4/trunk/modules/enterprise/src/main/java/org/jbpm/enterprise/mgmt/CommandDelegate.java 2009-02-09 15:07:40 UTC (rev 3814)
@@ -0,0 +1,72 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.enterprise.mgmt;
+
+
+import org.jbpm.enterprise.internal.ejb.LocalCommandExecutor;
+import org.jbpm.enterprise.internal.ejb.LocalCommandExecutorHome;
+
+import javax.ejb.CreateException;
+
+/**
+ * Adopts a business interface to the command facade.<br>
+ * Depends on the CommandExecutor(<code>java:jbpm/CommandExecutor</code>).
+ *
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+class CommandDelegate
+{
+ private LocalCommandExecutor facade;
+ private static final String DEFAULT_JNDI_NAME = "java:jbpm/CommandExecutor";
+
+ /*
+ * Lookup with particluar JNDI name.
+ * @param jndiName
+ */
+ public CommandDelegate(String jndiName)
+ {
+ initialize(jndiName);
+ }
+
+ /*
+ * Lookup using default JNDI name.
+ * @see #DEFAULT_JNDI_NAME
+ */
+
+ public CommandDelegate()
+ {
+ initialize(DEFAULT_JNDI_NAME);
+ }
+
+ private void initialize(String jndiName)
+ {
+ try
+ {
+ LocalCommandExecutorHome home = (LocalCommandExecutorHome)ServiceLocator.getEjbLocalHome(jndiName);
+ this.facade = home.create();
+ }
+ catch (CreateException e)
+ {
+ throw new RuntimeException("Failed to create LocalCommandService", e);
+ }
+ }
+}
Added: jbpm4/trunk/modules/enterprise/src/main/java/org/jbpm/enterprise/mgmt/ManagementFactoryImpl.java
===================================================================
--- jbpm4/trunk/modules/enterprise/src/main/java/org/jbpm/enterprise/mgmt/ManagementFactoryImpl.java (rev 0)
+++ jbpm4/trunk/modules/enterprise/src/main/java/org/jbpm/enterprise/mgmt/ManagementFactoryImpl.java 2009-02-09 15:07:40 UTC (rev 3814)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.enterprise.mgmt;
+
+import org.jboss.bpm.console.server.integration.*;
+
+/**
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+public class ManagementFactoryImpl extends ManagementFactory
+{
+
+ public ProcessManagement createProcessManagement()
+ {
+ return new ProcessManagementImpl();
+ }
+
+ public TaskManagement createTaskManagement()
+ {
+ throw new RuntimeException("Not implemented");
+ }
+
+ public UserManagement createUserManagement()
+ {
+ throw new RuntimeException("Not implemented");
+ }
+
+ public ExtensionManagement createExtensionManagement()
+ {
+ throw new RuntimeException("Not implemented");
+ }
+}
Added: jbpm4/trunk/modules/enterprise/src/main/java/org/jbpm/enterprise/mgmt/ProcessManagementImpl.java
===================================================================
--- jbpm4/trunk/modules/enterprise/src/main/java/org/jbpm/enterprise/mgmt/ProcessManagementImpl.java (rev 0)
+++ jbpm4/trunk/modules/enterprise/src/main/java/org/jbpm/enterprise/mgmt/ProcessManagementImpl.java 2009-02-09 15:07:40 UTC (rev 3814)
@@ -0,0 +1,83 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.enterprise.mgmt;
+
+import org.jboss.bpm.console.server.integration.ProcessManagement;
+import org.jboss.bpm.console.client.model.ProcessDefinitionRef;
+import org.jboss.bpm.console.client.model.ProcessInstanceRef;
+
+import java.util.List;
+
+/**
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+class ProcessManagementImpl implements ProcessManagement
+{
+
+ private CommandDelegate delegate;
+
+ public ProcessManagementImpl()
+ {
+ this.delegate = new CommandDelegate();
+ }
+
+ public List<ProcessDefinitionRef> getProcessDefinitions()
+ {
+ throw new RuntimeException("Not implemented");
+ }
+
+ public ProcessDefinitionRef getProcessDefinition(long procDefId)
+ {
+ throw new RuntimeException("Not implemented");
+ }
+
+ public List<ProcessDefinitionRef> removeProcessDefinition(long procDefId)
+ {
+ throw new RuntimeException("Not implemented");
+ }
+
+ public List<ProcessInstanceRef> getProcessInstances(long procDefId)
+ {
+ throw new RuntimeException("Not implemented");
+ }
+
+ public ProcessInstanceRef getProcessInstance(long procId)
+ {
+ throw new RuntimeException("Not implemented");
+ }
+
+ public ProcessInstanceRef newInstance(long procDefId)
+ {
+ throw new RuntimeException("Not implemented");
+ }
+
+ public void setProcessState(long procId, ProcessInstanceRef.STATE nextState)
+ {
+ throw new RuntimeException("Not implemented");
+ }
+
+ public void signalToken(long tokenId, String signal)
+ {
+ throw new RuntimeException("Not implemented");
+ }
+}
+
Added: jbpm4/trunk/modules/enterprise/src/main/java/org/jbpm/enterprise/mgmt/ServiceLocator.java
===================================================================
--- jbpm4/trunk/modules/enterprise/src/main/java/org/jbpm/enterprise/mgmt/ServiceLocator.java (rev 0)
+++ jbpm4/trunk/modules/enterprise/src/main/java/org/jbpm/enterprise/mgmt/ServiceLocator.java 2009-02-09 15:07:40 UTC (rev 3814)
@@ -0,0 +1,74 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.enterprise.mgmt;
+
+import javax.ejb.EJBLocalHome;
+import javax.naming.Context;
+import javax.naming.NamingException;
+import javax.naming.InitialContext;
+import javax.transaction.UserTransaction;
+
+/**
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+class ServiceLocator
+{
+ public static EJBLocalHome getEjbLocalHome(String localHomeJndiName)
+ {
+ EJBLocalHome localHome = null;
+ try
+ {
+ Context ctx = createContext();
+ localHome = (EJBLocalHome) ctx.lookup(localHomeJndiName);
+ }
+ catch (Exception cce)
+ {
+ throw new RuntimeException("Failed load access EJB: " +localHomeJndiName, cce);
+ }
+
+ return localHome;
+ }
+
+ public static UserTransaction getUserTransaction()
+ {
+ UserTransaction tx = null;
+
+ try
+ {
+ Context ctx = createContext();
+ tx = (UserTransaction) ctx.lookup("java:comp/UserTransaction");
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException("Failed to create UserTransaction");
+ }
+
+ return tx;
+ }
+
+ private static Context createContext()
+ throws NamingException
+ {
+ InitialContext ctx = new InitialContext();
+ return ctx;
+ }
+}
\ No newline at end of file
Modified: jbpm4/trunk/modules/examples/jbpm4-examples.iml
===================================================================
--- jbpm4/trunk/modules/examples/jbpm4-examples.iml 2009-02-09 14:56:37 UTC (rev 3813)
+++ jbpm4/trunk/modules/examples/jbpm4-examples.iml 2009-02-09 15:07:40 UTC (rev 3814)
@@ -9,11 +9,10 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="module" module-name="jbpm4-task" />
- <orderEntry type="module" module-name="jbpm4-pvm" />
<orderEntry type="module" module-name="jbpm4-toplevel" />
- <orderEntry type="module" module-name="jbpm4-jpdl" />
<orderEntry type="module" module-name="jbpm4-test-base" />
+ <orderEntry type="module" module-name="jbpm4-jpdl" />
+ <orderEntry type="module" module-name="jbpm4-pvm" />
<orderEntry type="module-library">
<library name="M2 Dep: javax.transaction:jta:jar:1.0.1B:compile">
<CLASSES>
Modified: jbpm4/trunk/modules/jpdl/pom.xml
===================================================================
--- jbpm4/trunk/modules/jpdl/pom.xml 2009-02-09 14:56:37 UTC (rev 3813)
+++ jbpm4/trunk/modules/jpdl/pom.xml 2009-02-09 15:07:40 UTC (rev 3814)
@@ -46,7 +46,7 @@
<groupId>org.jbpm.jbpm4</groupId>
<artifactId>jbpm-task</artifactId>
<version>${version}</version>
- </dependency>
+ </dependency>
<!-- 3rd Party -->
<dependency>
@@ -101,7 +101,7 @@
<ant antfile="scripts/antrun-jbpm-config.xml" target="concat" />
</tasks>
</configuration>
- </execution>
+ </execution>
</executions>
</plugin>
Modified: jbpm4/trunk/modules/test-db/jpm4-test-db.iml
===================================================================
--- jbpm4/trunk/modules/test-db/jpm4-test-db.iml 2009-02-09 14:56:37 UTC (rev 3813)
+++ jbpm4/trunk/modules/test-db/jpm4-test-db.iml 2009-02-09 15:07:40 UTC (rev 3814)
@@ -9,11 +9,10 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="module" module-name="jbpm4-toplevel" />
- <orderEntry type="module" module-name="jbpm4-pvm" />
- <orderEntry type="module" module-name="jbpm4-task" />
- <orderEntry type="module" module-name="jbpm4-jpdl" />
- <orderEntry type="module" module-name="jbpm4-test-base" />
+ <orderEntry type="module" module-name="jbpm4-toplevel" exported="" />
+ <orderEntry type="module" module-name="jbpm4-test-base" exported="" />
+ <orderEntry type="module" module-name="jbpm4-jpdl" exported="" />
+ <orderEntry type="module" module-name="jbpm4-pvm" exported="" />
<orderEntry type="module-library" exported="">
<library name="M2 Dep: javax.transaction:jta:jar:1.0.1B:compile">
<CLASSES>
@@ -280,15 +279,6 @@
</library>
</orderEntry>
<orderEntry type="module-library" exported="">
- <library name="M2 Dep: javassist:javassist:jar:3.4.GA:test">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/javassist/javassist/3.4.GA/javassist-3.4.GA.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library" exported="">
<library name="M2 Dep: org.jboss.identity:idm-api:jar:1.0.0-SNAPSHOT:test">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/jboss/identity/idm-api/1.0.0-SNAPSHOT/idm-api-1.0.0-SNAPSHOT.jar!/" />
@@ -404,6 +394,15 @@
</SOURCES>
</library>
</orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: javassist:javassist:jar:3.4.GA:test">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/javassist/javassist/3.4.GA/javassist-3.4.GA.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
<orderEntryProperties />
</component>
</module>
Modified: jbpm4/trunk/pom.xml
===================================================================
--- jbpm4/trunk/pom.xml 2009-02-09 14:56:37 UTC (rev 3813)
+++ jbpm4/trunk/pom.xml 2009-02-09 15:07:40 UTC (rev 3814)
@@ -48,11 +48,12 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<apache.ant.version>1.7.0</apache.ant.version>
<cactus.version>13-1.7.1</cactus.version>
+ <gwt.console.version>1.0.0-SNAPSHOT</gwt.console.version>
<hibernate.version>3.2.6.ga</hibernate.version>
<hibernate.annotations.version>3.3.1.GA</hibernate.annotations.version>
- <jboss.identity.version>1.0.0-SNAPSHOT</jboss.identity.version>
<hsqldb.version>1.8.0.7</hsqldb.version>
<izpack.version>4.1.0</izpack.version>
+ <jboss.identity.version>1.0.0-SNAPSHOT</jboss.identity.version>
<jboss.j2ee.version>4.2.2.GA</jboss.j2ee.version>
<jbossesb.version>4.4.0.GA</jbossesb.version>
<jboss.client.version>4.2.2.GA</jboss.client.version>
@@ -100,6 +101,11 @@
<version>${version}</version>
</dependency>
<dependency>
+ <groupId>org.jboss.bpm</groupId>
+ <artifactId>gwt-console-server-integration</artifactId>
+ <version>${gwt.console.version}</version>
+ </dependency>
+ <dependency>
<groupId>org.livetribe</groupId>
<artifactId>livetribe-jsr223</artifactId>
<version>${jsr233.version}</version>
@@ -538,7 +544,7 @@
<profile>
<id>report</id>
- <!-- Report Customization 'mvn site:site'-->
+ <!-- Report Customization 'mvn site:site'-->
<reporting>
<plugins>
<plugin>
More information about the jbpm-commits
mailing list