How to block on MQ queue with MQControl

I'm using WL 8.1SP4.
I'm trying to use the com.bea.control.MQControl class. It seems like there is no way to "block" on a queue with this. It appears that the various "getMessageAs..." methods will just throw a ResourceException if there is no message on the queue. Failing a blocking capability, I have to implement a complicated wait/retry loop so the app doesn't spin waiting for a message.
Alternatively, if my jpd has a Subscription node for the queue, if I get to that node, does that mean that there is definitely a message on the queue at that point? It would be ok if I could execute the process only when there is a message on the queue, and I could restart it each time.

I figured out how to do this. The MQMDHeaders instance, which gets passed to the "getMessageAsString()" method, has a "waitInterval" property, which when set to "-1", will wait forever.
What I'm not sure about, however, is whether it's valid to block for resources inside a JPD.

Similar Messages

  • How to notify the waiting queue with first-in-first-out?

    Could anyone know
    how to notify the waiting queue with first-in-first-out?
    I dont want to notify the waiting queue randomly!
    thanks~

    i assume you are referring to wait "queue" of threads waiting to be notified. while you can do this with some effort on your own part (it's not trivial), depending on what type of guarantees you want, you could use a ReentrantLock with the "fair" policy. it tries to be FIFO but doesn't guarantee it. if you need stronger guarantees, then you will have to code it yourself.
    note, that many of the reasons for using wait/notify explicitly are now handled with some of the concurrent utilities like BlockingQueue, so you may not need to code your own wait/notify logic.

  • How to block the multiple logons with NWBC?

    Hello,
    With Sapgui we have the possibility to prevent the multiple dialog logon by profile parameters (login/disable_multi_gui_login).
    How to prevent the multiple dialog logon using NWBC to the same system?
    Best regards
    Frédéric Blaise
    e-Kenz S.A.
    Luxembourg

    Hello,
    I opened a ticket at Sap but unfortunately they do not have a solution even if the problem is known.
    "Unfortunately, due the HTTP protocol nature, is not possible to force a single logon via web browser. The profile parameter login/disable_multi_gui_login is solely valid for SAPGUI logons."
    "Since this case is known since the Web Application Server was created, I am pretty convinced that SAP knows about the fact that multiple logons cannot be blocked (you can only give a warning for the user)."
    Since we monitor multiple connections with the SM04 transaction and notify customers that they may be controlled by Sap.
    Best regards
    Frédéric

  • How to block an Ipod Touch with a serial number?

    Who can tell me how i can block my Ipod Touch, it was stolen and i did not configured the Icloud application to find it or lock it...Can i block it with the serial number? i live in Colombia and i don´t really know where can i get support to do this..
    thank you

    No. The SN will only help idenify the iPod as yours if it is recovered.
    - Report to police and change the passwords fro all accounts used on the iPod.
    - Apple will not help
    Reporting a lost or stolen Apple product

  • How to block encoded subject header with =?utf-8?B?

    What is the best way to block email with encoded subject header with          
    =?utf-8?B?WzM0MDkzODld5ZyG5Lit5Zu95bel5Lia5qKm77ya44CK5Lqn5ZOB5aSn5YWo5ZKM5bqU55So5qGI5L6L5omL5YaM44CLKDIwMTPlubQp5YWN6LS55LiL6L29KDMy6aG1LOmrmOa4hSw3TSxQREbmoLzlvI8pWzYwZzJqMDk5aHVzZnMwYWhja2FjZm00c3dyazlwd3o5M2dmbm1nbHo0Ym50ZV0=?=        

    Customize the adapter to write the files out in UTF-8.
    OR
    Write code to re-create the .DAT output file in UTF-8 format.
    I'm not sure the exact coding on either option, but anything is possible.

  • Block material of sloc with HU management

    Hi experts,
    How to block material in sloc with HU management. I found I can't use MB1B 344 to do it. I check SAP help and found standard sap provide me tcode VLMOVE to do it, but I see in mateiral process there is no 344 mvt can't find.
    Who can explain me detail about block material from unrestricted to block status with HU sloc.
    Thanks.

    Hi Santosh,
    I don't need do GR for special stock, why use 103,105 mvt. Please explain in detail, thanks.
    Stock is in shipping sloc for finished goods.
    Edited by: wlmworld on Dec 30, 2008 8:24 AM

  • My neighbour's Mac Book Pro shows up as discoverable when Bluetooth is turned on in my iPad Air.  How can I block her device?  How can I prevent her pairing with my iPad Air. I need Bluetooth on to play music over my system.

    My neighbour's Mac Book Pro shows up as discoverable in my Bluetooth list on my iPad Air.  How can I block her Bluetooth device? How can I prevent her pairing with my device?  I need Bluetooth to stream music on my Bose system.  Thanks!

    If your device is discoverable, the other BT device would try (I am not sure if that would be successful). If it was, it would appear in your system preferences>Bluetooth.
    Take a look at this re: security:
    http://support.apple.com/kb/PH10786
    This is from another Apple article:
    Use Bluetooth
    You can wirelessly transfer files between computers—even Mac to PC—using the Bluetooth File Exchange utility. You can even browse selected devices and retrieve files remotely. For extra security, you can stipulate that only trusted devices be allowed to connect to your Mac, and 128-bit over-the-air encryption is also available
    Barry
    P.S. Since I have not had the issue, I have not researched this before. Thank you for making me look into BT security
    Message was edited by: Barry Hemphill

  • ? How do I delete large blocks of empty space with Adobe Acrobat Pro?

    How do I delete large blocks of empty space with Adobe Acrobat Pro?

    How can you delete "empty space"? If you mean that you want to delete lines,
    like in Word, so that the text afterwards will go "up the page", then you're
    out of luck. You should do that in the original file, and then re-create the
    PDF.

  • How to block p2p applications(Bittorent like) with AIP-SSM-10?

    Hi,
    How to block p2p application using AIP-SSM-10 working with ASA5520?AIP is on promiscuous mode.
    Thanks,
    Siva

    There are several signatures that detect p2p, for bit torrent there is 11020.0
    Yahoo triggers: 5539.0, 11200.0, 11212.0, 11217.0 & 11219.0
    etc..
    Some are disabled by default though so please ensure you enable the ones that you need.
    If you want to block these then you will have to use event actions that work in promiscuous setup for example request block connection and tcp reset. Please note that care must be taken when using these event actions.
    For more information about the event actions please refer the link below:
    http://www.cisco.com/univercd/cc/td/doc/product/iaabu/csids/csids12/idmguide/dmevtrul.htm#wp1069467

  • How to share 10.6 OSX Server print queue with Windows 7 successfully?

    I used Bonjour Print Services for a Windows 7 machine (http://support.apple.com/kb/dl999) to successfully connect to a Mac OX Server 10.6 print queue, and the following message is generated in the print log and CUPS log,
    "POST/printers/stormoncecar/ HTTP/ 1.1" 200 2205 Print-Job Successful-OK
    There are no errors, however, nothing comes out of the printer.  It works for all the Mac OS Client machines, but not for any of the Windows 7 machines.
    How to share print queue with Windows 7 successfully?

    I'm back on this problem.  I thought I would give more details as I still can't print. 
    Operating System: 10.6.8
    Driver for Canon LBP6750 UFRII prints from Mac and prints from Windows 7.  However, printing from Windows 7 as you share the printer from your Mac does not print out anything and has no errors.
    JOB INFO
    Completed smbprn.00000004 Microsoft Word - Document 1 3:43PM Today 3:43PM Name
    CUPS > access_log
    localhost - - [01/Feb/2012:15:43:33 +0900] "POST /printers/FLOOD_6750_UFR HTTP/1.1" 401 2003 Print-Job successful-ok
    localhost - lino [01/Feb/2012:15:43:33 +0900] "POST /printers/FLOOD_6750_UFR HTTP/1.1" 200 2003 Print-Job successful-ok
    CONSOLE MESSAGES
    2/1/12 3:47:45 PM    com.apple.launchd.peruser.501[
    200]    (jp.co.canon.UFR2.BackGrounder[664]) posix_spawn("/Library/Printers/Canon/UFR2/Utilities/UFR II BackGrounder.app/Contents/MacOS/UFR II BackGrounder", ...): No such file or directory

  • My button does not work is that to turn my ipod works and my ipod is block is an apple with a loading baarre how do I restore it?

    my button does not work is that to turn my ipod works and my ipod is block is an apple with a loading baarre how do i restore it ? please help me

    Try:
    - iOS: Not responding or does not turn on
    Where it says place the iPod in recovery mode use this program vice the iPod's buttons
    RecBoot: Easy Way to Put iPhone into Recovery Mode
    - If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
    - Try on another computer
    - If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
    Apple Retail Store - Genius Bar       

  • How do you block copying of content with createPDF??

    new user
    how do you block copying of content with createPDF??

    You'll need Acrobat Std. or Pro. to set security on a PDF document that disallows copying of the content.

  • How to get all the recipients of a server queue with powershell

    Hello,
    I have a queue who remains "full" because there was a bounce email sent to invalid addresses. I am looking for an easy way to list all the recipients with invalid addresses.
    I can have the list of emails in the queue with this command :
    get-queue -identity ServerName\Shadow\37057 | get-message
    But I am unable to list the recipient address with this one :
    get-queue -identity POST1MTY\Shadow\37057 | get-message -IncludeRecipient
    Can somebody help me with this ?
    Thank you in advance for your help.
    zigune

    Hi zigune,
    Thank you for your question.
    We could try to the following command to get the recipient address:
    Get-MessageTrackingLog –server “servername” | FL sender,Event-id,recipients | export-csv C:\test\test.csv
    Then, we could use log parser to view csv file for invalid recipient address, we could download log parser tool by the following link:
    http://www.microsoft.com/en-us/download/details.aspx?id=24659
    In other way, we could also try adding the “-IncludeRecipientInfo” in command:
    http://technet.microsoft.com/en-us/library/bb124738(v=exchg.150).aspx
    If there are any questions regarding this issue, please be free to let me know. 
    Best Regard,
    Jim

  • How to use a queue with dynamic data

    When using a collector I have found that it significantly slows down my loop times. I am using LabView7.1 on a Dell PC with Windows XP.  If I use a queue with dynamic data do you think that will require less of my processor and allow for faster loop speeds?
    I have created a queue using dynamic data in one loop and I want to retrieve all available samples each iteration in a slower loop. If I use the flush queue I get a 1d array of dynamic data. What is the best way to convert the 1d array of dynamic data so that the array of dynamic data is consolidated back into a single dynamic data type? Any help would be much appreciated.

    Hi Dennis,
    You could for instance wire the array to an auto-indexed for loop. I attach an example. I assume you wish to concatenate the arrays a singel waveform.
    Hope it helps,
    Pelle S
    District Sales Manager
    National Instruments Sweden
    Attachments:
    Dynamic queue.vi ‏245 KB

  • How to block expression with Spry ValidationTextarea?

    I have a spam problem with one of my forms. I would like to simply validate my Text Area not to allow URLs to be entered there (IE: If say - "http://" is entered - show an error warning and do not submit). I cannot find any information on how to do this using Spry. The closest I have found is "regExpFilter" for Test Fields. Not only am I unsure how this works, but it appears there is no such thing for Text Areas. Could someone please show or point me to a code example that could do this for me?
    I could start over and write my own script not using Spry, but the form is already using Spry validation, the client likes it, and does not want to reprogram the whole thing.
    (my Spry version is 1.6.1)
    Thank you for any help,
    Dave

    Great. I like your last idea and know how to hide a text field with CSS.
    I assume I would just have to check the field values on the back end (PHP in my case) when form is submitted, because using some javascript form validation will not work against with robots? Correct?
    ...and thank you.

Maybe you are looking for