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 » IBM MQ Java / JMS » How to use Multiple Temporary Model Queue with single MQ CF

Post new topic  Reply to topic
 How to use Multiple Temporary Model Queue with single MQ CF « View previous topic :: View next topic » 
Author Message
abhay09
PostPosted: Tue May 31, 2016 3:45 am    Post subject: How to use Multiple Temporary Model Queue with single MQ CF Reply with quote

Acolyte

Joined: 31 May 2016
Posts: 66

Hi,

I am using MQJMS API to connect to MQ server.

MQ version : 8.0 and all are under XA Transactions


In same, I am pooling XAJMSContext (com.ibm.msg.client.jms.JmsXAContext)
created from MQ XA Connection Factory for operations and all working fine.

However, have one blocker issue regarding Temporary queues

As per requirement, client can provide/change Temporary Model queue at any time.
Now, I am pooling XAJMSContext and couldn't find any method to add/change temporary model queue name.

However, as per IBM docs

Understood that MQXA ConnectionFactory do have setTemporaryModel() method to add MQ Model queue. but that is in the CF object
and I am pooling XAJMSConetext.

Please let me know how can i use different Model queues from Context
object as creating CF every time with new model queue is very expensive task.

Also, it is like that, we can create use only 1 temporary Model queue per CF?

Any help will be appreciated , it is very urgent.

Thanks
Abhay
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue May 31, 2016 4:51 am    Post subject: Re: How to use Multiple Temporary Model Queue with single MQ Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

abhay09 wrote:
Hi,

I am using MQJMS API to connect to MQ server.

MQ version : 8.0 and all are under XA Transactions


In same, I am pooling XAJMSContext (com.ibm.msg.client.jms.JmsXAContext)
created from MQ XA Connection Factory for operations and all working fine.

However, have one blocker issue regarding Temporary queues

As per requirement, client can provide/change Temporary Model queue at any time.
Now, I am pooling XAJMSContext and couldn't find any method to add/change temporary model queue name.

However, as per IBM docs

Understood that MQXA ConnectionFactory do have setTemporaryModel() method to add MQ Model queue. but that is in the CF object
and I am pooling XAJMSConetext.

Please let me know how can i use different Model queues from Context
object as creating CF every time with new model queue is very expensive task.

Also, it is like that, we can create use only 1 temporary Model queue per CF?

Any help will be appreciated , it is very urgent.

Thanks
Abhay


So have you looked at all the properties of the XAJMSContext? None that fit the temporaryModel ??
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
abhay09
PostPosted: Tue May 31, 2016 5:07 am    Post subject: Reply with quote

Acolyte

Joined: 31 May 2016
Posts: 66

Yep , i checked XAJMSContext class and Producer/consumer all ,
only found method in CF.

Please help, this is eating all my days
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue May 31, 2016 5:16 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

abhay09 wrote:
Yep , i checked XAJMSContext class and Producer/consumer all ,
only found method in CF.

Please help, this is eating all my days


Explain why you need different models
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
abhay09
PostPosted: Tue May 31, 2016 5:32 am    Post subject: Reply with quote

Acolyte

Joined: 31 May 2016
Posts: 66

It depends on client, they might create one modelQ for Persistent message and other for Non persistent.

Client ask for option to put Model queue of his choice at run time.
Please help!!
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue May 31, 2016 7:43 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

abhay09 wrote:
It depends on client, they might create one modelQ for Persistent message and other for Non persistent.

Client ask for option to put Model queue of his choice at run time.
Please help!!

So if you know the model name (at runtime) create a queue from the model name and see if that matches your expectations...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Vitor
PostPosted: Tue May 31, 2016 7:53 am    Post subject: Reply with quote

Grand High Poobah

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

abhay09 wrote:
It depends on client, they might create one modelQ for Persistent message and other for Non persistent.


How does the client intend to put persistent messages on a temporary queue?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
abhay09
PostPosted: Tue May 31, 2016 8:10 am    Post subject: Reply with quote

Acolyte

Joined: 31 May 2016
Posts: 66

fjb_saper wrote:
abhay09 wrote:
Yep , i checked XAJMSContext class and Producer/consumer all ,
only found method in CF.

Please help, this is eating all my days


Explain why you need different models



As suggested, i create Queue using "modelQueue" Name,MQQueue MQueue mqQueue = (MQQueue)context1.createQueue("modelQueue");

It created MQQueue for me but when try to access it to get messages got below error:



com.ibm.msg.client.jms.DetailedInvalidDestinationRuntimeException: JMSWMQ2022: Cannot create a Message Producer or Message Consumer with a Model Queue 'modelQueue', as a Destination.
The Message Producer or Message Consumer was unable to open the Destination as it was a Model Queue.
Change the Message Producer or Message Consumer to use a different Destination Queue name other than a Model Queue.
at com.ibm.msg.client.jms.DetailedInvalidDestinationException.getUnchecked(DetailedInvalidDestinationException.java:273)
at com.ibm.msg.client.jms.internal.JmsErrorUtils.convertJMSException(JmsErrorUtils.java:151)
at com.ibm.msg.client.jms.internal.JmsContextImpl.createConsumer(JmsContextImpl.java:383)


Please suggest how to create Temporary queue with runtime model Queue
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue May 31, 2016 11:40 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

Well you may well have to create 2 contexts. One for persistent replies and one for non persistent ones. Each context built off a different CF.
Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
abhay09
PostPosted: Wed Jun 01, 2016 9:17 pm    Post subject: Reply with quote

Acolyte

Joined: 31 May 2016
Posts: 66

fjb_saper wrote:
Well you may well have to create 2 contexts. One for persistent replies and one for non persistent ones. Each context built off a different CF.
Have fun


OK. So, need to create separate contexts for each different model queue?
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Jun 02, 2016 4:48 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

abhay09 wrote:
fjb_saper wrote:
Well you may well have to create 2 contexts. One for persistent replies and one for non persistent ones. Each context built off a different CF.
Have fun


OK. So, need to create separate contexts for each different model queue?

May be and may be not.
Say you specify your model for persistent. This means that you need to close and delete the temporary queue explicitly. So as long as your app correctly handles the clean up, one (persistent) model should be enough. Be aware that you may encounter a performance penalty compared to non persistent dynamic queues.

Have fun
_________________
MQ & Broker admin
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 » IBM MQ Java / JMS » How to use Multiple Temporary Model Queue with single MQ CF
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.