I am running on JBoss 3.2.1.
I am trying to catch an exception for handling the case where a Stateful session EJB has thrown an EJBException due to some error and is no longer available. On the next call to the session, according to the EJB Spec it should throw me an NoSuchObjectLocalException (I am working in local mode). Unfortunately JBOss does not do that, and instead I receive an EJBException wrapping another exception of java.rmi.NoSuchObjectException.
Here is just the catch clause:
// THIS the version that does not catch anything catch (NoSuchObjectLocalException e) { // Subsequent invocations will create a new Searcher m_searcher = null; throw new SearcherTimeoutException (e); } // This catches the exception catch (EJBException e) { Exception cause = e.getCausedByException(); }