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 » WBIMB Clarification

Post new topic  Reply to topic Goto page 1, 2  Next
 WBIMB Clarification « View previous topic :: View next topic » 
Author Message
sambati
PostPosted: Wed Sep 09, 2009 1:25 am    Post subject: WBIMB Clarification Reply with quote

Novice

Joined: 14 Nov 2006
Posts: 19

Hi,

This is ambati, I need a clarification on MB.

I have one requirement. i.e My message flow is keep on appending a file in a physical location. Cron job will take this physical file at a certain time.

If that cron job is looking for taking that file at mentioned time, at the same time if our flow also appending the message in the same file. Will that file corrept or our broker transaction will keep that till broker transaction finishes.

Can any one help on this please.
Back to top
View user's profile Send private message Send e-mail
WMBDEV1
PostPosted: Wed Sep 09, 2009 1:44 am    Post subject: Re: WBIMB Clarification Reply with quote

Sentinel

Joined: 05 Mar 2009
Posts: 888
Location: UK

sambati wrote:

Cron job will take this physical file at a certain time.

Explain "take". Do you mean copy or move?

If it tries to move it I suspect it will fail.

If it tries to copy it, I suspect it will copy whatever the file looks like at that point in time, which will probably lead to the copy being corrupted.
Back to top
View user's profile Send private message
Monk
PostPosted: Wed Sep 09, 2009 3:13 am    Post subject: Reply with quote

Master

Joined: 21 Apr 2007
Posts: 282

Quote:
If that cron job is looking for taking that file at mentioned time, at the same time if our flow also appending the message in the same file. Will that file corrept


Well , in this case ,its quite difficult to say what will happen.

and btw why would you want to read and write to file from two process at the same time, the results in such cases are always unpredictable.
_________________
Thimk
Back to top
View user's profile Send private message
sambati
PostPosted: Wed Sep 09, 2009 5:00 am    Post subject: If that cron job is looking for taking that file at mentione Reply with quote

Novice

Joined: 14 Nov 2006
Posts: 19

Hi WMBDEV1 and Monk,

Thanks for your reply.

My message flow is continously append the records in a file. Cron job has to pickup(Remove in current location) that file and has to place in a remote location at specified time ex: 10:00AM. My problem is, when our transaction is appending records, if that cron job has started at 10:00am. will it corrept that file?

I thought transaction will hold till MB finishes its work.

Could you suggest me please?
Back to top
View user's profile Send private message Send e-mail
Vitor
PostPosted: Wed Sep 09, 2009 5:05 am    Post subject: Re: If that cron job is looking for taking that file at ment Reply with quote

Grand High Poobah

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

sambati wrote:
I thought transaction will hold till MB finishes its work.


What transaction? Files on most OS are not transactional.

sambati wrote:
Could you suggest me please?


Redesign.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
sambati
PostPosted: Wed Sep 09, 2009 8:51 pm    Post subject: when our transaction is appending records Reply with quote

Novice

Joined: 14 Nov 2006
Posts: 19

Hi,

Thanks for your reply


I mean to say our flow is appending the records into file, if that cron job invokes. Will our flow will corrupt?
Back to top
View user's profile Send private message Send e-mail
WMBDEV1
PostPosted: Thu Sep 10, 2009 12:27 am    Post subject: Re: when our transaction is appending records Reply with quote

Sentinel

Joined: 05 Mar 2009
Posts: 888
Location: UK

sambati wrote:
Hi,

Thanks for your reply


I mean to say our flow is appending the records into file, if that cron job invokes. Will our flow will corrupt?


From my previous comment, I suspect it will fail in the case where the file is attempted to be moved.

What happens when you try it?
Back to top
View user's profile Send private message
sirsi
PostPosted: Thu Sep 10, 2009 1:58 am    Post subject: Reply with quote

Disciple

Joined: 11 Mar 2005
Posts: 177

which OS is this? AIX?
Back to top
View user's profile Send private message
sambati
PostPosted: Thu Sep 10, 2009 3:13 am    Post subject: Reply with quote

Novice

Joined: 14 Nov 2006
Posts: 19

Yes this is on AIX
Back to top
View user's profile Send private message Send e-mail
sirsi
PostPosted: Thu Sep 10, 2009 4:28 am    Post subject: Reply with quote

Disciple

Joined: 11 Mar 2005
Posts: 177

its better if u check in ur cron script if file is being used before moving it... OR tell broker to wait for few minutes when clock ticks 10AM(u can do this by calling a simple java program)...
Back to top
View user's profile Send private message
sambati
PostPosted: Thu Sep 10, 2009 8:09 pm    Post subject: Reply with quote

Novice

Joined: 14 Nov 2006
Posts: 19

Thanks for your reply,

if you have Please provide me java code to stop broker for some time at 10AM.
Back to top
View user's profile Send private message Send e-mail
WMBDEV1
PostPosted: Fri Sep 11, 2009 1:05 am    Post subject: Reply with quote

Sentinel

Joined: 05 Mar 2009
Posts: 888
Location: UK

sambati wrote:
Thanks for your reply,

if you have Please provide me java code to stop broker for some time at 10AM.


OMG, whats happened to this thread? How did it come to this?

Cant you have a solution where the broker inserts to a file for a period of time (say a day) and then starts a new file. The job to pick this file up can then run say an hour after the broker is meant to have finished its work and all should be well.
Back to top
View user's profile Send private message
sirsi
PostPosted: Sat Sep 12, 2009 12:08 am    Post subject: Reply with quote

Disciple

Joined: 11 Mar 2005
Posts: 177

WMBDEV:
if sambati could use different file names he wouldnt have started the thread I believe

sambati:
a simple java program using sleep() function will do the work for you...just call this java program from broker flow, it will delay the execution of flow for 5min and then flow continues execution as usual...
Back to top
View user's profile Send private message
harish_td
PostPosted: Sat Sep 12, 2009 1:13 am    Post subject: Reply with quote

Master

Joined: 13 Feb 2006
Posts: 236

sirsi wrote:
sambati:
a simple java program using sleep() function will do the work for you...just call this java program from broker flow, it will delay the execution of flow for 5min and then flow continues execution as usual...


Do this at your own risk....The concept of passing control to a Java Compute which does sleep() seems like overkill.
Dynamic file names and a modified cron job which only picks the previous hour's file(s) is the way to go. Happy Broker, Happy Cron, Happy Support teams.
Back to top
View user's profile Send private message Yahoo Messenger
WMBDEV1
PostPosted: Sat Sep 12, 2009 5:15 am    Post subject: Reply with quote

Sentinel

Joined: 05 Mar 2009
Posts: 888
Location: UK

sirsi wrote:

if sambati could use different file names he wouldnt have started the thread I believe


Why would this be the case? Assume nothing.

If he needs the file to be called something specific then just rename it as part of the scheduled process that collects the file!

The process as suggested seems really messy to me; that was all
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » WBIMB Clarification
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.