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 API Support » MQSeries.NET package

Post new topic  Reply to topic Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next
 MQSeries.NET package « View previous topic :: View next topic » 
Author Message
kolban
PostPosted: Mon Jul 22, 2002 6:15 pm    Post subject: Reply with quote

Grand Master

Joined: 22 May 2001
Posts: 1072
Location: Fort Worth, TX, USA

Prophet,
Thanks for the thoughts. The C# library is, 100% C# ... it uses the interop for invoking the underlying MQI calls (MQCONN, MQOPEN etc etc etc).

It sounds like you may be knowledgable on this stuff. I have implemented two classes, MQ_Client and MQ_Server, both of which implement the same interface. The MQ_Client class binds to MQIC32.dll (MQ Client library) and the MQ_Server binds to MQM.dll (the MQ server library). Unfortunately, users that don't have the server installed find their apps fail because the MQM.dll is not present. I had assumed that unless a class was instantiated, DLL's need not be loaded or found ... it appears that this is not the case. Can you think of a way to load a class at run-time?
Back to top
View user's profile Send private message
sadamahan
PostPosted: Mon Jul 22, 2002 11:04 pm    Post subject: Reply with quote

Newbie

Joined: 23 May 2002
Posts: 6
Location: Simi Valley,CA

Kolban,

>>Can you think of a way to load a class at run-time?

PlatformInvoke (pInvoke) can do that.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconacloserlookatplatforminvoke.asp

Sada
Back to top
View user's profile Send private message Send e-mail
Prophet
PostPosted: Tue Jul 23, 2002 6:45 am    Post subject: Reply with quote

Novice

Joined: 19 Jul 2002
Posts: 16

pInvoke is definately the way to go.
_________________
Bobby Ledford
Lead Architect
TSYS
Back to top
View user's profile Send private message MSN Messenger
Prophet
PostPosted: Wed Jul 24, 2002 9:58 am    Post subject: Reply with quote

Novice

Joined: 19 Jul 2002
Posts: 16

Finally got an end to end test of connecting to a queue manager, opening a couple queues, sending and recieving, and finally disconnecting.(about 4 am this morning . When this dog gets a hold of a bone he dont let go )

I am modifying our current MQHandler class now to use the prototype code I wrote. Once I have completed this, I should be able to run a multithreaded tester against this guy and generate a significant load. This would be generated against a win2k Queue Manager sending and recieving messages across channels attached to a MVS Queue Manager.

It wont be a true scale test but I can at least compare it against our current MQAX200 implementation using COM Interop.

Ill try to have some numbers ready for posting next week. Im probably gonna have to put this down a while to focus on other architectural concerns but Ill have someone else run the test.
_________________
Bobby Ledford
Lead Architect
TSYS
Back to top
View user's profile Send private message MSN Messenger
Prophet
PostPosted: Thu Jul 25, 2002 8:09 am    Post subject: Reply with quote

Novice

Joined: 19 Jul 2002
Posts: 16

Any way we could get you to strongly name the MQ.dll assembly? The assembly that will be calling it in our code is strong named and requires a strong named assembly to call.
_________________
Bobby Ledford
Lead Architect
TSYS
Back to top
View user's profile Send private message MSN Messenger
kolban
PostPosted: Thu Jul 25, 2002 3:18 pm    Post subject: Reply with quote

Grand Master

Joined: 22 May 2001
Posts: 1072
Location: Fort Worth, TX, USA

I have refreshed the code and now supply PCF support and hopefully one or two bug fixes, especially in the client support area.

What is meant by "strongly name" the MQ.dll assembly?
Back to top
View user's profile Send private message
sadamahan
PostPosted: Thu Jul 25, 2002 4:56 pm    Post subject: Reply with quote

Newbie

Joined: 23 May 2002
Posts: 6
Location: Simi Valley,CA

Prophet,

I guess Kolban could use SN.exe to sign his assemblies before he distributes them as detailed in:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cptools/html/cpgrftypelibraryimportertlbimpexe.asp

Sada
Back to top
View user's profile Send private message Send e-mail
sadamahan
PostPosted: Thu Jul 25, 2002 5:02 pm    Post subject: Reply with quote

Newbie

Joined: 23 May 2002
Posts: 6
Location: Simi Valley,CA

Hi,

I don't understand why I should be getting a MQRC_BUFFER_ERROR error when I use MQAX.

1. The MQActiveX equivalent of the MQAI api "mqInquireBag" is "Item
(Selector, ItemIndex, Value)" in as detailed in .

http://publibfp.boulder.ibm.com/epubs/html/amqtan02/amqtan02tfrm.htm
Chapter 5, "MQBag properties"



2. My simple C# program uses COM interop to import MQAX.dll and MQAI.dll and
gets a MQRC_BUFFER_ERROR error at the line indicated:

MQBag qAttrsBag; /* bag containing q attributes */
qAttrsBag = (MQBag)responseBag[MQ.MQHA_BAG_HANDLE, 0];//>I'm certain that qAttrsBag gets populated corrected because other apis on qAttrsBag work.

