I have made a number of Struts classes Serializable, which addresses this 
issue:  http://issues.apache.org/bugzilla/show_bug.cgi?id=26322

Attached are the diffs for:

 - org.apache.struts.action.PlugIn
 - org.apache.struts.action.RequestProcessor
 - org.apache.struts.config.ModuleConfig
 - org.apache.struts.tiles.TilesPlugin
 - org.apache.struts.tiles.TilesRequestProcessor
 - org.apache.struts.util.ModuleUtils

In all of the above cases, the default serialization was sufficient to 
serialize the objects.

This is my first patch submission, so please let me know if there is anything 
I should do differently.

Thanks,

Justin
Index: src/share/org/apache/struts/config/ModuleConfig.java
===================================================================
RCS file: /home/cvspublic/jakarta-struts/src/share/org/apache/struts/config/ModuleConfig.java,v
retrieving revision 1.7
diff -u -b -r1.7 ModuleConfig.java
--- src/share/org/apache/struts/config/ModuleConfig.java	14 Mar 2004 06:23:47 -0000	1.7
+++ src/share/org/apache/struts/config/ModuleConfig.java	24 Mar 2004 17:26:05 -0000
@@ -19,6 +19,8 @@
  */
 package org.apache.struts.config;
 
+import java.io.Serializable;
+
 /**
  * <p>The collection of static configuration information that describes a
  * Struts-based module.  Multiple modules are identified by
@@ -31,7 +33,7 @@
  * @version $Revision: 1.7 $ $Date: 2004/03/14 06:23:47 $
  * @since Struts 1.1
  */
-public interface ModuleConfig {
+public interface ModuleConfig extends Serializable {
     /**
      * Has this module been completely configured yet.  Once this flag
      * has been set, any attempt to modify the configuration will return an
Index: src/share/org/apache/struts/tiles/TilesPlugin.java
===================================================================
RCS file: /home/cvspublic/jakarta-struts/src/share/org/apache/struts/tiles/TilesPlugin.java,v
retrieving revision 1.25
diff -u -b -r1.25 TilesPlugin.java
--- src/share/org/apache/struts/tiles/TilesPlugin.java	14 Mar 2004 06:23:43 -0000	1.25
+++ src/share/org/apache/struts/tiles/TilesPlugin.java	24 Mar 2004 17:27:03 -0000
@@ -21,6 +21,7 @@
 package org.apache.struts.tiles;
 
 import java.util.Map;
+import java.io.Serializable;
 
 import javax.servlet.ServletContext;
 import javax.servlet.ServletException;
@@ -59,7 +60,7 @@
  * properly initialize the request processor.
  * @since Struts 1.1
  */
-public class TilesPlugin implements PlugIn {
+public class TilesPlugin implements PlugIn, Serializable {
 
     /** 
      * Commons Logging instance. 
Index: src/share/org/apache/struts/tiles/TilesRequestProcessor.java
===================================================================
RCS file: /home/cvspublic/jakarta-struts/src/share/org/apache/struts/tiles/TilesRequestProcessor.java,v
retrieving revision 1.25
diff -u -b -r1.25 TilesRequestProcessor.java
--- src/share/org/apache/struts/tiles/TilesRequestProcessor.java	14 Mar 2004 06:23:43 -0000	1.25
+++ src/share/org/apache/struts/tiles/TilesRequestProcessor.java	24 Mar 2004 17:27:18 -0000
@@ -21,6 +21,7 @@
 package org.apache.struts.tiles;
 
 import java.io.IOException;
+import java.io.Serializable;
 
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServletRequest;
@@ -51,7 +52,7 @@
  * </p>
  * @since Struts 1.1
  */
-public class TilesRequestProcessor extends RequestProcessor {
+public class TilesRequestProcessor extends RequestProcessor implements Serializable {
 
 	/** 
 	 * Definitions factory. 
Index: src/share/org/apache/struts/action/PlugIn.java
===================================================================
RCS file: /home/cvspublic/jakarta-struts/src/share/org/apache/struts/action/PlugIn.java,v
retrieving revision 1.15
diff -u -b -r1.15 PlugIn.java
--- src/share/org/apache/struts/action/PlugIn.java	14 Mar 2004 06:23:42 -0000	1.15
+++ src/share/org/apache/struts/action/PlugIn.java	24 Mar 2004 17:25:51 -0000
@@ -25,6 +25,8 @@
 import javax.servlet.ServletException;
 import org.apache.struts.config.ModuleConfig;
 
+import java.io.Serializable;
+
 
 /**
  * <p>A <strong>PlugIn</strong> is a configuration wrapper for a
@@ -47,7 +49,7 @@
  * @since Struts 1.1
  */
 
-public interface PlugIn {
+public interface PlugIn extends Serializable {
 
 
     /**
Index: src/share/org/apache/struts/util/ModuleUtils.java
===================================================================
RCS file: /home/cvspublic/jakarta-struts/src/share/org/apache/struts/util/ModuleUtils.java,v
retrieving revision 1.8
diff -u -b -r1.8 ModuleUtils.java
--- src/share/org/apache/struts/util/ModuleUtils.java	14 Mar 2004 06:23:51 -0000	1.8
+++ src/share/org/apache/struts/util/ModuleUtils.java	24 Mar 2004 17:27:33 -0000
@@ -29,13 +29,15 @@
 import org.apache.struts.action.RequestProcessor;
 import org.apache.struts.config.ModuleConfig;
 
+import java.io.Serializable;
+
 /**
  * General purpose utility methods related to module processing.
  * 
  * @version $Revision: 1.8 $
  * @since Struts 1.2
  */
-public class ModuleUtils {
+public class ModuleUtils implements Serializable {
 
     /**
      * The Singleton instance.
Index: src/share/org/apache/struts/action/RequestProcessor.java
===================================================================
RCS file: /home/cvspublic/jakarta-struts/src/share/org/apache/struts/action/RequestProcessor.java,v
retrieving revision 1.44
diff -u -b -r1.44 RequestProcessor.java
--- src/share/org/apache/struts/action/RequestProcessor.java	14 Mar 2004 06:23:42 -0000	1.44
+++ src/share/org/apache/struts/action/RequestProcessor.java	24 Mar 2004 17:25:14 -0000
@@ -21,6 +21,7 @@
 package org.apache.struts.action;
 
 import java.io.IOException;
+import java.io.Serializable;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Locale;
@@ -54,7 +55,7 @@
  * @version $Revision: 1.44 $ $Date: 2004/03/14 06:23:42 $
  * @since Struts 1.1
  */
-public class RequestProcessor {
+public class RequestProcessor implements Serializable {
 
 
     // ----------------------------------------------------- Manifest Constants

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to