The current problem with the cts test serialization has to due with the behavior of the
VirtualFileAdaptor. A VirtualFileAdaptor is created with a VirtualFile whose underlying
handler is a ZipEntryHandler is created that has a path
interop_W2JREMarshallTest_appclient_vehicle_client.jar, and a uri of
vfszip:/Users/svn/JBossHead/jboss-head/build/output/jboss-5.0.0.CR1/server/cts/tmp/jsr88/interop_W2JREMarshallTest_appclient_vehicle.ear/interop_W2JREMarshallTest_appclient_vehicle_client.jar:
ZipEntryHandler(a)2656127[path=interop_W2JREMarshallTest_appclient_vehicle_client.jar
context=vfszip:/Users/svn/JBossHead/jboss-head/build/output/jboss-5.0.0.CR1/server/cts/tmp/jsr88/interop_W2JREMarshallTest_appclient_vehicle.ear/interop_W2JREMarshallTest_appclient_vehicle_client.jar
real=vfszip:/Users/svn/JBossHead/jboss-head/build/output/jboss-5.0.0.CR1/server/cts/tmp/jsr88/interop_W2JREMarshallTest_appclient_vehicle.ear/interop_W2JREMarshallTest_appclient_vehicle_client.jar]
When the VirtualFileAdaptor that wraps the associated VirtualFile, ends up writing out the
path and rootURL as interop_W2JREMarshallTest_appclient_vehicle_client.jar and
vfszip:/Users/svn/JBossHead/jboss-head/build/output/jboss-5.0.0.CR1/server/cts/tmp/jsr88/interop_W2JREMarshallTest_appclient_vehicle.ear/interop_W2JREMarshallTest_appclient_vehicle_client.jar.
| private void writeObject(ObjectOutputStream out) throws IOException,
URISyntaxException
| {
| URL url = rootUrl;
| if (url == null)
| {
| VFS vfs = getFile().getVFS();
| url = vfs.getRoot().toURL();
| }
| String pathName = path;
| if (pathName == null)
| pathName = getFile().getPathName();
|
| ObjectOutputStream.PutField fields = out.putFields();
| fields.put("rootUrl", url);
| fields.put("path", pathName);
| out.writeFields();
| }
|
This will not work when deserialized with the VirtualFileAdaptor.getFile() implementation.
The only way this could work is if the following code used to return the root URL of the
ear previously:
| VFS vfs = getFile().getVFS();
| url = vfs.getRoot().toURL();
|
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4159656#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...