Author |
Message
|
lordnecron |
Posted: Mon Sep 16, 2002 5:32 am Post subject: trigerring a JAVA remote Process |
|
|
Novice
Joined: 15 Jul 2002 Posts: 12 Location: France, paris
|
Hi,
I'd like to know how I could execute a JAVA process on a remote machine with the trigger Monitor ?
The remote machine could be a Win NT server or a Sun Solaris, and the MQServer is located on a Win NT server or a Sun Solaris too...
In each case, what are the application ID ?
Thank you very much for your attention.
Julien |
|
Back to top |
|
 |
dotjas |
Posted: Mon Sep 16, 2002 10:31 am Post subject: |
|
|
Novice
Joined: 28 Apr 2002 Posts: 14 Location: Madison, WI
|
One technique that I have seen used is,
1. Trigger a Java App on the server that is running MQ
2. Then have that app use HTTP tunneling to start a Servlet residing on another Server (I am assuming you are trying to run a Servlet).
The following link is to a very good ariticle on HTTP tunneling,
http://www-106.ibm.com/developerworks/library/j-tunnel/index.html
This should work with Solaris and definitely works on NT.
If I understand your question regarding the Application Id, it the name of the application you are triggering. _________________ Jim Schuchardt
Principal Consultant
MQ Certified Specialist |
|
Back to top |
|
 |
nimconsult |
Posted: Mon Sep 16, 2002 10:44 pm Post subject: |
|
|
 Master
Joined: 22 May 2002 Posts: 268 Location: NIMCONSULT - Belgium
|
I have never personally used it, but isn't the objective of "runmqtmc" to act as a client trigger monitor?
My interpretation of "runmqtmc" is that it runs as a client trigger monitor on the machine where the triggered application should run.
Anybody knows about this "runmqtmc"? _________________ Nicolas Maréchal
Senior Architect - Partner
NIMCONSULT Software Architecture Services (Belgium)
http://www.nimconsult.be |
|
Back to top |
|
 |
murugana |
Posted: Tue Sep 17, 2002 1:27 am Post subject: |
|
|
Newbie
Joined: 17 Jul 2001 Posts: 6 Location: singapore
|
hi ,
IN MQ TERMINOLOGY , trigger monitors trigers a process . the process could a program or shell script or NT script or exe that is local .to invoke a java program on a remote machine u should definitely have a wrapper program . this wrapper program gets triggered by the trigger monitor and the wrapper program executes the java program on remote machine. this sounds like a very typical of executing a program on a remote machine.yes it is.
as far as i know u cant achieve this directly .
let me know abt your environment
do u have an mqseries server on the remote machine where the java program is ?
do u have any appserver on the remote machine where the java program resides .
is the requirement is such that its absolutelyn necessary to call a program on the remote machine from mqseries or to just invoke a java program on the remote machine thru other means too ? |
|
Back to top |
|
 |
lordnecron |
Posted: Tue Sep 17, 2002 1:44 am Post subject: |
|
|
Novice
Joined: 15 Jul 2002 Posts: 12 Location: France, paris
|
Hi,
Thanks to all for your replies.
To answer your questions :
I don't have an MQserver on the remote machine.
but...
I've got a Weblogic 6.1 server on the remote machine... I could run a servlet...
My JAVA program must be called each time there's a first message on my queue.
It must retrieve the message, analyse it, and update an Oracle DataBase.
Now questions :
- Is tunelling the only solution to call a JAVA remote Program/Servlet ?
- I decided to abandon the use of MDB, I couldn't implement the listening of my remote MQSeries queue ... is that so difficult or I am stupid ?
Thanks again to all.
Julien |
|
Back to top |
|
 |
PeterPotkay |
Posted: Tue Sep 17, 2002 6:19 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
Nicolas, you are correct about the Client Trigger monitor. We use it here. We have VB apps that run on a server (Server1) that has only MQClient installed. These VB apps need to be triggered. So we have the Client trigger monitor running on Server1, monitoring the init queue on the queue manager on the other server (Server2).
A trigger monitor can only start an app that is running locally on the same machine that the trigger monitor is running on, so client apps need the client trigger monitor.
We use support pac MA7K, which allows the client triger monitor to run as a Windows service. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
murugana |
Posted: Tue Sep 17, 2002 6:56 pm Post subject: |
|
|
Newbie
Joined: 17 Jul 2001 Posts: 6 Location: singapore
|
hi lord ,
since u r telling that u r using weblogic and u have abonded the usage of mdbs as they could not listen to remote queues . i can suggest the foll way
1.Kindly note that u cant listen to a remote queue where by your mdbs wil fail
2. tunneling is not best of all solutions
3. what do u mean by the foll
I couldn't implement the listening of my remote MQSeries queue ?
shall i assume that you have DISTRIBUTED QUEUEING ENVIRONMENT(DQE) setup where by you have mqservers inter communication thru remote queue definition
1if that is so do u have a mqserver local to the environment where weblogic 6.1 is running .
if so then you can have a local queue in mqseries server and you can have an mdb in weblogic 6.1 listening to it ?
On the arrival of a message in the queue , the mdb gets triggered and calls the java program ?
this is pretty scalable solution and a standard J2EE solutions
i have implmented this and it works fine even in transacted scenarios ?
2.if u dont have a local mqseries server and if i assume that you have a remote mqserver and you have weblogic 6.1 on another machine but both are reachable in the network then
you can think of going for mqseries jms solution .define a jms queue to a local queue defined for receiving the messages in the mqseries server
then have a java program that implements the weblogic scheduled , triggered services which wakes up at regular intervals to check for the arrival of the messages if a message arrrives , then call the java program
let me know if you have any problems ?
cheers |
|
Back to top |
|
 |
nimconsult |
Posted: Tue Sep 17, 2002 10:02 pm Post subject: |
|
|
 Master
Joined: 22 May 2002 Posts: 268 Location: NIMCONSULT - Belgium
|
Thank you Peter for the information about client trigger monitors. _________________ Nicolas Maréchal
Senior Architect - Partner
NIMCONSULT Software Architecture Services (Belgium)
http://www.nimconsult.be |
|
Back to top |
|
 |
lordnecron |
Posted: Wed Sep 18, 2002 1:50 am Post subject: I 've found a solution |
|
|
Novice
Joined: 15 Jul 2002 Posts: 12 Location: France, paris
|
Hi all,
Finally I use the client trigger monitor "runmqtmc"
I don't know why I couldn't use it before, it didn't work.
Now, it's working fine and it calls my JAVA program each time a first message is put on my remote queue.
My program get the messages, will call my local servlets and will use my EJBs on the local Weblogic Server.
Is there any solution to call directly my servlet from the client trigger monitor (via the process which is triggered ?)
P.S : I'm sorry for my english... it's very difficult... |
|
Back to top |
|
 |
|