Author |
Message
|
kolban |
Posted: Fri Jun 21, 2002 8:32 am Post subject: .NET native support |
|
|
 Grand Master
Joined: 22 May 2001 Posts: 1072 Location: Fort Worth, TX, USA
|
I am putting together a managed code class which invokes the MQSeries MQI API from .NET classes. This is being modeled on the Java classes in MA88 as opposed to the COM interface.
Code like the following will be possible in, say, C#:
Code: |
try
{
MQQueueManager qmgr = new MQQueueManager("MQSIQM");
MQQueue q = qmgr.accessQueue("IN", MQC.MQOO_OUTPUT);
MQMessage message = new MQMessage();
message.Write("Hello World!");
q.put(message);
q.close();
qmgr.disconnect();
}
catch(MQException e)
{
Console.WriteLine("MQException: " + e.ToString());
}
|
If there is interest in such, I will make more available. My thinking is that a native (non-COM wrapped) interface will be faster and can take advantage of the .NET framework explicitly.
If there is interest, please post here and we'll discuss. |
|
Back to top |
|
 |
Shep |
Posted: Fri Jun 21, 2002 10:19 am Post subject: |
|
|
Newbie
Joined: 21 Jun 2002 Posts: 6 Location: Massachusetts
|
I have a definite interest in this. I just started a .NET project that will send messages to MQSeries on AIX. In doing some research today I came acrosss this site. We are still kicking around ways to architect the communication from Windows to MQSeries. I'll be happy to share things I learn along the way! |
|
Back to top |
|
 |
kolban |
Posted: Fri Jun 21, 2002 2:18 pm Post subject: |
|
|
 Grand Master
Joined: 22 May 2001 Posts: 1072 Location: Fort Worth, TX, USA
|
Great, I have a working prototype that I should be able to share shortly. I think I'd like to make this an open source project but want to ensure that we have a single, consistent code base. If you or anyone else has ideas on how to achieve this, I'd love to hear from you. |
|
Back to top |
|
 |
RogerLacroix |
Posted: Fri Jun 21, 2002 8:44 pm Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
I wrote several simple MQ apps using C# and MQAX (ActiveX) and they worked fine. I would be interested in seeing how much faster a native C# solution would be.
later
Roger... |
|
Back to top |
|
 |
smkwan |
Posted: Fri Jun 21, 2002 10:31 pm Post subject: |
|
|
Newbie
Joined: 19 Jun 2002 Posts: 2
|
I'm interested to learn about this and particular in VB .Net 'cause I need to write a program to access MQ but the VB .Net is the only tool that available to me now. |
|
Back to top |
|
 |
kolban |
Posted: Sat Jun 22, 2002 2:51 am Post subject: |
|
|
 Grand Master
Joined: 22 May 2001 Posts: 1072 Location: Fort Worth, TX, USA
|
The way I have got this working is to write some C# classes, that model exactly the MA88 base-MQ Java classes (class names, methods and properties). I think IBM did a good job with these.
I then implemented these classes using the platform invoke functions of .NET to marshall calls to MQCONN, MQOPEN etc etc etc
This way, I think I am calling the MQI as quickly as possible and also has the ability to work at the .NET framework level to take advantage of any features provided there.
I haven't done any comparison tests yet. |
|
Back to top |
|
 |
SwanseaJack |
Posted: Wed Jun 26, 2002 1:27 pm Post subject: |
|
|
Newbie
Joined: 26 Jun 2002 Posts: 1
|
I'd be interested in sharing information on this topic. I have just started trying to use MQI from VB.Net.
At the moment I'm trying to overcome a 2044 reason code coming back from the MQOPEN call. Did you have any trouble with the MQOD parameter ? |
|
Back to top |
|
 |
|