How to notify the exceptions in JMS sychronous request-response processing?

          Hi All,
          Pl. help me with ur expertise in the foll. scenario we are facing.
          Scenario:
          I have a requirement where I need to notify the exceptions to my client while
          the client request's are processed asynchronously and my client is waiting in
          synchronous for the response.
          The client is sending a message to one queue (QueueA) and waiting for response
          in another queue (QueueB). The message from "QueueA" is picked up by a MDB listening
          to "QueueA" and it throws an exception while processing some "business logic".
          In this case how do I notify to my client who is waiting in another queue. i.e.
          "QueueB" that there is an exception occurred while processing the business logic.
          I am using JMSCorrelationID to uniquely identify a response for a request sent
          by the client.
          What are the possible options to handle exceptions in JMS for an implementation
          like the one mentioned above.
          Any comments/feedback/pointers will be REALLY REALLY appreciated.
          Tks and regds
          C R Baradwaj
          

          Raghuram Bharadwaj C wrote:
          > Tom,
          >
          > Once again thanks a lot for your prompt response!
          >
          > Yes, A Knows how many downstream queues are involved.
          >
          > For unanticipated multiple responses
          >
          > If I do a select for update in all the MDB's listening to "QueueB/QueueC/QueueD",
          > only one response message will be sent to the "ResponseQ".
          Does this run the risk of serializing the database access? If
          B/C/D have no messages so that a new operation causes all
          three to fire at once, will they end up serializing on their
          respective selectForUpdate calls, losing parallelism?
          >
          > The response from all the datasource(s) are updated in the database by the MDB.
          > The MDB which updates the database last will consolidate all the response(s) and
          > send one final response to the "ResponseQ".
          >
          > This will be picked up the client who is waiting in the "ResponseQ". There wont
          > be multiple message(s) placed in the "ResponseQ".
          >
          > In this situation, How do I handle exceptions that occur in downstream MDB's?
          Use multiple responses. MDB's send error message on response.
          Or have failing MDB put an error message in the database table, so
          that the final responder can read the error message?
          >
          > Many Thanks in Advance,
          > C R Baradwaj
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          > Tom Barnes <[email protected]> wrote:
          >
          >>
          >>Raghuram Bharadwaj C wrote:
          >>
          >>>Thanks tom for your support!
          >>>
          >>>Let me explain more about the problem.
          >>>
          >>>Scenario
          >>>========
          >>>Lets take a simplest case where the client is sending a message to
          >>
          >>"QueueA" and
          >>
          >>>he is now waiting for a response in the "ResponseQ"
          >>>
          >>>The MDB listening to "QueueA" wakes up and split the message(s) into
          >>
          >>three and
          >>
          >>>passing it to the next layer of datasource specific queue(s). The queue(s)
          >>
          >>are
          >>
          >>>"QueueB", "QueueC" and "QueueD".
          >>>
          >>>The MDB listening to the datasource specific queue(s) picks up the
          >>
          >>datasource
          >>
          >>>request sends it to the datasource and gets the response back from
          >>
          >>the datasource.
          >>
          >>>The MDB also updates a table in the database with the response. The
          >>
          >>MDB also check(s)
          >>
          >>>after updating the database to see all response(s) from all the datasource(s)
          >>>are reached. If yes, one of the MDB also sends a acknowledgement to
          >>
          >>the "ResponseQ".
          >>
          >>>
          >>>The client listening to the "ResponseQ" gets the acknowledgement and
          >>
          >>hit the database
          >>
          >>>to collect all the response(s) from all the datasource(s). These response(s)
          >>
          >>are
          >>
          >>>formatted and sent a response to the client. We have also created uniqueid
          >>
          >>for
          >>
          >>>identifying each request. This uniqueid is set in the JMSCorrelationID.
          >>
          >>The client
          >>
          >>>uses the uniqueid to collect all the response(s) for the request he
          >>
          >>had sent.
          >>
          >>>Problem
          >>>=======
          >>>If an error/exception occurred in a one of the MDB which is listening
          >>
          >>to QueueB/QueueC/QueueD.
          >>
          >>>How do we handle this?
          >>>
          >>>Please let me know all the possibilities that you would have done in
          >>
          >>this case.
          >>
          >>>
          >>Does A know how many downstream queues are involved? As part of its
          >>transaction it can send a message to the responseQ stating which
          >>queues to expect responses from. The client gets this message
          >>and knows that it must get responses from all of B, C, D, etc.
          >>before assuming success. On a failure, B, C, D, etc. can send
          >>an error message back to the response Q, or the client can
          >>simply timeout.
          >>
          >>This way there are no race conditions
          >>involving unanticipated multiple responses or missing
          >>responses, which I think the
          >>algorithm you mention above can create.
          >>Assuming just B and C (no D):
          >> B detects C is done by checking the DB
          >> C detects B is done by checking the DB **at the same time**
          >> Two response messages get sent
          >> - or -
          >> B finishes detects C not done, and sends no message.
          >> C finishes, B is finished but not reflected in DB yet, sends
          >> no message.
          >>
          >>NOTE: Be aware that when a transaction commits, different
          >>resources can response "faster" than others. The transaction
          >>monitor has no control over this. So, if as part of the
          >>same commit, a database insert and a queue insert is
          >>performed, it is possible for a consumer to receive the
          >>new message BEFORE the new database insert actually completes.
          >>
          >>
          >>>
          >>>Many Thanks in Advance,
          >>>
          >>>C R Baradwaj
          >>>
          >>>
          >>>
          >>>
          >>>
          >>>
          >>>
          >>>
          >>>Assuming that
          >>>
          >>>Tom Barnes <[email protected]> wrote:
          >>>
          >>>
          >>>>One approach is to send an "error" message to QB that uses
          >>>>the JMSCorrelationID the consumer is expecting. This will
          >>>>wake up the consumer, and the consumer can react to
          >>>>the error as needed.
          >>>>
          >>>>Another is to use two asynchronous listeners, one on the
          >>>>response queue, and one on a temporary (client created)
          >>>>queue. On error detection the MDB can send error messages
          >>>>to the temporary queue.
          >>>>
          >>>>You may want to skim the book "Professional JMS" - as I
          >>>>recall, it contains a section on queueing design patterns.
          >>>>
          >>>>Tom
          >>>>
          >>>>Raghuram Bharadwaj C wrote:
          >>>>
          >>>>
          >>>>
          >>>>>Hi All,
          >>>>>
          >>>>>Pl. help me with ur expertise in the foll. scenario we are facing.
          >>>>>
          >>>>>Scenario:
          >>>>>I have a requirement where I need to notify the exceptions to my client
          >>>>
          >>>>while
          >>>>
          >>>>
          >>>>>the client request's are processed asynchronously and my client is
          >>>>
          >>>>waiting in
          >>>>
          >>>>
          >>>>>synchronous for the response.
          >>>>>
          >>>>>The client is sending a message to one queue (QueueA) and waiting
          >>
          >>for
          >>
          >>>>response
          >>>>
          >>>>
          >>>>>in another queue (QueueB). The message from "QueueA" is picked up
          >>
          >>by
          >>
          >>>>a MDB listening
          >>>>
          >>>>
          >>>>>to "QueueA" and it throws an exception while processing some "business
          >>>>
          >>>>logic".
          >>>>
          >>>>
          >>>>>In this case how do I notify to my client who is waiting in another
          >>>>
          >>>>queue. i.e.
          >>>>
          >>>>
          >>>>>"QueueB" that there is an exception occurred while processing the
          >>
          >>business
          >>
          >>>>logic.
          >>>>
          >>>>
          >>>>>I am using JMSCorrelationID to uniquely identify a response for a
          >>
          >>request
          >>
          >>>>sent
          >>>>
          >>>>
          >>>>>by the client.
          >>>>>
          >>>>>What are the possible options to handle exceptions in JMS for an implementation
          >>>>>like the one mentioned above.
          >>>>>
          >>>>>Any comments/feedback/pointers will be REALLY REALLY appreciated.
          >>>>>
          >>>>>Tks and regds
          >>>>>C R Baradwaj
          >>>>
          >
          

