]> git.argeo.org Git - gpl/argeo-slc.git/commitdiff
Introduce SLC Execution otification via JMS
authorMathieu Baudier <mbaudier@argeo.org>
Tue, 17 Mar 2009 23:03:08 +0000 (23:03 +0000)
committerMathieu Baudier <mbaudier@argeo.org>
Tue, 17 Mar 2009 23:03:08 +0000 (23:03 +0000)
git-svn-id: https://svn.argeo.org/slc/trunk@2277 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc

18 files changed:
demo/site/.classpath [new file with mode: 0644]
demo/site/.project
demo/site/org.argeo.slc.demo.agent/META-INF/spring/jms.xml
demo/site/org.argeo.slc.demo.agent/META-INF/spring/osgi.xml
demo/site/org.argeo.slc.demo.manager/conf/manager-osgi.xml
demo/site/org.argeo.slc.demo.manager/conf/manager.xml
demo/site/pom.xml
runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/services/impl/process/SlcExecutionServiceImpl.java [new file with mode: 0644]
runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/services/process/SlcExecutionService.java [new file with mode: 0644]
runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/JmsSlcExecutionNotifier.java [new file with mode: 0644]
runtime/org.argeo.slc.support.activemq/src/main/resources/org/argeo/slc/activemq/destinations.xml
runtime/org.argeo.slc.support.simple/src/main/java/org/argeo/slc/core/execution/DefaultModulesManager.java
server/org.argeo.slc.siteserver/bundles/logging/log4j.properties
server/org.argeo.slc.siteserver/bundles/org.argeo.slc.server.hibernate/META-INF/spring/transaction-osgi.xml
server/org.argeo.slc.siteserver/bundles/org.argeo.slc.server.jms/META-INF/spring/jms-osgi.xml
server/org.argeo.slc.siteserver/bundles/org.argeo.slc.server.jms/META-INF/spring/jms.xml
server/org.argeo.slc.siteserver/bundles/org.argeo.slc.server.services/META-INF/spring/services-osgi.xml
server/org.argeo.slc.siteserver/bundles/org.argeo.slc.server.services/META-INF/spring/services.xml

diff --git a/demo/site/.classpath b/demo/site/.classpath
new file mode 100644 (file)
index 0000000..d0bec0f
--- /dev/null
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+       <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+       <classpathentry kind="output" path="target/classes"/>
+</classpath>
index 3bc0b024e3dd79241b069c788a2a61f65dbc6cf2..33d9f2693ee3fe16b7167dd5f35cd66a1b9f3327 100644 (file)
@@ -5,7 +5,19 @@
        <projects>
        </projects>
        <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.jdt.core.javabuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.maven.ide.eclipse.maven2Builder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
        </buildSpec>
        <natures>
+               <nature>org.eclipse.jdt.core.javanature</nature>
+               <nature>org.maven.ide.eclipse.maven2Nature</nature>
        </natures>
 </projectDescription>
index f0214ef48df4e01923f4ccb079ee22eec841bcd4..705e6e9c8cc60097d584c3006cef1a6530e8fa8f 100644 (file)
                        </bean>
                </property>
        </bean>
+       
+       <!-- SLC Execution Listener -->
+       <bean id="slcExecutionListener" class="org.argeo.slc.jms.JmsSlcExecutionNotifier">
+               <property name="updateStatusDestination" ref="slcJms.destination.slcExecution.updateStatus" />
+               <property name="jmsTemplate">
+                       <bean class="org.springframework.jms.core.JmsTemplate">
+                               <property name="messageConverter" ref="slcDefault.jms.castorMessageConverter" />
+                               <property name="connectionFactory" ref="jmsConnectionFactory" />
+                       </bean>
+               </property>
+       </bean>
 </beans>
