[jbpm-commits] JBoss JBPM SVN: r4187 - in jbpm4/branches/tbaeyens/modules: distro and 10 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Sat Mar 7 06:05:44 EST 2009


Author: tom.baeyens at jboss.com
Date: 2009-03-07 06:05:44 -0500 (Sat, 07 Mar 2009)
New Revision: 4187

Added:
   jbpm4/branches/tbaeyens/modules/distro/src/main/resources/config-tool/jbpm/cfg/remote.command.service.xml
   jbpm4/branches/tbaeyens/modules/distro/src/main/resources/config-tool/jbpm/wire.bindings/enterprise.exclude.xml
   jbpm4/branches/tbaeyens/modules/distro/src/main/resources/config-tool/jbpm/wire.bindings/enterprise.include.xml
   jbpm4/branches/tbaeyens/modules/enterprise/src/main/java/org/jbpm/enterprise/internal/ejb/EjbRemoteCommandService.java
   jbpm4/branches/tbaeyens/modules/enterprise/src/main/java/org/jbpm/enterprise/internal/wire/binding/EjbRemoteCommandServiceBinding.java
   jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/CommandServiceBinding.java
Removed:
   jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/AsyncCommandServiceBinding.java
   jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/StandardCommandServiceBinding.java
Modified:
   jbpm4/branches/tbaeyens/modules/devguide/
   jbpm4/branches/tbaeyens/modules/distro/.settings/attachedFile.properties
   jbpm4/branches/tbaeyens/modules/distro/pom.xml
   jbpm4/branches/tbaeyens/modules/distro/src/main/resources/config-tool/build.xml
   jbpm4/branches/tbaeyens/modules/distro/src/main/resources/config-tool/jbpm/wire.bindings/part1.jbpm.wire.bindings.xml
   jbpm4/branches/tbaeyens/modules/examples/pom.xml
   jbpm4/branches/tbaeyens/modules/integration/jboss5/
   jbpm4/branches/tbaeyens/modules/integration/spi/
Log:
work


Property changes on: jbpm4/branches/tbaeyens/modules/devguide
___________________________________________________________________
Name: svn:ignore
   + target


Modified: jbpm4/branches/tbaeyens/modules/distro/.settings/attachedFile.properties
===================================================================
--- jbpm4/branches/tbaeyens/modules/distro/.settings/attachedFile.properties	2009-03-07 08:27:26 UTC (rev 4186)
+++ jbpm4/branches/tbaeyens/modules/distro/.settings/attachedFile.properties	2009-03-07 11:05:44 UTC (rev 4187)
@@ -1,2 +1,2 @@
 ## index of importer -> set(imports)
-#Fri Mar 06 15:12:54 CET 2009
+#Sat Mar 07 09:22:34 CET 2009

Modified: jbpm4/branches/tbaeyens/modules/distro/pom.xml
===================================================================
--- jbpm4/branches/tbaeyens/modules/distro/pom.xml	2009-03-07 08:27:26 UTC (rev 4186)
+++ jbpm4/branches/tbaeyens/modules/distro/pom.xml	2009-03-07 11:05:44 UTC (rev 4187)
@@ -35,72 +35,59 @@
     <dependency>
       <groupId>org.jbpm.jbpm4</groupId>
       <artifactId>jbpm-api</artifactId>
-      <version>${version}</version>
     </dependency>
     <dependency>
       <groupId>org.jbpm.jbpm4</groupId>
       <artifactId>jbpm-log</artifactId>
-      <version>${version}</version>
     </dependency>
     <dependency>
       <groupId>org.jbpm.jbpm4</groupId>
       <artifactId>jbpm-pvm</artifactId>
-      <version>${version}</version>
     </dependency>
     <dependency>
       <groupId>org.jbpm.jbpm4</groupId>
       <artifactId>jbpm-jpdl</artifactId>
-      <version>${version}</version>
     </dependency>
     <dependency>
       <groupId>org.jbpm.jbpm4</groupId>
       <artifactId>jbpm-jpdl</artifactId>
       <classifier>config</classifier>
-      <version>${version}</version>
     </dependency>
     <dependency>
       <groupId>org.jbpm.jbpm4</groupId>
       <artifactId>jbpm-db</artifactId>
-      <version>${version}</version>
     </dependency>
     <dependency>
       <groupId>org.jbpm.jbpm4</groupId>
       <artifactId>jbpm-enterprise</artifactId>      
