MDB not dequeuing the Queue

Hi Guys.
Im working with oc4j_extended_101300 and a MDB with annotations
I've got a jsp that sends a message to the queue. This seems to work. I can see in the administrative console that the "Messages Waiting for Read" is modified each time I send a message.
But my MDB is not reading those messages. The onMessage() is never called.
The annotations in my MDB are:
@MessageDriven(activationConfig = {
@ActivationConfigProperty(propertyName="messageListenerInterface", propertyValue="javax.jms.MessageListener"),
@ActivationConfigProperty(propertyName="connectionFactoryJndiName", propertyValue="jms/NewMessageFactory"),
@ActivationConfigProperty(propertyName="destinationName", propertyValue="jms/NewMessage"),
@ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Queue"),
@ActivationConfigProperty(propertyName="messageSelector", propertyValue="RECIPIENT = 'MDB'") })
The Factory and the Queue are also defined in de jms.xml
Am I forgetting about a configuration somewhere??
I hope you can help.

Does your jsp put the selector value (RECIPIENT='MDB') in the Message object?
I think it would be like this:
on your Message object: setStringProperty("RECIPIENT","MDB");

Similar Messages

  • Could not create the queue connection

    Hi,
    I have successfully registered and retrieved the connection factory object from LDAP server..But when i try to make connection out of that connection factory object, it gives following issue[1]. My sample code is like;
              // get connection factory "test_queue_factory"
              QueueConnectionFactory qc_fact = (QueueConnectionFactory) connctx.lookup("cn=test_queue_factory");
              System.out.println("Factory look up success "+qc_fact.toString());
              QueueConnection QCon = qc_fact.createQueueConnection();
              System.out.println("Connection craeted " + QCon.toString());
    and the error im getting is;
    [1]
    Factory look up success oracle.jms.AQjmsQueueConnectionFactory@126e85f
    oracle.jms.AQjmsException: The Network Adapter could not establish the connection
         at oracle.jms.AQjmsDBConnMgr.checkForSecurityException(AQjmsDBConnMgr.java:939)
         at oracle.jms.AQjmsDBConnMgr.getConnection(AQjmsDBConnMgr.java:617)
         at oracle.jms.AQjmsDBConnMgr.<init>(AQjmsDBConnMgr.java:251)
         at oracle.jms.AQjmsConnection.<init>(AQjmsConnection.java:185)
         at oracle.jms.AQjmsQueueConnectionFactory.createQueueConnection(AQjmsQueueConnectionFactory.java:252)
         at OracleAQJNDIClient.get_Factory_from_LDAP(OracleAQJNDIClient.java:71)
         at OracleAQJNDIClient.main(OracleAQJNDIClient.java:79)
    Caused by: java.sql.SQLException: The Network Adapter could not establish the connection
         at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:412)
         at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:531)
         at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:221)
         at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
         at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:503)
         at java.sql.DriverManager.getConnection(DriverManager.java:582)
         at java.sql.DriverManager.getConnection(DriverManager.java:154)
         at oracle.jms.AQjmsDBConnMgr.getConnection(AQjmsDBConnMgr.java:579)
         ... 5 more
    Caused by: oracle.net.ns.NetException: The Network Adapter could not establish the connection
         at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:359)
         at oracle.net.resolver.AddrResolution.resolveAndExecute(AddrResolution.java:422)
         at oracle.net.ns.NSProtocol.establishConnection(NSProtocol.java:672)
         at oracle.net.ns.NSProtocol.connect(NSProtocol.java:237)
         at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1042)
         at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:301)
         ... 12 more
    Caused by: java.net.ConnectException: Connection refused: connect
         at java.net.PlainSocketImpl.socketConnect(Native Method)
         at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
         at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
         at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
         at java.net.Socket.connect(Socket.java:529)
         at oracle.net.nt.TcpNTAdapter.connect(TcpNTAdapter.java:141)
         at oracle.net.nt.ConnOption.connect(ConnOption.java:123)
         at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:337)
         ... 17 more
    Any help?
    Thanks
    -Ratha
    Edited by: Ratha on Oct 3, 2011 1:56 AM

    I solved it..my oracle service was down...

  • MDB is not picking up messages in the Queue

    Hi ,
    I am trying to implement a MDB (Producer) , that acts as a Message Producer also . This MDB pickes up a message from a Queue and sends it to another Queue(Queue 2) after some processing. The MDB listening to the Queue 2 is not being able to pick this message.
    The Weblogic console shows that the message is pending.
    The transaction-type is Container and transaction-attribute is 'Required' for the Producer (MDB) ...
    I am creating a QueueSession as con.createQueueSession(true, Session.AUTO_ACKNOWLEDGE) . I also tried specifying queuesession.commit() ...
    even then the Message is not picked by the MDB listening on the other side...
    Please help me out

    any one

  • OAI Event is not reading the workflow queue

    I'm creating the workflow event using iStudio (created automatically by iStudio) with the following information:
    Item Type: OAI Process Bundle: EDWARD
    Internal Name: I_EDWARD_PAATRANSACTION_OAI_V1
    Display Name: Receive Request EDWARD.PAATransaction:IN
    Description: OAI Event
    Event Action: Receive
    Event Filter: oai.edward.paatransaction.oai_v1.receive_request.oai_v1
    Cost: 0.0
    I also create the event subscription for oracle.apps.wf.event.agent.create, oracle.apps.wf.event.event.create, and oracle.apps.wf.event.subscription.create and put the following information:
    System: WFLOWDEV.MAXIMUSBC.CA
    Source Type: External
    Event Filter: oracle.apps.wf.event.subscription.create
    Source Agent: <blank>
    Phase: 1
    Status: Enabled
    Rule Data: Key
    Rule Function: WF_EVENT_FUNCTIONS_PKG.RECEIVE
    Workflow Item Type: EDWARD
    Workflow Process Name: PAATRANSACTION
    Out Agent: <blank>
    To Agent: [email protected]
    Priority: Normal
    Parameters: <blank>
    I can see that the interconnect OAI Hub is putting a message into the WF_IN queue but the event does not dequeue the message and run the process.
    So, I don't know if I'm missing anything here or there is something wrong with my configuration.
    Can anyone help me please?
    Thanks,
    Edward

    Edward,
    I am basing this reply on the OAI build I have on my laptop, which is an Oracle 9iAS Integration build, however I do not think that it has changed since.
    Before you do this, it is always a good idea to add the "OAIHeader" objects to the Common View.
    1. Under "Common Views", expand the "Business Objects" and find your Business Object (e.g. MY_BO)
    2. Under the "Events", expand the "Events" to find your event (e.g. MY_EVENT)
    3. Highlight you event (MY_EVENT), Right-click on your mouse, and choose "Edit". This will bring up the "Edit Event" window.
    4. Choose "Add". This will create a new line.
    The 'Name' will be blank.
    The 'Type' will be "String".
    The 'Owner' will be blank.
    The 'Array' will be blank, and
    The 'Default' will be 'NULL'.
    5. On the 'Type' value ("String"), click on the value "String". This will bring up a pop-up list.
    6. From this list, select "Data Type..."
    7. Now click once anywhere in the "Edit Event" window. This will bring up a "Common Data Types" window.
    8. Scroll down, find and highlight the the name "OAIHeader". Press 'OK'
    9. Now back in the 'Edit Event' window, you will notice that the type is "OAIHeader".
    10. Now give the "Name" (currently still blank) a value. Give it the name "OAIHeader" too.
    11. Press 'OK'
    12. You will now see that the Event now has "OAIHeader" information. Some of these values will be of interest and of use later.
    The actual values for "EventName, EventVersion" etc. will be added to the data of the message at Runtime.
    *** TIP: I always do the above exercise first for every Business Object event I create. Once I've included the 'OAIHeader', I then add all of the actual other message attributes to the message afterwards. ***
    Create Content Based Routing Rules
    In this example, I am going to route a message from a sending DB Adapter (DBAPP1) to the Workflow Adapter (WORKFLOW). Then once the message has been passed to the Workflow, it will be passed to the receiving DB Adapter (DBAPP2).
    1. In iStudio, under the "Design" tab, expand the "Enabling Infrastructure".
    2. Under "Content Based Routing", find your Business Object.
    e.g. MY_BO
    3. Expand the Business Object, and then expand the "Events" to find your event.
    e.g. MY_EVENT
    4. On the Event (MY_EVENT), highlight it, then right mouse click. Choose Edit.
    5. A window will pop-up called "Content Based Routing: MY_EVENT"
    6. Hit the "New" button.
    7. Expand the message structure (MY_EVENT), and find the 'OAIHeader' node.
    8. Expand the "OAIHeader" node, and select (highlight) the "SendingApplication" attribute.
    9. Press 'Next'. This will move you onto the next screen.
    10. From the drop-down list, choose the "==" Operator. Press 'Next'.
    11. Enter a Value in the box. Since my sending application is "DBAPP1", type in "DBAPP1". Press Next.
    12. Since I have completed the "source" CBR rules, check the "Condition Complete" radio button, and Press 'Next'.
    13. Now in the next screen, select "WORKFLOW". Now press 'Finish'.
    Perform the same as above, this time routing the message from the "WORKFLOW" adapter to your receiving adapter (e.g. 'DBAPP2'). If the Workflow message does not have the 'OAIHeader' information in it's structure, once again refer to the above and add it in.
    Once you have completed all of your CBR configuration, use "File > Push Metadata" to send this new message structure and CBR rules to your adapters (DBAPP1, WORKFLOW and DBAPP2).
    HTH,
    Yan

  • Email in the queue not sent

    Hi All Apex friends
    I am using 4.2 on glassfish ,linux ,oracle 11 g
    I am trying to make send email work
    create or replace procedure email ( p_email  in    varchar2)
    is
        l_workspace_id      number;
        l_subject           varchar2(2000);
        l_body              clob;
        l_body_html         clob;
         l_email varchar2(40);
    begin
        l_workspace_id := apex_util.find_security_group_id (p_workspace => 'xyz');
        apex_util.set_security_group_id (p_security_group_id => l_workspace_id);
    l_email:= p_email;
        l_body := ' ';
        l_subject := 'You have new tasks';
        --if l_email=:P3_CONFIRM_EMAIL_ADDRESS is not null then
       -- email( l_email =>:P3_CONFIRM_EMAIL );
    -- end if;
            l_body_html := '<p/>The following tasks have been added.';
         apex_mail.send (
                p_to        => l_email ,
                p_from      => '[email protected]',
                p_body      => l_body,
                p_body_html => l_body_html,
                p_subj      => l_subject );
      APEX_MAIL.PUSH_QUEUE;
    end;
    select * from apex_mail_queue
    select * from  apex_mail_logBoth the queries has my TEST email but it not pushing the queue out
    Kindly suggest what to do ?

    You may need to Enable Network Services in the 11g Database (or get your DBA to do this for you).
    I think the reason being in 11g, Oracle tightened the security so users that needed to access network credentials like LDAP and Email required specific privileges granted. Unfortunately it seems you can’t grant it for the whole database, so it needs to be done for each schema/user on the database.
    See the APEX 4.2 Installation Guide, Setion 3.3.8 on 'Enabling Network Services'
    http://docs.oracle.com/cd/E37097_01/doc/install.42/e35123/otn_install.htm#BEHIFAJD
    Amanda.

  • Finding which recipients did not dequeue a message

    Hello
    Is there a way with a multiconsumer queue to fid out which recipients in the list have not dequeued the message?
    The scenario is this. We have a number of daemon type processes that sit on queues, processing whatever messages they need to. We need a way of finding out if each daemon is alive and kicking.
    The way I thought of doing this was to set up a multiconsumer queue and enqueue a message with the list of recipients being each daemon process, and set an expiration time of say 10 seconds. The daemons listen to their normal work queue and the "are you alive" queue, and just dequeue any messages on the latter. If the message is not dequeued by all recipients within the time limit, the message will be moved to the exception queue. The process that sent out the request can then just listen on the exception queue for a mesage comming back, but it needs to know which recipient did not dequeue it's message.
    So is it possible to find out which recipients did not dequeue the message just from the exceptions queue and supporting meta data tables? Does this sound like a reasonable approach?
    David

    Yes, you can, use the queue table view. It has the consumer name column. View is automatically created [by default] when the table is created.
    All the queue table view name start with AQ$<Queue table name>.
    For example :- if a queue table name is customer_qt then the view name would be aq$customer_qt.
    Regards,
    Sanjeev

  • Passing the queue name to the sender JMS adapter at run time..

    Hello Experts,
    I have a scenario where PI is to pick data from MQ queues. The message type coming from queues is same and the procession needs to be done with PI is also the same.That's the reason why we want to have only one interface processing the data for all the queues.
    My question here is that is there any way where I do not put the queue name in the sender adapter at design time and based on the data availability in the queue let the sender adapter know the queue name to be processed at run time.
    Any suggestions will be greatly appreciated.
    - Rajan

    > My question here is that is there any way where I do not put the queue name in the sender adapter at design time and based on the data availability in the queue let the sender adapter know the queue name to be processed at run time.
    Unfortunately for JMS Sender CC it is not possible, but other way around is possible. I.e. you can dynamically choose the receving queue names by using ASMA "JMSReplyTo" in JMS Sender CC.
    Regards,
    Sarvesh

  • Dequeue with OCCI does not remove the message from the queue

    Hey there,
    I have this problem where no matter what dequeue option I try the messages never seem to be removed from the queue... I tried looking around and found only a similar un-answered question...
    Thanks in advance...
    void TryAnydataDequeue(oracle::occi::Connection * conn)
         try
              std::cout << "Dequeue Commence..." << std::endl;
              Consumer cons(conn);
              //Settings de dequeue
              cons.setCorrelationId("SPPC");
              cons.setQueueName("Anydata_queue");
              cons.setConsumerName("SNOOP");
              cons.setDequeueMode(cons.DEQ_REMOVE);
              //cons.setDequeueMode(cons.DEQ_LOCKED);
              std::cout << "Reception du message..." << std::endl;
              Message m2 = cons.receive(Message::ANYDATA);
              AnyData any(conn);
              any = m2.getAnyData();
              if(!any.isNull())
                   oracle::occi::TypeCode type = any.getType();
                   if(type == OCCI_TYPECODE_VARCHAR2)
                        std::string msg = any.getAsString();
                        std::cout << "Message Reçu: ";
                        std::cout << msg << std::endl;
                   else
                        std::cout << "Format du message invalide..." << std::endl;
                   std::cout << "Fin du message... (Press a key)" << std::endl;
              else
                   std::cout << "Message invalide..." << std::endl;
              System::String * theInput = System::Console::ReadLine();
         catch(SQLException ex)
              std::cout << "Exception: " << ex.getErrorCode() << " - " << ex.getMessage() << std::endl;
              System::String * tnput = System::Console::ReadLine();
    }

    The message from the queue will be removed when you do a commit after a successful dequeue call, depending upon your message retention settings.
    After you have done this processing and successfully performed a commit, what is the output of the following query:
    SQL> connect AQADMIN/password
    SQL> select msg_state from aq$<your_queue_table_name_goes_here> ;?
    If it is PROCESSED, check your queue retention settings.
    Additionally, make sure that the init.ora parameter AQ_TM_PROCESSES is set to a NON-ZERO value for this to happen.

  • Urgent : MDB stops listening to the queues after some time  !!!

    Hi,
    I am using OJMS with OC4J 10.1.2 and db 9.2.0.5. I have a web application which send messages into the queue very frequently.
    But the problem is the MDBs stop listening to the queues after some time (1-2 days) and no more messages will be dequeued from that point.
    All these messages will move to the exception queue after their expiry.
    But the dequeing agains resumes after restarting the OC4J !.
    I guess, at some point mdbs are either becoming busy (locked ) or some exception occured while dequeing, hence they stop listening to the queues.
    Please throw some light on this issue as it is very crucial in my project.
    Regards
    Prashanth

    I've noticed this lately as well, with my iPhone 4. I couldn't confidently pin it directly on any particular iOS update, but my iPhone used to automatically connect up via Bluetooth with my Prius's handsfree feature, and now it doesn't. I work with a CE-based device at my job, with Bluetooth capability, and I used to test out that feature by having it discover my iPhone. This no longer works either.
    What I have found (not really a solution, but it does work and may be a clue for Apple) is that if I simply go to the Settings app then the General -> Bluetooth screen and let it sit there, it will pair right up with my car within a few seconds. Bluetooth is always on, and always says "Now Discoverable" at the bottom of the settings screen.

  • MDB / AQ / RA problem: message not dequeued when put by PL/SQL to AQ

    I’m facing the following problem: I have a setup a J2CA Resource Adapter for AQ (OEMS) and a MDB listener. As polling configuration I use the following:
    <config-property>
    <config-property-name>ListenerThreadMaxPollInterval</config-property-name>
    <config-property-value>250</config-property-value>
    </config-property>
    According to the spec, this configuration should make sure that the underlying the JMS implementation polls the queue (AQ) every 250 ms in order to check whether there are available message.
    When I send a message to the AQ using JMS, the message is dequeued within an acceptable time range.
    However, when PL/SQL code enqueues messages directly to the AQ things do not work well:
    1. When PL/SQL posts a message > 4096 kb (according to the spec messages > 4096 kb have to be posted in a different way, since a CLOB column is used) for the first time it takes about 4 minutes until the MDB picks it up. All subsequent messages are picked up immediately, which is not surprisingly since the documentation mentions that an adaptive strategy is used. 4 minutes is not acceptable for me.
    2. When PL/SQL posts a message < 4096 kb the message expires on the AQ-queue (even though it is a non-expirable message), without being picked up by the MDB.
    What do I do wrong? Help is needed and appreciated!

    With great pleasure I can announce 'a' solution for the problem stated. Apparently the JMS implementation expects certain JMS headers in the Oracle AQ message in order to fetch it from the AQ properly. The PL/SQL code, which caused the problem described in this post, looked like this:
    declare
    enqueue_options SYS.DBMS_AQ.enqueue_options_t;
    message_properties SYS.DBMS_AQ.message_properties_t;
    message_handle RAW (16);
    user_prop_array SYS.aq$_jms_userproparray;
    AGENT SYS.aq$_agent;
    header SYS.aq$_jms_header;
    MESSAGE SYS.aq$_jms_text_message;
    p_xml_intern_bericht                          varchar2(8000);
    p_len_message                                    number;
    begin
    --p_xml_intern_bericht :='bla';
    p_xml_intern_bericht :='test';
    p_len_message := LENGTH (p_xml_intern_bericht);
    dbms_output.put_line('->' ||p_len_message);
    IF p_len_message > 4000
    THEN
    MESSAGE := SYS.aq$_jms_text_message (header,p_len_message,NULL,p_xml_intern_bericht);
    ELSE
    MESSAGE :=SYS.aq$_jms_text_message (header,p_len_message,p_xml_intern_bericht,NULL);
         END IF;                                        
    DBMS_AQ.enqueue (queue_name => 'MY_AQ' ,
    enqueue_options => enqueue_options,
    message_properties => message_properties,
    payload => MESSAGE,
    msgid => message_handle
    COMMIT;
    end;
    After adding the required JMS headers as in the snipped below, the message was picked up immediately from the AQ:
    declare
    msg SYS.AQ$_JMS_TEXT_MESSAGE;
    msg_hdr SYS.AQ$_JMS_HEADER;
    msg_agent SYS.AQ$_AGENT;
    msg_proparray SYS.AQ$_JMS_USERPROPARRAY;
    msg_property SYS.AQ$_JMS_USERPROPERTY;
    queue_options DBMS_AQ.ENQUEUE_OPTIONS_T;
    msg_props DBMS_AQ.MESSAGE_PROPERTIES_T;
    msg_id RAW(16);
    dummy VARCHAR2(4000);
    begin
    msg_agent := SYS.AQ$_AGENT('', null, 0);
    msg_proparray := SYS.AQ$_JMS_USERPROPARRAY();
    msg_proparray.EXTEND(1);
    msg_property := SYS.AQ$_JMS_USERPROPERTY('JMS_OracleDeliveryMode', 100, '2', NULL, 27);
    msg_proparray(1) := msg_property;
    msg_hdr := SYS.AQ$_JMS_HEADER(msg_agent,null,'MY_SCHEMA',null,null,null,msg_proparray);
    msg := SYS.AQ$_JMS_TEXT_MESSAGE(msg_hdr,null,null,null);
    msg.text_vc := 'test';
    msg.text_len := length(msg.text_vc);
    DBMS_AQ.ENQUEUE( queue_name => 'MY_AQ'
    , enqueue_options => queue_options
    , message_properties => msg_props
    , payload => msg
    , msgid => msg_id);     
    commit;
    end;     
    This solution was posted in the following blog: http://technology.amis.nl/blog/?p=2384. The environment in this blog is a Oracle XE database. The writer gets an ERROR when posting a message without adding the described JMS headers (see first pl/sql code snippet). Therefore he was forced to provide them in order to make AQ work for him.
    The remarkable thing is that in our environment (Oracle 10.2.0.x) posting messages without the necessary JMS headers do not result in errors. The AQ accepts them but the JMS listener remains silent or receives them after an unacceptable amount of time.
    This must definitely be a bug. Hope this information can help you to solve your PL/SQL AQ JMS problem.

  • Messages are not dequeing from the Queue

    I am using Oracle Advanced Queueing.
    PL/SQL API for enqueue
    JMS API for Dequeue Messages asynchronously (register listener and using onMessage())
    It is multi consumer queue.
    The program used to work fine. Now, it has stopped. Now, we can enqueue as
    many messages as we want. The subscriber does not recieve any messages. BUT,
    once we disconnect subscriber and connect again, the subscriber gets all the
    messages in the queue. You can repeat this N times.
    I sent this java program and sql scripts to Oracle support and they ran it successfully in their environment. So it appears to be some weird environment problem.
    Question:
    Did anybody have problem like this?
    Does anybody have any ideas about what to check in Oracle/Java client environment?
    We use Java SDK 1.2.2, thin JDBC drive and Oracle 8.1.7
    Thanks for reading this message.
    Vlad.
    null

    EMON is running:
    oracle 1105 1 0 Apr 28 ? 0:03 ora_emn0_wmdev
    And there are two trace files, but nothing interesting inside (they don't change when I run java client):
    -rw-r--r-- 1 oracle dba 107 May 2 18:01 PLSExtProc_agt_5404.trc
    -rw-r--r-- 1 oracle dba 107 May 2 18:06 PLSExtProc_agt_7021.trc
    PLSExtProc_agt_5404.trc
    Remote HO Agent received unexpected RPC disconnect
    status 1003: ncrorpi_recv_procid, called from horg.c
    PLSExtProc_agt_7021.trc
    Remote HO Agent received unexpected RPC disconnect
    status 1003: ncrorpi_recv_procid, called from horg.c
    null

  • Why are messages not dequeuing and stuck in the ready state?

    Messages are successfully enqueueing but not dequeuing and are stuck in ready state (STATE = 0).  The ENQ_TIME is 5 hours ahead of system time.  In one environment, AQ is working (10g 10.2.0.4.0).  In the other environment, it is not working (11g 11.2.0.3.0).
    I just did the following:
    1. Purged queue table
    2. Stopped queues
    3. Dropped queues
    4. Dropped queue table
    5. Created queue table
    6. Created queues
    7. Started queues
    I tested once and a record was inserted in the queue table:
    MSGID      <msgid>
    CORRID     
    PRIORITY      1
    STATE      0
    DELAY     
    EXPIRATION     
    TIME_MANAGER_INFO     
    LOCAL_ORDER_NO      0
    CHAIN_NO      0
    CSCN      0
    DSCN      0
    ENQ_TIME      12/23/2014 4:33:43.338902 PM
    ENQ_UID      <enq_uid>
    ENQ_TID      <enq_tid>
    DEQ_TIME     
    DEQ_UID     
    DEQ_TID     
    RETRY_COUNT      0
    EXCEPTION_QSCHEMA     
    EXCEPTION_QUEUE     
    STEP_NO      0
    RECIPIENT_KEY      0
    DEQUEUE_MSGID     
    SENDER_NAME     
    SENDER_ADDRESS     
    SENDER_PROTOCOL     
    USER_DATA      <user_data>
    USER_PROP     
    Notice the RETRY_COUNT is 0.  The ENQ_TIME is 5 hours ahead.  In the procedures to enqueue and dequeue, there are no errors.
    Following is the plsql to enqueue:
    CREATE OR REPLACE PACKAGE BODY
    pkg_2
    AS
        FUNCTION queue_create_thing ( <parameters> )
            RETURN NUMBER
        IS
            enqueue_options     dbms_aq.enqueue_options_t;
            message_properties  dbms_aq.message_properties_t;
            message_handle      RAW(16);
            v_message           msg_type;
            v_thing_id          things.id%TYPE;
        BEGIN
            v_message := msg_type( <parameters> );
            dbms_aq.enqueue(queue_name => '<queue name>',
                            enqueue_options => enqueue_options,
                            message_properties => message_properties,
                            payload => v_message,
                            msgid => message_handle);
            RETURN v_thing_id;
        EXCEPTION
            WHEN OTHERS
            THEN
               errpkg.record_and_stop (SQLCODE);
        END queue_create_thing;
        PROCEDURE queue_delete_thing( <parameters> )
        IS
            enqueue_options     dbms_aq.enqueue_options_t;
            message_properties  dbms_aq.message_properties_t;
            message_handle      RAW(16);
            v_message           msg_type;
        BEGIN
            v_message := msg_type( <parameters> );
            dbms_aq.enqueue(queue_name => '<queue name>',
                            enqueue_options => enqueue_options,
                            message_properties => message_properties,
                            payload => v_message,
                            msgid => message_handle);
        END;
    END pkg_2;
    Following is the code to dequeue:
    CREATE OR REPLACE PACKAGE BODY
    pkg_1
    AS 
        PROCEDURE create_thing ( context IN RAW,
                                    reginfo IN sys.aq$_reg_info,
                                    descr IN sys.aq$_descriptor,
                                    payload IN RAW,
                                    payloadl IN NUMBER )
        IS 
            dequeue_options dbms_aq.dequeue_options_t;
            message_properties dbms_aq.message_properties_t;
            message_handle RAW(16);
            message msg_type;
        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);
            pkg_2.create_thing( p_thing_id => message.thing_id );
            UPDATE table t
               SET creation_complete = 1
             WHERE id = message.thing_id;
            COMMIT;
        EXCEPTION
            WHEN OTHERS
            THEN
                ROLLBACK;
                plog.error(SQLERRM);
                plog.full_call_stack;
        END create_thing;
        PROCEDURE delete_thing ( context IN RAW,
                                    reginfo IN sys.aq$_reg_info,
                                    descr IN sys.aq$_descriptor,
                                    payload IN RAW,
                                    payloadl IN NUMBER )
        IS 
            dequeue_options dbms_aq.dequeue_options_t;
            message_properties dbms_aq.message_properties_t;
            message_handle RAW(16);
            message msg_type;
        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);
            pkg_2.delete_thing( p_thing_id => message.thing_id );
            COMMIT;
        EXCEPTION
            WHEN OTHERS
            THEN
                ROLLBACK;
                plog.error(SQLERRM);
                plog.full_call_stack;
        END delete_thing;   
    END pkg_1;

    Following is the code to create the queue:
    BEGIN
      SYS.DBMS_AQADM.STOP_QUEUE ( QUEUE_NAME => '<queue name>');
      SYS.DBMS_AQADM.DROP_QUEUE ( QUEUE_NAME => '<queue name>');
    END;
    BEGIN
      SYS.DBMS_AQADM.CREATE_QUEUE
        QUEUE_NAME          =>   '<queue name>'
       ,QUEUE_TABLE         =>   '<queue table>'
       ,QUEUE_TYPE          =>   SYS.DBMS_AQADM.NORMAL_QUEUE
       ,MAX_RETRIES         =>   5
       ,RETRY_DELAY         =>   0
       ,RETENTION_TIME      =>   0
       ,COMMENT             =>   'Queue for processing creation of things'
    END;
    BEGIN
      SYS.DBMS_AQADM.START_QUEUE
        QUEUE_NAME => '<queue name>'
       ,ENQUEUE => TRUE
       ,DEQUEUE => TRUE
    END;

  • MDB Not able to consume the messages

    Hi
    The code below put the messages in the queue which I can see through the admin console
    public class TestMDBClient {
    public static void main(String [] args) throws JMSException,
    NamingException {
    final Context ic = getInitialContext();
    final QueueConnectionFactory qcf = (QueueConnectionFactory)ic.lookup("jms/TestConnectionFactory");
    // Lookup should specify the queue name that is mentioned as "mappedName" in MessageDriven Bean.
    System.out.println("TEST ="+qcf);
    final Queue destQueue = (Queue)ic.lookup("jms/TestQueue");
    ic.close();
    final QueueConnection connection = qcf.createQueueConnection();
    try {
    final QueueSession session = connection.createQueueSession(false, 0);
    final QueueSender sender = session.createSender(destQueue);
    final TextMessage msg = session.createTextMessage("Hello World from Message Driven Bean");
    sender.send(msg);
    System.out.println("Message Sent");
    } catch (Exception ex) {
    ex.printStackTrace();
    } finally {
    connection.close();
    private static Context getInitialContext() throws NamingException {
    Hashtable env = new Hashtable();
    // Add InitialContext property assignments here.
    env.put( Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory" );
    // Note that by default WebLogic server is not created with security, so credentials are not needed.
    // TODO: Verify the server address and port number
    env.put(Context.PROVIDER_URL, "t3://localhost:7101");
    return new InitialContext( env );
    But My Mdb onMessage() is not getting executing
    import javax.ejb.EJBException;
    import javax.ejb.MessageDrivenBean;
    import javax.ejb.MessageDrivenContext;
    import javax.jms.Message;
    import javax.jms.MessageListener;
    public class TestMDBBean implements MessageDrivenBean, MessageListener {
    private MessageDrivenContext _context;
    public void ejbCreate() {
    public void setMessageDrivenContext(MessageDrivenContext context) throws EJBException {
    _context = context;
    public void ejbRemove() throws EJBException {
    public void onMessage(Message message) {
    System.out.println("I am here ...");
    System.out.println(message);
    My config xml files are
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <ejb-jar xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd" version="2.1"
    xmlns="http://java.sun.com/xml/ns/j2ee">
    <enterprise-beans>
    <message-driven>
    <description>Message-Driven Bean</description>
    <display-name>TestMDB</display-name>
    <ejb-name>TestMDB</ejb-name>
    <ejb-class>oracle.apps.rms.model.TestMDBBean</ejb-class>
    <messaging-type>javax.jms.MessageListener</messaging-type>
    <transaction-type>Container</transaction-type>
    </message-driven>
    </enterprise-beans>
    </ejb-jar>
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <weblogic-ejb-jar xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.bea.com/ns/weblogic/weblogic-ejb-jar http://www.bea.com/ns/weblogic/weblogic-ejb-jar/1.0/weblogic-ejb-jar.xsd"
    xmlns="http://www.bea.com/ns/weblogic/weblogic-ejb-jar">
    <weblogic-enterprise-bean>
    <ejb-name>TestMDB</ejb-name>
    <message-driven-descriptor>
    <destination-jndi-name>jms/TestQueue</destination-jndi-name>
    </message-driven-descriptor>
    <enable-call-by-reference>true</enable-call-by-reference>
    </weblogic-enterprise-bean>
    <message-destination-descriptor>
    <message-destination-name>TestQueue</message-destination-name>
    <destination-jndi-name>jms/TestQueue</destination-jndi-name>
    </message-destination-descriptor>
    </weblogic-ejb-jar>
    I even tried with a standalone java program ; no luck there also .Any body can help ?
    package oracle.apps.rms.model;
    import java.util.Hashtable;
    import javax.jms.*;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    public class Test implements MessageListener {
    public final static String JNDI_FACTORY =
    "weblogic.jndi.WLInitialContextFactory";
    // ******Defines the JMS CONNECTION FACTORY JNDI name.******
    public final static String JMS_FACTORY = "jms/TestConnectionFactory";
    // ******Defines the QUEUE JNDI name.******
    public final static String QUEUE = "jms/TestQueue";
    private QueueConnectionFactory qconFactory;
    private QueueConnection qcon;
    private QueueSession qsession;
    private QueueReceiver qreceiver;
    private Queue queue;
    private boolean quit = false;
    public void onMessage(Message msg) {
    try {
    String msgText;
    if (msg instanceof TextMessage) {
    msgText = ((TextMessage)msg).getText();
    } else {
    msgText = msg.toString();
    System.out.println("Message Received: " + msgText);
    if (msgText.equalsIgnoreCase("quit")) {
    synchronized (this) {
    quit = true;
    this.notifyAll();
    } catch (JMSException jmse) {
    System.err.println("An exception occurred: " + jmse.getMessage());
    public void init(Context ctx, String queueName) throws NamingException,
    JMSException {
    qconFactory = (QueueConnectionFactory)ctx.lookup(JMS_FACTORY);
    qcon = qconFactory.createQueueConnection();
    qsession = qcon.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
    queue = (Queue)ctx.lookup(queueName);
    System.out.println(queue);
    qreceiver = qsession.createReceiver(queue);
    qreceiver.setMessageListener(this);
    qcon.start();
    public void close() throws JMSException {
    qreceiver.close();
    qsession.close();
    qcon.close();
    public static void main(String[] args) throws Exception {
    String str = "t3://localhost:7101";
    InitialContext ic = getInitialContext(str);
    Test qr = new Test();
    qr.init(ic, QUEUE);
    System.out.println("JMS Ready To Receive Messages (To quit, send a \"quit\" message).");
    synchronized (qr) {
    while (!qr.quit) {
    try {
    qr.wait();
    } catch (InterruptedException ie) {
    ie.printStackTrace();
    qr.close();
    private static InitialContext getInitialContext(String url) throws NamingException {
    Hashtable<String, String> env = new Hashtable<String, String>();
    env.put(Context.INITIAL_CONTEXT_FACTORY, JNDI_FACTORY);
    env.put(Context.PROVIDER_URL, url);
    return new InitialContext(env);
    Thanks
    Suneesh

    Hi,
    Please try the below one: http://weblogic-wonders.com/weblogic/2009/08/17/mdb3-0-sample-for-weblogic-application-server/ (if you want to try with MDB3.0)
    If you want to continue with the MDB2.0 then please change the DDs as below:
    *"weblogic-ejb-jar.xml"*
    <?xml version="1.0" encoding="UTF-8"?>
    <weblogic-ejb-jar
    xmlns="http://www.bea.com/ns/weblogic/90" xmlns:j2ee="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.bea.com/ns/weblogic/90 http://www.bea.com/ns/weblogic/90/weblogic-ejb-jar.xsd">
    <weblogic-enterprise-bean>
    <ejb-name>TestMDB</ejb-name>
    <message-driven-descriptor>
    <destination-jndi-name>TestQ</destination-jndi-name>
    </message-driven-descriptor>
    </weblogic-enterprise-bean>
    </weblogic-ejb-jar>
    *"ejb-jar.xml"*
    <?xml version="1.0" encoding="UTF-8"?>
    <ejb-jar
    xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd"
    version="2.1">
    <enterprise-beans>
    <message-driven>
    <ejb-name>TestMDB</ejb-name>
    <ejb-class>test.example.mdb.TestMDB</ejb-class>
    <transaction-type>Container</transaction-type>
    <activation-config>
    <activation-config-property>
    <activation-config-property-name>destinationType</activation-config-property-name>
    <activation-config-property-value>javax.jms.Queue</activation-config-property-value>
    </activation-config-property>
    </activation-config>
    </message-driven>
    </enterprise-beans>
    </ejb-jar>
    I have uploaded My TestMDB Application in : http://www.4shared.com/file/ni4WBc6G/TestMDB.html you can get the "QueueSend.java" program from Step-6) of below link : http://weblogic-wonders.com/weblogic/2010/06/26/basic-jms-demo-using-weblogic-queue/
    Thanks
    Jay SenSharma
    http://weblogic-wonders.com (Wonders Are Here)
    Thanks
    Jay SenSharma

  • CSA* BDoc Queues that will not dequeue

    Hello,
    I am trying to solve a problem with queues that will NOT dequeue automatically the BDocs in the Q&A environment (dev is OK).
    This is the context:
    NW2004s, Q&A
    CRM 5.0
    BDoc processing
    When I create a new BP, a BDoc is created.
    If I go to the SWM01 transaction, I find my nice BDoc in an "Intermediate (written to qRFC queue)." State. The related queue is named "CSABUPA" + number of BP.
    In order to really process the BDoc and create the IDoc, I must click on the queue's name, verify it's got one tranasaction in, and ACTIVATE it.
    In this way, the BDoc will be processed and I will get the green light!
    If I go to the SQMR transaction, I can see that, in QA, the CSA* queues have a "U" type, whereas, in DEV, they have a "R" type.
    Yet, I don't know (perhaps have no authorization) to change the "U" to "R" type...
    Any clues?
    Thank you very much gentlemen!

    Thank you, that was it.
    I wonder what we developers can do in the end, always have to ask Administrators to do stuff

  • ORA-03113: end-of-file on communication channel:(The queuing is not enabled

    The queuing is not enabled.
    SQL> select * from user_queues;
    NAME QUEUE_TABLE QID QUEUE_TYPE MAX_RETRIES RETRY_DELAY ENQUEUE DEQUEUE RETENTION USER_COMMENT
    ACK_QUEUE ACK_QUEUE_T 36560 NORMAL_QUEUE 5 6 NO NO 0
    AQ$_ACK_QUEUE_T_E ACK_QUEUE_T 36561 EXCEPTION_QUEUE 0 0 NO NO 0 exception queue
    AQ$_IFW_SYNC_E IFW_SYNC 36562 EXCEPTION_QUEUE 0 0 NO NO 0 exception queue
    IFW_SYNC_QUEUE IFW_SYNC 36563 NORMAL_QUEUE 5 6 NO NO 0
    In blrhpqe2 system when we try to create the queue it gives end-of-communication error. It seems there some problem with the dbms_aqadmn. Can you please check-up and let know your feedback.
    Below the output of the screen contents:
    1* select * from user_queues
    SQL> begin
    2 dbms_aqadm.start_queue(ACK_QUEUE);
    3 commit;
    4 end;
    5 /
    begin
    ERROR at line 1:
    ORA-03113: end-of-file on communication channel
    please help me on this

    >>>ERROR at line 1:
    ORA-03113: end-of-file on communication channel
    conn to database again.
    ORA-03113: end-of-file on communication channel
    Cause: The connection between Client and Server process was broken.
    Action: There was a communication error that requires further investigation. First, check for network problems and review the SQL*Net setup. Also, look in the alert.log file for any errors. Finally, test to see whether the server process is dead and whether a trace file was generated at failure time.

Maybe you are looking for

  • Custom Report - OLM

    Dear Friends I am novoice to OLM module, we have requirement from client to develop a custom concurrent report. 'Course Wise Attendance Report'. Could Please guide me in this. 1. How to enroll the employees in the course 2. How to mark attendance 3.

  • BOR event vs ABAP OO event

    Hi, I would like create new PO workflow (BUS2012) using ABAP OO workflow. Is it possible to use the existing BOR event, such as RELEASESTEPCREATED  instead of creating new one for the ABAP OO workflow class? And if we can re-use the event, how do we

  • Where does portal details gets stored in the backend

    Hi Gurus, Where does portal contents gets stored in the portal related backend ? Example:  We have Content Administration under which we create iviews, pages, worksets and roles. Where does this gets stored ? do they get stored in some table as shown

  • Reading SPRM's

    hi so i nee some help... i'm using a video track with subtitles for the button overlay's... it looks great on a 16:9 TV but all out of whack on a 4:30 TV. i've created a 4:3 subtitle track as well but i can't figure out how to create the script to re

  • Cropping photos at an angle within InDesign?

    Is this possible? I have a bunch of product shots. I want to bring them into InDesign, rotate them until I like the angle, and then crop them (mask out the background) to fit inside a squared-up rectangle border. I know I can do this all individually