On 08/08/13 16:59, Kurt Landen wrote:
Why do you want to delete the folder?

I want to be able to drop a dataset that I create

What exactly is the dataset you are using?

When the dataset is created, I use TDBFactory.createDataset(), I've just
been using the Dataset interface.

How would I set up a StoredConnection?
I realize that this does not work on Windows 64-bit.

I was typing too quicky s/d// .  The internal operation is

StoreConnection.release(Location)

it's better to use the public API:

TDBFactory.release(location)

TDB keeps a cache of all databases by location so when you ask for one you always get the same one, same caches and same transaction manager.

StoreConnection's are that single instance of the attachment to the database at a location.

        Andy



On Thu, Aug 8, 2013 at 10:34 AM, Andy Seaborne <[email protected]> wrote:

On 08/08/13 14:59, Kurt Landen wrote:

I am currently using a method I made which just uses Apache FileUtils to
delete the folder containing my TDB, but if I add named models to the
Dataset, the models will still be accessible in memory even after the
physical models are gone. If I called addNamedModel it will tell me the
model already exists when I delete the TDB folder and re-create it. How
can
I fix this?


Why do you want to delete the folder?

What exactly is the dataset you are using?

Deleting files behind TDB's back can only be done with great care.  You
must use StoredConnection.release() to expel it from the in-JVM cache. Then
delete the files, then reopen it the database.

Otherwise, the caches are still there and some of your data is still
around.  Eventually something will go wrong.  Such data is not persistent.

This does not work on Windows/64bit.  This is a well-documented issue on
MS Windows with memory mapped files.

         Andy




Reply via email to