I have a class variable that holds my DSL context.

myDSLContext = DSL.using(dataSource, dialect);

The data source is an instance of SQLiteDataSource and the dialect is 
SQLDialect.SQLITE.

It is my understanding that the default JOOQ connection provider should use 
the
data source to acquire and then release the connection when executing 
within the context.

In various methods in my class, I use myDSLContext when building and 
executing the SQL:

Condition condition = myRowId.between(minRowNum, maxRowNum);
Result<Record> records = 
myDSLContext.select(myFields).from(myDataTable).where(condition).fetch();

After the program exits, there are shm and wal temporary files left over.

See: https://www.sqlite.org/tempfiles.html

These files should be automatically cleaned up if the database closes 
correctly:  "if the last connection 
does not shutdown cleanly, the WAL file will remain in the filesystem and 
will be 
automatically cleaned up the next time the database is opened".

Since all my interaction with the DB is through the same context, what 
could be causing
the database (connection) to not shutdown cleanly?

By using a data source, I am able to not worry about connection management 
for this simple 1 user, 1 file database.  In fact, it is my understanding 
that JOOQ uses automatic closing for me after the query is executed. This 
is one of the main features.  

Am I missing understanding this feature?
If not, are there issues with SQLite connection management that I am 
missing?

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jooq-user/39628a3d-116c-454b-a56e-6589cacfaa8dn%40googlegroups.com.

Reply via email to