Author: julien(a)jboss.com
Date: 2007-04-23 15:27:57 -0400 (Mon, 23 Apr 2007)
New Revision: 7030
Modified:
trunk/core/src/main/org/jboss/portal/core/controller/portlet/CachedUserImpl.java
trunk/core/src/main/org/jboss/portal/core/ns/NavigationalStateKey.java
Log:
make CachedUserImpl and NSKey serializable for clustering
Modified:
trunk/core/src/main/org/jboss/portal/core/controller/portlet/CachedUserImpl.java
===================================================================
---
trunk/core/src/main/org/jboss/portal/core/controller/portlet/CachedUserImpl.java 2007-04-23
14:59:51 UTC (rev 7029)
+++
trunk/core/src/main/org/jboss/portal/core/controller/portlet/CachedUserImpl.java 2007-04-23
19:27:57 UTC (rev 7030)
@@ -25,6 +25,7 @@
import org.jboss.portal.identity.User;
import java.util.Map;
+import java.io.Serializable;
/**
* Simple POJO to cache user data.
@@ -32,7 +33,7 @@
* @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot
com">Boleslaw Dawidowicz</a>
* @version $Revision: 0.1 $
*/
-public class CachedUserImpl implements User
+public class CachedUserImpl implements User, Serializable
{
/** . */
Modified: trunk/core/src/main/org/jboss/portal/core/ns/NavigationalStateKey.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/ns/NavigationalStateKey.java 2007-04-23
14:59:51 UTC (rev 7029)
+++ trunk/core/src/main/org/jboss/portal/core/ns/NavigationalStateKey.java 2007-04-23
19:27:57 UTC (rev 7030)
@@ -22,13 +22,16 @@
******************************************************************************/
package org.jboss.portal.core.ns;
+import java.io.Serializable;
+import java.io.Externalizable;
+
/**
* A key for navigational state.
*
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-public final class NavigationalStateKey
+public final class NavigationalStateKey implements Serializable
{
/** The type. */
@@ -47,6 +50,10 @@
{
throw new IllegalArgumentException("No id provided");
}
+ if (id instanceof Serializable == false && id instanceof Externalizable ==
false)
+ {
+ throw new IllegalArgumentException("Id should implement Serializable or
Externalizable");
+ }
this.type = type;
this.id = id;
}
Show replies by date