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 » IBM MQ Installation/Configuration Support » triggers how to config. for invoking java Class MQ 5.3 /NT

Post new topic  Reply to topic
 triggers how to config. for invoking java Class MQ 5.3 /NT « View previous topic :: View next topic » 
Author Message
geniemani
PostPosted: Thu May 08, 2003 2:30 am    Post subject: triggers how to config. for invoking java Class MQ 5.3 /NT Reply with quote

Newbie

Joined: 05 May 2003
Posts: 8

hi ,
i checked out the app prog guide for triggers.... but did not get much out of it.... basically i want to invoke a java program sayit might be in C:\getmsg\getmsg.class when a message comes to the queue
i am using MQseries 5.3 NT
I have :
*) created a queue and enabled the trigger to ON
need to know what to enter in trig data/queue name/process name ?

*) created a trig monitor and started it ...

where do i tell MQ about the app to be invoked and how??

thnx in advance
_________________
visit http://www.geniemani.com
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
oz1ccg
PostPosted: Thu May 08, 2003 3:04 am    Post subject: Reply with quote

Yatiri

Joined: 10 Feb 2002
Posts: 628
Location: Denmark

First I would create a .BAT file(RUNJV.BAT) containg your command: "start java.. C:\getmsg\getmsg.class .."
When issuing "start java..." the trigger monitor will be release, so it's able to handle other events.

Second create the process definition, and in APPLICID() specify the commad from above RUNJV.BAT

Then place the process definition on the QLOCAL, and check the INITQ parm...

I'll update one of my published samples to contain a triggering setup.

Just my $0.02
_________________
Regards, Jørgen
Home of BlockIP2, the last free MQ Security exit ver. 3.00
Cert. on WMQ, WBIMB, SWIFT.
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
geniemani
PostPosted: Thu May 08, 2003 5:33 am    Post subject: triggers APPLCID prob Reply with quote

Newbie

Joined: 05 May 2003
Posts: 8

thnx for u r reply oz1ccg
in RUNJV.bat i have now
cd c:\downloads\webservices\MQsample
java mqbrowse GenieQueue

which i want to run when there is a message in the Queue

now i created a new Process Definition and
in the application IDentifier i gave
C:\runjv.bat IS THIS CORRECT??

i then set this process def. in the queue properties ( PROCESS NAME )


since i tried by putting a msg in the queue which should have triggered off this Runjv.bat ..

but

am i missing something.... i have just started off with MQ so forgive my
ignorance .
_________________
visit http://www.geniemani.com
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
vennela
PostPosted: Thu May 08, 2003 7:59 am    Post subject: Reply with quote

Jedi Knight

Joined: 11 Aug 2002
Posts: 4055
Location: Hyderabad, India

Quote:
i then set this process def. in the queue properties ( PROCESS NAME )


You also need to set the INITQ name in the queue definition. You can use SYSTEM.DEFAULT.INITIATION.QUEUE. You have to turn the trigger on (on the queue properties again).

Then you have to run the trigger monitor. For this on the windows command line use
runmqtrm -m QMGRNAME -q INITQ
Back to top
View user's profile Send private message Send e-mail Visit poster's website
jefflowrey
PostPosted: Thu May 08, 2003 8:03 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Your process definition looks correct, and you put it in the right property of the queue. You might want to double check that it is of Application Type 'Windows NT', but it probably is.

You also have to do the following:
On the queue properties, set
TriggerType = first (MQTT_FIRST)
TriggerControl = on (MQTC_ON)
InitiationQName = <some local queue>

You say you have started a trigger monitor running. Is it configured to listen to whatever queue you named in InitationQName?
Back to top
View user's profile Send private message
oz1ccg
PostPosted: Thu May 08, 2003 2:49 pm    Post subject: Reply with quote

Yatiri

Joined: 10 Feb 2002
Posts: 628
Location: Denmark

Another thing to do while testing, is when using TRIGTYPE=FIRST, and the qdepth is greater that 0, MQ wount generate a trigger... You could change TRIGGER interval on the queue manager to a reasonable value eg. 60000 (1 minute).

Another trick could be using TRIGTYPE=EVERY, but not in production !!

Third check to see if your initiation is opened for input (using explore).

This is just a couble of things to help get it up and run.