\ No newline at end of file
index b6b025c2dfa89ac5f3890a61dc1e2fa0438dad76..2ffd2d4d6c6ab7502fe9da5dd9a56ae5a453090d 100644 (file)
@@ -7,6 +7,7 @@
        http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">\r
 \r
        <service ref="resultListener" interface="org.argeo.slc.test.TestResultListener" />\r
+       <service ref="slcExecutionListener" interface="org.argeo.slc.process.SlcExecutionNotifier" />\r
 \r
        <reference id="modulesManager"\r
                interface="org.argeo.slc.execution.ExecutionModulesManager" />\r
index 16d57c1274bbfb1d2da9a20dae9bf40809075617..34bc15da500e78a9a9382e72bde030490d0f17d1 100644 (file)
@@ -15,4 +15,5 @@
                <beans:bean class="org.argeo.slc.core.test.tree.TreeTestResultLogger" />\r
        </service>\r
 \r
+       <list id="slcExecutionListeners" interface="org.argeo.slc.process.SlcExecutionNotifier" cardinality="0..N"/>\r
 </beans:beans>
\ No newline at end of file
index ba9fea471d281146d9dea4abbc2965a5e42a2678..da2842aefc8d533c8cb1e599dc67ca36a32e75c1 100644 (file)
@@ -6,5 +6,6 @@
 \r
        <bean id="modulesManager" class="org.argeo.slc.core.execution.DefaultModulesManager">\r
                <property name="executionModules" ref="executionModules" />\r
+               <property name="slcExecutionNotifiers" ref="slcExecutionListeners" />\r
        </bean>\r
 </beans>
\ No newline at end of file
index a278c001c7043e17290903764a86eec64d4dd15c..affcde423f6b4d963d6d15c6982116ea2b6b3b19 100644 (file)
                <module>org.argeo.slc.demo.deploy</module>
                <module>org.argeo.slc.demo.log4j</module>
        </modules>
+       <dependencies>
+       <!-- 
+               <dependency>
+                       <groupId>org.argeo.slc.demo</groupId>
+                       <artifactId>org.argeo.slc.demo.basic</artifactId>
+                       <version>${project.version}</version>
+               </dependency>
+                -->
+       </dependencies>
 </project>
