Author |
Message
|
MinalYog |
Posted: Wed Sep 19, 2007 4:53 am Post subject: Access of MQ using .net |
|
|
Novice
Joined: 19 Sep 2007 Posts: 11
|
Hi,
please help to reslove the issue
I am using .net application
Dim objProps As New Hashtable
'objProps.Add(MQC.TRANSPORT_PROPERTY, MQC.TRANSPORT_MQSERIES_CLIENT)
objProps.Add(MQC.HOST_NAME_PROPERTY, strHostQueue)
objProps.Add(MQC.CHANNEL_PROPERTY, strChannelName)
objProps.Add(MQC.USER_ID_PROPERTY, strQueueUserId)
objProps.Add(MQC.PASSWORD_PROPERTY, "")
objQMgr = New MQQueueManager(strQueueManager, objProps)
it is giving error at "objQMgr = New MQQueueManager(strQueueManager, objProps)" as error in the application. (2195).
And big problem is in that server i cannot check FDC file also. :
oops: |
|
Back to top |
|
 |
Vitor |
Posted: Wed Sep 19, 2007 4:55 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
What version of MQ? What maintenance level?
Does the sample .NET work? Does the C or C++ sample work?
Perhaps more generally does the queue manager work with other applications?
You need to see the FDC file. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
MinalYog |
Posted: Wed Sep 19, 2007 5:52 am Post subject: Access of MQ using .net |
|
|
Novice
Joined: 19 Sep 2007 Posts: 11
|
Hi,
I am using IBM MQ 6.0 version.
I am unable to test the .net sample as well C/C++ code
Please let me know what is wrong in the code.
I do not have access to MQ. Even on my machine MQ is not installed. |
|
Back to top |
|
 |
Vitor |
Posted: Wed Sep 19, 2007 6:33 am Post subject: Re: Access of MQ using .net |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
MinalYog wrote: |
I am unable to test the .net sample as well C/C++ code |
This implies a fairly fundamental configuration error rather than a code problem.
MinalYog wrote: |
I do not have access to MQ. Even on my machine MQ is not installed. |
If you don't have the MQ client installed that's going to stop you creating a client connection fairly effectively!
Be sure you have a full client install rather than just the libraries that someone's decided you "need".
Also quite surprised you can get a 2195 from a client install..... _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
MinalYog |
Posted: Wed Sep 19, 2007 10:38 pm Post subject: Access to MQ using .net |
|
|
Novice
Joined: 19 Sep 2007 Posts: 11
|
Hi,
It means that i cannot access MQ if Client is not installed on My Machine.
Just for Clarity i am explaing the actual sceniraio
Server 1 has MQ insalled and created a Queue Manager and Queue with Channel name
Server 2: Do not have IBM MQ insalled (Not even Client). My code is in this Server (.net). I am trying to access the MQ of Server 1 with Host, Channel and port address
Can Above thing is possible?
 |
|
Back to top |
|
 |
Vitor |
Posted: Wed Sep 19, 2007 10:57 pm Post subject: Re: Access to MQ using .net |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
MinalYog wrote: |
Can Above thing is possible? |
No, it's not and that explains the 2195 - you're connecting to the queue manager's listener and doing lord knows what. That's the kind of fairly fundamental configuration error I was talking about.
Install the client on Server 2 (as listed in your example). There's no reason not to and I'm struggling to see a) why you tried to do it without the client or b) why you thought it would work!
But it won't. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
MinalYog |
Posted: Wed Sep 19, 2007 11:04 pm Post subject: Access to MQ using .net |
|
|
Novice
Joined: 19 Sep 2007 Posts: 11
|
Hi,
But I cannot tell to client to install IBM MQ on Server 2. As Server 2 is at client end. Is there any alernative. can i able to read message from Server 1 from Server 2 without IBM MQ (Client) installed
 |
|
Back to top |
|
 |
Vitor |
Posted: Wed Sep 19, 2007 11:18 pm Post subject: Re: Access to MQ using .net |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
MinalYog wrote: |
can i able to read message from Server 1 from Server 2 without IBM MQ (Client) installed
 |
No. You can't (logically enough) establish a client connection to a queue manager without the client software installed.
I assume from your post that both machines are owned by the client you're working for. If they have a queue manager on Server 1, then their admin will confirm that they need to install the client on Server 2 for this to work so you don't need to tell them anything. Get the admin to do it.
There really is no other way, and no good reason not to do it. Purely out of curiosity, what's their objection to installing on Server 2? I ask only to determine what bad reason they've come up with...  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Sep 20, 2007 4:17 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Well.
The "managed client" connection in .NET is supposed to be the equivalent of the "100% pure Java" client code in the Java API.
That is, it's designed to allow you to run MQ client apps in situations where you can't install the full MQ client - where you want to provide a single application package that happens to use MQ without telling the end user.
I don't know if the Using .NET manual goes into how to build and package a .NET app using this option, though. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Vitor |
Posted: Thu Sep 20, 2007 4:40 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
jefflowrey wrote: |
The "managed client" connection in .NET is supposed to be the equivalent of the "100% pure Java" client code in the Java API.
|
Well yes.
I was confused by the specification of MQC.TRANSPORT_MQSERIES_CLIENT in the connection details.
I'm also not a big fan of managed connections. Bit of a traditionalist there really. Especially given the cost, overhead and footprint of a client install (!) _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Sep 20, 2007 5:24 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Vitor wrote: |
I'm also not a big fan of managed connections. Bit of a traditionalist there really. Especially given the cost, overhead and footprint of a client install (!) |
I was merely explaining a feature of the product that may or may not be well known (introduced sometime in the last year or two), that may meet the presented requirements.
I'd like to think that I did not actually express an opinion one way or another as to the suitableness of the solution, or the validity of the presented requirements.
 _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Vitor |
Posted: Thu Sep 20, 2007 5:28 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
jefflowrey wrote: |
Vitor wrote: |
I'm also not a big fan of managed connections. Bit of a traditionalist there really. Especially given the cost, overhead and footprint of a client install (!) |
I was merely explaining a feature of the product that may or may not be well known (introduced sometime in the last year or two), that may meet the presented requirements.
|
I know, I know, you're being helpful, I'm being a Luddite  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
MinalYog |
Posted: Fri Sep 21, 2007 5:27 am Post subject: Access to MQ using .net |
|
|
Novice
Joined: 19 Sep 2007 Posts: 11
|
Hi,
Sorry Guys. but what is conclusion?
Can I able to read the MQ from a server where MQ is not installed.
Please tell me  |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Sep 21, 2007 5:42 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
There is a way to do it, with the .NET API, yes.
You'll have to do a good bit of legwork on your own to figure out how, though. I haven't done it.
The thing to look for in the "Using .NET" manual is for information on "managed connection". _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
MinalYog |
Posted: Fri Sep 21, 2007 5:54 am Post subject: Access to MQ using .net |
|
|
Novice
Joined: 19 Sep 2007 Posts: 11
|
Hi ,
Can this code will work.
Dim objProps As New Hashtable
objProps.Add(MQC.HOST_NAME_PROPERTY, strHostQueue)
objProps.Add(MQC.CHANNEL_PROPERTY, strChannelName)
objProps.Add(MQC.USER_ID_PROPERTY, strQueueUserId)
objProps.Add(MQC.PASSWORD_PROPERTY, "")
objQMgr = New MQQueueManager(strQueueManager, objProps)
or there is another way |
|
Back to top |
|
 |
|