Closing a sql directory session for you

I am writing code to load a dictionary from a CSV. (Have to implement some custom functionality.) I am looping through the CSV and have code to commit every 10,000 rows. I'm using session.createEntry to insert each dictionary entry. Two questions: 1) Coming from a database background, best practice is to commit periodically. Is this a valid approach here? (We could have large volumes) 2) So far I am only running tests. In the test, when I call TransactionHelper.commitOrRollbackTransaction I am getting a warning: [SQLDirectory$TxSessionCleaner] Closing a sql directory session for you SQLSession[directory=<mydir>, sid=<-nnnnnnnnnnnnnn>]

On entry into the loop I am checking to see if a transaction is active. If not, I create one. However, on entry into the loop it appears that a transaction is always active. I am only using one PlatformFeature.class.

0 votes

0 answers

1709 views

ANSWER