'what should the equivalent Mule4 configuration for this quartz:connector and in Mule4?
I am migrating Mule 3 application to Mule4,From Mule-config.xml we are calling synchronized method . Below is the Mule3-config.xml looks like :-
<quartz:connector name="quartzConnector" createMultipleTransactedReceivers="false" numberOfConcurrentTransactedReceivers="1" >
<dispatcher-threading-profile doThreading="false"/>
</quartz:connector>
<flow name="rccHeartbeatTask">
<quartz:inbound-endpoint connector-ref="quartzConnector" repeatInterval="1000" startDelay="60000" jobName="rccHeartbeat">
<quartz:event-generator-job/>
</quartz:inbound-endpoint>
<component>
<method-entry-point-resolver>
<include-entry-point method="process"/>
</method-entry-point-resolver>
<singleton-object class="com.emsgt.occ600.task.RCCHeartbeatGenerator"/>
</component>
</flow>
process method looks like below :-
public synchronized void process() throws Exception {
//some code
}
I want to convert this to Mule 4 and my converted Mule-config. xml looks like below :-
<spring:config name="springConfig" files="beans.xml" />
<flow name="mule-configFlow" doc:id="c7374765-8867-4e12-b62b-88e69f98824c" >
<scheduler doc:name="rccHeartbeat" doc:id="85e2d9b9-330d-48a1-a37b-4882a46bcaa6" >
<scheduling-strategy >
<fixed-frequency startDelay="60000" frequency="1000"/>
</scheduling-strategy>
</scheduler>
<java:invoke instance="taskScheduler" class="com.emsgt.occ600.task.RCCHeartbeatGenerator" method="process()" />
</flow>
beans.xml looks like below:-
<bean id="taskScheduler" scope="singleton" class="com.emsgt.occ600.task.RCCHeartbeatGenerator">
</bean>
If I build this converted application, build and deployment is successful but I am getting below error after deployment:-
Error stacktrace :
Message : Invocation of Method 'process()' from Class 'com.emsgt.occ600.task.RCCHeartbeatGenerator' without any argument resulted in an error.
Cause: java.lang.NoClassDefFoundError - com/emssatcom/dal/util/CacheRecord
Element : mule-configFlow/processors/0 @ occtaskscheduler-1.0.0-SNAPSHOT-mule-application:mule-config.xml:31
Element DSL : <java:invoke instance="taskScheduler" class="com.emsgt.occ600.task.RCCHeartbeatGenerator" method="process()"></java:invoke>
Error type : JAVA:INVOCATION
FlowStack : at mule-configFlow(mule-configFlow/processors/0 @ occtaskscheduler-1.0.0-SNAPSHOT-mule-application:mule-config.xml:31)
In place of "process method" if I call any non synchronized method, application runs without errors.
Below lines are missing in my migrated mule-config.xml.
<quartz:connector name="quartzConnector" createMultipleTransactedReceivers="false" numberOfConcurrentTransactedReceivers="1" > </quartz:connector>
what should the equivalent Mule4 configuration for this quartz:connector and in Mule4? Please add if anything else is missing in migrated xml.
Definition of beans.xml looks like below :-
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|