-      <version>${version}</version>
     </dependency>
     <dependency>
       <groupId>org.jbpm.jbpm4</groupId>
       <artifactId>jbpm-enterprise</artifactId>
       <classifier>config</classifier>
-      <version>${version}</version>
     </dependency>
 
     <dependency>
       <groupId>org.jbpm.jbpm4</groupId>
       <artifactId>jbpm-examples</artifactId>
-      <version>${version}</version>
     </dependency>
        
     <dependency>
       <groupId>org.jbpm.jbpm4</groupId>
       <artifactId>jbpm-test-db</artifactId>
-      <version>${version}</version>
     </dependency>
     <dependency>
       <groupId>org.jbpm.jbpm4</groupId>
       <artifactId>jbpm-spi</artifactId>
-      <version>${version}</version>
     </dependency>
     <dependency>
       <groupId>org.jbpm.jbpm4</groupId>
       <artifactId>jbpm-jboss5</artifactId>
-      <version>${version}</version>
     </dependency>
      <dependency>
       <groupId>org.jbpm.jbpm4</groupId>
       <artifactId>jbpm-jboss5</artifactId>
       <classifier>config</classifier>
-      <version>${version}</version>
     </dependency>
 
     <!-- GWT Console -->

Modified: jbpm4/branches/tbaeyens/modules/distro/src/main/resources/config-tool/build.xml
===================================================================
--- jbpm4/branches/tbaeyens/modules/distro/src/main/resources/config-tool/build.xml	2009-03-07 08:27:26 UTC (rev 4186)
+++ jbpm4/branches/tbaeyens/modules/distro/src/main/resources/config-tool/build.xml	2009-03-07 11:05:44 UTC (rev 4187)
@@ -45,13 +45,6 @@
       </fileset>
     </copy>
 
-    <concat destfile="${config.files.dir}/jbpm.wire.bindings.xml">
-      <filelist dir=".">
-        <file name="jbpm/wire.bindings/part1.jbpm.wire.bindings.xml" />
-        <file name="jbpm/wire.bindings/jpdl.${jpdl}.xml"/>
-        <file name="jbpm/wire.bindings/part2.jbpm.wire.bindings.xml" />
-      </filelist>
-    </concat>
     <concat destfile="${config.files.dir}/jbpm.cfg.xml">
       <filelist dir=".">
         <file name="jbpm/cfg/part1.jbpm.cfg.xml" />
@@ -70,6 +63,7 @@
   		</fileset>
     </copy>
 
+    <antcall target="internal.wire.bindings" />
     <antcall target="internal.jpdl.hibernate.mapping.files" />
     <antcall target="internal.identity.config.files" />
   	<antcall target="internal.jdk.logging" />
@@ -110,6 +104,24 @@
                   quiet="yes" />
   </target>
 
+  <target name="create.remote.configuration" 
+          depends="internal.prepare"
+          description="creates a jbpm.cfg.xml that connects to a remote jboss">
+    <delete>
+    	<fileset dir="${config.files.dir}">
+    		<include name="jbpm.*.xml" />
+      </fileset>
+    </delete>
+    <antcall target="internal.wire.bindings" />
+    <concat destfile="${config.files.dir}/jbpm.cfg.xml">
+      <filelist dir="${resolved.dir}">
+        <file name="jbpm/cfg/part1.jbpm.cfg.xml" />
+        <file name="jbpm/cfg/identity.service.${identity}.jbpm.cfg.xml" />
+        <file name="jbpm/cfg/remote.command.service.xml" />
+      </filelist>
+    </concat>
+ 	</target>
+
   <target name="db.create"
           depends="create.db.scripts, internal.load.hibernate.properties"
           description="creates the db tables in the database">
@@ -151,6 +163,15 @@
 
 
 	<!-- internal targets -->
+	<target name="internal.wire.bindings">
+    <concat destfile="${config.files.dir}/jbpm.wire.bindings.xml">
+      <filelist dir=".">
+        <file name="jbpm/wire.bindings/part1.jbpm.wire.bindings.xml" />
+        <file name="jbpm/wire.bindings/jpdl.${jpdl}.xml"/>
+        <file name="jbpm/wire.bindings/part2.jbpm.wire.bindings.xml" />
+      </filelist>
+    </concat>
+	</target>
 	
 	<target name="internal.load.hibernate.properties">
     <copy file="${resolved.dir}/hibernate/jdbc/${database}.xml" 
