org.mockejb
Class EjbExceptionHandler

java.lang.Object
  extended byorg.mockejb.EjbExceptionHandler
All Implemented Interfaces:
Aspect, Interceptor, java.io.Serializable

public class EjbExceptionHandler
extends java.lang.Object
implements Aspect, java.io.Serializable

Performs exception logging and chaining according to the EJB spec. Wraps system exceptions in RemoteException or EJBException. All runtime and transaction-related exceptions are considered system exceptions.

Author:
Alexander Ananiev
See Also:
MockContainer.isSystemException(Throwable), Serialized Form

Constructor Summary
EjbExceptionHandler()
           
 
Method Summary
 boolean equals(java.lang.Object obj)
          This class does not have state, so all instances of this class are considered equal
 Pointcut getPointcut()
          Intercepts all EJB methods.
 int hashCode()
           
 void intercept(InvocationContext invocationContext)
          Performs exception translation according to the ejb spec rules.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EjbExceptionHandler

public EjbExceptionHandler()
Method Detail

getPointcut

public Pointcut getPointcut()
Intercepts all EJB methods.

Specified by:
getPointcut in interface Aspect
See Also:
Aspect.getPointcut()

intercept

public void intercept(InvocationContext invocationContext)
               throws java.lang.Exception
Performs exception translation according to the ejb spec rules.

Specified by:
intercept in interface Interceptor
Parameters:
invocationContext - provides the info about this call. Also calls interceptors in turn according to their order in the chain. invocationContext provides access to the return value and thrown exceptions of this call.
Throws:
java.lang.Exception

equals

public boolean equals(java.lang.Object obj)
This class does not have state, so all instances of this class are considered equal


hashCode

public int hashCode()