Hi Kendall,
I would indeed recommend you to use the CHECK command before doing any other operations. This command does exactly what you seem to be looking for (checking if the databases is opened; if not, open it).
Does this help? Christian
On Wed, Jun 15, 2016 at 7:03 PM, Kendall Shaw kendall.shaw@workday.com wrote:
Using ClientSession from java, I do this to check if the database is open:
try {
replace(somewhere, new ArrayInput(bytes));
} catch (IOException e) { String msg = e.getMessage();
if (msg == null || !msg.contains(“No database opened”))
throw e;
execute(new Check(databaseName));
replace(somewhere, new ArrayInput(bytes));
}
Is there a better way to detect if the database is open than testing the exception message text?
Kendall