@@ -210,9 +231,11 @@
     <delete dir="${tmp.dir}" />
     <mkdir dir="${config.files.dir}" />
     <mkdir dir="${resolved.dir}" />
-    <filter filtersfile="jdbc.properties" />
     <copy todir="${resolved.dir}" filtering="true">
       <fileset dir="." />
+    	<filterset filtersfile="jdbc.properties">
+    		<filter token="jboss.bind.address" value="${jboss.bind.address}"/>
+      </filterset>
     </copy>
   </target>
 

Added: jbpm4/branches/tbaeyens/modules/distro/src/main/resources/config-tool/jbpm/cfg/remote.command.service.xml
===================================================================
--- jbpm4/branches/tbaeyens/modules/distro/src/main/resources/config-tool/jbpm/cfg/remote.command.service.xml	                        (rev 0)
+++ jbpm4/branches/tbaeyens/modules/distro/src/main/resources/config-tool/jbpm/cfg/remote.command.service.xml	2009-03-07 11:05:44 UTC (rev 4187)
@@ -0,0 +1,9 @@
+
+    <command-service initial-context-factory="org.jboss.naming.NamingContextFactory"
+                     provider-url="jnp://@jboss.bind.address@"
+                     url-pkg-prefixes="org.jboss.naming rg.jnp.interfaces">
+      <retry-interceptor />
+    </command-service>
+
+  </process-engine-context>
+</jbpm-configuration>


Property changes on: jbpm4/branches/tbaeyens/modules/distro/src/main/resources/config-tool/jbpm/cfg/remote.command.service.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: jbpm4/branches/tbaeyens/modules/distro/src/main/resources/config-tool/jbpm/wire.bindings/enterprise.exclude.xml
===================================================================


Property changes on: jbpm4/branches/tbaeyens/modules/distro/src/main/resources/config-tool/jbpm/wire.bindings/enterprise.exclude.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: jbpm4/branches/tbaeyens/modules/distro/src/main/resources/config-tool/jbpm/wire.bindings/enterprise.include.xml
===================================================================
--- jbpm4/branches/tbaeyens/modules/distro/src/main/resources/config-tool/jbpm/wire.bindings/enterprise.include.xml	                        (rev 0)
+++ jbpm4/branches/tbaeyens/modules/distro/src/main/resources/config-tool/jbpm/wire.bindings/enterprise.include.xml	2009-03-07 11:05:44 UTC (rev 4187)
@@ -0,0 +1,3 @@
+  <binding class="org.jbpm.enterprise.internal.wire.binding.EjbTimerSessionBinding" />
+  <binding class="org.jbpm.enterprise.internal.wire.binding.EjbLocalCommandServiceBinding" />
+  <binding class="org.jbpm.enterprise.internal.wire.binding.EjbRemoteCommandServiceBinding" />


Property changes on: jbpm4/branches/tbaeyens/modules/distro/src/main/resources/config-tool/jbpm/wire.bindings/enterprise.include.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Modified: jbpm4/branches/tbaeyens/modules/distro/src/main/resources/config-tool/jbpm/wire.bindings/part1.jbpm.wire.bindings.xml
===================================================================
--- jbpm4/branches/tbaeyens/modules/distro/src/main/resources/config-tool/jbpm/wire.bindings/part1.jbpm.wire.bindings.xml	2009-03-07 08:27:26 UTC (rev 4186)
+++ jbpm4/branches/tbaeyens/modules/distro/src/main/resources/config-tool/jbpm/wire.bindings/part1.jbpm.wire.bindings.xml	2009-03-07 11:05:44 UTC (rev 4187)
@@ -57,8 +57,7 @@
   <!-- dynamic type mapping configuration  -->    
   <binding class="org.jbpm.pvm.internal.wire.binding.TypesBinding" />
   <!-- services  -->
-  <binding class="org.jbpm.pvm.internal.wire.binding.StandardCommandServiceBinding" />
-  <binding class="org.jbpm.pvm.internal.wire.binding.AsyncCommandServiceBinding" />
+  <binding class="org.jbpm.pvm.internal.wire.binding.CommandServiceBinding" />
   <binding class="org.jbpm.pvm.internal.wire.binding.ProcessServiceBinding" />
   <binding class="org.jbpm.pvm.internal.wire.binding.ExecutionServiceBinding" />
   <binding class="org.jbpm.pvm.internal.wire.binding.ManagementServiceBinding" />

