User: oberg
Date: 00/06/21 04:51:34
Modified: src/main/org/jboss/ejb/plugins/jrmp/interfaces
EntityProxy.java GenericProxy.java
RemoteMethodInvocation.java
StatefulSessionProxy.java
Log:
Added some stateful container files
Revision Changes Path
1.10 +17 -1
jboss/src/main/org/jboss/ejb/plugins/jrmp/interfaces/EntityProxy.java
Index: EntityProxy.java
===================================================================
RCS file:
/products/cvs/ejboss/jboss/src/main/org/jboss/ejb/plugins/jrmp/interfaces/EntityProxy.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- EntityProxy.java 2000/06/16 13:10:25 1.9
+++ EntityProxy.java 2000/06/21 11:51:33 1.10
@@ -19,7 +19,7 @@
*
* @see <related>
* @author Rickard �berg ([EMAIL PROTECTED])
- * @version $Revision: 1.9 $
+ * @version $Revision: 1.10 $
*/
public class EntityProxy
extends GenericProxy
@@ -58,6 +58,9 @@
{
super(name, container, optimize);
+ if (id == null)
+ throw new NullPointerException("Id may not be null");
+
this.id = id;
}
@@ -119,6 +122,19 @@
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
+ protected void writeObject(java.io.ObjectOutputStream out)
+ throws IOException
+ {
+ super.writeObject(out);
+ out.writeObject(id);
+ }
+
+ protected void readObject(java.io.ObjectInputStream in)
+ throws IOException, ClassNotFoundException
+ {
+ super.readObject(in);
+ id = in.readObject();
+ }
// Private -------------------------------------------------------
1.4 +13 -16
jboss/src/main/org/jboss/ejb/plugins/jrmp/interfaces/GenericProxy.java
Index: GenericProxy.java
===================================================================
RCS file:
/products/cvs/ejboss/jboss/src/main/org/jboss/ejb/plugins/jrmp/interfaces/GenericProxy.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- GenericProxy.java 2000/06/16 13:10:25 1.3
+++ GenericProxy.java 2000/06/21 11:51:33 1.4
@@ -21,7 +21,7 @@
*
* @see <related>
* @author Rickard �berg ([EMAIL PROTECTED])
- * @version $Revision: 1.3 $
+ * @version $Revision: 1.4 $
*/
public class GenericProxy
implements java.io.Serializable
@@ -66,26 +66,22 @@
return containerStartup == ContainerRemote.startup;
}
- // Private -------------------------------------------------------
- private void writeObject(java.io.ObjectOutputStream out)
+ protected void writeObject(java.io.ObjectOutputStream out)
throws IOException
{
- if (!isLocal())
- {
- ContainerRemote old = container;
- container = null;
- out.defaultWriteObject();
- container = old;
- } else
- {
- out.defaultWriteObject();
- }
+ out.writeUTF(name);
+ out.writeObject(isLocal() ? container : null);
+ out.writeLong(containerStartup);
+ out.writeBoolean(optimize);
}
-
- private void readObject(java.io.ObjectInputStream in)
+
+ protected void readObject(java.io.ObjectInputStream in)
throws IOException, ClassNotFoundException
{
- in.defaultReadObject();
+ name = in.readUTF();
+ container = (ContainerRemote)in.readObject();
+ containerStartup = in.readLong();
+ optimize = in.readBoolean();
if (isLocal())
{
@@ -93,6 +89,7 @@
container = getLocal(name);
}
}
+ // Private -------------------------------------------------------
// Inner classes -------------------------------------------------
}
1.2 +24 -2
jboss/src/main/org/jboss/ejb/plugins/jrmp/interfaces/RemoteMethodInvocation.java
Index: RemoteMethodInvocation.java
===================================================================
RCS file:
/products/cvs/ejboss/jboss/src/main/org/jboss/ejb/plugins/jrmp/interfaces/RemoteMethodInvocation.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- RemoteMethodInvocation.java 2000/06/16 13:10:25 1.1
+++ RemoteMethodInvocation.java 2000/06/21 11:51:33 1.2
@@ -27,7 +27,7 @@
* @author Rickard �berg ([EMAIL PROTECTED])
* @author <a href="mailto:[EMAIL PROTECTED]">Richard
Monson-Haefel</a>.
* @author <a href="mailto:[EMAIL PROTECTED]">Marc Fleury</a>.
- * @version $Revision: 1.1 $
+ * @version $Revision: 1.2 $
*/
public final class RemoteMethodInvocation
implements java.io.Serializable
@@ -44,7 +44,7 @@
Transaction tx;
Principal identity;
- Map methodMap;
+ transient Map methodMap;
// Static --------------------------------------------------------
@@ -135,6 +135,28 @@
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
+ protected void writeObject(java.io.ObjectOutputStream out)
+ throws IOException
+ {
+ out.writeObject(id);
+ out.writeUTF(className);
+ out.writeInt(hash);
+ out.writeObject(args);
+// out.writeObject(tx);
+// out.writeObject(identity);
+ }
+
+ protected void readObject(java.io.ObjectInputStream in)
+ throws IOException, ClassNotFoundException
+ {
+ id = in.readObject();
+ className = in.readUTF();
+ hash = in.readInt();
+ args = (Object[])in.readObject();
+
+ tx = (Transaction)in.readObject();
+ identity = (Principal)in.readObject();
+ }
// Private -------------------------------------------------------
1.8 +15 -1
jboss/src/main/org/jboss/ejb/plugins/jrmp/interfaces/StatefulSessionProxy.java
Index: StatefulSessionProxy.java
===================================================================
RCS file:
/products/cvs/ejboss/jboss/src/main/org/jboss/ejb/plugins/jrmp/interfaces/StatefulSessionProxy.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- StatefulSessionProxy.java 2000/06/16 13:10:25 1.7
+++ StatefulSessionProxy.java 2000/06/21 11:51:33 1.8
@@ -6,6 +6,7 @@
*/
package org.jboss.ejb.plugins.jrmp.interfaces;
+import java.io.IOException;
import java.lang.reflect.Method;
import java.rmi.MarshalledObject;
@@ -18,7 +19,7 @@
*
* @see <related>
* @author Rickard �berg ([EMAIL PROTECTED])
- * @version $Revision: 1.7 $
+ * @version $Revision: 1.8 $
*/
public class StatefulSessionProxy
extends GenericProxy
@@ -68,6 +69,19 @@
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
+ protected void writeObject(java.io.ObjectOutputStream out)
+ throws IOException
+ {
+ super.writeObject(out);
+ out.writeObject(id);
+ }
+
+ protected void readObject(java.io.ObjectInputStream in)
+ throws IOException, ClassNotFoundException
+ {
+ super.readObject(in);
+ id = in.readObject();
+ }
// Private -------------------------------------------------------