ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » poll a folder from time to time to check for a file

Post new topic  Reply to topic
 poll a folder from time to time to check for a file « View previous topic :: View next topic » 
Author Message
gaurav.udgir
PostPosted: Tue Jul 14, 2009 7:01 am    Post subject: poll a folder from time to time to check for a file Reply with quote

Apprentice

Joined: 18 May 2009
Posts: 32

Hi All,

I have requirement where I need to poll a system folder after every 10 seconds to check for file. If file is not available then need to throw an exception. If any of you have any idea/ solution for achieving this.

Thank you.
Back to top
View user's profile Send private message
jbanoop
PostPosted: Tue Jul 14, 2009 8:43 am    Post subject: Reply with quote

Chevalier

Joined: 17 Sep 2005
Posts: 401
Location: SC

timeout notification node + Java compute node.
Back to top
View user's profile Send private message Yahoo Messenger
WMBDEV1
PostPosted: Wed Jul 15, 2009 2:08 am    Post subject: Reply with quote

Sentinel

Joined: 05 Mar 2009
Posts: 888
Location: UK

jbanoop wrote:
timeout notification node + Java compute node.


Or better still use the fileinput node (although yuo have not stated what version of MB you are at so this may require an upgrade).
Back to top
View user's profile Send private message
jbanoop
PostPosted: Wed Jul 15, 2009 4:59 am    Post subject: Reply with quote

Chevalier

Joined: 17 Sep 2005
Posts: 401
Location: SC

Quote:
Or better still use the fileinput node


Can it throw an exception / trigger the flow if the file is not present ? and as I remember it, FI node does not have an input terminal or am I missing something ?
Back to top
View user's profile Send private message Yahoo Messenger
smdavies99
PostPosted: Wed Jul 15, 2009 5:47 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

You are correct in that the FileInput Node DOES NOT have an Input Terminal so it has to be at the start of a flow.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
WMBDEV1
PostPosted: Wed Jul 15, 2009 6:03 am    Post subject: Reply with quote

Sentinel

Joined: 05 Mar 2009
Posts: 888
Location: UK

Ok maybe throwing the exception on the lack of presence of a file is not doable using FI alone...
jbanoop wrote:

Can it throw an exception / trigger the flow if the file is not present ?


but.......

Quote:

FI node does not have an input terminal or am I missing something ?


it has a polling interval option so it doesnt need an input terminal so yes, you was missing something here.


Last edited by WMBDEV1 on Wed Jul 15, 2009 6:31 am; edited 1 time in total
Back to top
View user's profile Send private message
zpat
PostPosted: Wed Jul 15, 2009 6:11 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

FileInput node can look for files at a given polling interval.

It does not need a timer node to drive it. However it is not a failure if the file is not there, since it might be there next time.

WMB is not a system management tool. It is about messages and data being found, rather than alerting if they are not found.

If you are processing this file in WMB and want to alert when it was not found in a given period, you could code the flow that processes the file to generate an additional message to a queue that another flow, using a timer node checked at intervals to make sure things were OK.

Generally these sort of designs indicate a lack of clarity of the requirements - always aim for elegant, simple solutions.
Back to top
View user's profile Send private message
jbanoop
PostPosted: Wed Jul 15, 2009 7:12 am    Post subject: Reply with quote

Chevalier

Joined: 17 Sep 2005
Posts: 401
Location: SC

Quote:
it has a polling interval option so it doesnt need an input terminal so yes, you was missing something here


when i was refering to inpout terminal i was thinking in terms of "if it had an input terminal , it could be triggered by a timeout notification node and made to check the directory. If the file was not present, you could throw an exception".

I guess I have been around long enough to understand that nodes without input terminals will have mechanism(s) to trigger the flow
Back to top
View user's profile Send private message Yahoo Messenger
bhavyabhandari
PostPosted: Wed Jul 29, 2009 2:11 am    Post subject: Reply with quote

Apprentice

Joined: 09 Nov 2006
Posts: 33

Hi All,

I have requirement where I need to poll a system folder after every 10 seconds to check for file. And I have to move the same to a folder based on its success or failure.
I am working on MB v6.0 .
I have made use of TimeOut Notification - JCN
But the file is not getting pollled.
Back to top
View user's profile Send private message Yahoo Messenger
zpat
PostPosted: Wed Jul 29, 2009 2:26 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

That is not a requirement, that is one possible implementation choice.

Learning to distinguish underlying requirements from possible solutions (which may be unsuitable) is key to getting good designs.

So don't keep on about how to do something that is fundamentally not a good idea, but find a better, more elegant, solution.

Any design that relies on files being there or not every few seconds is fundamentally fragile and unreliable.

Make designs event driven, not timer driven, for anything to do with MQ or WMB.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » poll a folder from time to time to check for a file
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.