In one instance, I have created an RMI object (extending Remote and using
RMIC to compile), put it into the Orion hosted JNDI tree, and was able to
use it from a SessionObject running in Orion.
In another instance, I need Orion to "callback" onto my client. So I
created another RMI object in the client (so the client is acting as a
server, in a way):
Remote:
public interface EventListener extends Remote {
public void event(int status) throws RemoteException;
}
Implementation (in the client side):
public class Listener extends UnicastRemoteObject implements EventListener {
public Listener() throws RemoteException {
}
public void event(int status) {
System.out.println("Event: " + status + " recevied on the client!");
}
};
Attempting to call server (session is Stateless Session Bean) from client:
session.play(1, "content.mpg", new Listener());
Trying to pass this RMI object from the client to the server I get the
following exception:
Exception in thread "main" com.evermind.server.rmi.OrionRemoteException:
Error (de-)serializing object: __Proxy0
at com.evermind.server.ejb.EJBUtils.cloneObject(.:352)
at
ControlSession_StatelessSessionBeanWrapper0.play(ControlSession_StatelessSes
sionBeanWrapper0.java:101)
at java.lang.reflect.Method.invoke(Native Method)
at com.evermind._dr._fm(.:79)
at com.evermind._bs.run(.:62)
at connection to individualmusic.com/64.172.193.203 as admin
at
com.evermind._dn.EXCEPTION_ORIGINATES_FROM_THE_REMOTE_SERVER(.:1446)
at com.evermind._dn.invokeMethod(.:1369)
at com.evermind._yd.invoke(.:53)
at __Proxy2.play(Unknown Source)
at com.indnet.enseo.server.test.Client.main(Unknown Source)
Nested exception is:
java.io.NotSerializableException: __Proxy0
at java.io.ObjectOutputStream.outputObject(Unknown Source)
at java.io.ObjectOutputStream.writeObject(Unknown Source)
at com.evermind.server.ejb.EJBUtils.cloneObject(.:340)
at
ControlSession_StatelessSessionBeanWrapper0.play(ControlSession_StatelessSes
sionBeanWrapper0.java:101)
at java.lang.reflect.Method.invoke(Native Method)
at com.evermind._dr._fm(.:79)
at com.evermind._bs.run(.:62)
at connection to individualmusic.com/64.172.193.203
at com.evermind.server.rmi.OrionRemoteException._ge(.:130)
at com.evermind._dn._cte(.:1556)
at com.evermind._dn.run(.:475)
at java.lang.Thread.run(Thread.java:484)
Any idea?
Thanks.
-AP_