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 » General IBM MQ Support » To avoid opening multiple windows while triggering

Post new topic  Reply to topic
 To avoid opening multiple windows while triggering « View previous topic :: View next topic » 
Author Message
rvikky
PostPosted: Fri May 12, 2006 3:33 am    Post subject: To avoid opening multiple windows while triggering Reply with quote

Apprentice

Joined: 14 Feb 2006
Posts: 32
Location: Bangalore

I'm using triggering for every message which comes to the queue. The trigger will call a batch file which runs a jsp file in IE.
I'm using windows.

Every time a new message comes, it runs the jsp file in a new IE window. I want to restrict it to single window. is there a way to do it?
Back to top
View user's profile Send private message
kevinf2349
PostPosted: Fri May 12, 2006 5:21 am    Post subject: Reply with quote

Grand Master

Joined: 28 Feb 2003
Posts: 1311
Location: USA

Quote:
I'm using triggering for every message which comes to the queue


Why? I have yet to hear a really good reason for doing this so I am extremely interested in understanding why someone would need to trigger on every.

Quote:
I want to restrict it to single window. is there a way to do it?


Yes...trigger on first!
Back to top
View user's profile Send private message
n1ghtrain
PostPosted: Sun May 14, 2006 8:10 pm    Post subject: Reply with quote

Apprentice

Joined: 23 Mar 2006
Posts: 48
Location: Bangalore

In any case ,(imo) rvikky's query is how to avoid opening new browser windows on subsequent triggers .. A way to run 'em in the same window ..
Back to top
View user's profile Send private message Yahoo Messenger
n1ghtrain
PostPosted: Sun May 14, 2006 8:24 pm    Post subject: Reply with quote

Apprentice

Joined: 23 Mar 2006
Posts: 48
Location: Bangalore

Quote:

I have yet to hear a really good reason for doing this so I am extremely interested in understanding why someone would need to trigger on every

A low-volume queue that was going to be serviced by a single ECB and you didn't want to start up a new process every time a message arrived...
Back to top
View user's profile Send private message Yahoo Messenger
elvis_gn
PostPosted: Sun May 14, 2006 8:36 pm    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi,

n1ghtrain wrote:
rvikky's query is how to avoid opening new browser windows on subsequent triggers .. A way to run 'em in the same window ..

Use trigger on first and get all the messages in the same window.

n1ghtrain wrote:
you didn't want to start up a new process every time a message arrived...

It is just for this reason that you would want to have the trigger on First and use the application to fetch all the messages on queue currently...
Back to top
View user's profile Send private message Send e-mail
kevinf2349
PostPosted: Mon May 15, 2006 5:02 am    Post subject: Reply with quote

Grand Master

Joined: 28 Feb 2003
Posts: 1311
Location: USA

Quote:
In any case ,(imo) rvikky's query is how to avoid opening new browser windows on subsequent triggers .. A way to run 'em in the same window ..


Whilst my reply didn't address the question directly, it was supposed to make him actually think about the the design of the application.

What did your post do to help him?

I still have yet to find a reason to trigger on every. Laziness or bad design is not a good reason to do this.

Quote:
A low-volume queue that was going to be serviced by a single ECB and you didn't want to start up a new process every time a message arrived...


OK...trigger on first and then wait indefinately if you want to avoid the 'start up' over head. Either that or trigger on first and end when you get a 2033. The next time a message arrives the application restarts.
Back to top
View user's profile Send private message
PeterPotkay
PostPosted: Mon May 15, 2006 2:39 pm    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7722

kevinf2349 wrote:

I still have yet to find a reason to trigger on every. Laziness or bad design is not a good reason to do this.


How about an app that takes a few minutes to process a message. You want it triggered. But messages arrive more frequently sometimes and you don't want them waiting in the queue if the app is working on a previous one. So you trigger on Every to get multiple long running processes servicing the queue when needed?
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon May 15, 2006 3:10 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

So you trigger on Every to get multiple long running processes servicing the queue when needed?

Ummm...

I think this would not work. Trigger on every is going to trigger on almost every message. So there's no way for it to tell that message 5, for example, is okay to trigger on because the rest of the messages are going to be processed in a timely manner by the one already started instance of the program.

I think you would have to write a fairly complicated traffic cop pattern that would essentially post the trigger events into an internal data structure from each trigger-on-every event, and then determine when a new instance of the program should be started or not.

So, really, you're better off writing your own trigger monitor that handles this kind of workload balancing.

Plus, you can take a few simple steps to ensure that someone doesn't manually create an MQTRM2 that does, for example "del *.*".
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
PeterPotkay
PostPosted: Mon May 15, 2006 3:43 pm    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7722

jefflowrey wrote:
So you trigger on Every to get multiple long running processes servicing the queue when needed?

Ummm...

I think this would not work. Trigger on every is going to trigger on almost every message. So there's no way for it to tell that message 5, for example, is okay to trigger on because the rest of the messages are going to be processed in a timely manner by the one already started instance of the program.

Because each mesage will most likely take a long time to process, you assume every one will, and so set to trigger the every so that every time a message lands on the queue, a trigger message is generated. The code is written to read until 2033, even though 99.99999% of the time when the app finished with the first message it was working on, it will find an empty queue because other instances have bene triggered to handle other messages. The app goes until 2033 to circumvent the problem that occasionally you'll find messages on the triggered every queue, and as new messages arrive, you only get triggers for the newly arriving messsages, not any existing ones.
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon May 15, 2006 6:20 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Okay, that's not what I thought you meant. I thought you meant something like "start the program only once, but if there are a whole bunch of trigger messages in a short time, then start the program again".
_________________
I am *not* the model of the modern major general.
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 » General IBM MQ Support » To avoid opening multiple windows while triggering
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.