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 » creating multiple sessions with CCDT connection

Post new topic  Reply to topic
 creating multiple sessions with CCDT connection « View previous topic :: View next topic » 
Author Message
henry_chuo
PostPosted: Thu Dec 01, 2011 2:09 am    Post subject: creating multiple sessions with CCDT connection Reply with quote

Newbie

Joined: 01 Dec 2011
Posts: 5

Hi,

I used CCDT table to create a connection, then on top of the connection, I created multiple sessions to which one message listener is registered for each session. I found that CCDT dispatch requests for creating sessions to different queue managers. In my understanding, CCDT should dispatch requests for creating connection only, not session.

Is my finding correct or I missed anything eg. channel parameter, AFFINITY?

Below is my definition for CCDT table:

DEFINE CHANNEL(FTCSGD01.1) CHLTYPE(CLNTCONN) TRPTYPE(TCP) CONNAME('10.210.64.103(60000)') QMNAME(FTCSGD01) AFFINITY(NONE) CLNTWGHT(5) SSLCIPH(TRIPLE_DES_SHA_US) REPLACE
DEFINE CHANNEL(FTCSGD01.2) CHLTYPE(CLNTCONN) TRPTYPE(TCP) CONNAME('10.210.64.103(60010)') QMNAME(FTCSGD01) AFFINITY(NONE) CLNTWGHT(5) SSLCIPH(TRIPLE_DES_SHA_US) REPLACE

Any hint or advice is welcome. thanks so much.
Back to top
View user's profile Send private message
zpat
PostPosted: Thu Dec 01, 2011 2:34 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

What do you mean byl a session, as opposed to a connection?
Back to top
View user's profile Send private message
henry_chuo
PostPosted: Thu Dec 01, 2011 2:39 am    Post subject: Reply with quote

Newbie

Joined: 01 Dec 2011
Posts: 5

They are JMS API terms:
javax.jms.Connection
javax.jms.Session
javax.jms.MessageConsumer
javax.jms.MessageProducer

A Connection is created to connect to queue manager, then the connection is used to create Session(s), and Session is used to create Consumer and Producer.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Dec 01, 2011 2:41 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

So, first of all, your CCDT is set up to allow the behavior you're seeing. You have defined multiple channel definitions for the same queue manager name.

Secondly, I think you should take a bit more time in your testing and confirm that you are seeing the new connection created with the session, or if it is being created when you register the message listener.
Back to top
View user's profile Send private message
henry_chuo
PostPosted: Thu Dec 01, 2011 2:59 am    Post subject: Reply with quote

Newbie

Joined: 01 Dec 2011
Posts: 5

There is no way for me to determine whether new connection created with the session, or if it is being created when you register the message listener.

But the observation is that creating 2 sessions caused client application to consume message from the two different queue managers.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Dec 01, 2011 12:41 pm    Post subject: Reply with quote

Grand High Poobah

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

I suspect you're not telling the full picture.
I would not use a CCDT for MDBs just because of this quirck that would be expected when you set up the MDBs.

However for a simple request reply request there should be no problems.

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
henry_chuo
PostPosted: Thu Dec 01, 2011 5:18 pm    Post subject: Reply with quote

Newbie

Joined: 01 Dec 2011
Posts: 5

Do you mean that asynchronous mode for receiving message should not use CCDT?
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Dec 01, 2011 11:51 pm    Post subject: Reply with quote

Grand High Poobah

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

henry_chuo wrote:
Do you mean that asynchronous mode for receiving message should not use CCDT?


Explain to us why you would want to?
In asynchronous receiving you need to target a specific qmgr (right?).
So what is the advantage a CCDT would provide you with that?


_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
henry_chuo
PostPosted: Mon Dec 12, 2011 11:15 pm    Post subject: Reply with quote

Newbie

Joined: 01 Dec 2011
Posts: 5

I just use CCDT to get a MQ connection, then I create sessions on top of the MQ connection retrieved. The problem is that creating one session surprisingly create one "MQ connection" again, in this case, CCDT apply again and distribute among available QMs.

The root cause is that creating JMS sessions on top on a JMS connection should NOT create "MQ connection" again.

Any hint is welcome. Thanks.
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 » IBM MQ Java / JMS » creating multiple sessions with CCDT connection
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.