User: user57  
  Date: 02/02/16 00:34:43

  Modified:    src/main/org/jboss/test/util/ejb SessionSupport.java
  Log:
   o made Category transient & added custom deserialization to hook up logging
     again (too bad Category doesn't do this it's self).
  
  Revision  Changes    Path
  1.3       +18 -14    jbosstest/src/main/org/jboss/test/util/ejb/SessionSupport.java
  
  Index: SessionSupport.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jbosstest/src/main/org/jboss/test/util/ejb/SessionSupport.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SessionSupport.java       15 Feb 2002 06:15:57 -0000      1.2
  +++ SessionSupport.java       16 Feb 2002 08:34:42 -0000      1.3
  @@ -9,27 +9,18 @@
   import org.apache.log4j.Category;
   
   /**
  - *      
  + * 
    *   @see <related>
  - *   @author $Author: user57 $
  - *   @version $Revision: 1.2 $
  + *   @version $Revision: 1.3 $
    */
   public abstract class SessionSupport
      extends EnterpriseSupport
      implements SessionBean
   {
  -   protected Category log = Category.getInstance(getClass());
  -   
  -   // Constants -----------------------------------------------------
  -    
  -   // Attributes ----------------------------------------------------
  -   protected SessionContext sessionCtx;
  -   
  -   // Static --------------------------------------------------------
  +   protected transient Category log = Category.getInstance(getClass());
   
  -   // Constructors --------------------------------------------------
  +   protected SessionContext sessionCtx;
      
  -   // Public --------------------------------------------------------
      public void ejbCreate()
         throws CreateException
      {
  @@ -37,7 +28,7 @@
      
      public void setSessionContext(SessionContext ctx) 
      {
  -             sessionCtx = ctx;
  +      sessionCtx = ctx;
      }
        
      public void ejbActivate() 
  @@ -50,5 +41,18 @@
        
      public void ejbRemove() 
      {
  +   }
  +
  +   private void writeObject(java.io.ObjectOutputStream stream)
  +      throws java.io.IOException
  +   {
  +      // nothing
  +   }
  +   
  +   private void readObject(java.io.ObjectInputStream stream)
  +      throws java.io.IOException, ClassNotFoundException
  +   {
  +      // reset logging
  +      log = Category.getInstance(getClass());
      }
   }
  
  
  

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

Reply via email to