[jcifs] Checking file locks

Volker Müller volker.mueller at xsystem.de
Tue Oct 28 08:11:08 GMT 2008


Hi Mike,

yes, I did some investigations on the locking mechanism. Unfortunately
my result until now is, that I can't check the lock without setting the
lock.
But i keep on searching ...


Best regards,

Volker

Michael B Allen schrieb:
> On Mon, Oct 27, 2008 at 9:50 AM, Volker Müller
> <volker.mueller at xsystem.de> wrote:
>   
>> Hello,
>>
>> I spent some time on trying to determine the locks (file lock, oplock)
>> of a file.
>> After all, I have'nt found a way to check the lock without locking the file.
>>
>> My application has a lot of threads opening files on a netApp-Filer. The
>> same file may be opened from various clients.
>> In this scenario I need something like a checkLock()-methode to
>> determine the file lock without blocking the access for other clients
>> (in case of reading access). The result should only displayed in the
>> GUI, the file will not be opened in all cases.
>>
>> Have someone an idea how to solve the problem?
>>     
>
> Hi Volker,
>
> We do not have locking support and I don't know enough about it to
> give you a definitive answer. But JCIFS is fairly easy to hack on and
> locking flags are decoded (e.g.
> jcifs/smb/SmbComNTCreateAndXResponse.java). If there is a way to do
> what you want it's probably not too difficult to do with JCIFS.
>
> Mike
>
>   


-------------- next part --------------
HTML attachment scrubbed and removed


More information about the jcifs mailing list