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 » amqmdnet.dll without MQ client installed

Post new topic  Reply to topic Goto page 1, 2  Next
 amqmdnet.dll without MQ client installed « View previous topic :: View next topic » 
Author Message
tri.vu
PostPosted: Fri Feb 01, 2013 9:26 am    Post subject: amqmdnet.dll without MQ client installed Reply with quote

Newbie

Joined: 01 Feb 2013
Posts: 9

I am writing a Windows App in VB.Net to put messages to the Queue using amqmdnet.dll (v7.0.1). When deploying on some other PCs the program is not putting message to the queue unless I get MQ client installed for those machines.
As it is so inconvenient to install MQ Client on all of my users' machines, is there anyway I can send message to MQ without installing MQ Clients?
Any additional .DLL I can use to put message to the queue to avoid MQ Client installation?

I appreciate your help. Thank you,

Tri
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Feb 01, 2013 9:52 am    Post subject: Re: amqmdnet.dll without MQ client installed Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

tri.vu wrote:
As it is so inconvenient to install MQ Client on all of my users' machines


Inconvenient to install software on client machines? It must be hell everytime they want Microsoft Office or similar.

tri.vu wrote:
is there anyway I can send message to MQ without installing MQ Clients?


If you're using .NET look into Managed Connections.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
tri.vu
PostPosted: Fri Feb 01, 2013 3:41 pm    Post subject: Reply with quote

Newbie

Joined: 01 Feb 2013
Posts: 9

Hi Vitor
Thank you for your valuable response. I've removed MQ Client and tried Managed Client Connection parameter in the connection and I was not able to put message to the queue. It seems that MQ client need to be there or the message will not be sent.

Below is the test function that I used to send message to MQ. Do I need to update any other parameter in the connection?


Private Sub test()
Dim hashConnProperties As New Hashtable()
hashConnProperties.Add(MQC.TRANSPORT_PROPERTY, MQC.TRANSPORT_MQSERIES_MANAGED)
'hashConnProperties.Add(MQC.TRANSPORT_PROPERTY, MQC.TRANSPORT_MQSERIES_XACLIENT)
hashConnProperties.Add(MQC.HOST_NAME_PROPERTY, "IBMMQ_XXX")
hashConnProperties.Add(MQC.CHANNEL_PROPERTY, "SRVR.CONN")

Try
Dim QueueMgr2 As MQQueueManager
QueueMgr2 = New MQQueueManager("MY.QUEUE.MANAGER", hashConnProperties)

Dim OutputQueue2 As MQQueue = Nothing
OutputQueue2 = QueueMgr2.AccessQueue("MY.TEST.QUEUE", MQC.MQOO_INPUT_AS_Q_DEF + MQC.MQOO_OUTPUT + MQC.MQOO_FAIL_IF_QUIESCING)

Dim putMqMsg As MQMessage = New MQMessage
putMqMsg.WriteString("<test>This is a long test<test>")
putMqMsg.Format = MQC.MQFMT_STRING

Dim pmo As MQPutMessageOptions = New MQPutMessageOptions
pmo.Options = MQC.MQPMO_NEW_MSG_ID Or MQC.MQPMO_SYNCPOINT
OutputQueue2.Put(putMqMsg, pmo)

If Not OutputQueue2 Is Nothing Then
'If IsOpen, then Close
If OutputQueue2.IsOpen() Then
OutputQueue2.Close()
End If
End If

If Not QueueMgr2 Is Nothing Then
If QueueMgr2.IsConnected Then
'If Isconnected, then Disconnect
QueueMgr2.Disconnect()
End If
End If
Catch ex As Exception
Throw New Exception(ex.ToString())
End Try
End Sub
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Feb 01, 2013 3:53 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

tri.vu wrote:
I was not able to put message to the queue.


Why not? Was there any kind of error or did you get a dialog box saying "Application just doesn't feel the message putting"

tri.vu wrote:
It seems that MQ client need to be there or the message will not be sent.


Is that what the documentation says about Managed Connections?

tri.vu wrote:
Do I need to update any other parameter in the connection?


Is that how the documentation says how to set up a managed connection? Does it say that just selecting the Managed option out of the constants is enough?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
tri.vu
PostPosted: Mon Feb 04, 2013 1:57 pm    Post subject: Reply with quote

Newbie

Joined: 01 Feb 2013
Posts: 9

Hi Vitor,
Thank you for your information. I did some further testing and figured out that it's the option at putting message to the queue

pmo.Options = MQC.MQPMO_NEW_MSG_ID Or MQC.MQPMO_SYNCPOINT

I removed the second option and this works for me: pmo.Options = MQC.MQPMO_NEW_MSG_ID

