[ http://issues.apache.org/jira/browse/VFS-98?page=comments#action_12445918 
] 
            
Mario Ivankovits commented on VFS-98:
-------------------------------------

I dont know why, but everytime when I'll go on vacation there is something 
happening around vfs ;-)

First, please stick with the SoftReferenceFilesCache, its your only option in 
reality.
Then, please try one of the very latest builds, as far as I remember I fixed 
something in this area, but can't remember when it was, though, I am pretty 
sure it will help here.

When your application hangs anyway, please create a "full thread dump" [1] and 
post it here. This should allow us to debug your problem.

As a workaround you can create a FileSystemManager per thread by
1) create the StandardFileSystem manager manually (do not user VFS.getManager())
2) store the reference in an java.lang.ThreadLocal

Hope this helps for now.

[1] http://java.sun.com/developer/technicalArticles/Programming/Stacktrace/

> VFS causes deadlocks or is not thread-safe
> ------------------------------------------
>
>                 Key: VFS-98
>                 URL: http://issues.apache.org/jira/browse/VFS-98
>             Project: Commons VFS
>          Issue Type: Bug
>    Affects Versions: Nightly Builds
>         Environment: jdk1.5.0_07 / Linux
>            Reporter: Juha-Matti Toppinen
>
> Newer versions of VFS seems to be unusable in multithreading environments, 
> causing a deadlock of some kind. This causes my Java  web server application 
> to completely hang when there is many concurrent connections. My application 
> uses a single FileSystemManager instance, and makes quite heavy use of VFS; 
> opening many files from many threads simultaneously.
> I have tried, without success different workarounds based on some mailing 
> list threads:
> - Using both NullReferenceFilesCache and the default SoftReferenceFilesCache. 
> (SoftReferenceFilesCache seemed to sometimes cause some additional 
> thread-related exceptions under heavy load, but propably unrelated to this 
> issue)
> - Using the new SynchorizedFileObjectDecorator also did not help. On the 
> contrary, it seemed to trigger the deadlock more easily.
> The version I have problems with is a nightly build: commons-vfs-20060831
> The older version commons-vfs-20060115 works beautifully, but I would like to 
> use newer version because I want to be able to use FileObject.refresh() to 
> reset the internal state of files (specially, to get a fresh list of 
> children).
> I hope the threading issues are going to be resolved in near future, and I am 
> willing to help in any way. I do not have very deep experience about 
> multithreading applications, so I wasn't able to get more close to the roots 
> of the issue. Feel free to ask for more information.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to