Just my $0.02
_________________
Regards, Jørgen
Home of BlockIP2, the last free MQ Security exit ver. 3.00
Cert. on WMQ, WBIMB, SWIFT.
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
geniemani
PostPosted: Fri May 09, 2003 1:58 am    Post subject: MQseries Trigger trouble !!! :-( Reply with quote

Newbie

Joined: 05 May 2003
Posts: 8

I have created Qmanager named : QMxyz
In this QMxyz i have created a queue: named genieQueue
In MQseries Explorer
=====================
I have created a process definition
Name = GeniePrcDef
Type = Windows NT
Application ID= C:\RUNJV.bat
Env Data = ( Blank )
User Data = = ( Blank )

I have set trigger control = ON
type = Every ( just for Dev )
trigger Depth = 1
proirity = 0
trigger data = ( blank )
initiation qu name = INITIATION.QUEUE
Process Name = GeniePrcDef ( defined above )

i had also created a file named RUNJV.bat in C:\
in runjv.bat i have given a statement
Net send "My machine ip " "message for me "
when i run this bat file it runs properly ( Making sure)

IN MQseries services interface
=============================
I have also set the trigger monitor running

the Queue INITIATION.QUEUE is mentioned above,
and that is also existing , is there i need to set something in that queue too????

i am not able to trigger that batch file RUNJV.bat

i go to GenieQueue right click and then put message it does not trigger the batch file ?????

This INITIATION.QUEUE which is existing do i need to configure it or Something ????

Where does the message go since when i start the trigger monitor ,
and then in explorer i double click the GenieQueue i dont see the message
and when i stop the trig mon. then i am able to see the next message that i insert. i checked the initiation.queue also in MQexplorer it is not there too ???
_________________
visit http://www.geniemani.com
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
oz1ccg
PostPosted: Fri May 09, 2003 5:26 am    Post subject: Reply with quote

Yatiri

Joined: 10 Feb 2002
Posts: 628
Location: Denmark

Have you got anything interesting in the eventviewer ?

let us hear about IPPROCS on INITIATION.QUEUE :

Code:
runmqsc QMxyz
DIS QL(INITIATION.QUEUE) ALL
end


IPPROCS should contain IPPROCS(1), which means that the triggermonitor have the queue opened.

Just my $0.02
_________________
Regards, Jørgen
Home of BlockIP2, the last free MQ Security exit ver. 3.00
Cert. on WMQ, WBIMB, SWIFT.
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
vennela
PostPosted: Fri May 09, 2003 7:41 am    Post subject: Reply with quote

Jedi Knight

Joined: 11 Aug 2002
Posts: 4055
Location: Hyderabad, India

geniemani:

I doubt one thing in your setup and you can verify it real quick.

Instead of starting the trigger monitor from the MQSeries Services run it on the command line

runmqtrm -m QMxyz -q INITIATION.QUEUE

It will start the trigger monitor and say it is waiting for messages.

Now, if you PUT a message to the genieQueue then the application should be triggered.

It would also help if you post the definitions of the objects

runmqsc QMxyz

dis ql(genieQueue) all
dis process(GeniePrcDef ) all
dis q(INITIATION.QUEUE ) all

end

-------
Venny
Back to top
View user's profile Send private message Send e-mail Visit poster's website
oz1ccg
PostPosted: Fri May 09, 2003 8:19 am    Post subject: Reply with quote

Yatiri

Joined: 10 Feb 2002
Posts: 628
Location: Denmark

I've just updated my website with a small triggering sample (and it works for me..)

http://d1o110.dk.telia.net/~u149101068/index.htm?triggering.htm

This sample contains a script for creating a small Queue Manager with two queues, a process and a BAT-file to send a message and drain the queue. The definitions are working together, and is quite simple.

I'll extend the page with some of the CICS triggering stuff too.....

Just my $0.02
_________________
Regards, Jørgen
Home of BlockIP2, the last free MQ Security exit ver. 3.00
Cert. on WMQ, WBIMB, SWIFT.
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
offshore
PostPosted: Fri May 16, 2003 6:33 am    Post subject: Reply with quote

Master

Joined: 20 Jun 2002
Posts: 222

Sort OT,

why would you know want to set trigger = every in production?

What is the drawback? - All I can possibly think of is a process/transaction could run wild if wasn't working correctly.

I'm interested in anyones views
Back to top
View user's profile Send private message Send e-mail
oz1ccg
PostPosted: Mon May 19, 2003 12:24 am    Post subject: Reply with quote

Yatiri

Joined: 10 Feb 2002
Posts: 628
Location: Denmark

Let's think of this scenario:

you receive 1000 messages under same UOW, generating 1000 trigger messages, which will spawn 1000 processes.... running in parallel

What would happen to your systems performance, and the other applications running on your server, they will all do an additional MQGET with RC=2033 ?
They would probberly be very slow too... and give a poor system performance too.

Another drawback of the TRIGTYPE=EVERY is your application SHALL still read to end of queue, and not just pick one message... If it just pick one message, some messages might stay for a long time in the queue, due to the design of TRIGTYPE=EVERY. I've seen this design... and messages can sleep for a long time, I created a shell to put arround this application type so we could let the application tink it was TRIGTYPE=EVERY, but technical it's a TRIGTYPE=FIRST. And now it works all messages gets processed

My persoanl two loved TRIGTYPE is NONE and FIRST, that's it.

Just my $0.02
_________________
Regards, Jørgen
Home of BlockIP2, the last free MQ Security exit ver. 3.00
Cert. on WMQ, WBIMB, SWIFT.
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
bduncan
PostPosted: Mon May 19, 2003 10:04 am    Post subject: Reply with quote

Padawan

Joined: 11 Apr 2001
Posts: 1554
Location: Silicon Valley

I've never seen a situation where trigger type EVERY was required. There was always some way to alter the applications/architecture to work with trigger type first, which is much less error prone in my opinion...
_________________
Brandon Duncan
IBM Certified MQSeries Specialist
MQSeries.net forum moderator
Back to top
View user's profile Send private message Visit poster's website AIM Address
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Installation/Configuration Support » triggers how to config. for invoking java Class MQ 5.3 /NT
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.