ESB Exception Handling Best Practices

I've update the "ESB Transactions, Error Handling and Resubmit" Lesson PDF to include a best practices section. Go to http://otn.oracle.com/goto/esb and click on the link in the Learning more section. Feedback welcome.

Hi Dave,
I checked this document yesterday, it contained 18 pages.
Some great info in the additional 7 pages, just in time as well: at a customer site we are hitting bug 5547165, the rejected messages being empty. I checked the rejection handlers for BPEL and was investigating how these could be used in case of ESB. Seems you have provided the answer.
Any chance a fix for the bug mentioned here is in the 10.1.3.3 patch set?
One more thing: by default the rejected messages for ESB are written to file system, in a directory below the 'home' OC4J instance. Could this be turned into a configurable space in a next release?
Thanks and best regards, Sjoerd

Similar Messages

  • Exception Handling best practices?

    Hi, Where can I find the tutorial on exception handling best practices on oracle website?
    I am looking for the sun standards for the exception handling.

    By the way, the google keywords to find that tutorial are "java exception tutorial". In general to find a Java tutorial on topic X the google keywords are "java X tutorial". Prefer tutorials from Oracle when scanning the list of links you get back.

  • Exception handling best practice

    whats the best practice for exception handling on ?
    - BC
    -controller
    -view layer (Managed beans)
    do we have to handle commit operations on BC so we can rollback like this code
    public void save()
    // create/update/delete ROW
    try
    this.getTransaction().commit();
    catch(JboException e ){this.getTransaction().rollBack();}
    thanks
    Edited by: user3674912 on 23/05/2011 05:18 ص

    Hi,
    IMO, best practices is to handle exceptions as close to their origin. If you can't handle it, you re-throw it as you would in Java so another handler gives it a try
    Frank

  • Extend BizTalk ESB Exception Handling to manage exception for all organization wide application exception

    Hello,
    Can we Extend BizTalk ESB Exception Handling to manage exception for all organization wide application ( both biztalk and external) exception ?
    Is it something a good option or there are better approach to do this.
    Business requirement is Exception management should be single window for complete end-to end application ( source-Biztalk - destination)
    Tarun
    Tarun

    Hi Tarun,
    ESB Toolkit framework for exception handling is not complete OOTB. it is intended as a framework and set of patterns that can and should
    be extended based on the customer’s needs.
    One way of extending the capabilities is by using Standardized Exception Management or SEM in short. 
    SEM solution extends the capabilities of the Microsoft ESB Exception Management Framework and follows a design pattern that provides a flexible
    approach to exception monitoring and enables error responses to originate from outside of the solution. While SEM is primarily targeted to Microsoft BizTalk Server applications, it can also be leveraged by other applications that are able to call a Windows
    Communications Foundation (WCF) or web service.
    Refer: Standardized Exception Management
    Standardized Exception Management (SEM)
    Rachit

  • MRP Exception Messages - Best practices

    Dear colleagues,
    I am currently dealing with a large SAP installation where system is already live in 50+ countries and the number of manufacturing plants are in hundreds. MRP generates exception messages but the volume is significantly high. Planners have lost faith in these messages thus the client is not getting the full benefit of reacting to MRP exceptions. 
    Have any of you dealt with similar business situations? If yes, what best practices and what system design have you put in place to simplify the process of resolving exception messages.
    Thanks,
    PKV

    Hello Pavan,
    MD06 should be the planner's best friend as it helps him be on top of all the future expected shortfalls, talk to production schedulers or Vendors to bring material on time for production/deliver to customer.
    Best way to handle exception messages in a plant is to divide it by MRP controllers, procurement types external or internal.
    Planners have to analyse MD06 after every MRP run if possible. Atleast once a week go through their MD06.
    However as per my experience most places the material master planning data is not as clean as the planners would like to have. But MD06 offers them an opportunity to update the material master as per their choice. ie planners can change planned delivery time, mrp lot size, mrp type etc..
    You may have to find out why the planners have lost faith in MRP messages. System(MRP) can give you a good result only if  master data is good.
    Hope this helps.
    Thanks,
    Ram

  • ESB Exception handling

    Dave,
    In your Advanced Architecture presentation you mentioned about default and custom error handlers for non transactional end points. And you mentiond JMS:// and BPEL:// handlers as an example. So my question is how to configure this? I assume this involves editing ESB service files. Any documentation in this regard is appreciated. I know BPEL supports this via inbound activation specs but not sure about ESB.
    By transactional you mean Asynch invocations, right? If I invoke a BPEL either via SOAP or internal Java binding, can I still use the exception handling for a Asynch invocation?
    Thanks in advance.
    Regards,
    Rajesh

    Hi Dave,
    I checked this document yesterday, it contained 18 pages.
    Some great info in the additional 7 pages, just in time as well: at a customer site we are hitting bug 5547165, the rejected messages being empty. I checked the rejection handlers for BPEL and was investigating how these could be used in case of ESB. Seems you have provided the answer.
    Any chance a fix for the bug mentioned here is in the 10.1.3.3 patch set?
    One more thing: by default the rejected messages for ESB are written to file system, in a directory below the 'home' OC4J instance. Could this be turned into a configurable space in a next release?
    Thanks and best regards, Sjoerd

  • Simple HTTP Post Handler - Best Practice?

    I would like to create a fairly simple ASP.Net application that takes an XML record from an HTTP post request, submits it to a process that invokes a command line app that parses the XML file, takes the parsed XML file (as XML), and returns the result. 
    For now the process can be synchronous as the transform has to complete and there are no parallel activities that need to be performed.
    I'm not sure that writing an HTTP Handler is the way to go, but maybe I'm mistaken.  Plus there are no examples of doing that in Visual Studio 2013 using IIS 8.0 or 8.5 and I don't really understand the value of applying a file extension or processing
    an HTTP post to initiate the request, perhaps using a dedicated port.  I already have a class library for handling the process request.
    I'm also a little confused about reading the post request - it seems I can just do it during the page load and that I should be able to extract the first request form field - that of course means using a webform to process the request which seems to be the
    most straight-forward way to do this. So I'm looking for the best practice for fielding this kind of request.  My target server is Windows 2012, but I'm developing with VS 2013 and C# on Windows 7 using IIS Express and configuring IIS is confusing. 
    Overall it is a fairly simple app, but there are so many rich new features in VS 2013 (most of my work has been in VS 2005).  I also want to build a test app and am looking for the best way to do so, although I think I can build a simple client app
    to do that.  The business requirements will be to issue the post request from a MarkLogic xquery request which will take care of any JSON wrappers and balance between multiple Windows servers to handle the load.
    Thanks for any help with this!
    ~Tim

    Hi Tim,
    Thank you for posting in the MSDN forum.
    Actually this forum is to discuss the VS IDE, if this issue is related to web development, you could ask this question in the ASP.NET forum:
    http://forums.asp.net. If then, you could get an answer more quickly and professional. Thanks for your cooperation.
    Best Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • What are default Zend Session handling best practices to prevent Cross Site Request Forgery?

    I have enjoyed the David Powers book Adobe Dreamweaver CS5 with PHP:  Training from the Source - and have put many of the examples into practice.  I have a security related concern that may be tied to the Zend::Auth example in the book.  While this is installed an working on my site:
    <?php
    $failed = FALSE;
    if ($_POST) {
      if (empty($_POST['username']) || empty($_POST['password'])) {
        $failed = TRUE;
      } else {
        require_once('library.php');
        // check the user's credentials
        try {
          $auth = Zend_Auth::getInstance();
          $adapter = new Zend_Auth_Adapter_DbTable($dbRead, 'user', 'login', 'user_pass', 'sha1(?)');
          $adapter->setIdentity($_POST['username']);
          $adapter->setCredential($_POST['password']);
          $result = $auth->authenticate($adapter);
          if ($result->isValid()) {
            $storage = $auth->getStorage();
            $storage->write($adapter->getResultRowObject(array(
              'ID', 'login',  'user_first', 'user_last', 'user_role')));
            header('Location: /member/index.php');
            exit;
          } else {
            $failed = TRUE;
        } catch (Exception $e) {
          echo $e->getMessage();
    if (isset($_GET['logout'])) {
      require_once('library.php');
      try {
        $auth = Zend_Auth::getInstance();
        $auth->clearIdentity();
      } catch (Exception $e) {
        echo $e->getMessage();
    Apparently, there is  very limited protection against Cross Site Request Forgery, where the resulting SessionID could be easily hijacked?  I am using the Zend Community edition (I have 1.11.11).     I have an observation from a client that this authentication is not up to snuff. 
    To boil it down: 
    1.  Is there a Zend configuration file that might have some settings to upgrade the Session and or authentication security basics? I'm wondering specifically about the settings in /library/Zend/session.php? Ie secure the session against a changing user IP, and invoking some other session handling stuff (time-out etc). 
    2.  If I understand it correctly, "salting" won't help with this, unless it's added/checked via a hidden POST at login time? 
    Ideally, the man himself, David Powers would jump in here - but I'll take any help I can get!
    Thanks!

    Might ask them over here.
    http://forums.asp.net/1146.aspx/1?MVC
    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows]
    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

  • Unable to browse ESB.Exception Handling Services.WCF Service Model Exception

    Hi All,
    Currently i am trying to Configure ESB Portal on windows server 2012 .Everything worked fine but while browsing ESB Services such with extension WCF I am gettting below exception
    Could not load type 'System.ServiceModel.Activation.HttpModule' from assembly 'System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Any idea ?
    Thank
    Abhishek

    Hi Abhishek,
    Never had this issue personally. But can try the solution as suggested here..
    MSDN : Troubleshooting: Could not load type 'System.ServiceModel.Activation.HttpModule' from assembly 'System.ServiceModel...'
    Quick troubleshooting in configuring ESB Management Portal ( 2.1) on Biztalk Server
    2010
    The solution seems to be navigate to %windir%\Microsoft .NET\Framework\v4.0.30319\ and run
    aspnet_regiis –iru and iisreset commands.
    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

  • ICM Scripting Error Handling Best Practice

    Can someone tell me what is the best way to handle errors in ICM scripting. For example false node on Send to VRU or Run Ext Script node, I normally handle this with calltypes for errors and then continue the callflow. But recently I noticed that some of my clients are using peripheral variable to store an error message instead of calltype. I am just wonderinmg which is the best option?

    I don't think you need a call type, I usually set PV10 = "Error: XYZ".  Creating a call type just seems a little redundant, however it would make it easier on the reporting side as you don't have to create any custom queries to search for a specific error type.
    david

  • Good exception handling policy for Java web application

    I'm looking for a good exception handling policy for Java web application. First I found this Java exception handling best practices - How To Do In Java which says that you should never catch the Trowable class nor use e.printStackTrace();
    Then I found this Oracle page The Message-Driven Bean Class - The Java EE 6 Tutorial, which does just that. So now I'm confused. Is there a good page online for an exception handling policy for Java EE Web applications? I have a hard time finding one. I've read that you should not catch the Exception class. I've been catching it previously to make sure that some unknown exception doesn't slip through early in the loop and stops all other customers from executing later on in the loop. We have a loop which runs once a minute implemented using the Quartz framework. Is it OK if you just change the implementation to catch the RuntimeException class instead of the Exception class? We're using Java 7 and the Jetty Servlet Container.

    I'm looking for a good exception handling policy for Java web application.
    If you have not done so I suggest you start by reviewing the several trails in The Java Tutorials.
    Those trails cover both HOW to use exceptions and WHEN to use them.
    This trail discusses  the 'controversy' you mention regarding 'Unchecked Exceptions'
    http://docs.oracle.com/javase/tutorial/essential/exceptions/runtime.html
    Unchecked Exceptions — The Controversy
    Because the Java programming language does not require methods to catch or to specify unchecked exceptions (RuntimeException, Error, and their subclasses), programmers may be tempted to write code that throws only unchecked exceptions or to make all their exception subclasses inherit from RuntimeException. Both of these shortcuts allow programmers to write code without bothering with compiler errors and without bothering to specify or to catch any exceptions. Although this may seem convenient to the programmer, it sidesteps the intent of the catch or specify requirement and can cause problems for others using your classes.
    Why did the designers decide to force a method to specify all uncaught checked exceptions that can be thrown within its scope? Any Exception that can be thrown by a method is part of the method's public programming interface. Those who call a method must know about the exceptions that a method can throw so that they can decide what to do about them. These exceptions are as much a part of that method's programming interface as its parameters and return value.
    The next question might be: "If it's so good to document a method's API, including the exceptions it can throw, why not specify runtime exceptions too?" Runtime exceptions represent problems that are the result of a programming problem, and as such, the API client code cannot reasonably be expected to recover from them or to handle them in any way. Such problems include arithmetic exceptions, such as dividing by zero; pointer exceptions, such as trying to access an object through a null reference; and indexing exceptions, such as attempting to access an array element through an index that is too large or too small.
    Generally don't catch an exception unless you plan to HANDLE the exception. Logging, by itself is NOT handliing.
    First I found this Java exception handling best practices - How To Do In Java which says that you should never catch the Trowable class nor use e.printStackTrace(); 
    That article, like many, has some good advice and some poor or even bad advice. You get what you pay for!
    I've read that you should not catch the Exception class.
    Ok - but all that does is indicate that a problem of some sort happened somewhere. Not very useful info. Java goes to a lot of trouble to provide specific exceptions for specific problems.
    I've been catching it previously to make sure that some unknown exception doesn't slip through early in the loop and stops all other customers from executing later on in the loop.
    If the exception is 'unknown' then maybe it NEEDS to 'stop all other customers from executing later on in the loop'.
    That is EXACTLY why you don't want to do that. You need to identify which exceptions should NOT stop processing and which ones should.
    Some 'unknown' exceptions can NOT be recovered and indicate a serious problem, perhaps with the JVM itself. You can NOT just blindly keep executing and ignore them without risking data corruption and/or the integrity of the entire system Java is running on.
    Is it OK if you just change the implementation to catch the RuntimeException class instead of the Exception class? We're using Java 7 and the Jetty Servlet Container.
    No - not if you want a well-behaved system.
    Don't catch exceptions unless you HANDLE/resolve them. There are times when it makes sense to log the exception (which does NOT handle it) and then raise it again so that it gets handled properly later. Yes - I know that is contrary to the advice given in that article but, IMHO, that article is wrong about that point.
    If you have ever had to maintain/fix/support someone else's Java code you should already understand how difficult it can be to find WHERE a problem occurs and WHAT the exact problem is when exceptions are not handled properly.

  • Exception Handling in BizTalk

    what is the best way to handle errors in BizTalk ?
    We are using web services, databases.
    Is ESB Exception handling preferred to others ? any better suggestions please ?
    MBH

    You don't need  custom-Itineraries /On Ramp/Off Ramp for repaid and resubmit using ESB portal. But you need to have receive ports, send ports, orchestration which comes with ESB tool kit for this purpose. When a failure is published to ESB-bus,
    "catch all” exception send port will pick it up and publish it to the ESB Exceptiondb. Then using the ESB portal you can edit/repair the message and resubmit it directly from the portal without using the ESB-Toolkit artefacts like Itineraries /On Ramp/Off
    Ramp.
    Refer this article where author uses this feature without any custom ESB-toolkit artefacts
    http://seroter.wordpress.com/2010/01/18/considerations-when-retrying-failed-messages-in-biztalk-or-the-esb-toolkit/
    One option to route a failed message to the ESB Portal one must turn on routing for failed messages on the send port. This results in the failed message being routed to the ESB Exception database along with the exception details. Even in orchestration's
    you can submit the failed message to ESBException DB from where  you can repair and resubmit the message.
    Refer this article for more help on this context:
    Routing exceptions on send ports to the ESB Exception Management Portal without turning on routing for failed messages
    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

  • ESB exception monitoring

    Hi,
    I'm developing some ESB flows on which i should implement a sort of monitor application.
    This application should work as a custom ESB Control.
    I've seen I can redirect the output of the external services or adapters I call, for example, to a JMS queue, which feeds my custom ESB Control.
    The problem is with exceptions; if one of that called service throws an exception I'm not able to catch it.
    I've seen a particular JMS queue on which ESB rely: jms/topic/ESB_ERROR, which, as I can understand, contains all errors received by ESB flows, for which tracking options is enabled.
    I'm wondering if there is a way to subscribe and consume that queue. Or better, if I can redirect errors to an AQ based queue, to ensure presistence or these message.
    Thank you in advance,
    Lisa

    Hi,
    Please follow this link
    ESB Error Handling - Best Practise?
    Page 2
    follow rch181 posting

  • Best Practice for Implementing Exception Handling in BPEL

    Hi All,
    what is the best practice and the approach to follow Exception Handling in BPEL.
    1) Do we need to implement Exception Handling in BPEL as we do in Java, means
         method 3 throws error to method 2 (if any) and
         method 2 throws error to method 1 (if any) and
         finally method 1 throws error to the main Class.
    If we replicate the above scenario to BPEL
    In BPEL main Scope have Custom Fault, Catch ALL
         Each Invoke is surrounded by a Scope Activity with Remote Fault, Binding Fault & Custom Fault
    and follow the paradigm of Java, assuming we have Inner Scopes
         [ OR ]
    2) In BPEL main Scope have all exceptions defined like
         Remote Fault,
         Binding Fault,
         anyOther System Fault (selectionFailure / forcedTermination),
         Custom Fault (if required) and
         CatchALL
         and also
         each Invoke is surrounded by a Scopes Acitivity with Custom Fault (business fault) exception Handling
    I feel 1st one may not be a good practice, may be i am wrong...
    Any Suggestions from experts.
    Thanks in Advance
    anvv sharma

    Hi-
    In you can create different scope and use catch branch to catch binding, remote, custom faults, business faults etc. If an error happens in a scope it will not move to the next scope( eg: you have 3 scope, error occured in 2nd scope then it will not propogate to the 3rd scope. One thing to be noticed here is your transaction in the 1st scope doesnt gets commited when an error happens in 2d scope).
    You can have a catch all to catch error which are not being caught at catch level. So if any error happens which is not defined in catch block then then it will be caught in catch all branch.
    Edited by: 333333 on Apr 12, 2011 9:39 AM

  • Best Practice Exception Handling.

    Hi,
    Please consider two scenarios:
    Scenario 1:
    DECLARE
      l_emp   scott.emp.ename%TYPE;
      l_dname scott.dept.dname%TYPE;
    BEGIN
      BEGIN
        SELECT ename INTO l_emp FROM emp WHERE empno = 7934;
      EXCEPTION
        WHEN no_data_found THEN
          dbms_output.put_line('No big deal');
          NULL;
        WHEN too_many_rows THEN
          dbms_output.put_line('It is a big deal');
          RAISE;
        WHEN OTHERS THEN
          RAISE;
      END;
      BEGIN
        SELECT dname INTO l_dname FROM dept WHERE deptno = 1;
      EXCEPTION
        WHEN no_data_found THEN
          dbms_output.put_line('It is a big deal');
          RAISE;
        WHEN too_many_rows THEN
          dbms_output.put_line('It is a big deal');
          RAISE;
        WHEN OTHERS THEN
          RAISE;
      END;
    EXCEPTION
      WHEN OTHERS THEN
        RAISE;
    END;
    Scenario 2:
    DECLARE
      l_point_of_error NUMBER;
      l_emp            scott.emp.ename%TYPE;
      l_dname          scott.dept.dname%TYPE;
    BEGIN
      l_point_of_error := 1;
      now write some implicit cursors-
      SELECT ename INTO l_emp FROM emp WHERE empno = 7934;
      l_point_of_error := 2;
      SELECT dname INTO l_dname FROM dept WHERE deptno = 1;
    EXCEPTION
      WHEN no_data_found THEN
        CASE l_point_of_error
          WHEN 1 THEN
            dbms_output.put_line('No big deal');
            NULL;
          WHEN 2 THEN
            dbms_output.put_line('It is a big deal');
            RAISE;
          ELSE
            dbms_output.put_line('I have an idea which block this errored out on...but I want or HAVE TO raise the error');
            RAISE;
        END CASE;
        NULL;
      WHEN too_many_rows THEN
        CASE l_point_of_error
          WHEN 1 THEN
            dbms_output.put_line('It is a big deal');
            RAISE;
          WHEN 2 THEN
            dbms_output.put_line('It is a big deal');
            RAISE;
          ELSE
            dbms_output.put_line('I have an idea which block this errored out on...but I want or HAVE TO raise the error');
            RAISE;
        END CASE;
        NULL;
      WHEN OTHERS THEN
        RAISE;
    END;
    /What do you think is the right approach?
    The one thing I can think of using Scenario 2, it will be a nightmare to handle the 'case' statements in the final exception catcher when the number of blocks to handle are more.
    Also, Scenario 2 also uses ONE more variable to be assigned (more processing time maybe??).
    I am also told that Scenario 2 is used extensively used by Oracle Applications PL/SQL Api's.
    But, if you can suggest which do you think is the best practice is? I would really appreciate it.
    Thank you,
    Rahul

    My bad 3360:
    I didn't mention the error logging think in OP and I use it in my code all the time and forgot to put it in OP.
    Anyway, I use Tom Kyte's who_am_i and who_called_me in my error logging to figure out the line number of the error.
    * One failure was caused by the error log table running out of space because no one ever looked at it and didn't realize it had hundreds of thousands of exceptions in it. Yes, you are absolutely right. Yes somebody(the developer(s) ) have to take care of the error logging table (try to see what errors out and why).
    P.S: I am gonna stick with Scenario 1 (with the error logging of course :) ) according to Todd Barry's comments and I have no idea why Oracle Applications uses Scenario 2. Can anybody tell me why (maybe it's just bad coding on Oracle Apps part?).
    Thank you,
    Rahul.

Maybe you are looking for

  • How do I transfer voicemail messages from my iPhone 4 to my Mac?

    Hi I'm trying to transfer a selected group of voicemail messages from my iPhone 4 onto my mac - would someone please advise me if there's a simple method to do this? Cheers Stephen.

  • HT4113 Is there a way to unlock your phone using your apple ID if your screen is locked?

    I created a 4 digit password on my phone, locked the phone to make sure it worked, and typed it in....Wrong Password. Not exactly sure how that happened but I have since tried every combination I can think of (waiting 60 minutes apart of course). App

  • How to implement the function like this?

    I'm sorry, don't know why the previous post was approved then deleted. User visit http://aa.com/show?id=1  then the player plays 1.swf User visit http://aa.com/show?id=2  then the player plays 2.swf User can only see the url id, but can't see which s

  • Oracle Data Guard 9i

    This is a quote from an Oracle publication on Oracle Data Guard 9i. "Oracle Data Guard's new SQL Apply feature creates a "logical standby" that enables continuous access to a working copy of your primary database. With SQL Apply, the standby database

  • Photo Booth Audio and Logic

    I was messing around with Photo Booth today while at the computer learning some songs on my bass and just started recording video in photo booth. On playback the audio is on the left only. I'm recording thru the instrument input of a Apogee duet fire