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:
even though the client implements Serializable.
any help would be appreciated!
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.
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
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 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.