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 IndexIBM MQ Java / JMSHow to connect to remote JMS Provider?

Post new topicReply to topic
How to connect to remote JMS Provider? View previous topic :: View next topic
Author Message
GeneRK4
PostPosted: Sun Oct 05, 2014 5:21 pm Post subject: How to connect to remote JMS Provider? Reply with quote

Master

Joined: 08 Jul 2013
Posts: 220

I want highllevel steps to connect to remote JMS Provider. I have some client application which wants to lookup in JNDI on FileSystem based to get the connection factory for JMS provider. I understand that in JMS Administeration (MQ Explorer),we can create the Connection factories.This is creating .bindings file.How can I use this .bindings file into my client application system? Should the Client Application system contain the JMS Administerator to create the .bindings in the same system?or .bindings alone should be imported to the client system? If Filesystem is used,then a path specifying the .binding is given as Provider url.This provider url (EG: F:/JMS) seems to be the path present in JMS Provider system.If .bindings file imported in client system,then how the client can recognise the path of .bindings file? And What is the purpose of having ServerConnection channel in the Connection Factories definition when MQClient mode is used?When the JMS client connects through JNDI bindings ,why Server Connection channel is required?
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sun Oct 05, 2014 7:54 pm Post subject: Reply with quote

Grand Poobah

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

Lots of questions....
Quote:
.bindings file

It is ok to copy this file in binary mode to your target / source system and use it.
Quote:
If Filesystem is used,then a path specifying the .binding is given as Provider url. How the client can recognize the path of .bindings file?

Well you gave the response before asking the question. You specify the path to the .bindings file as the provider URL in your JNDI setup.

The server connection channel allows you to specify a client connection to the MQ Server (i.e. the MQ Server is no on the same machine as the MQ Client).
You will have to use a server connection channel on the server. The other is either explicitly or implicitly specified at the client end as a client connection channel.

Remember that the JNDI bindings just defines the mode of communication for your JMS implementation to use (MQ in this case). So you still have to use the protocols mandated by the JMS implementation (Server connection channel).

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
GeneRK4
PostPosted: Mon Oct 06, 2014 6:37 pm Post subject: Reply with quote

Master

Joined: 08 Jul 2013
Posts: 220

Thanks a lot ...
Just two more question to be more clear in this part..

"This provider url (EG: F:/JMS) seems to be the path of .bindings file present in JMS Provider system."

So,how does the client system resolves/recognises the F drive present in the Server system.Does it automatically resolves after it establishes connection to JMS provider via Server Connection Channel?

fjb_saper wrote:

Remember that the JNDI bindings just defines the mode of communication for your JMS implementation to use (MQ in this case). So you still have to use the protocols mandated by the JMS implementation (Server connection channel).


An Application would like to communicate via JMS so that it can connect to any Messaging providers such as IBM MQ,TIBCO,SAP Netweaver PI etc...Having said that,why do we need ServerConnectionChannel which is more specific for an MQ Client to be used at Application side?Does it not fall back to the category of MQClient instead of acting as JMSClient?
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Oct 06, 2014 7:43 pm Post subject: Reply with quote

Grand Poobah

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

Ok, you're generously mixing fact and fiction here.

The provider URL points you with the JNDI to the .bindings file which contains the implementation information for the connection.
The client system does not resolve anything at this point.
The client system's OS knows the location of the .bindings file because the Provider URL told it where it was.
Inside the .bindings file you have bound a JMS ConnectionFactory. There is an Implementation Class name behind it. So when you retrieve the JMS ConnectionFactory from the JNDI it already knows the relevant implementation parameters "decorating" it.
I.E. all your JMS program needs to do is create a connection off of it.

If you did create the JMS ConnectionFactory, instead of retrieving it from JNDI, you will have to decorate it with all the information it needs in order to be able to build the connection....

Read up on the basic JMS model. The JMS client knows nothing about the MQ Channel. The JMS client knows about the JMS ConnectionFactory. The connection factory in turn knows about the MQ channel and hostname / port etc.. and any other information needed to build the connection.

So yes your JMS code is agnostic to the implementation. Your JNDI however is not. It is the JNDI that builds the glue between the JMS generic set up (program) and its practical implementation (MQ).

So if you want to access MQ, Tibco, SAP PI or any other JMS implementation, all you need to do is correctly bind a "decorated" JMS ConnectionFactory for each of those providers into your JNDI.
Retrieve from the JNDI the ConnectionFactory corresponding to the implementation you desire.

Needless to say the same thing goes for the JMS Destinations bound in your JNDI. And no your code is not allowed to mix and match destinations with connection factories, or sessions.

The preferred thing is to define your destinations in the URI form and instantiate them from the session created off the connection (created off the connection factory). This gives you more flexibility than retrieving the queue from JNDI as you can have the URI retrieved from a resource bundle or properties file...

The URI form of the destination should be as much implementation agnostic as possible. The following example ("queue://qmgr/qname?property=value&property=value...") is the MQ URI form for a queue.
You may notice the qmgr/queue pair which could be considered as implementation specific...

Your generic form is ("destinationtype://implementation naming?property=value&property=value..."). The property value pairs are mostly generic but can also be implementation specific.

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
GeneRK4
PostPosted: Wed Oct 08, 2014 5:26 pm Post subject: Reply with quote

Master

Joined: 08 Jul 2013
Posts: 220

Its wonderful!!!!Thank you very much for spending your time in explaining me the concept so clearly...
Back to top
View user's profile Send private message
ashutosh007
PostPosted: Fri May 26, 2017 2:14 am Post subject: Reply with quote

Newbie

Joined: 26 May 2017
Posts: 1

I think OP here is trying to ask that - If we have created JMS administered object in WMQ on a sevrer A (ip = xx.xx.xx.x), and the provider URL looks something like file://C:/Users/Peoplesoft_binding. Then how does a client sitting on Server B(ip = yy.yy.yy.y), will reslove the filepath.

I have the same query. If client is sitting on a diffrent server, how can we use provider URL such as file://C:/Users/Peoplesoft_binding.

Please help!
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri May 26, 2017 4:17 am Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17443

ashutosh007 wrote:
I think OP here is trying to ask that - If we have created JMS administered object in WMQ on a sevrer A (ip = xx.xx.xx.x), and the provider URL looks something like file://C:/Users/Peoplesoft_binding. Then how does a client sitting on Server B(ip = yy.yy.yy.y), will reslove the filepath.

I have the same query. If client is sitting on a diffrent server, how can we use provider URL such as file://C:/Users/Peoplesoft_binding.

Please help!


The bindings file has to live on the machine where the client is - or it has to be available to the machine where the client runs.
_________________
Read, Think, Try, Repeat
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sat May 27, 2017 7:43 am Post subject: Reply with quote

Grand Poobah

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

ashutosh007 wrote:
I think OP here is trying to ask that - If we have created JMS administered object in WMQ on a sevrer A (ip = xx.xx.xx.x), and the provider URL looks something like file://C:/Users/Peoplesoft_binding. Then how does a client sitting on Server B(ip = yy.yy.yy.y), will reslove the filepath.

I have the same query. If client is sitting on a diffrent server, how can we use provider URL such as file://C:/Users/Peoplesoft_binding.

Please help!

You don't and you can't because your URL is wrong...

Typically the URL form is
Code:
file://[server(ip or name)]/path/.bindings

You need to check the documentation to verify from which version on the file does no longer have to be available on the client machine...
If you have to copy it, remember to use an ftp with binary transfer configuration. The .bindings is not a text file!

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexIBM MQ Java / JMSHow to connect to remote JMS Provider?
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.