Before that the program completed without any error notification. However on checking MQ queue I do not see any message in the queue..
Thank you & I appreciate your time.

Tri
Back to top
View user's profile Send private message
gbaddeley
PostPosted: Mon Feb 04, 2013 2:19 pm    Post subject: Reply with quote

Jedi Knight

Joined: 25 Mar 2003
Posts: 2538
Location: Melbourne, Australia

tri.vu wrote:
Hi Vitor,
Thank you for your information. I did some further testing and figured out that it's the option at putting message to the queue

pmo.Options = MQC.MQPMO_NEW_MSG_ID Or MQC.MQPMO_SYNCPOINT

I removed the second option and this works for me: pmo.Options = MQC.MQPMO_NEW_MSG_ID

Before that the program completed without any error notification. However on checking MQ queue I do not see any message in the queue..
Thank you & I appreciate your time.

Tri


Before using MQPMO_SYNCPOINT you understand what it means! You would then know why the message was not visible or committed to the queue.
_________________
Glenn
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Feb 05, 2013 4:32 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

tri.vu wrote:
Before that the program completed without any error notification. However on checking MQ queue I do not see any message in the queue..


Of course you didn't. That's not an error, that's what you coded.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
tri.vu
PostPosted: Tue Feb 05, 2013 10:01 am    Post subject: Reply with quote

Newbie

Joined: 01 Feb 2013
Posts: 9

You are right! I do not understand what it means. I am still in the process of learning and collecting knowledge in this domain. That's why I am here in this forum
Thank you for pointing out the right direction - Managed client connection.

BTW, I have another question about MQPMO_SYNCPOINT.
This option will allow to commit the transaction when the program completed successfully, or the message will not be visible if any issue. In my case the flow is smooth until the output queue is closed, the queue manager is disconnected and the program completed without any issue. So I wonder why the message was not written to the queue?
Experts I'm waiting for your answer..
Thank you & I appreciate your time.

Tri
Back to top
View user's profile Send private message
bruce2359
PostPosted: Tue Feb 05, 2013 11:41 am    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9469
Location: US: west coast, almost. Otherwise, enroute.

tri.vu wrote:
So I wonder why the message was not written to the queue?

Did you application issue an explicit or implicit MQCMIT?
_________________
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
View user's profile Send private message
Vitor
PostPosted: Tue Feb 05, 2013 12:12 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

tri.vu wrote:
You are right! I do not understand what it means. I am still in the process of learning and collecting knowledge in this domain. That's why I am here in this forum


You're in the wrong place. We're not equipted to be a training resource nor have we any desire to be. Specific answers to specific questions yes, learning and collecting knowledge you're much better off with a mentor or a training course.

Really. WMB is a complex product and you'll have a terrible time trying to pick it up through here.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
tri.vu
PostPosted: Tue Feb 05, 2013 1:40 pm    Post subject: Reply with quote

Newbie

Joined: 01 Feb 2013
Posts: 9

Quote:
Did you application issue an explicit or implicit MQCMIT?


I did not issue any implicit / explicit MQCMIT. The test() function in the previous post is all what I have for verifying the issue.
Thanks Bruce!
[/quote]
Back to top
View user's profile Send private message
tri.vu
PostPosted: Tue Feb 05, 2013 1:59 pm    Post subject: Reply with quote

Newbie

Joined: 01 Feb 2013
Posts: 9

Quote:
We're not equipted to be a training resource nor have we any desire to be. Specific answers to specific questions yes

Hi Vitor, your pointing to "Managed connection" is much better than any training resources

Quote:
learning and collecting knowledge you're much better off with a mentor or a training course

I dont think so! learning should NOT be limitted to training courses or mentors. Beside the job learning processs can be conducted from useful tech forum with agressive experts as well
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Feb 05, 2013 11:11 pm    Post subject: Reply with quote

Grand High Poobah

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

You may want to read up in the infocenter.
I don't believe XA is available for a managed connection at the level of WMQ you are running...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
tri.vu
PostPosted: Wed Feb 06, 2013 12:10 pm    Post subject: Reply with quote

Newbie

Joined: 01 Feb 2013
Posts: 9

Thank you fjb_saper. The TRANSPORT_MQSERIES_XACLIENT was commented in the code I posted.. I should have removed it for more clarification. I'll go through the info center..
Back to top
View user's profile Send private message
tri.vu
PostPosted: Wed Feb 06, 2013 12:42 pm    Post subject: Reply with quote

Newbie

Joined: 01 Feb 2013
Posts: 9

For MQC.MQPMO_SYNCPOINT the code is missing
QueueMgr2.Commit() to write the message to the queue..
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » IBM MQ API Support » amqmdnet.dll without MQ client installed
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.