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 » SVRCONN channels to be manually started!

Post new topic  Reply to topic
 SVRCONN channels to be manually started! « View previous topic :: View next topic » 
Author Message
gigya74
PostPosted: Mon Jul 10, 2006 9:56 pm    Post subject: SVRCONN channels to be manually started! Reply with quote

Newbie

Joined: 03 Oct 2005
Posts: 6

Hi,
I have written a small pgm to put and get messages. This uses SVRCONN channel. My problem is i have to start the channel before putting a message to the queue. This happens if i try to put a message after a long period of inactivity. Sending you the java code i use to put messages.
The object names are read from a property file.
Please send me any solutions. Can i start the channel programatically before putting the message-if yes what is the syntax.

thanks n regards
venkatB
-------------------------------------------------------------------------------------
private void sendMessage(String message) throws MQException, IOException {

// Set up connection to the MQ Server
MQEnvironment.hostname = props.getProperty("send.queue.host");
MQEnvironment.port = Integer.parseInt(props.getProperty("send.queue.port"));
MQEnvironment.channel = props.getProperty("send.queue.channel");
MQEnvironment.properties.put(MQC.TRANSPORT_PROPERTY, MQC.TRANSPORT_MQSERIES);

openOptions = MQC.MQOO_INPUT_AS_Q_DEF + MQC.MQOO_OUTPUT;
reqQueueManager = new MQQueueManager(props.getProperty("send.queue.mgr"));
reqQueue = reqQueueManager.accessQueue(props.getProperty("send.queue"), openOptions, null, null, null);

// Prepare message
MQMessage msg = new MQMessage();
msg.writeString(message);
msg.format = MQC.MQFMT_STRING;

// Prepare message writing options
MQPutMessageOptions pmo = new MQPutMessageOptions();

// Write a message to the queue
reqQueue.put(msg, pmo);

// Commit the Queue manager
reqQueueManager.commit();
reqQueue.close();
reqQueueManager.disconnect();

System.out.println("Message \"" + message + " \"sent successfully at " + System.currentTimeMillis());
}
Back to top
View user's profile Send private message Send e-mail
Vitor
PostPosted: Mon Jul 10, 2006 11:26 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

SVRCONN channels should start automatically on programme connection. What reason code are you getting?

Also please supply MQ version & some platform details
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
gigya74
PostPosted: Tue Jul 11, 2006 10:12 pm    Post subject: MQ parameters Reply with quote

Newbie

Joined: 03 Oct 2005
Posts: 6

MQ version 5.3 running in solaris.
At times it says javax.jms.JMSException: MQJMS2005: failed to create MQQueueManager for '172.27.167.150:MATRIX.QM'
Some times while putting multiple messages onto the queue(a batch operation sort), randomly a mqji not found error appears and fails to put further messages. When the mqji message appears i have to restart the qmgr itself!

The channel properties are listed below:

AMQ8414: Display Channel details.
CHANNEL(UP9.CHL) CHLTYPE(SVRCONN)
TRPTYPE(TCP) DESCR( )
SCYEXIT( ) MAXMSGL(4194304)
SCYDATA( ) HBINT(300)
SSLCIPH( ) SSLCAUTH(REQUIRED)
KAINT(AUTO) MCAUSER( )
ALTDATE(2006-04-2 ALTTIME(10.06.3
SSLPEER()
SENDEXIT( )
RCVEXIT( )
SENDDATA( )
RCVDATA( )
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » SVRCONN channels to be manually started!
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.