Hi,

I'm using Jena TDB, and I need to override the datastore files ( i.e.  OSP.dat, 
OSP.idn, node2id.dat and etc...) with previous backup files that I have.
To close and release these resources I use the following:
TDB.sync(model);
TDB.closedown();
model.close();

but somehow the files are still held by the process, can someone please help, 
how do release any handlers attached to my model.
I saw the mail about it (see attached), will it help to do

My application is a standalone application with one main thread.

Thanks,

Nadav Hoze
Senior Software Engineer
dbMotion Ltd.
Direct: +972-9-7699000
Extension number: 9037
Mobile: 972-54-4821606
E-mail: [email protected]<mailto:[email protected]>
[Description: Logo + Tagline]

This email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed. 
Please note that any disclosure, copying or distribution of the content of this 
information is strictly forbidden. If you have received this email message in 
error please notify its sender and then delete it from your files.

<<inline: image001.jpg>>

--- Begin Message ---
Hello Jena users,

perhaps you'll find the following information useful, perhaps not :)

Problem:
A few days ago I asked for ideas why TDB has open file handles even if
one closed the model. This is a crucial point in case you are using
plenty of graphs. A call to graph.getDataSet().close() helped to close
most of the handles, but some unused file handles still remain. In long
running instances (doing re-open graphs often) this can be a problem.

Cause:
Today I dived into Jena's source code and found in BlockMgrMapped that
the database files are accessed via memory mapped buffers. As Java seems
to lack in a possibility to unmap the buffer directly, file handles
remain open.

Solution:
The only possibility I found (without changing anything in the Jena
framework) was to explicitly call System.gc() after dataSet.close().
Usually this closes the file handles (because Jena nulled all the
buffers before [bless the Jena group for this :) ]).
Of course, System.gc() is only an advice to the VM, but it seems to be
successful.


Thanks
André

--
Dr. André Lanka  *  0178 / 134 44 47  *  http://dr-lanka.de

--- End Message ---

Reply via email to