In AbstractVFSDeployment we do
| public void readExternal(ObjectInput in) throws IOException,
ClassNotFoundException
| {
| super.readExternal(in);
| root = (VirtualFile) in.readObject();
| }
|
| public void writeExternal(ObjectOutput out) throws IOException
| {
| super.writeExternal(out);
| out.writeObject(root);
| }
|
I would change it to
| public void readExternal(ObjectInput in) throws IOException,
ClassNotFoundException
| {
| super.readExternal(in);
| URL url = (URL)in.readObject();
| root = VFS.getRoot(url);
| }
|
| public void writeExternal(ObjectOutput out) throws IOException
| {
| super.writeExternal(out);
| out.writeObject(root.toURL());
| }
|
that way you don't serialize all the things that were already touched.
Only re-constructing lazy things on client side when needed.
The only thing with 2nd approach is that you loose parent info, and you probably get
different vfs context.
But do we really care about that?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4158398#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...