Revision 39625
Added by Michele Artini over 8 years ago
applicationContext-msro-service.xml | ||
---|---|---|
1 | 1 |
<?xml version="1.0" encoding="UTF-8"?> |
2 |
<beans xmlns="http://www.springframework.org/schema/beans"
|
|
3 |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxws="http://cxf.apache.org/jaxws"
|
|
4 |
xmlns:sec="http://cxf.apache.org/configuration/security" xmlns:wsa="http://cxf.apache.org/ws/addressing"
|
|
5 |
xmlns:p="http://www.springframework.org/schema/p" xmlns:http="http://cxf.apache.org/transports/http/configuration"
|
|
6 |
xmlns:t="http://dnetlib.eu/springbeans/t" xmlns:template="http://dnetlib.eu/springbeans/template"
|
|
7 |
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
|
|
8 |
http://cxf.apache.org/ws/addressing http://cxf.apache.org/schemas/ws-addr-conf.xsd |
|
9 |
http://cxf.apache.org/configuration/security http://cxf.apache.org/schemas/configuration/security.xsd |
|
2 |
<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
3 |
xmlns:jaxws="http://cxf.apache.org/jaxws"
|
|
4 |
xmlns:p="http://www.springframework.org/schema/p"
|
|
5 |
xmlns:http="http://cxf.apache.org/transports/http/configuration" xmlns:t="http://dnetlib.eu/springbeans/t"
|
|
6 |
xmlns:template="http://dnetlib.eu/springbeans/template" xmlns="http://www.springframework.org/schema/beans"
|
|
7 |
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
|
|
8 |
|
|
9 |
|
|
10 | 10 |
http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd |
11 | 11 |
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd |
12 | 12 |
http://dnetlib.eu/springbeans/template http://dnetlib.eu/springbeans/template.xsd"> |
13 |
<!-- beans -->
|
|
14 |
<bean id="msroService" class="eu.dnetlib.msro.MSROServiceImpl"
|
|
15 |
init-method="start" destroy-method="stop"
|
|
16 |
p:notificationHandler-ref="msroNotificationHandlerChain"
|
|
17 |
p:processRegistry-ref="graphProcessRegistry" />
|
|
13 |
<!-- beans -->
|
|
14 |
<bean id="msroService" class="eu.dnetlib.msro.MSROServiceImpl"
|
|
15 |
init-method="start" destroy-method="stop"
|
|
16 |
p:notificationHandler-ref="msroNotificationHandlerChain"
|
|
17 |
p:processRegistry-ref="graphProcessRegistry"/>
|
|
18 | 18 |
|
19 |
<bean id="msroNotificationHandlerChain"
|
|
20 |
class="eu.dnetlib.enabling.tools.blackboard.NotificationHandlerChainImpl">
|
|
21 |
<property name="handlerExecutor">
|
|
22 |
<bean class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor"
|
|
23 |
p:corePoolSize="32" p:keepAliveSeconds="3600" p:queueCapacity="0" />
|
|
24 |
</property>
|
|
25 |
<property name="handlers">
|
|
26 |
<list>
|
|
27 |
<ref bean="msroBlackboardNotificationHandler" />
|
|
28 |
</list>
|
|
29 |
</property>
|
|
30 |
</bean>
|
|
19 |
<bean id="msroNotificationHandlerChain"
|
|
20 |
class="eu.dnetlib.enabling.tools.blackboard.NotificationHandlerChainImpl">
|
|
21 |
<property name="handlerExecutor">
|
|
22 |
<bean class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor"
|
|
23 |
p:corePoolSize="32" p:keepAliveSeconds="3600" p:queueCapacity="0"/>
|
|
24 |
</property>
|
|
25 |
<property name="handlers">
|
|
26 |
<list>
|
|
27 |
<ref bean="msroBlackboardNotificationHandler"/>
|
|
28 |
</list>
|
|
29 |
</property>
|
|
30 |
</bean>
|
|
31 | 31 |
|
32 |
<bean id="wfDependencyLauncherNotificationHandler" class="eu.dnetlib.msro.notification.WfDependencyLauncherNotificationHandler" |
|
33 |
p:enabled="true" p:topicExpression="UPDATE/WorkflowDSResourceType/*/RESOURCE_PROFILE/BODY/STATUS/LAST_EXECUTION_DATE" /> |
|
32 |
<bean id="msroWfEngine" class="eu.dnetlib.msro.workflows.sarasvati.loader.InjectableMemEngine"> |
|
33 |
<property name="graphFactory"> |
|
34 |
<bean class="eu.dnetlib.msro.workflows.sarasvati.loader.InjectableMemGraphFactory"> |
|
35 |
<property name="nodeFactory"> |
|
36 |
<bean class="eu.dnetlib.msro.workflows.sarasvati.loader.InjectableNodeFactory" |
|
37 |
p:beanNamePrefix="wfNode"/> |
|
38 |
</property> |
|
39 |
</bean> |
|
40 |
</property> |
|
41 |
</bean> |
|
34 | 42 |
|
35 |
<alias name="cxfEndpointReferenceBuilder" alias="eprBuilder" /> |
|
36 |
|
|
37 |
<bean id="msroWfEngine" class="eu.dnetlib.msro.workflows.sarasvati.loader.InjectableMemEngine"> |
|
38 |
<property name="graphFactory"> |
|
39 |
<bean class="eu.dnetlib.msro.workflows.sarasvati.loader.InjectableMemGraphFactory"> |
|
40 |
<property name="nodeFactory"> |
|
41 |
<bean class="eu.dnetlib.msro.workflows.sarasvati.loader.InjectableNodeFactory" |
|
42 |
p:beanNamePrefix="wfNode" /> |
|
43 |
</property> |
|
44 |
</bean> |
|
45 |
</property> |
|
46 |
</bean> |
|
47 |
|
|
48 |
<bean id="graphProcessRegistry" class="eu.dnetlib.msro.workflows.sarasvati.registry.GraphProcessRegistry" |
|
49 |
p:maxSize="${msro.wf.registry.maxSize}" /> |
|
43 |
<bean id="graphProcessRegistry" class="eu.dnetlib.msro.workflows.sarasvati.registry.GraphProcessRegistry" |
|
44 |
p:maxSize="${msro.wf.registry.maxSize}"/> |
|
50 | 45 |
|
51 |
<bean id="sarasvatiGraphLoader" |
|
52 |
class="eu.dnetlib.msro.workflows.sarasvati.loader.GraphLoader" |
|
53 |
p:engine-ref="msroWfEngine" /> |
|
54 |
|
|
55 |
<bean id="sarasvatiWorkflowExecutor" class="eu.dnetlib.msro.workflows.sarasvati.loader.WorkflowExecutor" |
|
56 |
p:engine-ref="msroWfEngine" |
|
57 |
p:graphLoader-ref="sarasvatiGraphLoader" |
|
58 |
p:graphProcessRegistry-ref="graphProcessRegistry" |
|
59 |
p:profileToSarasvatiConverter-ref="msroProfileToSarasvatiConverter" |
|
60 |
init-method="init"/> |
|
61 |
|
|
62 |
<bean id="workflowsConstants" class="eu.dnetlib.msro.workflows.util.WorkflowsConstants" |
|
63 |
init-method="init" |
|
64 |
p:dataproviderProtocolsJson="${msro.wf.ui.dataprovider.protocols}" |
|
65 |
p:dataproviderTypologiesJson="${msro.wf.ui.dataprovider.typologies}" /> |
|
66 |
|
|
67 |
<bean id="msroProfileToSarasvatiConverter" class="eu.dnetlib.msro.workflows.sarasvati.loader.ProfileToSarasvatiConverter" |
|
68 |
p:xslt="classpath:/eu/dnetlib/msro/workflows/xslt/wf_profile2sarasvati.xslt" /> |
|
69 |
|
|
70 |
<bean id="msroBlackboardNotificationHandler" |
|
71 |
class="eu.dnetlib.enabling.tools.blackboard.DeletingBlackboardNotificationHandler" |
|
72 |
p:blackboardHandler-ref="blackboardClientHandler" /> |
|
73 |
|
|
74 |
<bean id="datasourceMetaWorkflowFactory" class="eu.dnetlib.msro.workflows.metawf.DatasourceMetaWorkflowFactory"/> |
|
75 |
|
|
76 |
<bean id="msroProcessCountingResultSetFactory" |
|
77 |
class="eu.dnetlib.msro.workflows.resultset.ProcessCountingResultSetFactory" |
|
78 |
p:resultSetFactory-ref="openResultSetFactory" p:serviceResolver-ref="serviceResolver" /> |
|
79 |
|
|
80 |
<bean t:id="msroJobSchedulerAccessor" |
|
81 |
class="org.springframework.scheduling.quartz.SchedulerAccessorBean" |
|
82 |
p:scheduler-ref="jobScheduler"> |
|
83 |
<property name="triggers"> |
|
84 |
<list> |
|
85 |
<bean class="org.springframework.scheduling.quartz.SimpleTriggerBean" |
|
86 |
p:startDelay="6000" p:repeatCount="0"> |
|
87 |
<property name="jobDetail"> |
|
88 |
<bean class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean" |
|
89 |
p:targetObject-ref="msroBlackboardSubscriber" p:targetMethod="subscribeAll" /> |
|
90 |
</property> |
|
91 |
</bean> |
|
92 |
<bean class="org.springframework.scheduling.quartz.SimpleTriggerBean" |
|
93 |
p:startDelay="${msro.wf.scheduler.startDelay}" p:repeatInterval="${msro.wf.scheduler.repeatInterval}"> |
|
94 |
<property name="jobDetail"> |
|
95 |
<bean class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean" |
|
96 |
p:targetObject-ref="msroScheduledWorkflowLauncher" p:targetMethod="verifySheduledWorkflows" /> |
|
97 |
</property> |
|
98 |
</bean> |
|
99 |
<bean class="org.springframework.scheduling.quartz.SimpleTriggerBean" |
|
100 |
p:startDelay="${msro.wf.mail.thread.startDelay}" p:repeatInterval="${msro.wf.mail.thread.repeatInterval}"> |
|
101 |
<property name="jobDetail"> |
|
102 |
<bean class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean" |
|
103 |
p:targetObject-ref="msroMailDispatcher" p:targetMethod="processMailQueue" /> |
|
104 |
</property> |
|
105 |
</bean> |
|
106 |
</list> |
|
107 |
</property> |
|
108 |
</bean> |
|
109 |
|
|
110 |
<bean id="msroBlackboardSubscriber" class="eu.dnetlib.msro.workflows.nodes.blackboard.BlackboardSubscriber" |
|
111 |
p:endpoint-ref="msroServiceEndpoint" /> |
|
112 |
|
|
113 |
<bean id="msroScheduledWorkflowLauncher" class="eu.dnetlib.msro.cron.ScheduledWorkflowLauncher" |
|
114 |
p:graphProcessRegistry-ref="graphProcessRegistry" p:workflowExecutor-ref="sarasvatiWorkflowExecutor" |
|
115 |
p:windowSize="${msro.wf.scheduler.window.size}" /> |
|
116 |
|
|
117 |
|
|
118 |
<bean id="msroWorkflowLogger" class="eu.dnetlib.common.logging.DnetLogger" |
|
119 |
p:name="${msro.wf.logger.name}" p:indexConf="${msro.wf.logger.index.conf}" /> |
|
120 |
|
|
121 |
<bean id="msroMailDispatcher" class="eu.dnetlib.msro.notification.EmailDispatcher" |
|
122 |
p:from="${msro.wf.mail.from}" p:fromName="${msro.wf.mail.fromName}" p:cc="${msro.wf.mail.cc}" |
|
123 |
p:smtpHost="${msro.wf.mail.smtp.host}" p:smtpPort="${msro.wf.mail.smtp.port}" p:smtpUser="${msro.wf.mail.smtp.user}" p:smtpPassword="${msro.wf.mail.smtp.password}" |
|
124 |
p:baseUrl="${msro.wf.mail.message.baseUrl}" p:infrastructure="${msro.wf.mail.message.infrastructure}"/> |
|
125 |
|
|
126 |
<!-- System nodes --> |
|
127 |
<bean id="wfNodeSuccess" class="eu.dnetlib.msro.workflows.nodes.SuccessFailureNode" p:success="true" scope="prototype" /> |
|
128 |
<bean id="wfNodeFailure" class="eu.dnetlib.msro.workflows.nodes.SuccessFailureNode" p:success="false" scope="prototype" /> |
|
129 |
|
|
130 |
<!-- REPO_HI and REPO_BYE --> |
|
131 |
<bean id="wfNodeRegisterMetaWf" class="eu.dnetlib.msro.workflows.nodes.repohi.RegisterMetaWfJobNode" scope="prototype" /> |
|
132 |
<bean id="wfNodeUpdateMetaWf" class="eu.dnetlib.msro.workflows.nodes.repohi.UpdateMetaWfJobNode" scope="prototype" /> |
|
133 |
<bean id="wfNodeUpdateMetaWfStatus" class="eu.dnetlib.msro.workflows.nodes.repohi.UpdateMetaWfStatusJobNode" scope="prototype" /> |
|
134 |
<bean id="wfNodeDeleteMetaWf" class="eu.dnetlib.msro.workflows.nodes.repobye.DeleteMetaWfJobNode" scope="prototype" /> |
|
135 |
<bean id="wfNodeDeleteMDStore" class="eu.dnetlib.msro.workflows.nodes.repobye.DeleteMDStoreJobNode" scope="prototype" /> |
|
136 |
|
|
137 |
<!-- endpoints --> |
|
138 |
<jaxws:endpoint id="msroServiceEndpoint" implementor="#msroService" |
|
139 |
implementorClass="eu.dnetlib.msro.rmi.MSROService" |
|
140 |
address="/msro" /> |
|
46 |
<bean id="sarasvatiGraphLoader" |
|
47 |
class="eu.dnetlib.msro.workflows.sarasvati.loader.GraphLoader" |
|
48 |
p:engine-ref="msroWfEngine"/> |
|
141 | 49 |
|
142 |
<template:instance name="serviceRegistrationManager" |
|
143 |
t:serviceRegistrationManagerClass="eu.dnetlib.enabling.tools.registration.ValidatingServiceRegistrationManagerImpl" |
|
144 |
t:name="msroServiceRegistrationManager" t:service="msroService" |
|
145 |
t:endpoint="msroServiceEndpoint" t:jobScheduler="jobScheduler" /> |
|
50 |
<bean id="sarasvatiWorkflowExecutor" class="eu.dnetlib.msro.workflows.sarasvati.loader.WorkflowExecutor" |
|
51 |
p:engine-ref="msroWfEngine" |
|
52 |
p:graphLoader-ref="sarasvatiGraphLoader" |
|
53 |
p:graphProcessRegistry-ref="graphProcessRegistry" |
|
54 |
p:profileToSarasvatiConverter-ref="msroProfileToSarasvatiConverter" |
|
55 |
init-method="init"/> |
|
146 | 56 |
|
57 |
<bean id="workflowsConstants" class="eu.dnetlib.msro.workflows.util.WorkflowsConstants" |
|
58 |
init-method="init" |
|
59 |
p:datasourceProtocolsJson="${msro.wf.ui.dataprovider.protocols}" |
|
60 |
p:datasourceTypologiesJson="${msro.wf.ui.dataprovider.typologies}"> |
|
61 |
</bean> |
|
62 |
|
|
63 |
<bean id="msroProfileToSarasvatiConverter" class="eu.dnetlib.msro.workflows.sarasvati.loader.ProfileToSarasvatiConverter" |
|
64 |
p:xslt="classpath:/eu/dnetlib/msro/workflows/xslt/wf_profile2sarasvati.xslt"/> |
|
65 |
|
|
66 |
<bean id="msroBlackboardNotificationHandler" |
|
67 |
class="eu.dnetlib.enabling.tools.blackboard.DeletingBlackboardNotificationHandler" |
|
68 |
p:blackboardHandler-ref="blackboardClientHandler"/> |
|
69 |
|
|
70 |
<bean id="msroProcessCountingResultSetFactory" |
|
71 |
class="eu.dnetlib.msro.workflows.resultset.ProcessCountingResultSetFactory" |
|
72 |
p:resultSetFactory-ref="openResultSetFactory" p:serviceResolver-ref="serviceResolver"/> |
|
73 |
|
|
74 |
<bean t:id="msroJobSchedulerAccessor" |
|
75 |
class="org.springframework.scheduling.quartz.SchedulerAccessorBean" |
|
76 |
p:scheduler-ref="jobScheduler"> |
|
77 |
<property name="triggers"> |
|
78 |
<list> |
|
79 |
<bean class="org.springframework.scheduling.quartz.SimpleTriggerBean" |
|
80 |
p:startDelay="6000" p:repeatCount="0"> |
|
81 |
<property name="jobDetail"> |
|
82 |
<bean class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean" |
|
83 |
p:targetObject-ref="msroBlackboardSubscriber" p:targetMethod="subscribeAll"/> |
|
84 |
</property> |
|
85 |
</bean> |
|
86 |
<bean class="org.springframework.scheduling.quartz.SimpleTriggerBean" |
|
87 |
p:startDelay="${msro.wf.scheduler.startDelay}" p:repeatInterval="${msro.wf.scheduler.repeatInterval}"> |
|
88 |
<property name="jobDetail"> |
|
89 |
<bean class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean" |
|
90 |
p:targetObject-ref="msroScheduledWorkflowLauncher" p:targetMethod="verifySheduledWorkflows"/> |
|
91 |
</property> |
|
92 |
</bean> |
|
93 |
<bean class="org.springframework.scheduling.quartz.SimpleTriggerBean" |
|
94 |
p:startDelay="${msro.wf.mail.thread.startDelay}" p:repeatInterval="${msro.wf.mail.thread.repeatInterval}"> |
|
95 |
<property name="jobDetail"> |
|
96 |
<bean class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean" |
|
97 |
p:targetObject-ref="msroMailDispatcher" p:targetMethod="processMailQueue"/> |
|
98 |
</property> |
|
99 |
</bean> |
|
100 |
</list> |
|
101 |
</property> |
|
102 |
</bean> |
|
103 |
|
|
104 |
<bean id="msroBlackboardSubscriber" class="eu.dnetlib.msro.workflows.nodes.blackboard.BlackboardSubscriber" |
|
105 |
p:endpoint-ref="msroServiceEndpoint"/> |
|
106 |
|
|
107 |
<bean id="msroScheduledWorkflowLauncher" class="eu.dnetlib.msro.cron.ScheduledWorkflowLauncher" |
|
108 |
p:graphProcessRegistry-ref="graphProcessRegistry" p:workflowExecutor-ref="sarasvatiWorkflowExecutor" |
|
109 |
p:windowSize="${msro.wf.scheduler.window.size}"/> |
|
110 |
|
|
111 |
|
|
112 |
<bean id="msroWorkflowLogger" class="eu.dnetlib.common.logging.DnetLogger" |
|
113 |
p:name="${msro.wf.logger.name}" p:indexConf="${msro.wf.logger.index.conf}"/> |
|
114 |
|
|
115 |
<bean id="msroMailDispatcher" class="eu.dnetlib.msro.notification.EmailDispatcher" |
|
116 |
p:from="${msro.wf.mail.from}" p:fromName="${msro.wf.mail.fromName}" p:cc="${msro.wf.mail.cc}" |
|
117 |
p:smtpHost="${msro.wf.mail.smtp.host}" p:smtpPort="${msro.wf.mail.smtp.port}" p:smtpUser="${msro.wf.mail.smtp.user}" |
|
118 |
p:smtpPassword="${msro.wf.mail.smtp.password}" |
|
119 |
p:baseUrl="${msro.wf.mail.message.baseUrl}" p:infrastructure="${msro.wf.mail.message.infrastructure}"/> |
|
120 |
|
|
121 |
<!-- System nodes --> |
|
122 |
<bean id="wfNodeSuccess" class="eu.dnetlib.msro.workflows.nodes.SuccessFailureNode" p:success="true" scope="prototype"/> |
|
123 |
<bean id="wfNodeFailure" class="eu.dnetlib.msro.workflows.nodes.SuccessFailureNode" p:success="false" scope="prototype"/> |
|
124 |
|
|
125 |
<!-- REPO_HI and REPO_BYE --> |
|
126 |
<bean id="wfNodeRegisterWf" class="eu.dnetlib.msro.workflows.nodes.repohi.RegisterWorkflowFromTemplateJobNode" scope="prototype"/> |
|
127 |
<bean id="wfNodeUpdateWfStatus" class="eu.dnetlib.msro.workflows.nodes.repohi.UpdateWfStatusJobNode" scope="prototype"/> |
|
128 |
<bean id="wfNodeDeleteWf" class="eu.dnetlib.msro.workflows.nodes.repobye.DeleteWfJobNode" scope="prototype"/> |
|
129 |
<bean id="wfNodeDeleteMDStore" class="eu.dnetlib.msro.workflows.nodes.repobye.DeleteMDStoreJobNode" scope="prototype"/> |
|
130 |
|
|
131 |
<!-- endpoints --> |
|
132 |
<jaxws:endpoint id="msroServiceEndpoint" implementor="#msroService" |
|
133 |
implementorClass="eu.dnetlib.msro.rmi.MSROService" |
|
134 |
address="/msro"/> |
|
135 |
|
|
136 |
<template:instance name="serviceRegistrationManager" |
|
137 |
t:serviceRegistrationManagerClass="eu.dnetlib.enabling.tools.registration.ValidatingServiceRegistrationManagerImpl" |
|
138 |
t:name="msroServiceRegistrationManager" t:service="msroService" |
|
139 |
t:endpoint="msroServiceEndpoint" t:jobScheduler="jobScheduler"/> |
|
140 |
|
|
147 | 141 |
</beans> |
Also available in: Unified diff