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 » WMB Code - to poll the UNIX directories after every 2 second

Post new topic  Reply to topic
 WMB Code - to poll the UNIX directories after every 2 second « View previous topic :: View next topic » 
Author Message
santy
PostPosted: Fri Jun 26, 2009 11:36 am    Post subject: WMB Code - to poll the UNIX directories after every 2 second Reply with quote

Centurion

Joined: 03 Nov 2006
Posts: 141

Hi,

Can it be possible to write a WMB (in 6.0) code which will constantly poll the UNIX directories for the nunber of files in it ?

I managed to write the code in Java Compute Node for this, but when I plays the messages, it goes in infinte loop.

So is this possible at all to write such code ?

Need guidance.

Thanks.
Back to top
View user's profile Send private message
zpat
PostPosted: Fri Jun 26, 2009 11:50 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

Don't write IBM's code, upgrade to 6.1 and use FileInput.

If you must code Java - use a suitable function that will monitor for files for you and start the flow on arrival. In fact there was an example of a custom input node that did this way back in a 2001 redbook. SG24-6509-00
Back to top
View user's profile Send private message
santy
PostPosted: Fri Jun 26, 2009 12:40 pm    Post subject: Reply with quote

Centurion

Joined: 03 Nov 2006
Posts: 141

The flow is running always in WMB.

I want to make sure that my java code write file to UNIX dir only when the number of files in the dir is 1.

I have written the code for that also, but worried that how can we constantly monitor the UNIX directory through WMB Java code..

I think for that the message flow thread is continuasly running, beacuase I'm getting below exception.

BIP2242E: Message flow 'TESTMSGFLOW' could not be reconfigured because it remained busy for longer than the timeout period of '300000'

A request to reconfigure the message flow 'TESTMSGFLOW' was received but this could not be processed because it remained busy processing a message for longer than the timeout specified.

This can be caused by the timeout being too short considering the complexity of the flow and the size of the messages being processed. In such cases the timeout should be increased. It can also be caused by message flows containing infinite loops. In such cases the SQL should be corrected.
Back to top
View user's profile Send private message
broker_new
PostPosted: Fri Jun 26, 2009 12:52 pm    Post subject: Reply with quote

Yatiri

Joined: 30 Nov 2006
Posts: 614
Location: Washington DC

The message flow should be like this

TimeOutNotificationNode>>>JCN>>>...

Configure the TimeOutNotificationNode to invoke the flow for every two seconds and in place your logic in JCN
_________________
IBM ->Let's build a smarter planet
Back to top
View user's profile Send private message
Vitor
PostPosted: Sat Jun 27, 2009 3:00 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

santy wrote:
I want to make sure that my java code write file to UNIX dir only when the number of files in the dir is 1.


Why Java? Why not FileOutput (assuming an upgrade)?

And why only one file? What's the requirement here?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
broker_new
PostPosted: Mon Jun 29, 2009 7:19 am    Post subject: Reply with quote

Yatiri

Joined: 30 Nov 2006
Posts: 614
Location: Washington DC

As santy is still at WMB6.0..he can't use FileOutput.

santy have you found a way to do it...even i had a similar requirement long time back and designed using the TimeOutNotificationNode
_________________
IBM ->Let's build a smarter planet
Back to top
View user's profile Send private message
santy
PostPosted: Mon Jun 29, 2009 8:52 am    Post subject: Reply with quote

Centurion

Joined: 03 Nov 2006
Posts: 141

Hi broker_new and Vitor,

This problem is solved, I have manipulated the java code itself in such a way that it waits for 2 seconds brore writing the file to UNIX directory.

Thanks.
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 » WMB Code - to poll the UNIX directories after every 2 second
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.