Author |
Message
|
henry_chuo |
Posted: Thu Dec 01, 2011 2:09 am Post subject: creating multiple sessions with CCDT connection |
|
|
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 |
|
 |
zpat |
Posted: Thu Dec 01, 2011 2:34 am Post subject: |
|
|
 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 |
|
 |
henry_chuo |
Posted: Thu Dec 01, 2011 2:39 am Post subject: |
|
|
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 |
|
 |
mqjeff |
Posted: Thu Dec 01, 2011 2:41 am Post subject: |
|
|
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 |
|
 |
henry_chuo |
Posted: Thu Dec 01, 2011 2:59 am Post subject: |
|
|
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 |
|
 |
fjb_saper |
Posted: Thu Dec 01, 2011 12:41 pm Post subject: |
|
|
 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 |
|
 |
henry_chuo |
Posted: Thu Dec 01, 2011 5:18 pm Post subject: |
|
|
Newbie
Joined: 01 Dec 2011 Posts: 5
|
Do you mean that asynchronous mode for receiving message should not use CCDT? |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Dec 01, 2011 11:51 pm Post subject: |
|
|
 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 |
|
 |
henry_chuo |
Posted: Mon Dec 12, 2011 11:15 pm Post subject: |
|
|
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 |
|
 |
|