0 Replies Latest reply on Nov 4, 2003 11:52 AM by ereze

    Not getting NoSuchObjectLocalException

    ereze

      Hi,

      I have a Stateful Session bean which I call from a delegator. I want my delegator to catch cases where the stateful session bean dies report the error and recreate a new session bean instance for susequent calls.

      The problem is that instead of getting an NoSuchObjectLocalException I get an EJBException with an inner cause exception of type NoSuchObjectException (a remote one, why??).

      The following is a snippet of my code:

      try {
      searchDTO = searcher.getAdvancedSearch (bActive);
      }
      catch (NoSuchObjectLocalException e) {

      // Subsequent invocations will create a new Searcher
      m_searcher = null;
      throw new SearcherTimeoutException (e);
      }
      catch (Exception e) {

      e.printStackTrace();
      }

      The catch(Exception e) clause was put just for testing and it does catch the error once the stateful session dies.

      I would appreciate any help here,
      Thanks in advance,

      --Erez