Author |
Message
|
Penfold |
Posted: Thu Apr 10, 2008 4:50 am Post subject: Connecting to an MQ Server without MQ Client installed |
|
|
Newbie
Joined: 10 Apr 2008 Posts: 4
|
I am currently developing a .Net application and I want to be able to communicate with a MQ Server on a remote machine. However, I don’t want to have to install the MQ Client on the machine the application runs on so that the user doesn't have to do it on install.
I have been looking through the Redbook entitled "Using .NET" and it seems to elude to the fact that the .Net dll set will allow you to run a managed version of the client in the application (with a couple of limitations).
The Dll I am using is the "amqmdnet.dll" that was installed onto the MQ Server machine. Its version is 1.0.0.3 and the product version is 6.0.0 but I am unable to get access to some of the constants that the Redbook refers to. I also am unable to figure out how to set NMQ_MQ_LIB. Is it in MQEnvironment.properties hashtable?
When I attempt to connect in a way that I think may work, the call to create a new instance of MQManager throws an exception looking for the non-.Net dlls. This tells me that it’s not thinking it should be running in managed mode.
Any ideas on what I am doing wrong or have I misunderstood the capabilities of the classes?
Thanks for you help in advance.
Penfold  |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Apr 10, 2008 4:52 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Yes, you should be able to do this with the .NET environment, by carefully and fully following all the instructions in the InfoCenter/Using .NET manual.
But I don't have practical experience, so I can't offer anything more specific than that. And double-check your NMQ_MQ_LIB env variable (or whatever it is). _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Vitor |
Posted: Thu Apr 10, 2008 5:01 am Post subject: Re: Connecting to an MQ Server without MQ Client installed |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Penfold wrote: |
I also am unable to figure out how to set NMQ_MQ_LIB. Is it in MQEnvironment.properties hashtable?
|
It's most commonly an environment variable, though I seem to remember it can be set in an app server configuration file as well. At least I think I remember that...
You need, in addition, to set the hashtable up to indicate a managed connection IIRC. MQC_TRANSPORT_PROPERTY rings a bell. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Penfold |
Posted: Thu Apr 10, 2008 5:07 am Post subject: Re: Connecting to an MQ Server without MQ Client installed |
|
|
Newbie
Joined: 10 Apr 2008 Posts: 4
|
Quote: |
It's most commonly an environment variable, though I seem to remember it can be set in an app server configuration file as well. At least I think I remember that...
You need, in addition, to set the hashtable up to indicate a managed connection IIRC. MQC_TRANSPORT_PROPERTY rings a bell. |
Yes, thats one of the things that I can't seem to get in the class so I think that I might have the wrong version of the dll or something!
I am trying to set MQC.TRANSPORT_PROPERTY to MQC.TRANSPORT_MQSERIES_MANAGED but the TRANSPORT_MQSERIES_MANAGED constant doesn't exist in the MQC class!
Do you know of any reason why this might have happened? |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Apr 10, 2008 5:26 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Okay, so reviewing http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/topic/com.ibm.mq.csqzav.doc/defconn.htm
MQC.TRANSPORT_PROPERTY is the best choice here, as it doesn't require the NMQ_MQ_LIB environment setting.
As for why the MQC.TRANSPORT_MQSERIES_MANAGED is not defined... it's only in later versions of v6 that a managed connection is even possible.
So on your development environment, you need to install the MQ client (at least) and FP that, and build/package against that. Then you can distribute your apps to machines without the Client installed. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Penfold |
Posted: Thu Apr 10, 2008 5:46 am Post subject: |
|
|
Newbie
Joined: 10 Apr 2008 Posts: 4
|
jefflowrey wrote: |
Okay, so reviewing http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/topic/com.ibm.mq.csqzav.doc/defconn.htm
MQC.TRANSPORT_PROPERTY is the best choice here, as it doesn't require the NMQ_MQ_LIB environment setting.
As for why the MQC.TRANSPORT_MQSERIES_MANAGED is not defined... it's only in later versions of v6 that a managed connection is even possible.
So on your development environment, you need to install the MQ client (at least) and FP that, and build/package against that. Then you can distribute your apps to machines without the Client installed. |
I have been through that docuement but when I try to tell it that I want to run managed, it throws an exception about not being able to find a C dll.
Why do I have to install the MQ Client to be able to use MQ without the client? I am trying to get my head round what is required at the users end so I know what we have to install on delivery.
Thanks,
Penfold |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Apr 10, 2008 5:51 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
|
Back to top |
|
 |
