camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hekon...@apache.org
Subject git commit: [CAMEL-7126] Cleaning code from JpaTemplate references.
Date Thu, 23 Jan 2014 21:00:09 GMT
Updated Branches:
  refs/heads/master 72e8240e2 -> bc983bdd4


[CAMEL-7126] Cleaning code from JpaTemplate references.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/bc983bdd
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/bc983bdd
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/bc983bdd

Branch: refs/heads/master
Commit: bc983bdd47ded164954c67321940157f4733a509
Parents: 72e8240
Author: Henryk Konsek <hekonsek@gmail.com>
Authored: Thu Jan 23 21:59:50 2014 +0100
Committer: Henryk Konsek <hekonsek@gmail.com>
Committed: Thu Jan 23 21:59:50 2014 +0100

----------------------------------------------------------------------
 .../apache/camel/bam/EntityManagerTemplate.java | 27 +++++++++++++
 .../org/apache/camel/bam/ProcessBuilder.java    | 42 ++++++++++----------
 .../bam/processor/ActivityMonitorEngine.java    | 24 ++++++-----
 .../camel/bam/processor/JpaBamProcessor.java    | 11 ++---
 .../bam/processor/JpaBamProcessorSupport.java   | 41 ++++++-------------
 .../java/org/apache/camel/bam/BamRouteTest.java |  7 ++--
 6 files changed, 84 insertions(+), 68 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/bc983bdd/components/camel-bam/src/main/java/org/apache/camel/bam/EntityManagerTemplate.java
----------------------------------------------------------------------
diff --git a/components/camel-bam/src/main/java/org/apache/camel/bam/EntityManagerTemplate.java
b/components/camel-bam/src/main/java/org/apache/camel/bam/EntityManagerTemplate.java
index fe2fddd..357a56b 100644
--- a/components/camel-bam/src/main/java/org/apache/camel/bam/EntityManagerTemplate.java
+++ b/components/camel-bam/src/main/java/org/apache/camel/bam/EntityManagerTemplate.java
@@ -16,8 +16,12 @@
  */
 package org.apache.camel.bam;
 
+import java.util.List;
+import java.util.Map;
+
 import javax.persistence.EntityManager;
 import javax.persistence.EntityManagerFactory;
+import javax.persistence.TypedQuery;
 
 import static org.apache.camel.bam.EntityManagers.closeNonTransactionalEntityManager;
 import static org.apache.camel.bam.EntityManagers.resolveEntityManager;
@@ -50,4 +54,27 @@ public class EntityManagerTemplate {
         });
     }
 