diff --git a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/services/impl/process/SlcExecutionServiceImpl.java b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/services/impl/process/SlcExecutionServiceImpl.java
new file mode 100644 (file)
index 0000000..0239887
--- /dev/null
@@ -0,0 +1,54 @@
+package org.argeo.slc.services.impl.process;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.argeo.slc.SlcException;
+import org.argeo.slc.dao.process.SlcExecutionDao;
+import org.argeo.slc.msg.process.SlcExecutionRequest;
+import org.argeo.slc.msg.process.SlcExecutionStatusRequest;
+import org.argeo.slc.process.SlcExecution;
+import org.argeo.slc.services.process.SlcExecutionService;
+
+public class SlcExecutionServiceImpl implements SlcExecutionService {
+       private final Log log = LogFactory.getLog(getClass());
+
+       private final SlcExecutionDao slcExecutionDao;
+
+       public SlcExecutionServiceImpl(SlcExecutionDao slcExecutionDao) {
+               this.slcExecutionDao = slcExecutionDao;
+       }
+
+       public void newExecution(SlcExecution slcExecutionMsg) {
+               SlcExecution slcExecutionPersisted = slcExecutionDao
+                               .getSlcExecution(slcExecutionMsg.getUuid());
+               if (slcExecutionPersisted == null) {
+                       if (log.isTraceEnabled())
+                               log.trace("Creating SLC execution #"
+                                               + slcExecutionMsg.getUuid());
+
+                       slcExecutionDao.create(slcExecutionMsg);
+               } else {
+                       if (log.isTraceEnabled())
+                               log.trace("Updating SLC execution #"
+                                               + slcExecutionMsg.getUuid());
+
+                       slcExecutionDao.merge(slcExecutionMsg);
+               }
+       }
+
+       public void updateStatus(SlcExecutionStatusRequest msg) {
+               SlcExecution slcExecution = slcExecutionDao.getSlcExecution(msg
+                               .getSlcExecutionUuid());
+               if (slcExecution == null)
+                       throw new SlcException("Could not find SLC execution #"
+                                       + msg.getSlcExecutionUuid());
+
+               slcExecution.setStatus(msg.getNewStatus());
+
+               if (log.isTraceEnabled())
+                       log.trace("Updating status for SLC execution #"
+                                       + slcExecution.getUuid());
+
+               slcExecutionDao.update(slcExecution);
+       }
+}
diff --git a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/services/process/SlcExecutionService.java b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/services/process/SlcExecutionService.java
new file mode 100644 (file)
index 0000000..9e617f7
--- /dev/null
@@ -0,0 +1,9 @@
+package org.argeo.slc.services.process;
+
+import org.argeo.slc.msg.process.SlcExecutionStatusRequest;
+import org.argeo.slc.process.SlcExecution;
+
+public interface SlcExecutionService {
+       public void newExecution(SlcExecution slcExecutionMsg);
+       public void updateStatus(SlcExecutionStatusRequest msg);
+}
diff --git a/runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/JmsSlcExecutionNotifier.java b/runtime/org.argeo.slc.support.activemq/src/main/java/org/argeo/slc/jms/JmsSlcExecutionNotifier.java
new file mode 100644 (file)
index 0000000..5bdefc8
--- /dev/null
@@ -0,0 +1,49 @@
+package org.argeo.slc.jms;
+
+import java.util.List;
+
+import javax.jms.Destination;
+
+import org.argeo.slc.SlcException;
+import org.argeo.slc.UnsupportedException;
+import org.argeo.slc.msg.process.SlcExecutionStatusRequest;
+import org.argeo.slc.process.SlcExecution;
+import org.argeo.slc.process.SlcExecutionNotifier;
+import org.argeo.slc.process.SlcExecutionStep;
+import org.springframework.jms.core.JmsTemplate;
+
+public class JmsSlcExecutionNotifier implements SlcExecutionNotifier {
+
+       private JmsTemplate jmsTemplate;
+
+       private Destination updateStatusDestination;
+
+       public void updateStatus(SlcExecution slcExecution, String oldStatus,
+                       String newStatus) {
+               SlcExecutionStatusRequest req = new SlcExecutionStatusRequest(
+                               slcExecution.getUuid(), newStatus);
+               jmsTemplate.convertAndSend(updateStatusDestination, req);
+       }
+
+       public void addSteps(SlcExecution slcExecution,
+                       List<SlcExecutionStep> additionalSteps) {
+               throw new UnsupportedException();
+       }
+
+       public void newExecution(SlcExecution slcExecution) {
+               throw new UnsupportedException();
+       }
+
+       public void updateExecution(SlcExecution slcExecution) {
+               throw new UnsupportedException();
+       }
+
+       public void setJmsTemplate(JmsTemplate jmsTemplate) {
+               this.jmsTemplate = jmsTemplate;
+       }
+
+       public void setUpdateStatusDestination(Destination updateStatusDestination) {
+               this.updateStatusDestination = updateStatusDestination;
+       }
+
+}
index 8b27dfbd62c4a72098ed02b425e884d6d4de46a3..c72f98c853a33e71e6313ccc5f2296e22eb85d30 100644 (file)
@@ -5,6 +5,8 @@
        default-lazy-init="false">
 
        <!-- Destinations -->
+
+       <!-- Agent service -->
        <bean id="slcJms.destination.agent.register" p:physicalName="agent.register"
                parent="slcJms.amTopic" />
        <bean id="slcJms.destination.agent.unregister" p:physicalName="agent.unregister"
@@ -12,6 +14,7 @@
        <bean id="slcJms.destination.agent.newExecution" p:physicalName="agent.newExecution"
                parent="slcJms.amTopic" />
 
