🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #501

Re: File Locking in IO classes

#501
From: Kevin Dean [TeamB]
Date: Thu, 21 Apr 2005 02:34
30 lines
2197 bytes
Vander wrote:

> Very nice! But that was nit the question.

No?  It seems to have an answer:

The behaviour of the file lock is platform-dependent. On some
platforms, the file lock is advisory, which means that unless an
application checks for a file lock, it will not be prevented from
accessing the file. On other platforms, the file lock is mandatory,
which means that a file lock prevents any application from accessing
the file.

In other words, how file locking behaves is platform-dependent.  In
your shoes I would write a test program to determine whether or not
"rw" automatically locks the file.  If it doesn't, then I would write
the locking code as shown in the article and rerun the experiment.

-- 
Kevin Dean [TeamB]
Dolphin Data Development Ltd.
http://www.datadevelopment.com/

NEW WHITEPAPERS
Team Development with JBuilder and Borland Enterprise Server
Securing Borland Enterprise Server
http://www.datadevelopment.com/papers/index.html

Please see Borland's newsgroup guidelines at
http://info.borland.com/newsgroups/guide.html
Technical Details
Message-ID: <xn0e18j7mw06c5003-kdean@www.teamb.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!212.101.4.254.MISMATCH!solnet.ch!solnet.ch!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <4264c9b6@newsgroups.borland.com> <xn0e16k112pcdb004-kdean@www.teamb.com> <42655400@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: f74b3,a6ef220bf23e44de
X-Google-Attributes: gidf74b3,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Kevin Dean [TeamB]" <NkOdSePaAnM@datadevelopment.com>
Subject: Re: File Locking in IO classes
Newsgroups: borland.public.jbuilder.java.language
References: <4264c9b6@newsgroups.borland.com> <xn0e16k112pcdb004-kdean@www.teamb.com> <42655400@newsgroups.borland.com>
Organization: Dolphin Data Development Ltd.
User-Agent: XanaNews/1.17.3.1
X-Face: ":yn4zt^A_dn>6~{YJmu^B\'4w)e:apPM\VC=Dvf&*tASxX9|BYczkFd$xr.$vNSZ[3Uobr
 p]c4\+\l){!WQI.$]veP({HLd;CDYH?iN
Message-ID: <xn0e18j7mw06c5003-kdean@www.teamb.com>
X-Ref: newsgroups.borland.com ~XNS:00000182
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
NNTP-Posting-Host: 24.57.153.235
Date: 20 Apr 2005 18:34:01 -0800
X-Trace: newsgroups.borland.com 1114047241 24.57.153.235 (20 Apr 2005 18:34:01 -0800)
Lines: 30
X-Authenticated-User: kdean
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!212.101.4.254.MISMATCH!solnet.ch!solnet.ch!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail