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 » Search

 Search found 44 matches
Author Message
  Topic: mq with java,multithread application,can't putMsg
andy840920

Replies: 9
Views: 7410

PostForum: IBM MQ Java / JMS   Posted: Wed Aug 26, 2009 8:32 am   Subject: mq with java,multithread application,can't putMsg
No you don't have to close the queue, multiple threads can access the same queue at the same time.

Your design is simply wrong. MQ is async anyway - you don't need to create additional threads for ...
  Topic: mq with java,multithread application,can't putMsg
andy840920

Replies: 9
Views: 7410

PostForum: IBM MQ Java / JMS   Posted: Wed Aug 26, 2009 7:22 am   Subject: mq with java,multithread application,can't putMsg
so if my program like this:

Qmgr putQmgr = new Qmgr();
Qmgr getQmgr = new Qmgr();
public static PutQueue putQueue = putQmgr.createPutQueue();
public static GetQueue getQu ...
  Topic: mq with java,multithread application,can't putMsg
andy840920

Replies: 9
Views: 7410

PostForum: IBM MQ Java / JMS   Posted: Wed Aug 26, 2009 7:11 am   Subject: mq with java,multithread application,can't putMsg
No you don't have to close the queue, multiple threads can access the same queue at the same time.

Your design is simply wrong. MQ is async anyway - you don't need to create additional threads for ...
  Topic: mq with java,multithread application,can't putMsg
andy840920

Replies: 9
Views: 7410

PostForum: IBM MQ Java / JMS   Posted: Wed Aug 26, 2009 6:52 am   Subject: mq with java,multithread application,can't putMsg
every thread need one queue handle?

so i must close queue after put or get msg, and open in the new thread to put or get? i think that is not efficient. so all thread use two queue handle to get or ...
  Topic: mq with java,multithread application,can't putMsg
andy840920

Replies: 9
Views: 7410

PostForum: IBM MQ Java / JMS   Posted: Wed Aug 26, 2009 6:48 am   Subject: mq with java,multithread application,can't putMsg
Unless you use handle sharing, each thread needs it's own queue manager and queue handle.

Since MQ is asynchronous anyway - there is no reason to do this, just issue the put in the same thread.how ...
  Topic: mq with java,multithread application,can't putMsg
andy840920

Replies: 9
Views: 7410

PostForum: IBM MQ Java / JMS   Posted: Wed Aug 26, 2009 5:57 am   Subject: mq with java,multithread application,can't putMsg
my application like this:

while (true) {
String msg = getQueue.getMsg();
BusinessClass obj = new BusinessClass(msg); //extends Thread
obj.start() ...
  Topic: when MQGET block, how to MQCLOSE and MQDISC?failed with 2219
andy840920

Replies: 14
Views: 14125

PostForum: IBM MQ API Support   Posted: Mon Nov 12, 2007 7:42 am   Subject: when MQGET block, how to MQCLOSE and MQDISC?failed with 2219
i'm so sorry to ask how to alter queue to inhibited? i find alter qmgr inhibitved enabled only.so...no alter queue.

and "Use the MQMD Feedback code of QUIT", can you show some sample code ...
  Topic: MQPUT1 get 2009 reson code
andy840920

Replies: 1
Views: 3673

PostForum: IBM MQ API Support   Posted: Fri Nov 09, 2007 7:34 am   Subject: MQPUT1 get 2009 reson code
my application like this:

while (MQGET(queue1))
{
fork(); //parent continue to GET message
//child process do something and put the result to another que ...
  Topic: when MQGET block, how to MQCLOSE and MQDISC?failed with 2219
andy840920

Replies: 14
Views: 14125

PostForum: IBM MQ API Support   Posted: Fri Nov 09, 2007 7:18 am   Subject: when MQGET block, how to MQCLOSE and MQDISC?failed with 2219
Set the queue that the MQGET is reading from GET(INHIBITED), then the MQGET will return and the app can close.how to set the queue that the MQGET is reading from GET(INHIBITED)?
i can't find GET(INHI ...
  Topic: when MQGET block, how to MQCLOSE and MQDISC?failed with 2219
andy840920

Replies: 14
Views: 14125

PostForum: IBM MQ API Support   Posted: Fri Nov 09, 2007 7:14 am   Subject: when MQGET block, how to MQCLOSE and MQDISC?failed with 2219
Short answer - you can't. The MQGET call is off with the queue manager waiting for a message, so there's no way to send a signal to the queue manager to end the call.

If you're going to use wait un ...
  Topic: when MQGET block, how to MQCLOSE and MQDISC?failed with 2219
andy840920

Replies: 14
Views: 14125

PostForum: IBM MQ API Support   Posted: Fri Nov 09, 2007 7:02 am   Subject: when MQGET block, how to MQCLOSE and MQDISC?failed with 2219
You can't cancel an MQGET that's in a WAIT state. It will only return from that call (and free the handle) when either a) a message appears on the queue that is eligible to be gotten by the GET, or b ...
  Topic: when MQGET block, how to MQCLOSE and MQDISC?failed with 2219
andy840920

Replies: 14
Views: 14125

PostForum: IBM MQ API Support   Posted: Wed Nov 07, 2007 6:17 am   Subject: when MQGET block, how to MQCLOSE and MQDISC?failed with 2219

static void SigUsr(int signo)
{
if (signo == SIGUSR1 || signo == SIGUSR2)
ExitResourceFree();
}
static void ExitResourceFree()
{
...
  Topic: how to query queue depth not int while
andy840920

Replies: 5
Views: 5202

PostForum: IBM MQ API Support   Posted: Tue May 29, 2007 5:49 am   Subject: how to query queue depth not int while
DON'T DO THAT.

Specify a WaitInterval on the GET, and loop until GET returns a 2033 - no more messages.why don't do that???
two processes, one GET from the queue in a while, and the other do somet ...
  Topic: how to query queue depth not int while
andy840920

Replies: 5
Views: 5202

PostForum: IBM MQ API Support   Posted: Mon May 28, 2007 6:06 am   Subject: how to query queue depth not int while
while (MQINQ(...) > 0)
sleep(1);
my application continue when the queue depth equals 0. but i can't find wait api in MQ. i must query in a while loop and sleep 1 sec ...
  Topic: MQSeries programing with C++
andy840920

Replies: 7
Views: 8367

PostForum: General IBM MQ Support   Posted: Mon May 21, 2007 6:44 am   Subject: MQSeries programing with C++
how to set CCSID in C program?
Goto page 1, 2, 3  Next Page 1 of 3

Jump to:  
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.