string d = (string)qAttrsBag[MQ.MQCA_Q_NAME, 0]; <-- Get a MQRC_BUFFER_ERROR here
with 'System.Runtime.InteropServices.COMException' exception.


I just don't understand this. Any help will be greatly appreciated.

FYI, I am using MQ ver. 5.2.1 on Win2K.

Thanks

Sada
Back to top
View user's profile Send private message Send e-mail
Prophet
PostPosted: Thu Jul 25, 2002 7:57 pm    Post subject: Reply with quote

Novice

Joined: 19 Jul 2002
Posts: 16

without going into a lot of detail, a strong name basically does three things,

Strong names guarantee name uniqueness(versions, elimination of dll hell)
Strong names guarantee that no one can produce a subsequent version of your assembly except you.
Strong names guarantees that the contents of the assembly have not been changed since it was built.

In essence, its a security check. It guarantess that the owner of the assembly, is the one that has provided you with the assembly and noone has modified it and recompiled it along the way.

To generate a strong name takes a couple of steps:

Open a Visual Studio Command Prompt(Visual Studio Start menu item under Visual Studio .NET tools)

1) Generate a key pair using the Strong Name tool. (This is a public/private key pair):

sn –k <file name> (usually the file name extension is .snk)

Put this file in your project directory.

2) There is a file in your c# project called AssemblyInfo.cs. At the bottom of this file are three attributes. The one you are interested in is AssemblyKeyFile. You want to set its value to the relative path of your keyfile. If your keyfile were named MQ.snk it would be:
[assembly: AssemblyKeyFile("..\\..\\MQ.snk")]

3) Thats it. Now all you have to do is build as normal. The assembly will be generated with a strong name. You can validate that it was strong named by using the strong name tool again and doing:

sn -vf <assemblyname>

(This process is how you do it using Visual Studio. There are a whole set of command line compilers and tools included with the .NET framework where you can automate builds and things like that)

There is a long(but confusing) topic on strong names at this url: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconreferencingstrongly-namedassembly.asp
_________________
Bobby Ledford
Lead Architect
TSYS
Back to top
View user's profile Send private message MSN Messenger
Prophet
PostPosted: Thu Aug 08, 2002 9:49 am    Post subject: Reply with quote

Novice

Joined: 19 Jul 2002
Posts: 16

Any word on possibly getting a strong named version of this wonderful proggy? We unfortunately cant use it if it isn't Strong named because of security reasons.

We would however love to take advantage of what you have done already

If you want to discuss it further you could send me an email at BLedford@tsystsol.com
_________________
Bobby Ledford
Lead Architect
TSYS
Back to top
View user's profile Send private message MSN Messenger
kolban
PostPosted: Thu Aug 08, 2002 5:12 pm    Post subject: Reply with quote

Grand Master

Joined: 22 May 2001
Posts: 1072
Location: Fort Worth, TX, USA

Sorry man ... been heads down on a bunch of other stuff. Let me look into it straight away.
Back to top
View user's profile Send private message
kolban
PostPosted: Fri Aug 09, 2002 6:26 am    Post subject: Reply with quote

Grand Master

Joined: 22 May 2001
Posts: 1072
Location: Fort Worth, TX, USA

I have now refreshed the images on the web site. All should be strongly named. I followed your instructions exactly. MANY thanks for posting those.
Back to top
View user's profile Send private message
Prophet
PostPosted: Fri Aug 09, 2002 7:35 pm    Post subject: Reply with quote

Novice

Joined: 19 Jul 2002
Posts: 16

Thank you very much I figured you were very busy. We actually did preliminary tests and got about double the performance from this then the regular MQAX.
_________________
Bobby Ledford
Lead Architect
TSYS
Back to top
View user's profile Send private message MSN Messenger
kolban
PostPosted: Sun Aug 11, 2002 5:19 pm    Post subject: Reply with quote

Grand Master

Joined: 22 May 2001
Posts: 1072
Location: Fort Worth, TX, USA

Wow!!! ... Now THAT is interesting. I must admit that I haven't tried any performance tests. My MQSeries.NET package uses Platform Invoke to call the MQI APIs ... I guess the overhead of invoking COM objects is higher. Thanks VERY much for the feedback.
Back to top
View user's profile Send private message
Glen_T_Dudley
PostPosted: Fri Sep 13, 2002 7:16 am    Post subject: How do I reset Mqseries.net Reply with quote

Newbie

Joined: 13 Sep 2002
Posts: 1
Location: Atlanta, Ga.

I have downloaded your examples.
I created a small test app in VB.NET
with 2 buttons and 2 textboxs
Get button retrieves a message from queue
Put places message in Queue

I can do thisw fore ever until I try to get when there is not
a message in queue. When I get the time out error
I can never put or get again until I close and restart the app.
Is there a method of reseting the mqseries object so I can
continue to put and get?

I can provide source if needed.
Dudley
Back to top
View user's profile Send private message Visit poster's website AIM Address MSN Messenger
Display posts from previous:   
Post new topic  Reply to topic Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next Page 2 of 7

MQSeries.net Forum Index » IBM MQ API Support » MQSeries.NET package
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.