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 » Creating a listener in MQ from inside an application

Post new topic  Reply to topic
 Creating a listener in MQ from inside an application « View previous topic :: View next topic » 
Author Message
MichaelBulla
PostPosted: Mon Oct 09, 2006 7:44 am    Post subject: Creating a listener in MQ from inside an application Reply with quote

Apprentice

Joined: 27 Sep 2006
Posts: 31
Location: Hamburg/Germany

Hi,

Im trying to configure MQ from an installer for my application. I use crtmqm to create a queuemanager and strmqm to start it. Now I want to create a listener and a channel.

As long as there is no channel and listener, I cant use PCF. And I didnt find a way to pass the command directly to runmqsc. And I dont want to create a tempfile to use runmqsc < tempfile. Is there a better way to create a listener?

Best regards Michael
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Oct 09, 2006 7:47 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You don't need to use a file to pipe input into runmqsc.

You just need to know how to read and write from the standard in and standard out of the child process.

Or you could make the child process the equivalent of
Code:
echo 'define listener(LISTENER.TCP) trptype(TCP) port(1414)'|runmqsc qmgrname

_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
MichaelBulla
PostPosted: Mon Oct 09, 2006 7:52 am    Post subject: Reply with quote

Apprentice

Joined: 27 Sep 2006
Posts: 31
Location: Hamburg/Germany

Pipe, of course
Thanks

Edit: After first euphoria I see, that using pipes and other special Shell-operators from java-applications is quite tricky, too.

Is there an even better way?
Back to top
View user's profile Send private message
vennela
PostPosted: Mon Oct 09, 2006 9:14 am    Post subject: Reply with quote

Jedi Knight

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

Why are you doing it from a java program anyway?
Back to top
View user's profile Send private message Send e-mail Visit poster's website
MichaelBulla
PostPosted: Mon Oct 09, 2006 11:19 pm    Post subject: Reply with quote

Apprentice

Joined: 27 Sep 2006
Posts: 31
Location: Hamburg/Germany

Im writing an installer for an application that uses MQ. The installer has to do a lot of things dynamically, so a script wont suffice.
Back to top
View user's profile Send private message
Nigelg
PostPosted: Tue Oct 10, 2006 12:39 am    Post subject: Reply with quote

Grand Master

Joined: 02 Aug 2004
Posts: 1046

Since your chosen tool (java) does not support the easy way, why not use another tool that does, like writing the program in C for example?
_________________
MQSeries.net helps those who help themselves..
Back to top
View user's profile Send private message
MichaelBulla
PostPosted: Tue Oct 10, 2006 12:52 am    Post subject: Reply with quote

Apprentice

Joined: 27 Sep 2006
Posts: 31
Location: Hamburg/Germany

Using java is a politically decision.
And the insaller should work os-independent. Thats why using os-operators ist tricky.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Oct 10, 2006 2:12 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

But the act of installation is going to be os-dependent, to a large extent.

So you will have to encode some os-specific information in your code and detect the OS and take different steps based on which OS you're running on.

You could look into using Ant, either externally or from within your java code. It might make this simpler.
_________________
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 » Creating a listener in MQ from inside an application
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.