User: starksm 
  Date: 01/08/15 11:14:21

  Modified:    src/main/org/jboss/ejb/plugins LogInterceptor.java
  Log:
  Only issue one log message when handling an exception.
  
  Revision  Changes    Path
  1.19      +10 -6     jboss/src/main/org/jboss/ejb/plugins/LogInterceptor.java
  
  Index: LogInterceptor.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/ejb/plugins/LogInterceptor.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- LogInterceptor.java       2001/08/03 17:15:44     1.18
  +++ LogInterceptor.java       2001/08/15 18:14:21     1.19
  @@ -40,7 +40,7 @@
    *
    *   @author <a href="mailto:[EMAIL PROTECTED]";>Rickard �berg</a>
    *   @author <a href="mailto:[EMAIL PROTECTED]";>Scott Stark</a>
  - *   @version $Revision: 1.18 $
  + *   @version $Revision: 1.19 $
    */
   public class LogInterceptor
      extends AbstractInterceptor
  @@ -188,9 +188,10 @@
         if (e instanceof EJBException)
         {
            EJBException ex = (EJBException) e;
  -         log.error("BEAN EXCEPTION:"+ex.getMessage());
            if( ex.getCausedByException() != null )
  -            log.error("CausedBy", ex.getCausedByException());
  +            log.error("EJBException, causedBy:", ex.getCausedByException());
  +         else
  +            log.error("EJBException:", ex);
   
            // Client sees RemoteException
            toThrow = new ServerException("Bean exception. Notify the application 
administrator", ex);
  @@ -198,7 +199,7 @@
         else if (e instanceof RuntimeException)
         {
            RuntimeException ex = (RuntimeException) e;
  -         log.error("CONTAINER EXCEPTION:", e);
  +         log.error("CONTAINER EXCEPTION:", ex);
            
            // Client sees RemoteException
            toThrow = new ServerException("Container exception. Notify the container 
developers :-)", ex);
  @@ -206,7 +207,6 @@
         else if (e instanceof TransactionRolledbackException)
         {
            TransactionRolledbackException ex = (TransactionRolledbackException) e;
  -         log.error("TRANSACTION ROLLBACK EXCEPTION: "+ex.getMessage());
            // Log the rollback cause
            // Sometimes it wraps EJBException - let's unwrap it
            Throwable cause = ex.detail;
  @@ -217,7 +217,11 @@
               {
                  cause = ((EJBException) cause).getCausedByException();
               }
  -            log.error("Detail", cause);
  +            log.error("TransactionRolledbackException, causedBy:", cause);
  +         }
  +         else
  +         {
  +            log.error("TransactionRolledbackException:", ex);
            }
            toThrow = ex;
         }
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to