+       <!-- Test result service -->
        <bean id="slcJms.destination.test.create" p:physicalName="test.create"
                parent="slcJms.amTopic" />
        <bean id="slcJms.destination.test.addResultPart" p:physicalName="test.addResultPart"
        <bean id="slcJms.destination.test.close" p:physicalName="test.close"
                parent="slcJms.amTopic" />
 
+       <!-- TSLC Execution service -->
+       <bean id="slcJms.destination.slcExecution.updateStatus"
+               p:physicalName="slcExecution.updateStatus" parent="slcJms.amTopic" />
+
        <!-- Templates -->
        <bean id="slcJms.amQueue" class="org.apache.activemq.command.ActiveMQQueue"
                abstract="true" />
index 9bb6aae6442b6247e1a9daf9a9bb67825145e67a..fdeb864a5b6b19be2b8c2346655ad692e524be5e 100644 (file)
@@ -2,6 +2,7 @@ package org.argeo.slc.core.execution;
 
 import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 
@@ -9,13 +10,14 @@ import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.argeo.slc.SlcException;
 import org.argeo.slc.execution.ExecutionContext;
-import org.argeo.slc.execution.ExecutionFlow;
 import org.argeo.slc.execution.ExecutionFlowDescriptor;
 import org.argeo.slc.execution.ExecutionModule;
 import org.argeo.slc.execution.ExecutionModuleDescriptor;
 import org.argeo.slc.execution.ExecutionModulesManager;
 import org.argeo.slc.process.RealizedFlow;
 import org.argeo.slc.process.SlcExecution;