Similar Messages

  • How to read the Image Data using HTTp Request response

    i want to read image data from server please send me any code or answers.
    and also i want to exit application using button control for iphone simulator.
    thanks in advance.

    You would do a URLRequest and download the image. You could save it to disk and then load it or directly create a new image with the binary data.

  • How to log the exception using Log action in Oracle Service Bus

    Hi,
    Whenever an exception is raised how to log the exception using Log action in oracle service bus.After logging where I have to find the logged message.

    It would be in the log file for the managed server which ran the request. If you are logging the message at a lower level than your app server, however, you won't see it. You should be logging the exception at Error level.

  • How to write the exceptions in function module

    dear all,
         how to write the exceptions in function modules with example.
    thanq
    jyothi

    Hi,
    Raising Exceptions
    There are two ABAP statements for raising exceptions. They can only be used in function modules:
    RAISE except.
    und
    MESSAGE.....RAISING except.
    The effect of these statements depends on whether the calling program handles the exception or not. The calling program handles an exception If the name of the except exception or OTHERS is specified after the EXCEPTION option of the CALL FUNCTION statement.
    If the calling program does not handle the exception
    · The RAISEstatement terminates the program and switches to debugging mode.
    · The MESSAGE..... RAISING statement displays the specified message. Processing is continued in relation to the message type.
    If the calling program handles the exception, both statements return control to the program. No values are transferred. The MESSAGE..... RAISING statement does not display a message. Instead, it fills the system fields sy-msgid, sy-msgty, sy-msgno , and SY-MSGV1 to SY-MSGV4.
    Source Code of READ_SPFLI_INTO_TABLE
    The entire source code of READ_SPFLI_INTO_TABLE looks like this:
    FUNCTION read_spfli_into_table.
    ""Local Interface:
    *" IMPORTING
    *" VALUE(ID) LIKE SPFLI-CARRID DEFAULT 'LH '
    *" EXPORTING
    *" VALUE(ITAB) TYPE SPFLI_TAB
    *" EXCEPTIONS
    *" NOT_FOUND
    SELECT * FROM spfli INTO TABLE itab WHERE carrid = id.
    IF sy-subrc NE 0.
    MESSAGE e007(at) RAISING not_found.
    ENDIF.
    ENDFUNCTION.
    The function module reads all of the data from the database table SPFLI where the key field CARRID is equal to the import parameter ID and places the entries that it finds into the internal table spfli_tab. If it cannot find any entries, the exception NOT_FOUND is triggered with MESSAGE ... RAISING. Otherwise, the table is passed to the caller as an exporting parameter.
    Calling READ_SPFLI_INTO_TABLE
    The following program calls the function module READ_SPFLI_INTO_TABLE:
    REPORT demo_mod_tech_fb_read_spfli.
    PARAMETERS carrier TYPE s_carr_id.
    DATA: jtab TYPE spfli_tab,
    wa LIKE LINE OF jtab.
    CALL FUNCTION 'READ_SPFLI_INTO_TABLE'
    EXPORTING
    id = carrier
    IMPORTING
    itab = jtab
    EXCEPTIONS
    not_found = 1
    OTHERS = 2.
    CASE sy-subrc.
    WHEN 1.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno.
    WHEN 2.
    MESSAGE e702(at).
    ENDCASE.
    LOOP AT jtab INTO wa.
    WRITE: / wa-carrid, wa-connid, wa-cityfrom, wa-cityto.
    ENDLOOP.
    The actual parameters carrier and jtab have the same data types as their corresponding interface parameters in the function module. The exception NOT_FOUND is handled in the program. It displays the same message that the function module would have displayed had it handled the error.
    Or
    just have to decide what exceptions u want and under what conditions.
    then declarethese exeptions under the exceptions tab.
    in the source code of ur function module.
    if
    like this u can code .
    now when u call the function module in tme mainprogram.
    if some error occurs and u have declared a exception for this then it will set sy-subrc = value u give inthe call of this fm.
    in the fm u can program these sy-subrc values and trigger the code for ur exception.
    Please reward if useful
    Regards,
    Ravi
    Edited by: Ravikanth Alapati on Mar 27, 2008 9:36 AM

  • How to trap the exception in cursors

    Hi
    How to trap the exception NO DATA FOUND/other exceptions with the cursor
    DECLARE
    CURSOR c1 IS SELECT * FROM EMP WHERE empno = 1234;
    BEGIN
    FOR i IN c1 LOOP
    DBMS_OUTPUT.PUT_LINE(i.ename);
    END LOOP;
    END;so 1234 is not in my table, how to trap this.could some one help me please
    Edited by: user4587979 on Sep 27, 2010 3:46 AM

    user4587979 wrote:
    Hi
    How to trap the exception NO DATA FOUND/other exceptions with the cursor
    DECLARE
    CURSOR c1 IS SELECT * FROM EMP WHERE empno = 1234;
    BEGIN
    FOR i IN c1 LOOP
    DBMS_OUTPUT.PUT_LINE(i.ename);
    END LOOP;
    END;so 1234 is not in my table, how to trap this.could some one help me please
    Edited by: user4587979 on Sep 27, 2010 3:46 AMYou don't trap NO_DATA_FOUND in a cursor loop, as for others ... you trap and handle the ones you expect.
    NO_DATA_FOUND isn't a condition associated with the processing of a cursor loop.
    You have other options though, for example ...
    declare
       l_processed_something boolean default false;
    begin
       for x in cursor
       loop
          l_processed_something   := true;
          <more processing>
       end loop;
    end;
    /

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

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

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

  • How to set the conversation id programmatically in a BPM process

    Hi all,
    I am using BPM/SOA 11g PS3.
    Is it possible to set the conversation id programmatically in a BPM process starting with a none start event?
    I know I can set it easily if I use a BPM process starting with a message start event.
    All I have to do is set it in the "wsa:MessageID" node in SOAP Header when I initiate the process instance.
    However, I have no idea how to set the conversation id programmatically in a BPM process starting with a none start event.
    I looked for if there is any appropriate method in the Java api for the process instance management, such as IInstanceManagementService and CompositeInstance, but no method seems to be appropriate.
    Does anyone know how to do this?
    Regards,
    Kenji
    Edited by: Kenji Imamura on 2011/04/20 0:10

    Hi fifty,
    Did you get a solution to the above problem you have mentioned? I have a similar issue i am trying to fix.
    I have a webservice call in a process activity and if the call does not work i get a soap fault and the fuego.lang.ComponentExecutionException . My process requires that i catch the exception infact any kind of exceptions that occur on that call and perform another activity in the process.
    I have defined an exception handler at the activity level for java.lang.Exception and java.lang.RunTimeException.
    i don't see anything in the catalog which would handle the SOAP fault OR the componentexception.

  • How to change the input and output schema in BPEL process

    hi',
    Please tell me how to change the input and output schema in BPEL process after the process is made.
    thanks
    Yatan

    If your intention is just changing the content you are passing to bpel/returning from bpel
    Here is another way
    just update your default created xsd files with new elements, update wsdl elements in message definition and chnage bpel code to reflect new elements in activities
    Regards,
    Praveen

  • How to get the queries behind a concurrent request

    Hi to all
    how to get the queries behind a concurrent request in oracle Apps R12
    Regards ,
    Zulqarnain

    IMHO you can not simple say that this query executed or another
    because many queries can be executed by one cp
    >
    My actually problem is that, i want to know that when Cost Summary Report from FA Responsibility is running then this concurrent program also run another CP. Populate Balanace Report . This CP also attach with
    Populate Balanace Report GT Data executable , This executable run FA_BALREP_PKG.populate_gt_table procedure.I want to know that which query is running for Cost Summary Report in above mention package.
    >
    it's look like that "Cost Summary Report from FA Responsibility" is main cp which generate the report based on some just-in-time data which generated by "Populate Balanace Report "
    in other words
    "FA_BALREP_PKG.populate_gt_table" populate data in some temp table for report and "Cost Summary Report" use it

  • How to delete the messages from JMS Queue

    Hi,Can anybody help how to delete the messages from the JMS Queue.Thanks in advance.

    You can dequeue the message using a JMS client or delete it using Weblogic Admin Console -
    http://download.oracle.com/docs/cd/E17904_01/apirefs.1111/e13952/taskhelp/jms_modules/queues/ManageQueues.html
    Regards,
    Anuj

  • How to handle the exception in GP(Exception : Activity could not be read)

    Hi all
    we are getting the GP exceptions  as  1) "Activity could not be read"  2) "Action has been stopped"
    3) error while processing the item can not be displayed
    Please let me know how to handle these exceptions in GP .
    currently i got some documents in SDN on GP exceptions but those are related to manual exceptions for example if you enterd wrong data in the inputfield then we can handle those exceptions then it will allow to enter the new value but the exceptions which i mentioned above are new it seems
    can you please let me know how to handle or solve those 3 exceptions
    Thanks
    bindu

    Hi Shikhil
    Thanks for your reply
    Please have a look below for exceptions which i am getting in GP and let me know how to handle these exceptions.
    1) "Activity could not be read"
    2) "Action has been stopped"
    3) error while processing the item can not be displayed
    if you give any idea/clue how to handle these exceptions then it would be great help to me
    Thanks
    Sunil

  • I added a security exception for an untrusted connection and can't figure out how to remove the exception.

    The site is not unsafe site, but it's not what I wanted to do! How do I get rid of the exception?
    I've tried Tools --> Options, and then I've looked mostly in Security and Advanced
    I located the Encription area under Advanced, which looked promising, but I can't figure out which certificate I need to revoke; none of the say anything helpful like "user-requested exception" or anything like that.
    The exception should have been for either a currently offline site (local only right now), or for the site I was connecting to through an embedded You Tube link. I am not sure which site I added the exception for, though I think it was for YouTube (the site being connected to).

    Click on the Layout button lower right and choose a Vertical lyout from the dropdown

  • How to raise the exception in function module

    Dear abaper's.
                   I am creating a Function module .In that in' EXCEPTION' Tab i am giving
    3 exception .1.NO_DATA_FOUND 2.NO_PRINTER_FOUND 3.SMARTFORM_INTERFACE_NOT_FOUND.
    In my coding if this condtion matches i want to raise this exception.how can i do this in my coding .can any one suggest me..
    advance thanks,
    Warm regards,
    Veera

    Hi,
    if that condition is not satisfied,and u didn't handle that exception while calling function module then in the runtime error u will get the text as the description of the exception in function module definition.
    rgds,
    bharat.

  • How to handle the Exception in GP using executable callabel object.

    Hi all,
            I handled an exception in GP using Background callable Object. That is working fine.
    (Ex: Exception_No_User_Found). The Problem is I am not able to handle the exceptions for normal callable object. I have done the same thing as i did in background callable object except implementing IGPBackgroundCallableObject Class.  I have created an WebDynpro DC Project where in getDescription method i declared an Exception and in execute method of component controller I caught the exception if no user found.
    Then i created an callable object for this simple DC project. but that is not working i could not catch the exception. when i execute the process it is asking the User ID if i give the wrong userId it is not refreshing back to the user id input form.
    But if i test that simple callable object separately it is throwing an Exception when I give the wrong input..
    but the same thing is working fine using background callable object.
    I couldn't handle the exception for the simple callable object or executable callable object.
    Please If anyone bring me the solution that would be appreciated.
    Thanks in advance.
    Regards,
    Malar.

    Hi Shikhil
    Thanks for your reply
    Please have a look below for exceptions which i am getting in GP and let me know how to handle these exceptions.
    1) "Activity could not be read"
    2) "Action has been stopped"
    3) error while processing the item can not be displayed
    if you give any idea/clue how to handle these exceptions then it would be great help to me
    Thanks
    Sunil

  • How to use the exceptions in a RFC ?

    I can use XI (through BPM) to call a RFC and get response from the "Export" of a RFC. But could I get the exception from the "exception" of a RFC ?
    I tried to write a RFC which will generate a exception and I found it in the XI monitor, but how to use it ? i.e. sometimes I need to get the "export", but sometimes I need to get "exception". Is there any documents or examples for it ? thanks.

    Hi,
    <i>But for fault message, I don't know how to send it to a receiver.</i>
    There is no other configurations that you need to do with respect to fault messages.
    If the rfc returns an exception, this message, is passed on to the receiver instead of the response message.
    The receiver of the fault message will be the system that sent the request.
    <i>(If I can use a transformation to mapping it to other message, I think it's ok too.)</i>
    You need not use a BPM, for this, in case you are using it only for fault message handling.
    All you need to do is, create a message mapping, with source and target message types as RFC exceptions and carry out a one to one mapping.This would display the exception coming from the RFC as the fault response st the sender.
    In case, the exception returned from the RFC is not self-explanatory, you could map constants to the target message type(in message mapping) which would explain the reason for the fault.
    Regards,
    Smitha.

Maybe you are looking for

  • Loadjava fails: missing SYS.LOADLOBS

    I installed oracle 8.1.5 using the "Typical option". When I run loadjava myclass.class I get this: Error while loading com/marksaltzman/task/Task ORA-04068: existing state of packages has been discarded ORA-04067: not executed, package body "SYS.LOAD

  • Lightroom style Graduated filter?

    I just started working with DNG images, which I thought was great because I could color correct them in Lightroom 5, which I'm used to because I have a background in stills. However I quickly realized if I put any graduated filters or such down, of c

  • Building a box from the begining

    I need to build a box (room in house) and attach components like wall hangings. need to rotate the room. change the positions of hangings. need to navigate inside the room and view it in different angles is it possible to use box object and achive th

  • How to decode Apple's new serial numbers

    I bought 2 Iphones recently one starts with C39  the other DQQ.  Both 4s. What is the new decoding for the serial number.  Anyone know beside going to the Chipmunk web site. Thanks

  • Grouping idoc processing

    Hello, I may receive in SAP system, idoc sequences like this one for example : 1 - Deletion 2 - Creation Firstly, I would like to be sure that the deletion is processed before the creation. For this I tought about serialization. But my issue is here