Register a Callback function in LabVIEW

Is there any way to register a callback function in LabVIEW. For example:
I have a DLL on Win2k that run a thread. This thread is doing a certain task (it is not important what it does...) I can't predict when this task will end and I need to know when the task is over. The easy way would be to poll this DLL and ask: "Is it over? Is it over?" over and over again. No! I don't want to poll. Not because it's too easy. I want this DLL to wake me up on time.
Any idea, solutions, function that I'm not aware of, new features...
Thanks
Nitrof

I think I have a much better solution for you. Here is an example program that show how to set a LabVIEW occurence in a dll. Therefore when your dll is done it can set the LabVIEW occurence, meanwhile your VI is just waiting on the occurence.
More infomration on this is in the external code in LabVIEW manual Using External Code in LabVIEW
NOTE:This will ONLY work in LabVIEW 7.
Attachments:
SetOccurDll.zip ‏165 KB

Similar Messages

  • How to implement a callback function using LabView's Call Library Function Node?

    I am trying to call a fuction from a SDK.dll library using the Call Library Function Node. The SDK was provided to
    me and I do not have the source code, just the .dll and .h files.
    The SdkSetPropertyEventHandler function has a callback fuction as one of its parameters. How do I implement the
    callback using the CLF node? I am a good LabView programmer but this is my first time using the Call Library
    Function Node. I have read all the info I can find on NI's web site and the discussion board but cannot figure
    this one out. I am using LabView 8.6.
    The SDK.h deacribes the function as:
    //  Function:   SdkSetPropertyEventHandler
    SdkError SDKAPI SdkSetPropertyEventHandler(
                SdkCameraRef                    inCameraRef,
                SdkPropertyEvent                inEvnet,          
                SdkPropertyEventHandler         inPropertyEventHandler,
                SdkVoid*                        inContext );
    //  Description:
    //       Registers a callback function for receiving status
    //          change notification events for property states on a camera.
    //  Parameters:
    //       In:    inCameraRef - Designate the camera object.
    //              inEvent - Designate one or all events to be supplemented.
    //              inPropertyEventHandler - Designate the pointer to the callback
    //                      function for receiving property-related camera events.
    //              inContext - Designate application information to be passed by
    //                      means of the callback function. Any data needed for
    //                      your application can be passed.
    //      Out:    None
    //  Returns:    Any of the sdk errors.
    A separate header file called SDKTypes.h contains the following data:
    typedef  SdkUInt32  SdkPropertyEvent;
    typedef  SdkUInt32  SdkPropertyID;
    typedef  void       SdkVoid;
    typedef  struct __SdkObject*    SdkBaseRef;
    typedef  SdkBaseRef    SdkCameraRef;
     SdkPropertyEventHandler
    typedef SdkError ( SDKCALLBACK *SdkPropertyEventHandler )(
                        SdkPropertyEvent        inEvent,
                        SdkPropertyID           inPropertyID,
                        SdkUInt32               inParam,
                        SdkVoid *               inContext );
    Thanks for your help.
    Alejandro
    Solved!
    Go to Solution.

    alejandroandreatta wrote:
    I am trying to call a fuction from a SDK.dll library using the Call Library Function Node. The SDK was provided to
    me and I do not have the source code, just the .dll and .h files.
    The SdkSetPropertyEventHandler function has a callback fuction as one of its parameters. How do I implement the
    callback using the CLF node? I am a good LabView programmer but this is my first time using the Call Library
    Function Node. I have read all the info I can find on NI's web site and the discussion board but cannot figure
    this one out. I am using LabView 8.6.
    Basically you do not do that. LabVIEW does not know pointers and certainly not function pointers. What you should do instead is writing a C DLL that implements the callback and also exports a function to be called by LabVIEW that translates between the callback and a LabVIEW user event. Look for PostLVUserEvent() here on the NI site to find examples how to do that.
    Rolf Kalbermatter
    Message Edited by rolfk on 02-11-2009 08:00 PM
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Registering AQ Callback function

    Can Oracle-8.1.7 which is installed on a Sun-Solaris machine send a notification to a WindowsNT callback function?
    I am using OCI for receving notifications from AQ.
    If I have Oracle and the Client application running on the same Operating system then everything works fine.
    If I run Oracle on Sun-Solaris, and the Client application on WindowsNT, then the client application is NOT able receive notifications from AQ.

    Hi,
    Kindly check below;
    AQ PL/SQL Notification: PL/SQL Callback and Email Notification (Doc ID 225749.1)
    Also let me know if there are any Q0** or J0** traces generated.
    Thanks,

  • MIDI in using DLL callback function

    I am trying to get MIDI into LV. The dll used is winmm.dll and the function midiinopen (plus others) is described here:
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/multimed/htm/_win32_midiinopen.asp
    The main problem is I don't know how to program the Call Library Function Node properly in order to perform the call
    plus set it to start receiving callback data, being midi messages. I have tried creating and registering a User Event and
    passing the Event ref to the dll's "dwCallback" and then trapping the callback in an Event Structure, but nothing happens.
    I have studied the "Communicating with a Windows MIDI Device in LabVIEW" example but it gives no hint since midi out
    does not require the use of callbacks.
    Please advice,
    Stefan

    Vedeja wrote:
    I am trying to get MIDI into LV. The dll used is winmm.dll and the function midiinopen (plus others) is described here:
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/multimed/htm/_win32_midiinopen.asp
    The main problem is I don't know how to program the Call Library Function Node properly in order to perform the call
    plus set it to start receiving callback data, being midi messages. I have tried creating and registering a User Event and
    passing the Event ref to the dll's "dwCallback" and then trapping the callback in an Event Structure, but nothing happens.
    Damn! Need to make this post shorter as this message
    board just silently told me that it needs to be shorter than 5000 words
    and ate up my lengthy repsonse with no way to get it back.
    You can't configure a Call Library Node to pass a Callback function to
    another function. Callback functions have been alien to LabVIEW for a
    long time with good reasons and what it has now as callback function in
    LabVIEw 7.1 and newer is not directly compatible with C callback
    functions.
    Basically as you want to get data from the callback function back into
    LabVIEW there is really no way around some intermediate software layer
    which in this case almost surely means your own specific wrapper DLL
    written in C.
    If you use LabVIEW 7.1 you could use user events but not in the way you
    describe. Attached is an example of how you can use user events from
    external code. Note the extra DLL you will have to write. You have to
    watch out what data you pass back to the user event as it has to match
    exactly the type you configured the user event for, otherwise LabVIEW
    will simply crash on you.
    For numerics this is quite simply and also shown in the example. For
    strings you can't just pass back a C string pointer but you will have
    to allocate a LabVIEW string handle with
    handle = DSNewHandle(sizeof(int32) + <length of C string>)
    and then copy the C string into it. For specifics about how to do this
    you should refer to the External Code reference manual in your Online
    Bookshelf. Similar rules apply for arrays or clusters for that matter.
    If you want or need to do this for LabVIEW < 7.1 there are two
    possible approaches but both are even less trivial. You could either
    create a wrapper DLL that translates your callback events into LabVIEW
    occurrences and for the data transfer back to LabVIEW you would have to
    implement your own queing too, or you could use the Windows Message
    Queue example somewhere here in the NI examples and adapt it to return
    your specific data. That would solve the data queueing more or less for
    you without having to worry about that.
    Rolf Kalbermatter
    Message Edited by rolfk on 05-22-2006 11:22 AM
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions
    Attachments:
    userevent.zip ‏27 KB

  • Callback Function in AQ not launched

    Hi All,
    I have registered a callback function on a queue. When I enqueue it has to call callback function. Below is my scrip for creation of Queue and Enqueue.
    CREATE type xxMessage_typ as object
        ( subject VARCHAR2(30), text VARCHAR2(80));
    =================================================
    BEGIN
    SYS.DBMS_AQADM.CREATE_QUEUE_TABLE(
                      QUEUE_TABLE           =>  'XXKNL_TEST_QTAB'
                     ,QUEUE_PAYLOAD_TYPE    =>  'xxMessage_typ'
                     ,MULTIPLE_CONSUMERS    =>  TRUE);
    END;
    ===============================================
    BEGIN
    SYS.DBMS_AQADM.CREATE_QUEUE(
                      QUEUE_NAME          =>   'XXKNL_TEST_Q'
                     ,QUEUE_TABLE         =>   'XXKNL_TEST_QTAB'
    END;
    ============================================
    BEGIN
    dbms_aqadm.add_subscriber
            ( queue_name => 'XXKNL_TEST_Q',
              subscriber => sys.aq$_agent( 'RECIPIENT', null, null ) );
    SYS.DBMS_AQ.REGISTER ( SYS.AQ$_REG_INFO_LIST( SYS.AQ$_REG_INFO('XXKNL_TEST_Q:RECIPIENT',DBMS_AQ.NAMESPACE_AQ,
                   'plsql://XXKNL_NOTIFYCB',
                    HEXTORAW('FF')
              1
    END;
    ===================================
    BEGIN
      SYS.DBMS_AQADM.START_QUEUE
        QUEUE_NAME => 'XXKNL_TEST_Q'
       ,ENQUEUE => TRUE
       ,DEQUEUE => TRUE
    END;
    ==========================================
    DECLARE
    enqueue_options dbms_aq.enqueue_options_t;
         message_properties dbms_aq.message_properties_t;
         message_handle RAW(16);
         message xxmessage_typ;
    BEGIN
           message := xxmessage_typ('NORMAL MESSAGE',  'This is my Q..' );
           dbms_aq.enqueue(queue_name => 'xxknl_test_q',
                          enqueue_options => enqueue_options,
                          message_properties => message_properties,
                          payload => message,
                          msgid => message_handle);
    end;
    ========================================================
    create or replace procedure xxknl_notifyCB( context raw,
                                              reginfo sys.aq$_reg_info,
                                              descr sys.aq$_descriptor,
                                              payload raw,
                                              payloadl number)
        as
         dequeue_options dbms_aq.dequeue_options_t;
         message_properties dbms_aq.message_properties_t;
         message_handle RAW(16);
        message xxmessage_typ;
       BEGIN
          dequeue_options.msgid := descr.msg_id;
          dequeue_options.consumer_name := descr.consumer_name;
          DBMS_AQ.DEQUEUE(queue_name => descr.queue_name,
                          dequeue_options => dequeue_options,
                          message_properties => message_properties,
                          payload => message,
                          msgid => message_handle);
          insert into xxknl_test values
          ( 'Dequeued and processed "' || message.text || '"' );
          COMMIT;
       END;
    Please let me know if something is missed.
    Thanks
    Rishi

    Hi,
    Kindly check below;
    AQ PL/SQL Notification: PL/SQL Callback and Email Notification (Doc ID 225749.1)
    Also let me know if there are any Q0** or J0** traces generated.
    Thanks,

  • Recursive ActiveX register event callback VI

    Hi!
    I am trying to control a motor in LV2013 using the ActiveX concept. When I use a "register event callback VI" function, can I call the same VI that calls a VI (with the "stop rule" controlled be the user data terminal, of course, inside)? By default, callback Vis that one can create for this are all reentrant (preallocated clone) and synchronious (according to help). However, both when I use the "server VI reference" ("This VI") and when I create a reference and browse for the same file - "register event callback" shows me a broken wire.

    _Basil_ wrote:
    As far as I understood, putting a  movement method in the loop will not give any result, so I tought in the direction of the recursive callback. However, I found this post. Would you in general agree that the callback VI cannot be recursive? I attach my code in LV13 (if you need me to convert, I will)
    Sorry, I'm still on LabVIEW 2012 here, so can't look at your VIs. I don't understand your comments in these sentences though. What do you mean by putting a movement method in a loop will not give any result? And why would you ever want a recursive callback? The callback is called each time the event occurs. There's no sense in making it recursive, nor would you want to re-register for a callback on an event inside a callback VI. Normally a callback should contain very little logic; it should primarily pass some piece of information (through a queue, user event, etc) back to the main thread and let the main logic handle it.

  • How to write c wrapper it containing callback functions

    hi here shambhu below call can be containing some call back functions ,how can create wrapper for this,please suggest me
    _export int GDSRegisterStation(char *sPort, char* sPanel, int iStation, GDSCallback lpGDSTaskCall); /*
    This call hooks up user application onto the GDS environment. From this point on, the GDS application has continuous, concurrent access to the virtual machine representing the test system. As multiple independent test systems may be hooked onto the same host computer, the call needs to specify a "Port" (unsigned uPort) to which GDS memory access is sought. Character string sPanel (up to 63 chars) identifies the calling GDS task to the Virtual Machine. This entry will assist the System Manager in monitoring active GDS tasks by their assigned names. As multiple test stations (each with one or more control channels) may be associated with the same controller, (int) iStation specifies the station to which this application will be connected. (GDSCallback) lpGDSTaskCal specifies the subroutine in the user application that is to be installed as the real-time callback into the Virtual Machine. From this moment on, the specified subroutine will be automatically called by the Virtual Machine to periodically All subsequent calls to the GDS library will apply to this Station and its control channels. This call is made only once and prior to other GDS calls. 0 is returned upon normal completion -1 is returned if the call was a failure due to absence of GDS space associated with the call. Make sure station is connected and On-Line and make sure Port No was correct in the call -2 is returned if the application was already registered by a previous call

    You will have to write a wrapper DLL in C which converts the callback event into a LabVIEW compatible event. The most versatile way would be to generate a user event with the PostLVUserEvent() LabVIEW manager function. Callback functions are however an advanced C programming construct, so you should definitely have a pretty decent understanding of C programming before starting this endeavour. Otherwise you end up with a not working solution or maybe even worse, one that seems to work sometimes but doesn't really do the right thing.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • How to create a callback function module

    Hi all,
    I am working in a requirement where we need to call a function module at a 'after change' event. So how to create a callback function module and register it with the crmvevent ?_
    I created a sample function module and try to create entries in table crmv_event_cust, but i got an error message saying that the function module name I provided is not in table CRMC_FUNC_ASSIGN. When I try to create entry there, I got a message that function module is not in CRMC_OBJ_FUNC and that table is a standard table with no maintanance options !!
    looks like i am going in wrong way ... can any one please help ??

    Looking at my system all you need to do is create the entry for the callback function in maint view: CRMV_FUNC_ASSIGN.
    Your entry should be as simple as Z-function name Object Function - <same as others in the segment you are assigning>
    IE for the partner it would be CRM_PARTNER as object function, for general order processing CRM_ORDER
    Take care,
    Stephen

  • Problem with register event callback in use of instrument control

    now, i use the register event callback to register a value change of a boolean control on the front panel, and wire the cluster's ref of the instrument control parameters to the user parameter input, then create the callback vi. In the callback vi, i select the pump-control subvi, and pass the user parameter to the subvi. The problem is that,  when i press the boolean control, the instrument (here is pump) can act, but immediately, the code crashes.
    I use labview 8.6
    Attachments:
    callback vi.png ‏8 KB
    register event callback.png ‏8 KB

    You would wire the event registration wire that comes out of the Register for Events node into an event structure.  You will need to right click on the event structure and check off "Show Dynamic Event Terminals" and it into that.  Then you can create a new Event Case that uses the dynamic event.  You can place your subVI in that event in whatever way you want.  (Just drop the subVI in or do a Call by Reference there, or whatever.)  Look in the Example Finder for "Dynamically Register for Events.vi".

  • Queue with callback function not dequeuing

    Hi,
    I would like to ask you for help or for a hint regarding our problem with the queue:
    A trigger is enqueuing to a queue. This works fine, but the callback function is never called. The queue already worked for a while, but since i changed something at the procedure called by the callback it does not work anymore.
    I already have tried the following:
    -Stopping and restarting
    -Dropping and recreating (with the scheduler having no jobs anymore)
    -Dropping, restarting the database and recreating
    None of these worked. Where do I fail, when considering that the queue with the same scripts worked already? I post the script for creating the queue and adding the subscriber:
    CREATE OR REPLACE TYPE pat_history_queue_payload_type AS OBJECT
    ( TSTAMP VARCHAR2(22 CHAR),
    TYP VARCHAR2(10 CHAR),
    DELTA_MENGE NUMBER,
    ORIGIN VARCHAR2(1 CHAR),
    TEXT VARCHAR2(1000 CHAR),
    QL_TSTAMP VARCHAR2(22 CHAR)
    BEGIN
    DBMS_AQADM.CREATE_QUEUE_TABLE (
    queue_table => 'pat_history_queue_table',
    queue_payload_type => 'pat_history_queue_payload_type',
    multiple_consumers => TRUE
    END;
    BEGIN
    DBMS_AQADM.CREATE_QUEUE (
    queue_name => 'pat_history_queue',
    queue_table => 'pat_history_queue_table',
    max_retries => 10
    DBMS_AQADM.START_QUEUE (
    queue_name => 'pat_history_queue'
    END;
    BEGIN
    DBMS_AQADM.ADD_SUBSCRIBER (
    queue_name => 'pat_history_queue',
    subscriber => SYS.AQ$_AGENT(
    'pat_history_queue_subscriber',
    NULL,
    NULL )
    DBMS_AQ.REGISTER (
    SYS.AQ$_REG_INFO_LIST(
    SYS.AQ$_REG_INFO(
    'pat_history_queue:pat_history_queue_subscriber',
    DBMS_AQ.NAMESPACE_AQ,
    'plsql://PAT.HISTORY_QUEUE_DISTRIBUTION.CALLBACK',
    HEXTORAW('FF')
    1
    END;
    The function CALLBACK which is called by the queue, is never called, I checked that with log messages. Also the package that contains the function is compiled ok.
    Thanks.
    Roland

    Hi,
    Does the subscription show up correct in sys.reg$ ?
    Regards,
    Harry
    http://dbaharrison.blogspot.com/

  • Import dll callback function

    Having trouble with this line "void   (*m_callback)(_t_pciCommand *cmd);" in PciApi.h file. I have replaced it with NULL and was able to import 2 functions, PciAllocCommand and PciSendCommand. I was then able to get valid information using GetValueByPointer.VI, but crash most of the time.
    typedef struct _t_pciCommand
                    t_pciCommandType                      m_command;
                    t_commandError                          m_error;
                    long                                               m_gpVal;
                    void                                                (*m_callback)(_t_pciCommand *cmd);
                    long                                              m_param[MAX_PCI_PARAMS];
                    int                                               m_state;
                    int                                               m_retries;
                    int                                               m_expected;           
                    long                                            m_origParam[MAX_PCI_PARAMS];
    } t_pciCommand;
    All files attached. Based on this callback funtion, I can't seem to resolve 2 functions, called PciAllocCommand and PciSendCommand.
    Thanks,
    John
    Solved!
    Go to Solution.
    Attachments:
    PciApiDll7.zip ‏630 KB

    The manual is "pci_api_manual_jb.doc", The funtion I care most about is PciAllocCommand and the #1 issue I have is how to pass "m_param[0]" , "m_param[1]" and "m_param[2]" to the dll. The original h file is "PciApp(original).h" . The second issue would be if removing the callback functionality I need a VI to poll the status of "t_PciCommand "Function without writing to it.
    For example, PciAllocCommand(c_baudrate, NULL, 0). How do I set baud = m_param[0]?
    Also I am adding a TestApp.exe example of what I want to do in Labview, focusing on the Param1 and Param2
    Attachments:
    PciApiDll7.zip ‏630 KB
    TestApp.zip ‏67 KB

  • Memory leak with callback function

    Hi,
    I am fairly new to LabWindows and the ninetv library, i have mostly been working with LabVIEW.
    I am trying to create a basic (no GUI) c++ client that sets up subscriptions to several network variables publishing DAQ data from a PXI.
    The data for each variable is sent in a cluster and contains various datatypes along with a large int16 2D array for the data acquired(average array size is 100k in total, and the average time between data sent is 10ms). I have on average 10 of these DAQ variables.
    I am passing the same callback function as an arguement to all of these subscriptions(CNVCreateSubcription).
    It reads all the correct data, but i have one problem which is that i am experiencing a memory leak in the callback function that i pass to the CNVCreateSubscription.
    I have reduced the code one by one line and found the function that actually causes the memory leak, which is a CNVGetStructFields(). At this point in the program the data has still not been passed to the clients variables.
    This is a simplified version of the callback function, where i just unpack the cluster and get the data (only showing from one field in the cluster in the example, also not showing the decleration).
    The function is passed into to the subscribe function, like so:
    static void CNVCALLBACK SubscriberCallback(void * handle, CNVData data, void * callbackData);
    CNVCreateSubscriber (url.c_str(), SubscriberCallback, NULL, 0, CNVWaitForever, 0 , &subscriber);
    static void CNVCALLBACK SubscriberCallback(void * handle, CNVData data, void * callbackData)
    int16_t daqValue[100000];
    long unsigned int nDims;
    long unsigned int daqDims[2];
    CNVData fields[1];
    CNVDataType type;
    unsigned short int numFields;
    CNVGetDataType(data, &type, &nDims);
    CNVGetNumberOfStructFields (data, &numFields);
    CNVGetStructFields (data, fields, numFields); // <-------HERE IS THE PROBLEM, i can comment out the code after this point and it still causes a memory leak.
    CNVGetDataType(fields[0], &type, &nDims);
    CNVGetArrayDataDimensions(fields[0], nDims, acqDims);
    CNVGetArrayDataValue(fields[0], type, daqValue, daqDims[0]*daqDims[1]);
    CNVDisposeData(data);
    At the average settings i use all my systems memory (4GB) within one hour. 
    My question is, have any else experienced this and what could the problem/solution to this be?
    Thanks.
    Solved!
    Go to Solution.

    Of course.....if it is something i hate more than mistakes, it is obvious mistakes.
    Thank you for pointing it out, now everything works

  • Application Builder, Callback function and ActiveX

    I have a software application which calls a callback function. This
    callback function talks to an Activex component. When I try to build
    an application.exe, the exe always hangs. Anyone know how to get
    around this? In the Labview developement envirorment it works just
    fine.
    -Chuck

    What is the ActiveX control that you're calling?
    Where in the execution of the code does the program hang?
    Can you post any of your code?
    What version of LV are you using? What version of Windows?
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • How to call this dll point function by labview

    Void SetCompStatusCallBack(void ((*CompStatusCallBack)(int id, int status, unsigned char conflict)))
    Sets up callback function for getting component status.
    Parameters:
    * CompStatusCallback – entry point for callback function.
    Return Value:
             None.

    left wrote:
    Void SetCompStatusCallBack(void ((*CompStatusCallBack)(int id, int status, unsigned char conflict)))
    Sets up callback function for getting component status.
    Parameters:
    * CompStatusCallback – entry point for callback function.
    Return Value:
             None.
    You don't. This is the callback protoype that would be passed as parameter to another API and as such never will be called by the caller of that API but instead be provided by that caller!
    And LabVIEW does not support function pointers at all, so you really can't do this.
    The only solution is to write a wrapper function in your DLL or in a separate DLL that translates between this interface and some more event oriented LabVIEW functionality such as user events, but unless you do know C to a fairly good level, you should probably leave that to someone else.
    Rolf Kalbermatter
    Message Edited by rolfk on 01-26-2007 04:21 PM
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Queue with callback function - strange behaviour when using max_retries

    Hi,
    I hope someone can tell me what is wrong or can explain the following strange behaviour to me.
    I am using one queue with a registered callback function. To test the behavoiur in case of an error I tested different settings, with or without explicit exception queue and with or without parameter max_retries.
    Database Version is 11.2.0.2.   Enterprise Edition
    I enqueue 10 messages in a loop.
    I define no exception queue and do not set max_retries
    ==> all messages stay in the queuetable with q_name = AQ$_... (implicit exception queue) and retry_count = 5
    I define no exception queue and set max_retries = 4
    ==> 1 message stays in the queuetable with q_name = AQ$_... (implicit exception queue) and retry_count = 4
           9 messages stay in the queuetable with q_name = nomal queue name and retry_count = 0
    I define an exception queue and set max_retries = 4
    ==> 1 message is transfered to the Exception Queuetable with retry_count = 4
           9 messages stay in the normal Queuetable and retry_count = 0
    I define an exception queue and do not set max_retries
    ==> all 10 messages are transferred to the Exception Queuetable with retry_count = 5
    I have no explanation for the behaviour in case 2 and case 3.
    To create the queue and the callback I use this code (reduced to minimum):
    begin
       DBMS_AQADM.CREATE_QUEUE_TABLE(Queue_table        => 'TESTUSER.TEST_TABELLE'
                                   , Queue_payload_type => 'SYS.AQ$_JMS_TEXT_MESSAGE'
                                   , sort_list          => 'enq_time'
                                   , multiple_consumers => FALSE
       DBMS_AQADM.CREATE_QUEUE( queue_name  => 'TESTUSER.TEST_QUEUE'
                              , queue_table => 'TESTUSER.TEST_TABELLE'
    --                          , max_retries => 4                     uncomment this line to set max_retries
    -- uncomment the following Block to use an explicit Exception Queue
    /*   DBMS_AQADM.CREATE_QUEUE_TABLE(Queue_table        => 'TESTUSER.TEST_TABELLE_EXC'
                                   , Queue_payload_type => 'SYS.AQ$_JMS_TEXT_MESSAGE'
                                   , sort_list          => 'enq_time'
                                   , multiple_consumers => FALSE
       DBMS_AQADM.CREATE_QUEUE( queue_name  => 'TESTUSER.TEST_QUEUE_EXC'
                              , queue_table => 'TESTUSER.TEST_TABELLE_EXC'
                              , queue_type  => dbms_aqadm.EXCEPTION_QUEUE);
       DBMS_AQADM.START_QUEUE('TESTUSER.TEST_QUEUE');
    end;
    create or replace procedure test_procedure
      (context  RAW
      ,reginfo  sys.AQ$_reg_info
      ,descr    sys.AQ$_descriptor
      ,payload  VARCHAR2
      ,payloadl NUMBER
      ) authid definer
      IS
      -- für Queue
      dequeue_options   DBMS_AQ.dequeue_options_t;
      message_prop      DBMS_AQ.message_properties_t;
      message_hdl       raw(16);
      message           sys.aq$_jms_text_message;
      l_daten           VARCHAR2(32767);
      ex_hugo          EXCEPTION;
      BEGIN
        dequeue_options.msgid         := descr.msg_id;
        dequeue_options.consumer_name := descr.consumer_name;
        dbms_aq.dequeue(descr.queue_name, dequeue_options, message_prop, message, message_hdl);
        -- to provoke an error
        RAISE ex_hugo;
        -- regurlar coding
        commit;
    exception
      when others then
           rollback;
           RAISE;
    end;
    DECLARE
       reginfo1    sys.aq$_reg_info;
       reginfolist sys.aq$_reg_info_list;
    BEGIN
       reginfo1 := sys.aq$_reg_info('TESTUSER.TEST_QUEUE', DBMS_AQ.NAMESPACE_AQ, 'plsql://TESTUSER.TEST_PROCEDURE?PR=0',HEXTORAW('FF'));
       reginfolist := sys.aq$_reg_info_list(reginfo1);
       sys.dbms_aq.register(reginfolist, 1);
       commit;
    END;
    to enqueue my messages i use:
    DECLARE
      message            sys.aq$_jms_text_message;
      enqueue_options    dbms_aq.enqueue_options_t;
      message_properties dbms_aq.message_properties_t;
      msgid              raw(16);
      v_daten            clob;
    BEGIN
       message := sys.aq$_jms_text_message.construct;
       for i in 1..10
       loop
          v_daten := '{ dummy_text }';
          message.set_text(v_daten);
    -- uncomment the following line to use an explicit Exception Queue     
    --      message_properties.exception_queue := 'TESTUSER.TEST_QUEUE_EXC'; 
          dbms_aq.enqueue(queue_name         => 'TESTUSER.TEST_QUEUE',
                          enqueue_options    => enqueue_options,
                          message_properties => message_properties,
                          payload            => message,
                          msgid              => msgid);
          message.clear_properties();
       end loop;
       commit;
    END;

    Hi Chris,
    I tried to reproduce your complaint, but was unable to. I didnt use auditting however, just a series of "select user from dual" with proxy authentication. You might want to see if you can put together a small complete testcase for this and open a sr with support.
    Cheers
    Greg

Maybe you are looking for