+import org.argeo.slc.process.SlcExecutionNotifier;
+import org.dbunit.operation.UpdateOperation;
 import org.springframework.util.Assert;
 
 public class DefaultModulesManager implements ExecutionModulesManager {
@@ -23,22 +25,24 @@ public class DefaultModulesManager implements ExecutionModulesManager {
                        .getLog(DefaultModulesManager.class);
 
        private List<ExecutionModule> executionModules = new ArrayList<ExecutionModule>();
-       
-       protected ExecutionModule getExecutionModule(String moduleName, String version) {
+       private List<SlcExecutionNotifier> slcExecutionNotifiers = new ArrayList<SlcExecutionNotifier>();
+
+       protected ExecutionModule getExecutionModule(String moduleName,
+                       String version) {
                for (ExecutionModule moduleT : executionModules) {
                        if (moduleT.getName().equals(moduleName)) {
-                               if(moduleT.getVersion().equals(version)) {
+                               if (moduleT.getVersion().equals(version)) {
                                        return moduleT;
                                }
                        }
                }
                return null;
        }
-       
+
        public ExecutionModuleDescriptor getExecutionModuleDescriptor(
                        String moduleName, String version) {
                ExecutionModule module = getExecutionModule(moduleName, version);
-               
+
                Assert.notNull(module);
 
                return module.getDescriptor();
@@ -52,44 +56,63 @@ public class DefaultModulesManager implements ExecutionModulesManager {
                this.executionModules = executionModules;
        }
 
-       protected Map<String, Object> convertValues(ExecutionFlowDescriptor executionFlowDescriptor) {
+       protected Map<String, Object> convertValues(
+                       ExecutionFlowDescriptor executionFlowDescriptor) {
                // convert the values of flow.getFlowDescriptor()
                Map<String, Object> values = executionFlowDescriptor.getValues();
-               
+
                Map<String, Object> convertedValues = new HashMap<String, Object>();
-               
-               for(String key : values.keySet()) {
+
+               for (String key : values.keySet()) {
                        Object value = values.get(key);
-                       if(value instanceof PrimitiveValue) {
+                       if (value instanceof PrimitiveValue) {
                                PrimitiveValue primitiveValue = (PrimitiveValue) value;
 
-                               // TODO: check that the class of the the primitiveValue.value matches
+                               // TODO: check that the class of the the primitiveValue.value
+                               // matches
                                // the primitiveValue.type
                                convertedValues.put(key, primitiveValue.getValue());
-                       }
-                       else if(value instanceof RefValue) {
+                       } else if (value instanceof RefValue) {
                                RefValue refValue = (RefValue) value;
                                convertedValues.put(key, refValue.getLabel());
                        }
-               }               
+               }
                return convertedValues;
        }
-       
+
        public void process(SlcExecution slcExecution) {
-               log.info("##\n## Process SLC Execution " + slcExecution+"\n##");
+               log.info("\n##\n## Process SLC Execution " + slcExecution + "\n##\n");
 
-               for(RealizedFlow flow : slcExecution.getRealizedFlows()) {
+               for (RealizedFlow flow : slcExecution.getRealizedFlows()) {
                        ExecutionModule module = getExecutionModule(flow.getModuleName(),
                                        flow.getModuleVersion());
-                       if(module != null) {
-                               ExecutionThread thread = new ExecutionThread(flow.getFlowDescriptor(), module);
+                       if (module != null) {
+                               ExecutionThread thread = new ExecutionThread(flow
+                                               .getFlowDescriptor(), module);
                                thread.start();
-                       }
-                       else {
-                               throw new SlcException("ExecutionModule " + flow.getModuleName() + ", version " 
+                       } else {
+                               throw new SlcException("ExecutionModule "
+                                               + flow.getModuleName() + ", version "
                                                + flow.getModuleVersion() + " not found.");
                        }
                }
+
+               slcExecution.setStatus(SlcExecution.STATUS_RUNNING);
+               dispatchUpdateStatus(slcExecution, SlcExecution.STATUS_SCHEDULED,
+                               SlcExecution.STATUS_RUNNING);
+       }
+
+       protected void dispatchUpdateStatus(SlcExecution slcExecution,
+                       String oldStatus, String newStatus) {
+               for (Iterator<SlcExecutionNotifier> it = slcExecutionNotifiers
+                               .iterator(); it.hasNext();) {
+                       it.next().updateStatus(slcExecution, oldStatus, newStatus);
+               }
+       }
+
+       public void setSlcExecutionNotifiers(
+                       List<SlcExecutionNotifier> slcExecutionNotifiers) {
+               this.slcExecutionNotifiers = slcExecutionNotifiers;
        }
 
        private class ExecutionThread extends Thread {
@@ -98,21 +121,23 @@ public class DefaultModulesManager implements ExecutionModulesManager {
 
                public ExecutionThread(ExecutionFlowDescriptor executionFlowDescriptor,
                                ExecutionModule executionModule) {
-                       super("SLC Execution #" /*+ executionContext.getUuid()*/);
+                       super("SLC Execution #" /* + executionContext.getUuid() */);
                        this.executionFlowDescriptor = executionFlowDescriptor;
                        this.executionModule = executionModule;
                }
 
                public void run() {
-                       ExecutionContext executionContext = executionModule.getExecutionContext();
-                       executionContext.addVariables(convertValues(executionFlowDescriptor));
+                       ExecutionContext executionContext = executionModule
+                                       .getExecutionContext();
+                       executionContext
+                                       .addVariables(convertValues(executionFlowDescriptor));
                        try {
                                executionModule.execute(executionFlowDescriptor);
                        } catch (Exception e) {
-                               //TODO: re-throw exception ?
+                               // TODO: re-throw exception ?
                                log.error("Execution " + executionContext.getUuid()
                                                + " failed.", e);
                        }
                }
-       }               
+       }
 }
index 0d4757ef414bc4a056cac39f732b43c459bead03..f8b5d3e8a64032bb2c3681ce3d2a2f232f2bd140 100644 (file)
@@ -5,7 +5,7 @@ log4j.logger.org.argeo=DEBUG
 log4j.logger.org.argeo.slc.execution.ExecutionParameterPostProcessor=TRACE
 log4j.logger.org.argeo.slc.execution.ExecutionContext=DEBUG
 log4j.logger.org.argeo.slc.execution.SimpleExecutionSpec=DEBUG
-log4j.logger.org.argeo.slc.services.impl=DEBUG
+log4j.logger.org.argeo.slc.services.impl=TRACE
 
 log4j.logger.org.springframework=WARN
 
index 08c04583a3a387f568cd4bb5b93802d52ed8700d..d74c5d5f0f30452aff1a15215c8ac88e6c12ebfa 100644 (file)
@@ -1,25 +1,14 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<beans:beans xmlns="http://www.springframework.org/schema/osgi"\r
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"\r
-       xsi:schemaLocation="http://www.springframework.org/schema/osgi  \r
-       http://www.springframework.org/schema/osgi/spring-osgi-1.1.xsd\r
-       http://www.springframework.org/schema/beans   \r
-       http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">\r
-\r
-       <service interface="org.argeo.slc.dao.test.tree.TreeTestResultDao"\r
-               ref="testResultDao" />\r
-       <service interface="org.argeo.slc.dao.test.tree.TreeTestResultCollectionDao"\r
-               ref="testResultCollectionDao" />\r
-       <service interface="org.argeo.slc.dao.test.TestRunDescriptorDao"\r
-               ref="testRunDescriptorDao" />\r
-       <service interface="org.argeo.slc.dao.process.SlcExecutionDao"\r
-               ref="slcExecutionDao" />\r
-       <service interface="org.argeo.slc.dao.runtime.SlcAgentDescriptorDao"\r
-               ref="slcAgentDescriptorDao" />\r
-       <service ref="transactionManager"\r
-               interface="org.springframework.transaction.PlatformTransactionManager" />\r
-\r
-       <reference id="sessionFactory" interface="org.hibernate.SessionFactory" />\r
-\r
-\r
+<?xml version="1.0" encoding="UTF-8"?>
+<beans:beans xmlns="http://www.springframework.org/schema/osgi"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"
+       xsi:schemaLocation="http://www.springframework.org/schema/osgi  
+       http://www.springframework.org/schema/osgi/spring-osgi-1.1.xsd
+       http://www.springframework.org/schema/beans   
+       http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
+
+
+       <service ref="transactionManager"
+               interface="org.springframework.transaction.PlatformTransactionManager" />
+
+
 </beans:beans>
\ No newline at end of file
index 70390b6c41e4bf05c17c77c2a251e92fe2e58f3c..8e68b553589d68a86e7bbc18983fbd3837102f5e 100644 (file)
@@ -9,6 +9,8 @@
        <reference id="agentService" interface="org.argeo.slc.services.runtime.AgentService" />
        <reference id="testManagerService"
                interface="org.argeo.slc.services.test.TestManagerService" />
+       <reference id="slcExecutionService"
+               interface="org.argeo.slc.services.process.SlcExecutionService" />
 
        <reference id="jmsConnectionFactory" interface="javax.jms.ConnectionFactory" />
 
index 607bd0c081627f214b638de8e8d669b35f387aad..5e1687d783b6f4fcdfab90c89f5bdcb39d319adf 100644 (file)
                </property>
        </bean>
 
+       <!-- SLC Execution Service -->
+       <bean parent="listenerContainer">
+               <property name="destination" ref="slcJms.destination.agent.newExecution" />
+               <property name="messageListener">
+                       <bean parent="listenerAdapterCastor">
+                               <constructor-arg ref="slcExecutionService" />
+                               <property name="defaultListenerMethod" value="newExecution" />
+                       </bean>
+               </property>
+       </bean>
+
+       <bean parent="listenerContainer">
+               <property name="destination" ref="slcJms.destination.slcExecution.updateStatus" />
+               <property name="messageListener">
+                       <bean parent="listenerAdapterCastor">
+                               <constructor-arg ref="slcExecutionService" />
+                               <property name="defaultListenerMethod" value="updateStatus" />
+                       </bean>
+               </property>
+       </bean>
+
 
        <!-- Templates -->
        <bean id="listenerContainer"
index f2490012d70fe092f7cb8e2da3b3de46b3d4a1c9..87520ed166cd1e5379b9e79846de6dd367101208 100644 (file)
@@ -1,26 +1,28 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<beans:beans xmlns="http://www.springframework.org/schema/osgi"\r
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"\r
-       xsi:schemaLocation="http://www.springframework.org/schema/osgi  \r
-       http://www.springframework.org/schema/osgi/spring-osgi-1.1.xsd\r
-       http://www.springframework.org/schema/beans   \r
-       http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">\r
-\r
-       <service ref="testManagerService" interface="org.argeo.slc.services.test.TestManagerService" />\r
-       <service ref="agentService" interface="org.argeo.slc.services.runtime.AgentService" />\r
-\r
-       <reference interface="org.argeo.slc.dao.test.tree.TreeTestResultDao"\r
-               id="testResultDao" />\r
-       <reference interface="org.argeo.slc.dao.test.tree.TreeTestResultCollectionDao"\r
-               id="testResultCollectionDao" />\r
-       <reference interface="org.argeo.slc.dao.test.TestRunDescriptorDao"\r
-               id="testRunDescriptorDao" />\r
-       <reference interface="org.argeo.slc.dao.process.SlcExecutionDao"\r
-               id="slcExecutionDao" />\r
-       <reference interface="org.argeo.slc.dao.runtime.SlcAgentDescriptorDao"\r
-               id="slcAgentDescriptorDao" />\r
-\r
-       <reference id="transactionManager"\r
-               interface="org.springframework.transaction.PlatformTransactionManager" />\r
-\r
+<?xml version="1.0" encoding="UTF-8"?>
+<beans:beans xmlns="http://www.springframework.org/schema/osgi"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"
+       xsi:schemaLocation="http://www.springframework.org/schema/osgi  
+       http://www.springframework.org/schema/osgi/spring-osgi-1.1.xsd
+       http://www.springframework.org/schema/beans   
+       http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
+
+       <service ref="testManagerService" interface="org.argeo.slc.services.test.TestManagerService" />
+       <service ref="agentService" interface="org.argeo.slc.services.runtime.AgentService" />
+       <service ref="slcExecutionService"
+               interface="org.argeo.slc.services.process.SlcExecutionService" />
+
+       <reference interface="org.argeo.slc.dao.test.tree.TreeTestResultDao"
+               id="testResultDao" />
+       <reference interface="org.argeo.slc.dao.test.tree.TreeTestResultCollectionDao"
+               id="testResultCollectionDao" />
+       <reference interface="org.argeo.slc.dao.test.TestRunDescriptorDao"
+               id="testRunDescriptorDao" />
+       <reference interface="org.argeo.slc.dao.process.SlcExecutionDao"
+               id="slcExecutionDao" />
+       <reference interface="org.argeo.slc.dao.runtime.SlcAgentDescriptorDao"
+               id="slcAgentDescriptorDao" />
+
+       <reference id="transactionManager"
+               interface="org.springframework.transaction.PlatformTransactionManager" />
+
 </beans:beans>
\ No newline at end of file
index fe2aa9173b842b551538d15e80558f6ead828ede..debb1c458daad11e50dce08110984554a4c47561 100644 (file)
                <constructor-arg ref="slcAgentDescriptorDao" />
        </bean>
 
+       <bean id="slcExecutionService" class="org.argeo.slc.services.impl.process.SlcExecutionServiceImpl">
+               <constructor-arg ref="slcExecutionDao" />
+       </bean>
+
        <!-- Services transactions -->
        <aop:config>
                <aop:pointcut id="serviceMethods"