Use of DBMS_AQ.LISTEN

Hello, I have created a queue in which someone else constantly enqueues messages (about 20000 every 15 minutes) and I have added and registered some subscriber to dequeue the messages, with the packages dbms_aq.add_subscriber and dbms_aq.register.
Although it works fine, I don't like this solution because, if I stop and restart the queue (for administration reasons), the messages arrived when the queue is stopped aren't dequeued by any subscriber.
So I think to use DBMS_AQ.LISTEN, but I'm not sure which is the best way to use it. These are my issues: do I have to use DBMS_JOB to schedule it ? or better, which is the best way to launch and use the LISTEN procedure ?
Maybe this is not the best practice to use AQ, so every suggestion will be very appreciated.
Thanks,
Ennio

Hi Philippe,
no, I didn't find detailed information about this issue, nobody answered to my question about links or documentation, so actually I don't konw which are the best practises to use the LISTEN or the AQ.
But maybe I can help you. Some days ago I was playing with the AQ and I wanted to implement something like your issue.
Before explaining what I did, you need to know that:
- I suppose I need 10 subscribers
- the queue owner is ENNIO
- the name of the queue is EVENT_QUEUE
- the paylod of the queue is EVENT_TYPE
- the name of the subscribers are EVENT_CONSUMER_[1..10]
Then I suppose you know how to create the queue (remember to set the multiple_consumer parameter to TRUE) and that you know how to write the notify callback which dequeues the message.
First of all, I haven't any priority need: every message have the some priority than the others. For this reason, I use the priority option to determine which subscriber have to dequeue the message in this way:
1) create the subscribers with a LOOP:
begin
     FOR priority IN 1..10
     LOOP
          dbms_aqadm.add_subscriber (
               queue_name => 'ENNIO.EVENT_QUEUE',
               subscriber => sys.aq$_agent( 'EVENT_CONSUMER_' || priority, null, null )
               , rule => 'TAB.PRIORITY = ' || priority
     END LOOP;
end;
Look at the RULE parameter: this is the first key of the solution.
2) register the subscribers with a LOOP:
DECLARE
     reginfolist sys.aq$_reg_info_list;
