Yes, I will be more than happy to write this component and contribute here.  

The main problem I am facing is, as soon as the SU loads the FilePoller
component it starts polling.  Is there any way to make it not start until
the message is received.

For now I have extended the FilePoller and implemented
MessageExchangeListener to listen to the message received from Quartz
component.  I am not able to stop the FilePoller for the very first time
when servicemix starts and loads the SU and underlying servicemix.xml.

Please givem some pointers and I will implement the way needs to be done.

Here is my config snippet:
<!-- Setup a timer which polls for file on a ftp server "Every day MON-FRI
at 11:00 PM, 0 0 23 ? * MON-FRI" -->
                        <sm:activationSpec componentName="scheduler" 
service="bc:scheduler"
destinationService="bc:filePoller">
                                <sm:component>
                                        <bean 
class="org.apache.servicemix.components.quartz.QuartzComponent">
                                                <property name="triggers">
                                                        <map>
                                                                <entry>
                                                                        <key>
                                                                                
<bean class="org.quartz.CronTrigger">
                                                                                
        <property name="name" value="VendorDataTrigger"/>
                                                                                
        <property name="group" value="ServiceMix"/>
                                                                                
        <property name="cronExpression" value="0 0 23 ? * MON-FRI"/>
                                                                                
</bean>
                                                                        </key>
                                                                        <bean 
class="org.quartz.JobDetail">
                                                                                
<property name="name" value="VendorDataJob"/>
                                                                                
<property name="group" value="ServiceMix"/>
                                                                        </bean>
                                                                </entry>
                                                        </map>
                                                </property>
                                        </bean>
                                </sm:component>
                        </sm:activationSpec>
                        
                        <sm:activationSpec componentName="filePoller" 
service="bc:filePoller"
destinationService="bc:recipients">
                                <sm:component>
                                <bean 
class="com.my.components.file.BCFilePoller"> 
                                <property name="workManager" 
ref="workManager"/> 
                                <property name="deleteFile" value="false"/>
                                <property name="period" value="86400000"/>
                                <property name="path"
value="ftp://username:[EMAIL PROTECTED]/test/"/>
                                <property name="marshaler" ref="marshaler"/> 
                                </bean>
                        </sm:component> 
                </sm:activationSpec>

Thank You.
Sundeep

gnodet wrote:
> 
> I think the way to do that would be to send the quartz message to a
> component
> which would start / stop the file poller using the jmx beans.
> It will be easier and more reusable than enhancing the file poller
> component.
> Unfortunately, this component does not exist yet, so you will have to
> write
> it.
> 
> On 8/11/06, speed <[EMAIL PROTECTED]> wrote:
>>
>>
>> The thing trying to accomplish is start a FilePoller component at a given
>> time.  I am using CronTrigger which works alright, can use SimpleTrigger
>> as
>> well to send a message at 11:00 pm, MON-FRI, to the FilePoller component
>> which then starts and does the required work.
>>
>> Is it possible to achieve that?  Please give some guidelines on what
>> needs
>> to get this done.
>>
>> Thank You.
>>
>> Sundeep
>> --
>> View this message in context:
>> http://www.nabble.com/scheduling-a-component%27s-execution-tf2088238.html#a5755598
>> Sent from the ServiceMix - User forum at Nabble.com.
>>
>>
> 
> 
> -- 
> Cheers,
> Guillaume Nodet
> 
> 

-- 
View this message in context: 
http://www.nabble.com/scheduling-a-component%27s-execution-tf2088238.html#a5768178
Sent from the ServiceMix - User forum at Nabble.com.

Reply via email to