Re: Help needed on returning serviceregistrar by hand
Gregg Wonderly <[email protected]> Thu, 25 Jun 2009 14:34:36 -0500
| Newsgroups | gmane.comp.java.sun.jini |
|---|---|
| Message-ID | <[email protected]> |
Alex Co wrote: > I am trying this on MyLUS > > MyRegistrarProxy p = new MyRegistrarProxy(); > > > out.writeObject(new > MarshalledInstance(p,Collections.EMPTY_LIST).convertToMarshalledObject()); Just from my perspective: The purpose of MarshalledInstance is to provide some separation from MarshalledObject. In your case, you can just use MarshalledObject to wrap the proxy object with the codebase that the associated classloader is advertising via the RMIClassLoaderSPI. To your problem, look at how you are doing the writeObject() and readObject(). I suspect that you have corrupted the stream by intermingly I/O with the Object(Input/Output)Stream and the underlying InputStream/OutputStream and not flushing at the appropriate times to make sure the bytes that go out the OutputStream or come in the InputStream are properly ordered. Gregg Wonderly -------------------------------------------------------------------------- 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 [email protected]