BEGIN
     reginfolist := sys.aq$_reg_info_list(
               sys.aq$_reg_info('ENNIO.EVENT_QUEUE:EVENT_CONSUMER_1',
                    DBMS_AQ.NAMESPACE_AQ,
                    'plsql://ENNIO.notifyCB',
                    HEXTORAW('FF')
     FOR priority IN 2..10
     LOOP
          reginfolist.EXTEND;
          reginfolist(priority) :=
                    sys.aq$_reg_info('ENNIO.EVENT_QUEUE:EVENT_CONSUMER_' || priority,
                         DBMS_AQ.NAMESPACE_AQ,
                         'plsql://ENNIO.notifyCB',
                         HEXTORAW('FF')
     END LOOP;
     dbms_aq.register ( reginfolist, 10 );
END;
Now what you need is to enqueue the messages so that, in a RANDOM way, every message can be read just by one consumer. To do this I use the RANDOM PLSQL function and this is my enqueue procedure:
PROCEDURE enqueue (
          hostname in VARCHAR2,
          event in VARCHAR2,
          data in DATE
     AS
          enqueue_options dbms_aq.enqueue_options_t;
          message_properties dbms_aq.message_properties_t;
          message_handle RAW(16);
          message ENNIO.event_type;
     BEGIN
          message_properties.priority := DBMS_RANDOM.value(1,10);
          message := event_type(hostname, event, data);
          dbms_aq.enqueue(queue_name => 'ENNIO.EVENT_QUEUE',
               enqueue_options => enqueue_options,
               message_properties => message_properties,
               payload => message,
               msgid => message_handle);
          COMMIT;
          DBMS_OUTPUT.put_line('EVENTO ACCODATO: PRIORITY=' || message_properties.priority);
     END enqueue;
The DBMS_RANDOM function is the second key of the solution: in this way, every message has a random priority value, which is used to determine which will be the consumer that will dequeue the message.
As I told you I don't know well the AQ, the Oracle Agents and the procedure/functions to use in these contexts, so I don't know if there are better ways to do it.
Finally, I'm not sure the LISTEN function is really necessary, but I haven't found usefull documentation about it.
Finally (again:)), are you sure the subscriber is a good way ? I mean: if you stop the dequeue, but leaving the enqueue active, after you restart the queue, the subscribers will not read the messages arrived in the meanwhile.
I hope my example could help you and maybe that someone else could help us to understand more in depth the AQ world.
Bye,
Ennio

Similar Messages

  • Problems with dbms_aq.listen

    I am having problem trying to listen to a set of queues.
    I have tried it with Single Consumer queues and it works fine.
    But with Multi Consumer queues dbms_aq.listen does not detect a new message enqueued and just waits until the time out then returns with the normal "No message" exception.
    Can any one tell me what I am doing wrong?
    Thanks
    Rick Laird
    code
    CREATE OR REPLACE TYPE message_type AS OBJECT (xml_message CLOB);
    exec dbms_aqadm.create_queue_table('testqueue_qtable','message_type',Null,Null,true);
    exec dbms_aqadm.create_queue('testqueue', 'testqueue_qtable');
    exec dbms_aqadm.start_queue('testqueue');
    exec dbms_aqadm.add_subscriber('testqueue',sys.aq$_agent('testqueue_subscriber',NULL,NULL));
    exec DBMS_AQADM.SCHEDULE_PROPAGATION('testqueue');
    CREATE OR REPLACE PROCEDURE MONITOR_STATUS_QUEUE(time IN NUMBER)
    IS
    pragma autonomous_transaction;
    agent_w_message sys.aq$_agent;
    agent_list dbms_aq.aq$_agent_list_t;
    wait_time INTEGER := 10;
    no_message EXCEPTION;
    pragma EXCEPTION_INIT(no_message, -25254);
    new_status VARCHAR2(30);
    monitor BOOLEAN := TRUE;
    begin_time number;
    end_time number;
    v_dequeue_options dbms_aq.dequeue_options_t;
    v_message_properties dbms_aq.message_properties_t;
    v_message_type message_type;
    v_dequeue_msg_id RAW(40);
    v_xml_message CLOB;
    v_message_text varchar2(2000);
    v_amount number;
    BEGIN
    begin_time := dbms_utility.get_time;
    WHILE (monitor)
    LOOP
    BEGIN
    -- agent_list(1) := sys.aq$_agent('testqueue_agent', 'testqueue', NULL);
    agent_list(1) := sys.aq$_agent('agent1', 'testqueue', NULL);
    /* wait for order status messages */
    dbms_aq.listen(agent_list, 0, agent_w_message);
    dbms_output.put_line('Agent' || agent_w_message.name || ' Address '|| agent_w_message.address);
    /* dequeue the message from the queue */
    v_dequeue_options.consumer_name := 'testqueue_subscriber';
    v_dequeue_options.wait := 0.5;
    -- v_dequeue_options.wait := dbms_aq.NO_WAIT;
    dbms_aq.dequeue('testqueue',v_dequeue_options, v_message_properties,
    v_message_type,v_dequeue_msg_id);
    v_amount := dbms_lob.getlength(v_message_type.xml_message);
    dbms_lob.read(v_message_type.xml_message,v_amount,1,v_message_text);
    dbms_output.put_line('New Message :'||v_message_text);
    /* exit if we have been working long enough */
    end_time := dbms_utility.get_time;
    IF (end_time - begin_time > time) THEN
    EXIT;
    END IF;
    EXCEPTION
    WHEN no_message THEN
    dbms_output.put_line('No messages so far');
    end_time := dbms_utility.get_time;
    --exit if we have done enough work
    IF (end_time - begin_time > time) THEN
    EXIT;
    END IF;
    END;
    END LOOP;
    commit;
    END;
    create or replace procedure enqueue is
    v_enqueue_options dbms_aq.enqueue_options_t;
    v_messages_properties dbms_aq.message_properties_t;
    v_message_type message_type;
    v_message_locator CLOB;
    v_enqueue_msg_id RAW(40);
    v_select_sql varchar2(2000);
    v_xml_message varchar2(2000);
    v_temp_clob CLOB;
    begin
    v_xml_message := '<TESTING><TEST>'||to_char(sysdate,'HH:MI:SS')||'</TEST></TESTING>';
    dbms_lob.createtemporary(v_temp_clob,true);
    dbms_lob.write(v_temp_clob,length(v_xml_message),1,v_xml_message);
    v_message_type := message_type(empty_clob());
    dbms_aq.enqueue(
    queue_name => 'testqueue',
    enqueue_options => v_enqueue_options,
    message_properties => v_messages_properties,
    payload => v_message_type,
    msgid => v_enqueue_msg_id);
    v_select_sql := ' select t.user_data.xml_message from testqueue_qtable t where t.msgid = :MSG_ID';
    execute immediate v_select_sql INTO v_message_locator using v_enqueue_msg_id;
    dbms_lob.copy( dest_lob => v_message_locator,
    src_lob => v_temp_clob,
    amount => dbms_lob.getlength(v_temp_clob));
    COMMIT;
    end enqueue;

    Hi,
    Your subscriber is called testqueue_subscriber. You must use the same consumer name in the agent list for dbms_aq.listen
    Change
    agent_list(1) := sys.aq$_agent('agent1', 'testqueue', NULL);
    to
    agent_list(1) := sys.aq$_agent('testqueue_subscriber', 'testqueue', NULL);

  • Get CGI env variables in a database procedure using new APEX Listener

    I already posted this question in the Apex Listener forum and still no replies after one week. The original post is here:
    Get CGI environment from APEX Listener within database procedure
    So please forgive me for posting in this forum as well, but there is a lot more activity here.
    I'd like to know how I can get the CGI environment from the APEX Listener. For example, if I want to write a procedure that inserts into a table the originating IP Address of the client making the web request, how do I get it?
    I am familiar with the Oracle Http Server and mod_plsql, and I know how to call OWA_UTIL.GET_CGI_ENV to get this sort of information. How do I do it using the APEX Listener?
    In particular, how do I do this when calling a custom procedure (not in an Apex workspace)? When I try it now, I get an error from owa_util. The cgi env seems to be empty or not initiated (owa.num_cgi_vars is null or zero).
    Specific set-up:
    I have a web server running the latest JDK, Glassfish, and 1.1.4 Apex Listener. It connects to another server running the latest 11.2 database. Apex is installed and running, but I am not really developing a traditional Apex application in a workspace. I mainly use it like you would use mod_plsql. In other words, I have custom pl/sql packages that are called directly via URL. The requests are forwarded by the listener to the database, and the DB executes the procedure and returns output using htp.p to send text back to the browser. And it works just fine for this purpose. But if I want to call GET_CGI_ENV to get information like the IP Address, web browser making the request, etc. I can't seem to get it with the OWA packages.
    Can anyone shed some light on this? If Apex Listener is not designed to do this, is there some kind of workaround I can use to forward this sort of information to the database for each request?

    I have not tried owa_util.print_cgi_env from SQL Workshop yet, as I have not created an APEX workspace. I have had no need for a workspace because of the way I am using APEX as a method for calling custom packages and stored procedures. In other words, I am using APEX strictly for the mod_plsql functionality. I just use it to forward requests to the database to execute pl/sql code, but I don't develop anything in APEX. My application is a web service with no screens and no direct user interface, which is why I did not need to create APEX forms. The front end is a mobile app that makes calls to the web service.
    But I have tried calling owa_util.print_cgi_env in one of my stored procedures and it returns no data, even when calling it from the web front-end.
    So I am beginning to believe that if the OWA toolkit works with APEX, then it must only be enabled when invoked within a workspace. Stand-alone procedures can be called via APEX, but apparently doing so does not initiate the CGI env variables. This set-up used to work under the OHS with mod_plsql. The embedded pl/sql gateway also works this way.
    Is there a procedure call that APEX is making to set the environment before each SQL Workshop request?
    My security model currently blocks access to all packages and procedures except for my custom packages. I am using the APEX Listener configuration to allow only the packages listed by name in a white list. But I thought I allowed all access when I first tried calling the OWA packages. I'll have to try that again.

  • Since I upgraded to IOS5, my Smart Playlists are in a random order. Since I use it for listening to Talking Books this makes it useless. How can I control the order of a Smart Playlist?

    Since I upgraded to IOS5, my Smart Playlists are in a random order. Since I use it for listening to Talking Books this makes it useless. How can I control the order of a Smart Playlist?

    It may be best to recreate the folder and the smart playlists from scratch.
    tt2

  • Q:Multiple databases using Single default listener ??

    I created a database on a host and have been using the default listener to connect to it - no entries in listener.ora/tnsnames.ora -
    now I have another database created on the host (different service_names) , but am unable to connect to it using default listener
    without making entry in tnsnames.ora .
    Q - Why does this work for the first DB I created and not for the second ?
    Edited by: user7480241 on May 28, 2009 8:16 PM
    Additional details about the env
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL>
    SQL> show parameter listener
    NAME TYPE VALUE
    local_listener string
    remote_listener string
    SQL> show parameter service_names
    NAME TYPE VALUE
    service_names string MAHARAJA
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL> show parameter listener
    NAME TYPE VALUE
    local_listener string
    remote_listener string
    SQL> show parameter service_names
    NAME TYPE VALUE
    service_names string MAHARAJ2
    SQL>
    -bash-3.00$ lsnrctl service
    LSNRCTL for Solaris: Version 10.2.0.2.0 - Production on 29-MAY-2009 11:19:01
    Copyright (c) 1991, 2005, Oracle. All rights reserved.
    Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
    Services Summary...
    Service "MAHARAJ2" has 1 instance(s).
    Instance "MAHARAJ2", status READY, has 1 handler(s) for this service...
    Handler(s):
    "DEDICATED" established:0 refused:0 state:ready
    LOCAL SERVER
    Service "MAHARAJ2_XPT" has 1 instance(s).
    Instance "MAHARAJ2", status READY, has 1 handler(s) for this service...
    Handler(s):
    "DEDICATED" established:0 refused:0 state:ready
    LOCAL SERVER
    Service "MAHARAJA" has 1 instance(s).
    Instance "MAHARAJA", status READY, has 1 handler(s) for this service...
    Handler(s):
    "DEDICATED" established:0 refused:0 state:ready
    LOCAL SERVER
    Service "MAHARAJA_XPT" has 1 instance(s).
    Instance "MAHARAJA", status READY, has 1 handler(s) for this service...
    Handler(s):
    "DEDICATED" established:0 refused:0 state:ready
    LOCAL SERVER
    Service "PLSExtProc" has 1 instance(s).
    Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
    Handler(s):
    "DEDICATED" established:0 refused:0
    LOCAL SERVER
    The command completed successfully
    -bash-3.00$ tnsping MAHARAJA
    TNS Ping Utility for Solaris: Version 10.2.0.2.0 - Production on 29-MAY-2009 11:20:01
    Copyright (c) 1997, 2005, Oracle. All rights reserved.
    Used parameter files:
    /export/home/oracle/network/admin/sqlnet.ora
    Used EZCONNECT adapter to resolve the alias
    Attempting to contact (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=MAHARAJA.))(ADDRESS=(PROTOCOL=TCP)(HOST=10.0.2.15)(PORT=1521)))
    OK (30 msec)
    -bash-3.00$ tnsping MAHARAJ2
    TNS Ping Utility for Solaris: Version 10.2.0.2.0 - Production on 29-MAY-2009 11:20:10
    Copyright (c) 1997, 2005, Oracle. All rights reserved.
    Used parameter files:
    /export/home/oracle/network/admin/sqlnet.ora
    TNS-03505: Failed to resolve name
    DB & Global Names
    SQL> show parameter name
    NAME TYPE VALUE
    db_file_name_convert string
    db_name string MAHARAJA
    db_unique_name string MAHARAJA
    global_names boolean FALSE
    instance_name string MAHARAJA
    lock_name_space string
    log_file_name_convert string
    service_names string MAHARAJA
    SQL> show parameter name
    NAME TYPE VALUE
    db_file_name_convert string
    db_name string MAHARAJ2
    db_unique_name string MAHARAJ2
    global_names boolean FALSE
    instance_name string MAHARAJ2
    lock_name_space string
    log_file_name_convert string
    service_names string MAHARAJ2
    SQL>

    Why does this work for the first DB I created and not for the second ?Because Oracle tries to make it easy for folks.
    listener.ora is not required for V10.
    tnsnames.ora changes are required so SQL*Net can identify the 2nd DB; so do the necessary as document at http://tahiti.oracle.com

  • Copy the values input in input text 1 to input text 2 using value change listener

    Hello ,
    I have two input texts :
    input text 1 & input text 2 .
    I need to copy the values input in input text 1 to input text 2 .
    How do I implement this using value change listener ?
    I did the following steps :
    1) I selected input text 1 and chose Value Change listener --> edit .
       Typed a new bean & class name .
       Which method name should I add ?
    Any help please ?

    Hi,
    Give any name to the method and bind the two input text to manged bean using bindings attribute of InputText. just follow the below given code
    Ex:
    test.java class
        private RichInputText inputVal1;
        private RichInputText inputVal2;
        public Test() {
        public void ValChange(ValueChangeEvent valueChangeEvent) {
            // Add event code here...
            inputVal2.setValue(inputVal1.getValue().toString());
        public void setInputVal1(RichInputText inputVal1) {
            this.inputVal1 = inputVal1;
        public RichInputText getInputVal1() {
            return inputVal1;
        public void setInputVal2(RichInputText inputVal2) {
            this.inputVal2 = inputVal2;
        public RichInputText getInputVal2() {
            return inputVal2;
    test.jspx page
    <af:inputText label="Label 1" id="it1" valueChangeListener="#{backingBeanScope.TestBean.ValChange}"
                                  binding="#{backingBeanScope.TestBean.inputVal1}" autoSubmit="true"/>
                    <af:inputText label="Label 2" id="it2" binding="#{backingBeanScope.TestBean.inputVal2}"
                                  partialTriggers="it1"/>
    Thanks
    nitesh

  • How to use JTable model listener???

    Anyone got idea , how to use table model listener. Can explain in simple example with code?? how to pass back to resultset ??

    Well, your pretty good at asking questions, but not very good at thanking people for the help given to you so I don't think I'll waste too much time helping this time.
    A TableModelListener notifies you when the contents of a cell are changed. So simply take the data from the cell and update your ResultSet. You question is so general I don't know how you expect any more advice than that.

  • Can I use two airports to use internet and listen to itunes in stereo? simultaneously?

    Can I use two airports to use internet and listen to itunes in stereo?  I just bought a second airport so I could listen to itunes & Pandora on my stereo.  My problem is that I haven't been able to connect to both airports at once.  I want to listen to the stereo (one airport) while using internet which is connected to a separate airport.  Unfortunately, the stereo and ethernet cables are not close by which is why I bought the second airport.

    You can run both simultaneously. You just need to reconfigure the base station that will be used for streaming as a wireless client.
    I suggest that you start by performing a "factory default" reset on the 802.11n AirPort Express Base Station (AXn) to get it back to its "out-of-the-box" configuration. By default, the AXn will broadcast an unsecured wireless network with a Network Name of something like: Apple Network NNNNNN
    After the reset has completed, plug the AXn into power, and then, verify from the iMac that this network shows up in the list of networks under the AirPort icon in the OS X menu bar.
    Be sure to first switch the wireless network to the AirPort that will be used for streaming. Note: You will temporarily lose the Internet connection from your "main" AirPort. Then, run the AirPort Utility. The Utility should now find the streaming AXn. If not, use the Utility's "Configure Other" option under the File menu option in the Utility's menu bar. Enter 10.0.1.1 for the Address and "public" for the Password.
    AirPort Utility > Select the AXn > Manual Setup > AirPort > Wireless
    Wireless Mode: Join a wireless network
    Network Name: <existing "main" AirPort's wireless network>
    Wireless Security: <select the encryption type of the existing wireless network>
    Wireless Password: <enter the existing wireless network password>
    Verify Password: <re-enter the existing wireless network password>
    AirPort Utility > Select the AXn > Manual Setup >Music
    Enable AirPlay (checked)
    iTunes Speaker Name: <enter desired speaker name>
    iTunes Speaker Password: (optional)
    Verify Password: (optional)
    Click Update to write the new settings to the AX

  • Can't get Listener to use the Correct listener.ora file

    I am on a Windows 2003 Server. I have copied the 10gR2 ORACLE_HOME from a diffent Windows 2003 server on to this one.
    I want to start the Oracle Listener on this server. I have:
    set TNS_ADMIN = E:\oracle\product\10.2.0\network\admin\EBIZBLK_nvciebizdbblk. In this folder is a listener.ora file.
    set ORACLE_HOME = E:\oracle\product\10.2.0
    This is what I get:
    C:\Documents and Settings\oracle>lsnrctl start
    LSNRCTL for 32-bit Windows: Version 10.2.0.4.0 - Production on 02-FEB-2009 15:42:06
    Copyright (c) 1991, 2007, Oracle. All rights reserved.
    Starting tnslsnr: please wait...
    Failed to open service <OracleTNSListener>, error 1060.
    TNSLSNR for 32-bit Windows: Version 10.2.0.4.0 - Production
    Message 279 not found; No message file for product=NETWORK, facility=NL
    Message 1073 not found; No message file for product=NETWORK, facility=TNS
    Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
    STATUS of the LISTENER
    Alias LISTENER
    Version TNSLSNR for 32-bit Windows: Version 10.2.0.4.0 - Production
    Start Date 02-FEB-2009 15:42:10
    Uptime 0 days 0 hr. 0 min. 2 sec
    Trace Level off
    Security ON: Local OS Authentication
    SNMP OFF
    Listener Log File listener.log
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=nvciebizdbblk.NVCI.org)(PORT=1521)))
    The listener supports no services
    The command completed successfully

    Chris Wendell wrote:
    I am on a Windows 2003 Server. I have copied the 10gR2 ORACLE_HOME from a diffent Windows 2003 server on to this one.
    I want to start the Oracle Listener on this server. I have:
    set TNS_ADMIN = E:\oracle\product\10.2.0\network\admin\EBIZBLK_nvciebizdbblk. In this folder is a listener.ora file.
    set ORACLE_HOME = E:\oracle\product\10.2.0
    This is what I get:
    C:\Documents and Settings\oracle>lsnrctl start
    LSNRCTL for 32-bit Windows: Version 10.2.0.4.0 - Production on 02-FEB-2009 15:42:06
    Copyright (c) 1991, 2007, Oracle. All rights reserved.
    Starting tnslsnr: please wait...
    Failed to open service <OracleTNSListener>, error 1060.
    TNSLSNR for 32-bit Windows: Version 10.2.0.4.0 - Production
    Message 279 not found; No message file for product=NETWORK, facility=NL
    Message 1073 not found; No message file for product=NETWORK, facility=TNSAny time you get "Message nnn not found; No message file for product...", it means your environment is not set up correctly ... there are some environment variables that have incorrect values. Thus, it can't even find the message file to report the message associated with "Messasge nnn". No doubt because you installed by simply copying some files instead of running the installer.
    Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
    STATUS of the LISTENER
    Alias LISTENER
    Version TNSLSNR for 32-bit Windows: Version 10.2.0.4.0 - Production
    Start Date 02-FEB-2009 15:42:10
    Uptime 0 days 0 hr. 0 min. 2 sec
    Trace Level off
    Security ON: Local OS Authentication
    SNMP OFF
    Listener Log File listener.log
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=nvciebizdbblk.NVCI.org)(PORT=1521)))
    The listener supports no services
    The command completed successfullyLooks like the listener is running, but it has no services registered with it. So far I see no indication that it is using the wrong listener.ora, only that some incorrect environment variables are preventing it from completely reporting any problems. How many listener.ora files do you have, and where are they located?

  • Wrong number of type of args to dbms_aq.listen

    Has anyone had trouble with the argument list for dbms_aq.listen. We've just go AQ going, having no trouble with enqueue and dequeue. However, when supplying what SEEM to be the right arg types for LISTEN (a table of aq$_agent, a binary int, and an aq$_agent for out) oracle gives us wrong number of type of arguments for call to
    DBMS_AQ.LISTEN (we're running 8.1.7).
    Sorry I'm at home and code is at work. But, just wondering if anyone else has had trouble with this.
    thanks

    The code would probably look like the following... where my_dequeue is my dequeue
    procedure.
    declare
    agent sys.aq$_agent;
    qlist dbms_aq.aq$_agent_list_t;
    begin
    qlist(1):= sys.aq$_agent(NULL, 'aqlis.qt1_queue1', NULL);
    qlist(2):= sys.aq$_agent(NULL, 'aqlis.qt2_queue4', NULL);
    dbms_output.put_line('Listening on' &#0124; &#0124;
    ' qt1_queue1, qt2_queue4');
    dbms_aq.listen(qlist, 0, agent);
    dbms_output.put_line('Message in Queue :- ' &#0124; &#0124; agent.address);
    my_dequeue(agent.address);
    dbms_output.put_line('');
    end;
    /

  • Why does not connect properly macpro my motorola bluetooth headphones S10? I get a connection error message and there is no sound. (I want to use headphones to listen to music via bluetooth from my macpro)

    Why does not connect properly macpro my motorola bluetooth headphones S10?     I get a connection error message and there is no sound.                         (I want to use headphones to listen to music via bluetooth from my macpro)   
    the s10 works perfectly on my ipod touch 4g. 

    this is   
    ERROR HAS OCCURRED Bluetooth audio.
    It failed to establish connection with their
    audio device. make sure it is on and
    in the range. you may need to restart the
      audio section of the program you were using
    STOP USING THE HEADSET WITH MICROPHONE.
    ALSO HAVE A MOTOROLA BLUETOOTH SPEAKERS WHICH EQ5 work seamlessly with the Mac

  • Getting NullPointerException in ADF form using Custom Selection Listener

    Hi,
    I am getting NullPointerException from getRowKey() in GenericTableSelectionHandler.java while pressing "Page Down" key or continuous pressing of "Down Arrow" key in Read Only ADF form (Query, Sort Enabled) using Custom Selection Listener.
    I have used the custom selection listener as mentioned at http://www.oracle.com/technetwork/developer-tools/adf/learnmore/23-generic-table-selection-listener-169162.pdf
    The requirement to use custom Selection Listener to populate some fields from the selected row.
    J Developer Version: 11.1.1.4.0
    The error is as below
    +<LifecycleImpl> <_handleException> ADF_FACES-60098:Faces lifecycle receives unhandled exceptions in phase INVOKE_APPLICATION 5+
    javax.el.ELException: java.lang.NullPointerException
    +     at com.sun.el.parser.AstValue.invoke(Unknown Source)+
    +     at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)+
    +     at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodExpression(UIXComponentBase.java:1300)+
    +     at org.apache.myfaces.trinidad.component.UIXTable.broadcast(UIXTable.java:268)+
    +     at oracle.adf.view.rich.component.UIXTable.broadcast(UIXTable.java:144)+
    +     at oracle.adf.view.rich.component.rich.data.RichTable.broadcast(RichTable.java:402)+
    +     at org.apache.myfaces.trinidad.component.UIXCollection.broadcast(UIXCollection.java:148)+
    +     at org.apache.myfaces.trinidad.component.UIXTable.broadcast(UIXTable.java:271)+
    +     at oracle.adf.view.rich.component.UIXTable.broadcast(UIXTable.java:144)+
    +     at oracle.adf.view.rich.component.rich.data.RichTable.broadcast(RichTable.java:402)+
    +     at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92)+
    +     at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)+
    +     at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)+
    +     at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:102)+
    +     at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92)+
    +     at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)+
    +     at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)+
    +     at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:96)+
    +     at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:879)+
    +     at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:312)+
    +     at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:185)+
    +     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)+
    +     at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)+
    +     at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)+
    +     at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)+
    +     at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)+
    +     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)+
    +     at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)+
    +     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)+
    +     at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)+
    +     at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)+
    +     at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)+
    +     at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)+
    +     at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)+
    +     at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)+
    +     at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)+
    +     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)+
    +     at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:175)+
    +     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)+
    +     at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)+
    +     at java.security.AccessController.doPrivileged(Native Method)+
    +     at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)+
    +     at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)+
    +     at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)+
    +     at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)+
    +     at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)+
    +     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)+
    +     at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)+
    +     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)+
    +     at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)+
    +     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)+
    +     at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)+
    +     at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)+
    +     at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)+
    +     at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)+
    +     at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)+
    +     at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)+
    +     at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)+
    +     at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)+
    +     at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)+
    Caused by: java.lang.NullPointerException
    +     at ibm.view.GenericTableSelectionHandler.makeCurrent(GenericTableSelectionHandler.java:48)+
    +     at ibm.view.backing.Testpage.XxSelectListener(Testpage.java:207)+
    +     at sun.reflect.GeneratedMethodAccessor355.invoke(Unknown Source)+
    +     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)+
    +     at java.lang.reflect.Method.invoke(Method.java:597)+
    +     ... 60 more+
    The table structure is as below for your reference
    +<af:table value="#{bindings.TestTableAdfView1.collectionModel}"+
    var="row"
    +rows="#{bindings.TestTableAdfView1.rangeSize}"+
    +emptyText="#{bindings.TestTableAdfView1.viewable ? 'No data to display.' : 'Access Denied.'}"+
    +fetchSize="#{bindings.TestTableAdfView1.rangeSize}"+
    +rowBandingInterval="0"+
    +filterModel="#{bindings.TestTableAdfView1Query.queryDescriptor}"+
    +queryListener="#{bindings.TestTableAdfView1Query.processQuery}"+
    +filterVisible="true" varStatus="vs"+
    +rowSelection="single"+
    +binding="#{backingBeanScope.backing_testpage.t1}"+
    +id="t1"+
    +selectionListener="#{backingBeanScope.backing_testpage.XxSelectListener}">+
    Any help to resolve the issue is highly appreciated.
    Thanks,
    Arijit
    Edited by: user10570755 on Aug 2, 2011 11:19 PM

    //selection with the selection in the ADF model Object
    _selectedRowData = _table.getSelectedRowData();
    //cast to JUCtrlHierNodeBinding, which is the ADF object //that represents a row
    JUCtrlHierNodeBinding _nodeBinding = (JUCtrlHierNodeBinding) _selectedRowData;
    //get the row key from the node binding and set it //as the current row in the iterator
    Key _rwKey = _nodeBinding.getRowKey();i guess nodeBinding becoming null here.. _table.getSelectedRowData().. is not returnign anything                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • I CAN'T use earpod to control my iphone5 ,but i still can use it to listen music

    I CAN'T use earpod to control my iphone5 ,but i still can use it to listen music

    If this is an iCloud email account, you should only need to go to Settings>iCloud, sign into your account and turn Mail on.  This will automatically add the account and would not prompt you for a password (since you already signed in with your iCloud password).
    But if you want to reset your password, you can contact Apple for assistance either by going to https://expresslane.apple.com, then click More Products and Services>Apple ID>Other Apple ID Topics>Lost or forgotten Apple ID password, or by contacting the Apple account security team: http://support.apple.com/kb/HT5699.

  • I have spent a very frustrating 2 hours trying to use ibooks to listen to a book. Is there any tutorial out there?

    I have spent 2 hours trying to use ibooks to listen to an audio book.  Is there any king od help or tutorial out there?  Recent experiences are making the shift bak to the world of PCs look better  all the time.

    iBooks has never had anything to do with audio books.  These are listened to using the Music app, or some other app dedicated to this like Audible Audiobooks.

  • Very happy with IMac version 10.4.11 Paired a wireless Bluetooth headset with the intention of using it to listen to radio podcasts. However, cannot connect headset. Any suggestions??

    Very happy with IMac version 10.4.11 Paired a wireless Bluetooth headset with the intention of using it to listen to radio podcasts. However, cannot connect headset. Any suggestions??

    Perhaps this "hint" might resolve your problem:
    http://hints.macworld.com/article.php?story=20050520082617274

Maybe you are looking for

  • Problem with date and timezone

    Hello, I am encountering a problem with the command new java.util.date() on a hpux 11 machine. The "date" from command line returns: Tue Oct 26 18:02:02 MEST 2004 And the date from java returns: Tue Oct 26 17:02:02 GMT+01:00 2004 It is as if the JVM

  • Forms 6i loop through datablock question

    I am writing a piece of code to loop through items with in a datablock to programmatically set the width between each field. I created my data block through the wizard, but then manually added some fields. I have them listed in the order I expect the

  • How do I move a group of tabs before closing a window?

    I recently lost all my custom settings on Firefox after an aggressive tech support person "cleaned" my browser settings. When this happened, I lost the ability to move my open tabs to a new group before closing the window they were in. Previously, wh

  • External hard drive does not shut down

    Hello, When my mini mac goes to sleep my samsung external hard drive does not shut down or dismount properly. when i wake computer i have a error message stating improperly ejected hard drive. It also does not reconize HD until I disconnect and recon

  • Default Display

    I am having trouble with my default display going to the video projector when I play it in. I can plug in an additional monitor and don't have this problem, but when i plug in a video projector, my monitor becomes the "show" monitor and the video pro