I have a bean which connects to a price feed and recieves prices asynchronously. I want to send these prices back to the client that initiated the connection. How do I do this ?.
I thought I could pass the client to the bean (using an interface), and then have the bean call a price update method on the client, but when I tried this I got this exception:
java.rmi.MarshalException: error marshalling arguments; nested exception is:
java.io.NotSerializableException: examples.ejb.basic.statefulSession.Client
java.io.NotSerializableException: examples.ejb.basic.statefulSession.Client
at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1148)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:366)
at weblogic.common.internal.ChunkedObjectOutputStream.writeObject(ChunkedObjectOutputStream.java:102)
at weblogic.common.internal.ChunkedObjectOutputStream.writeObject(ChunkedObjectOutputStream.java:108)
at examples.ejb.basic.statefulSession.TraderBeanEOImpl_WLStub.connect(TraderBeanEOImpl_WLStub.java:413)
at examples.ejb.basic.statefulSession.Client.<init>(Client.java:51)
at examples.ejb.basic.statefulSession.Client.main(Client.java:33)
even though the client implements Serializable.
any help would be appreciated!
chris davis
-
calling a client from a bean (4 messages)
- Posted by: chris davis
- Posted on: July 24 2001 13:25 EDT
Threaded Messages (4)
- calling a client from a bean by Kapil Israni on July 24 2001 13:48 EDT
- calling a client from a bean by chris davis on July 24 2001 14:16 EDT
- calling a client from a bean by Albert Zamus on July 24 2001 14:28 EDT
- It's a weblogic 6 known bug by Francois Le Droff on December 03 2004 12:28 EST
-
calling a client from a bean[ Go to top ]
- Posted by: Kapil Israni
- Posted on: July 24 2001 13:48 EDT
- in response to chris davis
Chris,
i think what u tryin to do is make a call-back to ur client. is the client within the same JVM as the bean ????
i think there shud no problem if they r in the same JVM.
if they r not then u cant just make call-back on ur client which is in a different JVM. remember ur object is not network(stub/skeleton) aware to be able to receive calls across machine or process. u have just serialized the object and that wont do the job.
the best solution to ur problem is probably JMS. what kinda client is it - servlet/jsp or java app/applet.
kapil -
calling a client from a bean[ Go to top ]
- Posted by: chris davis
- Posted on: July 24 2001 14:16 EDT
- in response to Kapil Israni
No they're not in the same jvm. The client is just a standalone java application. I guess your right, I have to use a different mechanism for the return data.
thanks for your help
Chris,
-
calling a client from a bean[ Go to top ]
- Posted by: Albert Zamus
- Posted on: July 24 2001 14:28 EDT
- in response to chris davis
You could either use JMS or RMI. If they are within the same JVM user the Observer pattern. Callbacks are generally avoided. -
It's a weblogic 6 known bug[ Go to top ]
- Posted by: Francois Le Droff
- Posted on: December 03 2004 12:28 EST
- in response to Albert Zamus
java.rmi.MarshalException
It's a weblogic 6 known bug with reading longs inside a chunked value. This is
fixed in SP2 and the relevant CR is CR124377 - you can get a patch for
SP1 from support.
see: http://forums.bea.com/bea/message.jspa?messageID=200032537