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 » A stupid question on client connection...

Post new topic  Reply to topic
 A stupid question on client connection... « View previous topic :: View next topic » 
Author Message
yeahyeah
PostPosted: Tue Aug 22, 2006 2:18 am    Post subject: A stupid question on client connection... Reply with quote

Novice

Joined: 06 Aug 2006
Posts: 18
Location: HK

Would somebody tell me what's the use of client conenction?...

I ask this question because, in IBM "Using Java", the JNDI ConnectionFactory object has a field "channel" supposed the name of a client connection channel be put, however i used the default "SYSTEM.DEF.SVRCONN" and no problem occured in my JMS programs so far. So what's client conenction? Should i use it?

Thanks...
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Aug 22, 2006 2:26 am    Post subject: Re: A stupid question on client connection... Reply with quote

Grand High Poobah

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

yeahyeah wrote:
Should i use it?


You are - "SYSTEM.DEF.SVRCONN" is how the default client connection is provided.

There are a myriad of good reasons why you'd want to set up your own client connections rather than use the default. There are a similar number of reasons why using the default is fine. It's a design decision and there's no right answer, just the right answer for you.

Spend some time with the "Clients" manual as well as the "Using Java" and all (or at least more) will become clear.

To provide a short answer to your question, running in a client mode allows you to connect to any queue manager accessable through the network and to which you have access (a key deciding factor on the use of defaults). This makes your transaction portable and allows for client side failover (look up client connection tables). Running in the binding mode (i.e. not client) allows the use of XA transaction management, two-phase commit and other good things.

Be aware this is the short, simplist answer!
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
HubertKleinmanns
PostPosted: Tue Aug 22, 2006 7:16 am    Post subject: Reply with quote

Shaman

Joined: 24 Feb 2004
Posts: 732
Location: Germany

I would not recommend to use SYSTEM.DEF.SVRCONN, because this is designed to be a template, to define other server connection channels. In my environments I "close" this channel by setting the MCAUSER to nobody. Then nobody can use this channel. Define channels for each application separately, then you are more flexibel and may use different permission settings for each application.
_________________
Regards
Hubert
Back to top
View user's profile Send private message Visit poster's website
yeahyeah
PostPosted: Tue Aug 22, 2006 6:24 pm    Post subject: Reply with quote

Novice

Joined: 06 Aug 2006
Posts: 18
Location: HK

Vitor wrote:

You are - "SYSTEM.DEF.SVRCONN" is how the default client connection is provided.

There are a myriad of good reasons why you'd want to set up your own client connections rather than use the default. There are a similar number of reasons why using the default is fine. It's a design decision and there's no right answer, just the right answer for you.

Spend some time with the "Clients" manual as well as the "Using Java" and all (or at least more) will become clear.

To provide a short answer to your question, running in a client mode allows you to connect to any queue manager accessable through the network and to which you have access (a key deciding factor on the use of defaults). This makes your transaction portable and allows for client side failover (look up client connection tables). Running in the binding mode (i.e. not client) allows the use of XA transaction management, two-phase commit and other good things.

Be aware this is the short, simplist answer!


Thanks for reply, yet i cannot find what will happen if i define server connection in "channel" of JNDI ConnectionFactory when i issue ConnectionFactory.createConnection()......will the qmgr create a client connection itself? or?......
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Aug 22, 2006 6:57 pm    Post subject: Reply with quote

Grand High Poobah

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

Quote:
i cannot find what will happen if i define server connection in "channel" of JNDI ConnectionFactory when i issue ConnectionFactory.createConnection()......will the qmgr create a client connection itself? or?......

This is more of the or... variety.
The traditionnal rule for client / server connection is respected. You still need a channel, a host and a port to access the resource in client mode... but ...
You have to think JMS first and think MQ second. You do not create a qmgr but you instanciate a factory that allows you to create a connection. Your connection is your link to the JMS resource that is a qmanager, but none of the standard java methods are accessible...

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Wed Aug 23, 2006 1:54 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

The name you put into the channel property of the Connection Factory must be the same name as an already defined server connection channel on the queue manager.

If you are using MQCONNX or some varient, which the JMS API does under the covers (in essence, at least), then the client half of the channel is defined by that actual call.

If you use an MQ Client Channel Table - which you can now do in MQ v6 - then the client connection channel is defined in that channel table, and is picked up by having the same name as the server connection channel.
_________________
I am *not* the model of the modern major general.
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 » A stupid question on client 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.