+    public void flush() {
+        execute(new EntityManagerCallback<Object>() {
+            @Override
+            public Object execute(EntityManager entityManager) {
+                entityManager.flush();
+                return null;
+            }
+        });
+    }
+
+    public <T> List<T> find(final Class<T> entity, final String query,
final Map<String, Object> parameters) {
+        return execute(new EntityManagerCallback<List<T>>() {
+            @Override
+            public List<T> execute(EntityManager entityManager) {
+                TypedQuery<T> typedQuery = entityManager.createQuery(query, entity);
+                for (Map.Entry<String, Object> parameter : parameters.entrySet()) {
+                    typedQuery.setParameter(parameter.getKey(), parameter.getValue());
+                }
+                return typedQuery.getResultList();
+            }
+        });
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/bc983bdd/components/camel-bam/src/main/java/org/apache/camel/bam/ProcessBuilder.java
----------------------------------------------------------------------
diff --git a/components/camel-bam/src/main/java/org/apache/camel/bam/ProcessBuilder.java b/components/camel-bam/src/main/java/org/apache/camel/bam/ProcessBuilder.java
index ff34ee2..49f459b 100644
--- a/components/camel-bam/src/main/java/org/apache/camel/bam/ProcessBuilder.java
+++ b/components/camel-bam/src/main/java/org/apache/camel/bam/ProcessBuilder.java
@@ -21,6 +21,8 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
+import javax.persistence.EntityManagerFactory;
+
 import org.apache.camel.CamelContext;
 import org.apache.camel.Endpoint;
 import org.apache.camel.Processor;
@@ -32,12 +34,11 @@ import org.apache.camel.bam.processor.JpaBamProcessor;
 import org.apache.camel.bam.rules.ProcessRules;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.impl.DefaultCamelContext;
-import org.apache.camel.util.CastUtils;
 import org.apache.camel.util.ObjectHelper;
-import org.springframework.orm.jpa.JpaTemplate;
 import org.springframework.transaction.TransactionStatus;
 import org.springframework.transaction.support.TransactionCallbackWithoutResult;
 import org.springframework.transaction.support.TransactionTemplate;
+
 import static org.apache.camel.util.ObjectHelper.notNull;
 
 /**
@@ -47,7 +48,7 @@ import static org.apache.camel.util.ObjectHelper.notNull;
  */
 public abstract class ProcessBuilder extends RouteBuilder {
     private static int processCounter;
-    private JpaTemplate jpaTemplate;
+    private EntityManagerFactory entityManagerFactory;
     private EntityManagerTemplate entityManagerTemplate;
     private TransactionTemplate transactionTemplate;
     private String processName;
@@ -60,15 +61,14 @@ public abstract class ProcessBuilder extends RouteBuilder {
     protected ProcessBuilder() {
     }
 
-    protected ProcessBuilder(JpaTemplate jpaTemplate, TransactionTemplate transactionTemplate)
{
-        this(jpaTemplate, transactionTemplate, createProcessName());
+    protected ProcessBuilder(EntityManagerFactory entityManagerFactory, TransactionTemplate
transactionTemplate) {
+        this(entityManagerFactory, transactionTemplate, createProcessName());
     }
 
-    protected ProcessBuilder(JpaTemplate jpaTemplate, TransactionTemplate transactionTemplate,
String processName) {
-        this.jpaTemplate = jpaTemplate;
+    protected ProcessBuilder(EntityManagerFactory entityManagerFactory, TransactionTemplate
transactionTemplate, String processName) {
+        setEntityManagerFactory(entityManagerFactory);
         this.transactionTemplate = transactionTemplate;
         this.processName = processName;
-        this.entityManagerTemplate = new EntityManagerTemplate(jpaTemplate.getEntityManagerFactory());
     }
 
     protected static synchronized String createProcessName() {
@@ -94,13 +94,13 @@ public abstract class ProcessBuilder extends RouteBuilder {
     }
 
     public Processor createActivityProcessor(ActivityBuilder activityBuilder) {
-        notNull(jpaTemplate, "jpaTemplate");
+        notNull(entityManagerFactory, "entityManagerFactory");
         transactionTemplate.execute(new TransactionCallbackWithoutResult() {
             protected void doInTransactionWithoutResult(TransactionStatus status) {
                 processRules.setProcessDefinition(getProcessDefinition());
             }
         });
-        return new JpaBamProcessor(getTransactionTemplate(), getJpaTemplate(), activityBuilder.getCorrelationExpression(),
activityBuilder.getActivityRules(), getEntityType());
+        return new JpaBamProcessor(transactionTemplate, entityManagerFactory, activityBuilder.getCorrelationExpression(),
activityBuilder.getActivityRules(), getEntityType());
     }
 
     // Properties
@@ -113,13 +113,13 @@ public abstract class ProcessBuilder extends RouteBuilder {
         return entityType;
     }
 
-    public JpaTemplate getJpaTemplate() {
-        return jpaTemplate;
+    public EntityManagerFactory getEntityManagerFactory() {
+        return entityManagerFactory;
     }
 
-    public void setJpaTemplate(JpaTemplate jpaTemplate) {
-        this.jpaTemplate = jpaTemplate;
-        this.entityManagerTemplate = new EntityManagerTemplate(jpaTemplate.getEntityManagerFactory());
+    public void setEntityManagerFactory(EntityManagerFactory entityManagerFactory) {
+        this.entityManagerFactory = entityManagerFactory;
+        this.entityManagerTemplate = new EntityManagerTemplate(entityManagerFactory);
     }
 
     public TransactionTemplate getTransactionTemplate() {
@@ -155,12 +155,12 @@ public abstract class ProcessBuilder extends RouteBuilder {
     // Implementation methods
     // -------------------------------------------------------------------------
     protected void populateRoutes() throws Exception {
-        ObjectHelper.notNull(getJpaTemplate(), "jpaTemplate", this);
+        ObjectHelper.notNull(entityManagerFactory, "entityManagerFactory", this);
         ObjectHelper.notNull(getTransactionTemplate(), "transactionTemplate", this);
 
         // add the monitoring service - should there be an easier way??
         if (engine == null) {
-            engine = new ActivityMonitorEngine(getJpaTemplate(), getTransactionTemplate(),
getProcessRules());
+            engine = new ActivityMonitorEngine(entityManagerFactory, getTransactionTemplate(),
getProcessRules());
         }
         CamelContext camelContext = getContext();
         if (camelContext instanceof DefaultCamelContext) {
@@ -185,8 +185,8 @@ public abstract class ProcessBuilder extends RouteBuilder {
         params.put("definition", definition);
         params.put("name", activityName);
 
-        List<ActivityDefinition> list = CastUtils.cast(jpaTemplate.findByNamedParams("select
x from "
-            + QueryUtils.getTypeName(ActivityDefinition.class) + " x where x.processDefinition
= :definition and x.name = :name", params));
+        List<ActivityDefinition> list = entityManagerTemplate.find(ActivityDefinition.class,
"select x from "
+            + QueryUtils.getTypeName(ActivityDefinition.class) + " x where x.processDefinition
= :definition and x.name = :name", params);
         if (!list.isEmpty()) {
             return list.get(0);
         } else {
@@ -202,8 +202,8 @@ public abstract class ProcessBuilder extends RouteBuilder {
         Map<String, Object> params = new HashMap<String, Object>(1);
         params.put("name", processName);
 
-        List<ProcessDefinition> list = CastUtils.cast(jpaTemplate.findByNamedParams("select
x from "
-            + QueryUtils.getTypeName(ProcessDefinition.class) + " x where x.name = :name",
params));
+        List<ProcessDefinition> list = entityManagerTemplate.find(ProcessDefinition.class,
"select x from "
+            + QueryUtils.getTypeName(ProcessDefinition.class) + " x where x.name = :name",
params);
         if (!list.isEmpty()) {
             return list.get(0);
         } else {

http://git-wip-us.apache.org/repos/asf/camel/blob/bc983bdd/components/camel-bam/src/main/java/org/apache/camel/bam/processor/ActivityMonitorEngine.java
----------------------------------------------------------------------
diff --git a/components/camel-bam/src/main/java/org/apache/camel/bam/processor/ActivityMonitorEngine.java
b/components/camel-bam/src/main/java/org/apache/camel/bam/processor/ActivityMonitorEngine.java
index df8fdb7..4ad2ebb 100644
--- a/components/camel-bam/src/main/java/org/apache/camel/bam/processor/ActivityMonitorEngine.java
+++ b/components/camel-bam/src/main/java/org/apache/camel/bam/processor/ActivityMonitorEngine.java
@@ -21,18 +21,18 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import javax.persistence.EntityManager;
+import javax.persistence.EntityManagerFactory;
 import javax.persistence.LockModeType;
 import javax.persistence.PersistenceException;
 
+import org.apache.camel.bam.EntityManagerCallback;
+import org.apache.camel.bam.EntityManagerTemplate;
 import org.apache.camel.bam.QueryUtils;
 import org.apache.camel.bam.model.ActivityState;
 import org.apache.camel.bam.rules.ProcessRules;
 import org.apache.camel.support.ServiceSupport;
-import org.apache.camel.util.CastUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.springframework.orm.jpa.JpaCallback;
-import org.springframework.orm.jpa.JpaTemplate;
 import org.springframework.transaction.TransactionStatus;
 import org.springframework.transaction.support.TransactionCallbackWithoutResult;
 import org.springframework.transaction.support.TransactionTemplate;
@@ -45,15 +45,17 @@ import org.springframework.transaction.support.TransactionTemplate;
  */
 public class ActivityMonitorEngine extends ServiceSupport implements Runnable {
     private static final Logger LOG = LoggerFactory.getLogger(ActivityMonitorEngine.class);
-    private JpaTemplate template;
+    private EntityManagerFactory entityManagerFactory;
+    private EntityManagerTemplate entityManagerTemplate;
     private TransactionTemplate transactionTemplate;
     private ProcessRules rules;
     private long windowMillis = 1000L;
     private Thread thread;
     private boolean useLocking;
 
-    public ActivityMonitorEngine(JpaTemplate template, TransactionTemplate transactionTemplate,
ProcessRules rules) {
-        this.template = template;
+    public ActivityMonitorEngine(EntityManagerFactory entityManagerFactory, TransactionTemplate
transactionTemplate, ProcessRules rules) {
+        this.entityManagerFactory = entityManagerFactory;
+        this.entityManagerTemplate = new EntityManagerTemplate(entityManagerFactory);
         this.transactionTemplate = transactionTemplate;
         this.rules = rules;
     }
@@ -80,8 +82,10 @@ public class ActivityMonitorEngine extends ServiceSupport implements Runnable
{
                         Map<String, Object> params = new HashMap<String, Object>(1);
                         params.put("timeNow", timeNow);
 
-                        List<ActivityState> list = CastUtils.cast(template.findByNamedParams("select
x from "
-                                + QueryUtils.getTypeName(ActivityState.class) + " x where
x.timeOverdue < :timeNow", params));
+                        String activityStateQuery = "select x from "
+                                + QueryUtils.getTypeName(ActivityState.class) + " x where
x.timeOverdue < :timeNow";
+                        List<ActivityState> list = entityManagerTemplate.find(ActivityState.class,
+                                activityStateQuery, params);
                         for (ActivityState activityState : list) {
                             fireExpiredEvent(activityState);
                         }
@@ -106,8 +110,8 @@ public class ActivityMonitorEngine extends ServiceSupport implements Runnable
{
     protected void fireExpiredEvent(final ActivityState activityState) {
         LOG.debug("Trying to fire expiration of: {}", activityState);
 
-        template.execute(new JpaCallback<Object>() {
-            public Object doInJpa(EntityManager entityManager) throws PersistenceException
{
+        entityManagerTemplate.execute(new EntityManagerCallback<Object>() {
+            public Object execute(EntityManager entityManager) throws PersistenceException
{
                 // let's try locking the object first
                 if (isUseLocking()) {
                     LOG.debug("Attempting to lock: {}", activityState);

http://git-wip-us.apache.org/repos/asf/camel/blob/bc983bdd/components/camel-bam/src/main/java/org/apache/camel/bam/processor/JpaBamProcessor.java
----------------------------------------------------------------------
diff --git a/components/camel-bam/src/main/java/org/apache/camel/bam/processor/JpaBamProcessor.java
b/components/camel-bam/src/main/java/org/apache/camel/bam/processor/JpaBamProcessor.java
index 0be2fcc..1d23dcf 100644
--- a/components/camel-bam/src/main/java/org/apache/camel/bam/processor/JpaBamProcessor.java
+++ b/components/camel-bam/src/main/java/org/apache/camel/bam/processor/JpaBamProcessor.java
@@ -16,6 +16,8 @@
  */
 package org.apache.camel.bam.processor;
 
+import javax.persistence.EntityManagerFactory;
+
 import org.apache.camel.Exchange;
 import org.apache.camel.Expression;
 import org.apache.camel.bam.model.ActivityState;
@@ -23,7 +25,6 @@ import org.apache.camel.bam.model.ProcessInstance;
 import org.apache.camel.bam.rules.ActivityRules;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.springframework.orm.jpa.JpaTemplate;
 import org.springframework.transaction.support.TransactionTemplate;
 
 /**
@@ -37,13 +38,13 @@ import org.springframework.transaction.support.TransactionTemplate;
 public class JpaBamProcessor extends JpaBamProcessorSupport<ProcessInstance> {
     private static final Logger LOG = LoggerFactory.getLogger(JpaBamProcessor.class);
 
-    public JpaBamProcessor(TransactionTemplate transactionTemplate, JpaTemplate template,
Expression correlationKeyExpression, ActivityRules activityRules) {
-        super(transactionTemplate, template, correlationKeyExpression, activityRules);
+    public JpaBamProcessor(TransactionTemplate transactionTemplate, EntityManagerFactory
entityManagerFactory, Expression correlationKeyExpression, ActivityRules activityRules) {
+        super(transactionTemplate, entityManagerFactory, correlationKeyExpression, activityRules);
     }
 
-    public JpaBamProcessor(TransactionTemplate transactionTemplate, JpaTemplate template,
Expression correlationKeyExpression, 
+    public JpaBamProcessor(TransactionTemplate transactionTemplate, EntityManagerFactory
entityManagerFactory, Expression correlationKeyExpression,
                            ActivityRules activityRules, Class<ProcessInstance> entitytype)
{
-        super(transactionTemplate, template, correlationKeyExpression, activityRules, entitytype);
+        super(transactionTemplate, entityManagerFactory, correlationKeyExpression, activityRules,
entitytype);
     }
 
     protected void processEntity(Exchange exchange, ProcessInstance process) throws Exception
{

http://git-wip-us.apache.org/repos/asf/camel/blob/bc983bdd/components/camel-bam/src/main/java/org/apache/camel/bam/processor/JpaBamProcessorSupport.java
----------------------------------------------------------------------
diff --git a/components/camel-bam/src/main/java/org/apache/camel/bam/processor/JpaBamProcessorSupport.java
b/components/camel-bam/src/main/java/org/apache/camel/bam/processor/JpaBamProcessorSupport.java
index 816d626..82ba7f8 100644
--- a/components/camel-bam/src/main/java/org/apache/camel/bam/processor/JpaBamProcessorSupport.java
+++ b/components/camel-bam/src/main/java/org/apache/camel/bam/processor/JpaBamProcessorSupport.java
@@ -22,6 +22,7 @@ import java.util.concurrent.locks.Lock;
 import java.util.concurrent.locks.ReentrantLock;
 
 import javax.persistence.EntityManager;
+import javax.persistence.EntityManagerFactory;
 
 import org.apache.camel.Exchange;
 import org.apache.camel.Expression;
@@ -34,7 +35,6 @@ import org.apache.camel.bam.rules.ActivityRules;
 import org.apache.camel.util.IntrospectionSupport;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.springframework.orm.jpa.JpaTemplate;
 import org.springframework.transaction.support.TransactionTemplate;
 
 /**
@@ -50,26 +50,24 @@ public class JpaBamProcessorSupport<T> extends BamProcessorSupport<T>
{
     private static final Lock LOCK = new ReentrantLock(); // lock used for concurrency issues
 
     private ActivityRules activityRules;
-    private JpaTemplate template;
+    private EntityManagerFactory entityManagerFactory;
     private EntityManagerTemplate entityManagerTemplate;
     private String findByKeyQuery;
     private String keyPropertyName = "correlationKey";
     private boolean correlationKeyIsPrimary = true;
 
-    public JpaBamProcessorSupport(TransactionTemplate transactionTemplate, JpaTemplate template,
+    public JpaBamProcessorSupport(TransactionTemplate transactionTemplate, EntityManagerFactory
entityManagerFactory,
             Expression correlationKeyExpression, ActivityRules activityRules, Class<T>
entitytype) {
         super(transactionTemplate, correlationKeyExpression, entitytype);
         this.activityRules = activityRules;
-        this.template = template;
-        this.entityManagerTemplate = new EntityManagerTemplate(template.getEntityManagerFactory());
+        setEntityManagerFactory(entityManagerFactory);
     }
 
-    public JpaBamProcessorSupport(TransactionTemplate transactionTemplate, JpaTemplate template,
+    public JpaBamProcessorSupport(TransactionTemplate transactionTemplate, EntityManagerFactory
entityManagerFactory,
             Expression correlationKeyExpression, ActivityRules activityRules) {
         super(transactionTemplate, correlationKeyExpression);
         this.activityRules = activityRules;
-        this.template = template;
-        this.entityManagerTemplate = new EntityManagerTemplate(template.getEntityManagerFactory());
+        setEntityManagerFactory(entityManagerFactory);
     }
 
     public String getFindByKeyQuery() {
@@ -99,13 +97,13 @@ public class JpaBamProcessorSupport<T> extends BamProcessorSupport<T>
{
         this.keyPropertyName = keyPropertyName;
     }
 
-    public JpaTemplate getTemplate() {
-        return template;
+    public EntityManagerFactory getEntityManagerFactory() {
+        return entityManagerFactory;
     }
 
-    public void setTemplate(JpaTemplate template) {
-        this.template = template;
-        this.entityManagerTemplate = new EntityManagerTemplate(template.getEntityManagerFactory());
+    public void setEntityManagerFactory(EntityManagerFactory entityManagerFactory) {
+        this.entityManagerFactory = entityManagerFactory;
+        this.entityManagerTemplate = new EntityManagerTemplate(entityManagerFactory);
     }
 
     public boolean isCorrelationKeyIsPrimary() {
@@ -129,25 +127,12 @@ public class JpaBamProcessorSupport<T> extends BamProcessorSupport<T>
{
                 ProcessDefinition definition = ProcessDefinition.getRefreshedProcessDefinition(entityManagerTemplate,
                         getActivityRules().getProcessRules().getProcessDefinition());
                 setProcessDefinitionProperty(entity, definition);
-                final T finalEntity = entity;
-                entityManagerTemplate.execute(new EntityManagerCallback<Object>() {
-                    @Override
-                    public Object execute(EntityManager entityManager) {
-                        entityManager.persist(finalEntity);
-                        return null;
-                    }
-                });
+                entityManagerTemplate.persist(entity);
 
                 // Now we must flush to avoid concurrent updates clashing trying to
                 // insert the same row
                 LOG.debug("About to flush on entity: {} with key: {}", entity, key);
-                entityManagerTemplate.execute(new EntityManagerCallback<Object>() {
-                    @Override
-                    public Object execute(EntityManager entityManager) {
-                        entityManager.flush();
-                        return null;
-                    }
-                });
+                entityManagerTemplate.flush();
             }
             return entity;
         } finally {

http://git-wip-us.apache.org/repos/asf/camel/blob/bc983bdd/components/camel-bam/src/test/java/org/apache/camel/bam/BamRouteTest.java
----------------------------------------------------------------------
diff --git a/components/camel-bam/src/test/java/org/apache/camel/bam/BamRouteTest.java b/components/camel-bam/src/test/java/org/apache/camel/bam/BamRouteTest.java
index 68119d8..f7d1b63 100644
--- a/components/camel-bam/src/test/java/org/apache/camel/bam/BamRouteTest.java
+++ b/components/camel-bam/src/test/java/org/apache/camel/bam/BamRouteTest.java
@@ -16,6 +16,7 @@
  */
 package org.apache.camel.bam;
 
+import javax.persistence.EntityManagerFactory;
 
 import org.apache.camel.bam.model.ActivityState;
 import org.apache.camel.builder.RouteBuilder;
@@ -24,9 +25,7 @@ import org.apache.camel.test.spring.CamelSpringTestSupport;
 import org.junit.Before;
 import org.junit.Test;
 
-
 import org.springframework.context.support.ClassPathXmlApplicationContext;
-import org.springframework.orm.jpa.JpaTemplate;
 import org.springframework.transaction.support.TransactionTemplate;
 
 import static org.apache.camel.util.Time.seconds;
@@ -66,11 +65,11 @@ public class BamRouteTest extends CamelSpringTestSupport {
     }
 
     protected RouteBuilder createRouteBuilder() throws Exception {
-        JpaTemplate jpaTemplate = getMandatoryBean(JpaTemplate.class, "jpaTemplate");
+        EntityManagerFactory entityManagerFactory = getMandatoryBean(EntityManagerFactory.class,
"entityManagerFactory");
         TransactionTemplate transactionTemplate = getMandatoryBean(TransactionTemplate.class,
"transactionTemplate");
 
         // START SNIPPET: example
-        return new ProcessBuilder(jpaTemplate, transactionTemplate) {
+        return new ProcessBuilder(entityManagerFactory, transactionTemplate) {
             public void configure() throws Exception {
 
                 // let's define some activities, correlating on an XPath on the message bodies


Mime
View raw message