Hi,

I wrote a very simple piece of esb script containing only two components.
The first is the servicemix  quartz component  which  is  configured to
run infinitely(ie with repeatInterval = -1).  The second one is a servicemix
groovy component  which  contains a couple of groovy's "println" statements.
After every two mins the quartz component fires the groovy component (ie the groovy script).

The problem is that , after 24-36 hrs  the  groovy component is not being invoked.
I found that the problem was not with the quartz component ,as I can see the
log file and debug statements on screen from quartz. I am not able to see the
output of the println statements from groovy after 25hrs to 28hrs approximately.

ServiceMix version used : servicemix-2.1-SNAPSHOT

I also tried it running on both windows and linux systems with different system loads.
The duration of successfully invoking the groovy script was varying from 25 hrs to 36 hrs.
I also didn't find any errors or atleast warnings in the debug mode.


Can someone help me in understanding the problem of why the destination groovy
components is being invoked for only around 24 hrs and failing then after.

I am attaching the esb script file along with the mail.

Thanks,
Pavan Kumar

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://xbean.org/schemas/spring/1.0";
 xmlns:spring="http://xbean.org/schemas/spring/1.0";
 xmlns:sm="http://servicemix.org/config/1.0";
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
 xsi:schemaLocation="http://xbean.org/schemas/spring/1.0 ../../conf/spring-beans.xsd
	                    http://servicemix.org/config/1.0 ../../conf/servicemix.xsd"
 xmlns:foo="http://company.com/MyApp/";>

 <!-- the JBI container -->
 <sm:container spring:id="jbi" useMBeanServer="false"
  createMBeanServer="false" dumpStats="false" rmiPort="9099"
  statsInterval="10">

  <sm:activationSpecs>

   <!-- Route the event to a tracer component that just outputs the event to the console -->
   <sm:activationSpec componentName="tracer" service="foo:tracer">
    <sm:component>
     <bean xmlns="http://xbean.org/schemas/spring/1.0";
      class="org.servicemix.components.util.StreamWriterComponent" />
    </sm:component>
   </sm:activationSpec>

   <sm:activationSpec componentName="outboundTimer"
    service="foo:outboundTimer"
    destinationService="foo:outboundProcessor">
    <sm:component>
     <bean class="org.servicemix.components.quartz.QuartzComponent">
      <property name="triggers">
       <map>
        <entry>
         <key>
          <bean class="org.quartz.SimpleTrigger">
           <property name="repeatInterval" value="120000" />
           <property name="repeatCount" value="-1" />
          </bean>
         </key>
         <bean class="org.quartz.JobDetail">
          <property name="name" value="MyApp Outbound Timer" />
          <property name="group" value="MyApp" />
         </bean>
        </entry>
       </map>
      </property>
     </bean>
    </sm:component>
   </sm:activationSpec>


<sm:activationSpec componentName="outboundProcessor"
    service="foo:outboundProcessor" destinationService="foo:tracer">
    <sm:component>
     <bean xmlns="http://xbean.org/schemas/spring/1.0";
      class="org.servicemix.components.groovy.GroovyComponent">
      <property name="scriptText">
       <value>
        <![CDATA[
			import groovy.sql.Sql

			def sno="1"
			def name="Pavan Kumar"	

			println "HAI"

		try{
				println "Serial Number : ${sno}" 
				println "NAME : ${name}"
		
		}catch(Exception e) { 
			e.printStackTrace() 
		}

		 outMessage.bodyText = """
                                        <MyApp>
                                         <Response>
                                         </Response>
                                        </MyApp>
                        """

        ]]>
       </value>
      </property>
     </bean>
    </sm:component>
   </sm:activationSpec>


  </sm:activationSpecs>
 </sm:container>

</beans>

Reply via email to