Penfold |
Posted: Thu Apr 10, 2008 8:19 am Post subject: |
|
|
Newbie
Joined: 10 Apr 2008 Posts: 4
|
Thanks for all you help guys.
Found that the issue that I was having was indeed a dll file version issue. I got them from the MQ Client rather than the MQ Server and now I can do managed connections without the MQ Client being installed!  |
|
Back to top |
|
 |
darin.brown |
Posted: Fri Jan 14, 2011 2:34 pm Post subject: |
|
|
Novice
Joined: 14 Jan 2011 Posts: 12
|
I'm having a similar issue when trying to use the IBM.XMS stuff. Our security folks aren't allowing us to install the MQClient on our front end sets so we're looking to go this route. We've got .NET 4, MQClient v7.0.1.3 and v2.0 of the IBM.XMS stuff installed in our development environment and things work great. I've tried deploying the application with the amqmdnet.dll included but it doesn't even get to the point where it tries to create a managed connection.
Code: |
XMSFactoryFactory factoryFactory = XMSFactoryFactory.GetInstance(XMSC.CT_WMQ);
IConnectionFactory cf = factoryFactory.CreateConnectionFactory();
|
when it tries to do the CreateConnectionFactory() I get an error complaining about other missing DLLs:
Could not load assembly 'amqmdnsp'
If I subsequently install the MQC on this machine, everything works fine. However, we won't be able to do that in our production environment. Has anyone successfully had the IBM.XMS stuff to work without the MQC installed? Or might I need to not worry about the IBM.XMS stuff and stick with just the standard MQ? |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Jan 14, 2011 5:11 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
IIRC the XMS package makes use of the non managed client. You should be able to get a managed connection with the right parms for the connection factory. However you'd need to check if the restrictions of the managed connection are compatible with the XMS package. So maybe no luck of just using the .net dll in your distribution...
Have fun  _________________ MQ & Broker admin
Last edited by fjb_saper on Fri Jan 14, 2011 6:03 pm; edited 1 time in total |
|
Back to top |
|
 |
bruce2359 |
Posted: Fri Jan 14, 2011 5:46 pm Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
Quote: |
Our security folks aren't allowing us to install the MQClient on our front end... |
Do the security folks have a good business reason for this? Do they expect more security risk with WMQ client? _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
darin.brown |
Posted: Fri Jan 14, 2011 6:52 pm Post subject: |
|
|
Novice
Joined: 14 Jan 2011 Posts: 12
|
bruce2359 wrote: |
Quote: |
Our security folks aren't allowing us to install the MQClient on our front end... |
Do the security folks have a good business reason for this? Do they expect more security risk with WMQ client? |
there concern is the fact that the MQC install created a new group (mqm) in Windows which is against their policy. It seems silly but that's their policy and there's no getting around that (unless MQC can be installed without it creating a new group) |
|
Back to top |
|
 |
Vitor |
Posted: Fri Jan 14, 2011 7:26 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
darin.brown wrote: |
there concern is the fact that the MQC install created a new group (mqm) in Windows which is against their policy. It seems silly but that's their policy and there's no getting around that (unless MQC can be installed without it creating a new group) |
The client doesn't make any changes to local security; it's the server install that creates the new group. If the client install did that, it's because it was installed off the server install media and the server install was not de-selected.
This can be prevented by downloading the client from the IBM site. This doesn't contain the server software so this error can't occur. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
bruce2359 |
Posted: Fri Jan 14, 2011 7:53 pm Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
You might want to send along a copy of the WMQ Clients manual to your security folks.
The WMQ Clients manual says:
Installing the WebSphere MQ client
To install a WebSphere MQ client, you must be logged on to Windows as an
administrator.
For AIX, Solaris,... root. _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
Vitor |
Posted: Sat Jan 15, 2011 9:20 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
bruce2359 wrote: |
The WMQ Clients manual says:
Installing the WebSphere MQ client
To install a WebSphere MQ client, you must be logged on to Windows as an
administrator.
For AIX, Solaris,... root. |
This doesn't seem to be the key problem here. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|