[jboss-dev-forums] [Design the new POJO MicroContainer] - VirtualFile.finalize, JBMICROCONT-115
scott.stark@jboss.org
do-not-reply at jboss.com
Sat Dec 2 12:20:36 EST 2006
The current sporadic read errors in jboss5 are due to the VirtualFile.finalize closing any open streams associated with the VirtualFile. This is an invalid ownership notion with the current VirtualFile.openStream implementation as one can have access to streams without holding a reference to the VirtualFile. Since its such a tricky problem to debug, its not a good idea to require a usage policy of keeping a reference to the VirtualFile and using its close method to close all associated streams.
The finalize method should be removed, and either one keeps a reference to the VirtualFile to use its close, or is responsible for closing any streams one opens.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3990759#3990759
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3990759
More information about the jboss-dev-forums
mailing list