serializable notification arguments

0 views
Skip to first unread message

Hamilton Turner

unread,
Mar 11, 2009, 7:03:27 PM3/11/09
to Javassonne Discussion
Hey all,

So I tried to run this:
Object boo = new Object();
Notification n = new Notification("test notification", boo);
cl.sendNotificationToHost(n);

and got this error: java.io.NotSerializableException: java.lang.Object

I think this may mean that any objects that are encapsulated in our
Notifications will have to be serializable. This sucks. Perhaps Jules
can help us get around this?

Hamy

PS - in my working copy, I already changed the notifications to this:
public class Notification implements Serializable {...}

Ben Gotow

unread,
Mar 11, 2009, 7:17:52 PM3/11/09
to javas...@googlegroups.com
Yeah - I think we'll have to make them serializable if we use the
default serialization stuff. If we do it with XStream, we don't have
to - though. I think the built in stuff requires that you "opt-in" to
serialization, and XStream has an "opt-out" system.

We should def. ask Jules though...

- Ben
Ben Gotow
-----------------------------------
http://www.gotow.net/
beng...@gmail.com
540-250-2334

Reply all
Reply to author
Forward
0 new messages