Added: jbpm4/branches/tbaeyens/modules/enterprise/src/main/java/org/jbpm/enterprise/internal/ejb/EjbRemoteCommandService.java
===================================================================
--- jbpm4/branches/tbaeyens/modules/enterprise/src/main/java/org/jbpm/enterprise/internal/ejb/EjbRemoteCommandService.java	                        (rev 0)
+++ jbpm4/branches/tbaeyens/modules/enterprise/src/main/java/org/jbpm/enterprise/internal/ejb/EjbRemoteCommandService.java	2009-03-07 11:05:44 UTC (rev 4187)
@@ -0,0 +1,71 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.enterprise.internal.ejb;
+
+import java.util.Properties;
+
+import javax.naming.Context;
+import javax.naming.InitialContext;
+
+import org.jbpm.JbpmException;
+import org.jbpm.cmd.Command;
+import org.jbpm.cmd.CommandService;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class EjbRemoteCommandService implements CommandService {
+
+  protected String initialContextFactory; 
+  protected String providerUrl; 
+  protected String urlPkgPrefixes;
+  
+  protected String jndiName;
+  
+  public EjbRemoteCommandService(String initialContextFactory, String providerUrl, String urlPkgPrefixes, String jndiName) {
+    this.initialContextFactory = initialContextFactory;
+    this.providerUrl = providerUrl;
+    this.urlPkgPrefixes = urlPkgPrefixes;
+    this.jndiName = jndiName;
+  }
+
+  public <T> T execute(Command<T> command) {
+
+    Properties env = new Properties();
+    env.put(Context.INITIAL_CONTEXT_FACTORY, initialContextFactory);
+    env.put(Context.PROVIDER_URL, providerUrl);
+    env.put(Context.URL_PKG_PREFIXES, urlPkgPrefixes);
+    
+    try {
+      InitialContext initialContext = new InitialContext(env);
+      RemoteCommandExecutorHome remoteCommandExecutorHome = (RemoteCommandExecutorHome) initialContext.lookup(jndiName);
+      RemoteCommandExecutor remoteCommandExecutor = remoteCommandExecutorHome.create();
+      Object result = remoteCommandExecutor.execute(command);
+      remoteCommandExecutor.remove();
+      return (T) result;
+
+    } catch (Exception e) {
+      throw new JbpmException("couldn't execute remote command", e);
+    }
+  }
+}


Property changes on: jbpm4/branches/tbaeyens/modules/enterprise/src/main/java/org/jbpm/enterprise/internal/ejb/EjbRemoteCommandService.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: jbpm4/branches/tbaeyens/modules/enterprise/src/main/java/org/jbpm/enterprise/internal/wire/binding/EjbRemoteCommandServiceBinding.java
===================================================================
--- jbpm4/branches/tbaeyens/modules/enterprise/src/main/java/org/jbpm/enterprise/internal/wire/binding/EjbRemoteCommandServiceBinding.java	                        (rev 0)
+++ jbpm4/branches/tbaeyens/modules/enterprise/src/main/java/org/jbpm/enterprise/internal/wire/binding/EjbRemoteCommandServiceBinding.java	2009-03-07 11:05:44 UTC (rev 4187)
@@ -0,0 +1,56 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.enterprise.internal.wire.binding;
+
+import org.jbpm.enterprise.internal.ejb.EjbRemoteCommandService;
+import org.jbpm.pvm.internal.util.XmlUtil;
+import org.jbpm.pvm.internal.wire.Descriptor;
+import org.jbpm.pvm.internal.wire.binding.WireDescriptorBinding;
+import org.jbpm.pvm.internal.wire.descriptor.ProvidedObjectDescriptor;
+import org.jbpm.pvm.internal.xml.Parse;
+import org.jbpm.pvm.internal.xml.Parser;
+import org.w3c.dom.Element;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class EjbRemoteCommandServiceBinding extends WireDescriptorBinding {
+
+  public EjbRemoteCommandServiceBinding() {
+    super("ejb-remote-command-service");
+  }
+
+  public Object parse(Element element, Parse parse, Parser parser) {
+    String initialContextFactory = XmlUtil.attribute(element, "initial-context-factory", true, parse); 
+    String providerUrl = XmlUtil.attribute(element, "provider-url", true, parse); 
+    String urlPkgPrefixes = XmlUtil.attribute(element, "url-pkg-prefixes", true, parse);
+    String jndiName = XmlUtil.attribute(element, "jndi-name", false, parse, "jbpm/CommandExecutor");
+    
+    EjbRemoteCommandService ejbRemoteCommandService = new EjbRemoteCommandService(initialContextFactory, providerUrl, urlPkgPrefixes, jndiName);
+    Descriptor descriptor = new ProvidedObjectDescriptor(ejbRemoteCommandService);
+
+    return descriptor;
+  }
+
+
+}


