[jboss-cvs] jboss-seam/src/main/org/jboss/seam/log ...
Gavin King
gavin.king at jboss.com
Tue Nov 14 13:59:31 EST 2006
User: gavin
Date: 06/11/14 13:59:31
Modified: src/main/org/jboss/seam/log LogImpl.java
Log:
try using externalizable
Revision Changes Path
1.6 +20 -6 jboss-seam/src/main/org/jboss/seam/log/LogImpl.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: LogImpl.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/log/LogImpl.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- LogImpl.java 24 Jul 2006 00:40:45 -0000 1.5
+++ LogImpl.java 14 Nov 2006 18:59:31 -0000 1.6
@@ -1,8 +1,9 @@
package org.jboss.seam.log;
+import java.io.Externalizable;
import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.Serializable;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
import org.apache.commons.logging.LogFactory;
import org.jboss.seam.core.Interpolator;
@@ -12,11 +13,11 @@
*
* @author Gavin King
*/
-public class LogImpl implements Log, Serializable
+public class LogImpl implements Log, Externalizable
{
private transient org.apache.commons.logging.Log log;
- private final String category;
+ private String category;
public LogImpl(Class clazz)
{
@@ -167,11 +168,24 @@
}
}
- void readObject(ObjectInputStream ois)
+ public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
+ {
+ category = (String) in.readObject();
+ log = LogFactory.getLog(category);
+ }
+
+ public void writeExternal(ObjectOutput out) throws IOException
+ {
+ out.writeObject(category);
+ }
+
+ /*void readObject(ObjectInputStream ois)
throws ClassNotFoundException, IOException
{
ois.defaultReadObject();
log = LogFactory.getLog(category);
- }
+ }*/
+
+
}
More information about the jboss-cvs-commits
mailing list