Re: Releasing the lock on Repository files

Martin Matula <[email protected]> Tue, 19 Aug 2003 11:26:16 +0200
Newsgroups gmane.comp.java.netbeans.modules.mdr.devel
Message-ID <[email protected]>
Hi,
unfortunatelly, unlocking the files in currently not possible. You may 
want to use XMI import/export to implement load/save functionality.
If you really need the files unlocking, please file a new enhancement 
request in Issuezilla.
Thanks,
Martin

[email protected] wrote:
> Hi,
> 
> I am presently doing development on a Feature Modelling tool which uses the MDR
> (independent of netbeans MDR Explorer) to store persistent data for the
> application’s “load†and “save†functionality. The save process creates a new
> repository called CFRepository (in the application path), loads the necessary
> metamodel and creates a new extent (if necessary). Next, the extent is populated
> with data from the application which consists of the user’s work. Finally, the
> files CFRepository.btd and CFRepository.btx are copied into a zip archive at a
> location specified by the user. The load process is essentially the reverse of
> this: The .btd and .btx files are extracted from the zip file to over-write the
> CFRepository in the application path and the data is loaded to the application.
> This works fine but for one thing:
> 
> After the application accesses the repository, an OS file lock is created on the
> CFRepository.btd and CFRepository.btx files. I can’t figure out how to get this
> lock released. Once the application exits, the lock is released, but I need it
> to be released by the application so the files can be over-written by the
> loading process.
> 
> At the end of the save routine I call
> rep.endTrans();
> rep.shutdown();
> 
> However, the repository files remain locked and any subsequent load attempt
> fails to over-write these files. Is there another API call that I am missing
> that will release the lock on CFRepository.btd and CFRepository.btx?
> 
> Thanks in advance for any advice.
> 
> James Markle
> 
> 
> ----------------------------------------
> This mail sent through www.mywaterloo.ca