Property changes on: jbpm4/branches/tbaeyens/modules/enterprise/src/main/java/org/jbpm/enterprise/internal/wire/binding/EjbRemoteCommandServiceBinding.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Modified: jbpm4/branches/tbaeyens/modules/examples/pom.xml
===================================================================
--- jbpm4/branches/tbaeyens/modules/examples/pom.xml	2009-03-07 08:27:26 UTC (rev 4186)
+++ jbpm4/branches/tbaeyens/modules/examples/pom.xml	2009-03-07 11:05:44 UTC (rev 4187)
@@ -97,6 +97,43 @@
         </plugins>
       </build>
     </profile>
+
+    <!-- -Djboss.bind.address= --> 
+    <profile>
+      <id>jboss.config.overwrite</id>
+      <activation>
+        <property>
+          <name>jboss.bind.address</name>
+        </property>
+      </activation>
+      <build>
+        <plugins>
+          <plugin>
+            <artifactId>maven-antrun-plugin</artifactId>
+            <executions>
+              <execution>
+                <phase>test-compile</phase>
+                <goals>
+                  <goal>run</goal>
+                </goals>
+                <configuration>
+                  <tasks>
+                    <echo>Overwriting db configuration for ${database}</echo>
+                    <ant antfile="../distro/src/main/resources/config-tool/build.xml" 
+                         target="create.remote.configuration" 
+                         inheritall="false">
+                      <property name="jboss.bind.address" value="${jboss.bind.address}" />
+                      <property name="config.files.dir" value="${basedir}/target/test-classes" />
+                      <property name="tmp.dir" value="${basedir}/target/config-tmp" />
+                    </ant>
+                  </tasks>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
   </profiles>
 
 </project>
\ No newline at end of file


Property changes on: jbpm4/branches/tbaeyens/modules/integration/jboss5
___________________________________________________________________
Name: svn:ignore
   + target



Property changes on: jbpm4/branches/tbaeyens/modules/integration/spi
___________________________________________________________________
Name: svn:ignore
   + target


Deleted: jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/AsyncCommandServiceBinding.java
===================================================================
--- jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/AsyncCommandServiceBinding.java	2009-03-07 08:27:26 UTC (rev 4186)
+++ jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/AsyncCommandServiceBinding.java	2009-03-07 11:05:44 UTC (rev 4187)
@@ -1,49 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.pvm.internal.wire.binding;
-
-import org.jbpm.cmd.CommandService;
-import org.jbpm.pvm.internal.svc.AsyncCommandService;
-import org.jbpm.pvm.internal.util.XmlUtil;
-import org.jbpm.pvm.internal.xml.Parse;
-import org.jbpm.pvm.internal.xml.Parser;
-import org.w3c.dom.Element;
-
-/**
- * @author Tom Baeyens
- */
-public class AsyncCommandServiceBinding extends StandardCommandServiceBinding {
-  
-  public AsyncCommandServiceBinding() {
-    super("async-command-service");
-  }
-
-  protected CommandService getCommandService(Element element, Parse parse, Parser parser) {
-    AsyncCommandService asyncCommandService = new AsyncCommandService();
-    
-    if (XmlUtil.attributeBoolean(element, "propagate-auth", false, parse)) {
-      asyncCommandService.setPropagateUserId(true);
-    }
-    
-    return asyncCommandService;
-  }
-}

Copied: jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/CommandServiceBinding.java (from rev 4185, jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/StandardCommandServiceBinding.java)
===================================================================
--- jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/CommandServiceBinding.java	                        (rev 0)
+++ jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/CommandServiceBinding.java	2009-03-07 11:05:44 UTC (rev 4187)
@@ -0,0 +1,82 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.pvm.internal.wire.binding;
+
+import java.util.List;
+
+import org.jbpm.cmd.CommandService;
+import org.jbpm.enterprise.internal.ejb.EjbRemoteCommandService;
+import org.jbpm.pvm.internal.svc.AsyncCommandService;
+import org.jbpm.pvm.internal.svc.DefaultCommandService;
+import org.jbpm.pvm.internal.util.XmlUtil;
+import org.jbpm.pvm.internal.wire.Descriptor;
+import org.jbpm.pvm.internal.wire.descriptor.CommandServiceDescriptor;
+import org.jbpm.pvm.internal.wire.xml.WireParser;
+import org.jbpm.pvm.internal.xml.Parse;
+import org.jbpm.pvm.internal.xml.Parser;
+import org.w3c.dom.Element;
+
+/** parses a descriptor for a creating {@link DefaultCommandService}.
+ * 
+ * See schema docs for more details.
+ *
+ * @author Tom Baeyens
+ */
+public class CommandServiceBinding extends WireDescriptorBinding {
+
+  public CommandServiceBinding() {
+    super("command-service");
+  }
+  
+  protected CommandServiceBinding(String tagName) {
+    super(tagName);
+  }
+
+  public Object parse(Element element, Parse parse, Parser parser) {
+    CommandServiceDescriptor commandServiceDescriptor = new CommandServiceDescriptor();
+
+    CommandService commandService = getCommandService(element, parse, parser);
+    commandServiceDescriptor.setCommandService(commandService);
+    
+    List<Element> interceptorElements = XmlUtil.elements(element);
+    for (Element interceptorElement : interceptorElements) {
+      Descriptor interceptorDescriptor = (Descriptor) parser.parseElement(interceptorElement, parse, WireParser.CATEGORY_INTERCEPTOR);
+      commandServiceDescriptor.addInterceptorDescriptor(interceptorDescriptor);
+    }
+
+    return commandServiceDescriptor;
+  }
+
+  protected CommandService getCommandService(Element element, Parse parse, Parser parser) {
+    if ( XmlUtil.attributeBoolean(element, "async", false, parse, Boolean.FALSE)) {
+
+      AsyncCommandService asyncCommandService = new AsyncCommandService();
+      if (XmlUtil.attributeBoolean(element, "propagate-auth", false, parse)) {
+        asyncCommandService.setPropagateUserId(true);
+      }
+      return asyncCommandService;
+    }
+    
+    return new DefaultCommandService();
+  }
+
+}


Property changes on: jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/CommandServiceBinding.java
___________________________________________________________________
Name: svn:mergeinfo
   + 

Deleted: jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/StandardCommandServiceBinding.java
===================================================================
--- jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/StandardCommandServiceBinding.java	2009-03-07 08:27:26 UTC (rev 4186)
+++ jbpm4/branches/tbaeyens/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/StandardCommandServiceBinding.java	2009-03-07 11:05:44 UTC (rev 4187)
@@ -1,71 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.pvm.internal.wire.binding;
-
-import java.util.List;
-
-import org.jbpm.cmd.CommandService;
-import org.jbpm.pvm.internal.svc.DefaultCommandService;
-import org.jbpm.pvm.internal.util.XmlUtil;
-import org.jbpm.pvm.internal.wire.Descriptor;
-import org.jbpm.pvm.internal.wire.descriptor.CommandServiceDescriptor;
-import org.jbpm.pvm.internal.wire.xml.WireParser;
-import org.jbpm.pvm.internal.xml.Parse;
-import org.jbpm.pvm.internal.xml.Parser;
-import org.w3c.dom.Element;
-
-/** parses a descriptor for a creating {@link DefaultCommandService}.
- * 
- * See schema docs for more details.
- *
- * @author Tom Baeyens
- */
-public class StandardCommandServiceBinding extends WireDescriptorBinding {
-
-  public StandardCommandServiceBinding() {
-    super("command-service");
-  }
-  
-  protected StandardCommandServiceBinding(String tagName) {
-    super(tagName);
-  }
-
-  public Object parse(Element element, Parse parse, Parser parser) {
-    CommandServiceDescriptor commandServiceDescriptor = new CommandServiceDescriptor();
-
-    CommandService commandService = getCommandService(element, parse, parser);
-    commandServiceDescriptor.setCommandService(commandService);
-    
-    List<Element> interceptorElements = XmlUtil.elements(element);
-    for (Element interceptorElement : interceptorElements) {
-      Descriptor interceptorDescriptor = (Descriptor) parser.parseElement(interceptorElement, parse, WireParser.CATEGORY_INTERCEPTOR);
-      commandServiceDescriptor.addInterceptorDescriptor(interceptorDescriptor);
-    }
-
-    return commandServiceDescriptor;
-  }
-
-  protected CommandService getCommandService(Element element, Parse parse, Parser parser) {
-    return new DefaultCommandService();
-  }
-
-}




More information about the jbpm-commits mailing list