D
David Levitan
I'm having an issue with ObjectInputStreams. I have two JVM instances
running, communicating via ObjectInputStream/ObjectOutputStreams. Call
them instance A and instance B.
The basic way the program works is that A sends B some data, B does
something to it, and sends back a result that is an object containing
several other objects. Until today, this has worked fine, but all
objects being sent back and forth were either part of the code base for
A and B or a standard java package.
Today a situation came up where B is sending back an object that is a
subclass of one of the classes in A/B's codebase, but is not in the
codebase itself. Based on my debugging, B sends the result (which
contains this object) successfully, but A just hangs trying to read the
object. The new object is in B's classpath but is not in A's classpath
This new object seems to be the reason for the hang, since I haven't
seen this behavior before. I'm wondering if anyone can comment on this
and whether dynamically changing the classpath would solve the issue, or
whether there is a more elegant way of solving the issue.
I'll be happy to provide more details if needed.
Thanks,
David
running, communicating via ObjectInputStream/ObjectOutputStreams. Call
them instance A and instance B.
The basic way the program works is that A sends B some data, B does
something to it, and sends back a result that is an object containing
several other objects. Until today, this has worked fine, but all
objects being sent back and forth were either part of the code base for
A and B or a standard java package.
Today a situation came up where B is sending back an object that is a
subclass of one of the classes in A/B's codebase, but is not in the
codebase itself. Based on my debugging, B sends the result (which
contains this object) successfully, but A just hangs trying to read the
object. The new object is in B's classpath but is not in A's classpath
This new object seems to be the reason for the hang, since I haven't
seen this behavior before. I'm wondering if anyone can comment on this
and whether dynamically changing the classpath would solve the issue, or
whether there is a more elegant way of solving the issue.
I'll be happy to provide more details if needed.
Thanks,
David