registrar.lookup <-> out.writeObject() vs registrar.lookup<->out.writebyte => OptionalDataException

View: New views
1 Messages — Rating Filter:   Alert me  

registrar.lookup <-> out.writeObject() vs registrar.lookup<->out.writebyte => OptionalDataException

by Alex Co :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,
Till now I can have a server java app that writes a serializable (proxy) class to
a socket using writeObject() and a client app getting that serializable object
using an http server for . class and registrar.lookup to get the serializable
proxy object and even can invoke methods on that object after reconstruction.

So, the pair:       registrar.lookup <-> out.writeObject()  works fine!

Now, i would like to replace the server side code:  out.writeObject() by writing
it object to a file first and then read the file byte by byte and send those
bytes through the socket. Client must be able to reconstruct object using registrar.lookup as usually.

When I try this second approach client fires the OptionalDataException
exception in java.io.ObjectInputStream.readObject0(). I cant find out why.


Please, could you help me on this?

Thanks a lot

Alex

--------------------------------------------------------------------------
Getting Started:     http://www.jini.org/wiki/Category:Getting_Started
Community Web Site:  http://jini.org
jini-users Archive:  http://archives.java.sun.com/archives/jini-users.html
Unsubscribing:       email "signoff JINI-USERS"  to listserv@...