Author |
Message
|
kun.leeing |
Posted: Tue Oct 28, 2008 6:28 pm Post subject: About Trigger Monitor on Client |
|
|
 Disciple
Joined: 27 Sep 2008 Posts: 171
|
Hi, Experts.
I want to make my own Client Monitor contained in my client App, it run like a deamon process or a app should never shut down and will be triggered to get the msg when msg reach the queue on server.
How can I do it and what materials I should read... |
|
Back to top |
|
 |
atheek |
Posted: Tue Oct 28, 2008 7:00 pm Post subject: |
|
|
 Partisan
Joined: 01 Jun 2006 Posts: 327 Location: Sydney
|
Read Chapter 12 of Clients manula to understand how triggering works in a client environment.
Read Chapter 14 of application programming guide to understand how to develop triggered applications and trigger monitors
Both these docs are available from the Library link at the top center of this page |
|
Back to top |
|
 |
kun.leeing |
Posted: Tue Oct 28, 2008 7:29 pm Post subject: |
|
|
 Disciple
Joined: 27 Sep 2008 Posts: 171
|
Thanks,atheek, I download docs and I will read it patiently.
Could anybody give me a code sample of client in java or anything like that? |
|
Back to top |
|
 |
atheek |
Posted: Tue Oct 28, 2008 8:11 pm Post subject: |
|
|
 Partisan
Joined: 01 Jun 2006 Posts: 327 Location: Sydney
|
kun.leeing wrote: |
I want to make my own Client Monitor contained in my client App |
Why can't you use the client trigger monitor ( runmqtmc) provided by MQ rather than building the trigger monitoring as part of your application
kun.leeing wrote: |
Could anybody give me a code sample of client in java or anything like that? |
The sample code link above has a sample program called JavaTrigger.java which shows how to write a triggered application in java - it shows how to interpret the MQTMC2 structure.
Check using Java guide from Library link to know how to connect in client mode |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Oct 28, 2008 8:50 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Remember also that JMS already implements that kind of behavior through the MessageListener interface...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
PeterPotkay |
Posted: Wed Oct 29, 2008 5:22 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
And if the client app will run on Windows, take a look at the MA7K Support Pack to make the client trigger monitor run as a Windows Service.
If you are coding in .NET, lookie here:
http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/topic/com.ibm.mq.csqzav.doc/monitor.htm
Quote: |
Using the .NET monitor
The .NET Monitor is an application similar to a WebSphere MQ trigger monitor. You can create .NET components which will be instantiated whenever a message is received on a monitored queue, and which will then process that message......
|
_________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
kun.leeing |
Posted: Wed Oct 29, 2008 11:20 pm Post subject: |
|
|
 Disciple
Joined: 27 Sep 2008 Posts: 171
|
Thanks,atheek and fjb_saper. Your reply really light me up.
And thanks, PeterPotkay. Though I must be coding in Java,your reply is helpful.
But I think I should describe further what I want.
Trigger application on client runs once the msg put in certain queue on server.
But the app must be specified in APP PROCESS property of trigger queue and must be created as a new instance of this application.
This is not what I want.
The function of queue monitor is a part of my client application running.
I want it just like a thread or a listener that can be triggered by MQ on server.
When msg come,it will control to retrieve this msg. It is enough.
It should not be created as a instance everytime one msg coming. |
|
Back to top |
|
 |
masteringmq |
Posted: Thu Oct 30, 2008 12:53 am Post subject: |
|
|
Master
Joined: 20 Oct 2008 Posts: 200
|
Code can be given. If you are lucky then you might find a cheerful giver. |
|
Back to top |
|
 |
atheek |
Posted: Thu Oct 30, 2008 1:41 am Post subject: |
|
|
 Partisan
Joined: 01 Jun 2006 Posts: 327 Location: Sydney
|
Ok. what you are looking at is asynchronous delivery of messages to an application which can implemented using jms message listener, as suggested as fjb_saper. If you dont want to use an app server, you can still use a standalone jms app.
Do you have any specific requirements to stick to java api..remember you can't do all what you do in java api using jms |
|
Back to top |
|
 |
|