Author |
Message
|
cliao |
Posted: Fri Oct 08, 2004 8:59 am Post subject: need sample code in vb.net on set the trigger on and off |
|
|
Novice
Joined: 08 Sep 2004 Posts: 23
|
Can some one give me an example on how to set the trigger on and off on an queue using vb.net?
Thanks,
Lei |
|
Back to top |
|
 |
kirani |
Posted: Fri Oct 08, 2004 11:28 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
If you have access to WMQ 5.3 (CSD5 or later) machine, you can find some vb.net sample programs in <wmq_home>\Tools\dotNet\samples\vb directory. Also, look at Using .NET manual. There are methods in MQQueue class to set these properties. _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
cliao |
Posted: Mon Oct 11, 2004 6:33 am Post subject: |
|
|
Novice
Joined: 08 Sep 2004 Posts: 23
|
I know there's sample programs come with it. However, there no sample on how to turn the trigger of the queue on/off. |
|
Back to top |
|
 |
kirani |
Posted: Mon Oct 11, 2004 11:23 am Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Well, you need to read the Using .NET manual for that. Take a look at properties for MQQueue class. You can use TriggerControl method. _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
cliao |
Posted: Wed Oct 13, 2004 11:39 am Post subject: |
|
|
Novice
Joined: 08 Sep 2004 Posts: 23
|
sorry to bother you, but would you please let me know where I can get that manual?
Thanks, |
|
Back to top |
|
 |
EddieA |
Posted: Wed Oct 13, 2004 11:49 am Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
<WMQ_HOME>/csqzav01.pdf. Provided you have applied a FixPac that supplies it.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
kirani |
Posted: Wed Oct 13, 2004 1:21 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
|
Back to top |
|
 |
EddieA |
Posted: Wed Oct 13, 2004 3:29 pm Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
Nice. Both csqzav01.pdf and csqzav03.pdf are the same: GC34-6328-02.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
cliao |
Posted: Mon Oct 18, 2004 8:07 am Post subject: |
|
|
Novice
Joined: 08 Sep 2004 Posts: 23
|
this is what I have, and I got the mq selector error.
************************************************************
Try
objQueue = objQMgr.AccessQueue(strQname, MQC.MQOO_SET + MQC.MQOO_INQUIRE + MQC.MQOO_FAIL_IF_QUIESCING) '* open queue for input but not if MQM stopping
If iOption = 0 Then
objQueue.Set(lSel(2), lIntArr(0), cChar2)
ElseIf iOption = 1 Then
'objQueue.TriggerControl(MQC.MQTC_ON)
End If
TriggerControl = True
Catch ex As IBM.WMQ.MQException
Console.WriteLine("Error accessing the trigger")
Console.WriteLine(ex.Reason)
Console.WriteLine(ex.Message)
TriggerControl = False
End Try
************************************************************
what I have for lSel is: lSel = New Integer() {MQC.MQIA_CURRENT_Q_DEPTH, MQC.MQIA_OPEN_INPUT_COUNT, MQC.MQIA_TRIGGER_CONTROL}
and lIntArr is lIntArr = New Integer() {0, 1}
Thanks for your help.
Lei |
|
Back to top |
|
 |
JasonE |
Posted: Fri Oct 22, 2004 2:34 am Post subject: |
|
|
Grand Master
Joined: 03 Nov 2003 Posts: 1220 Location: Hursley
|
Have you solved this problem? If not, I'll take a look (I'm not in the office at the moment which is why I havent been answering) |
|
Back to top |
|
 |
cliao |
Posted: Thu Nov 11, 2004 7:24 am Post subject: |
|
|
Novice
Joined: 08 Sep 2004 Posts: 23
|
Yes, I have solve the problem. Thanks for all the help.
cl |
|
Back to top |
|
 |
|