Companion
Functions
Duplicates the database into a new database with the supplied name and directory. Assumes that the source database has no active connections and performs a file system copy
Uses an active database connection and derby system commands to freeze the database, uses system OS commands to copy the database, and then unfreezes the database. The duplicate name and directory path must not already exist
If the database already exists it is deleted
This does not check if the database is shutdown. It simply removes the database from the file system. If it doesn't exist, then nothing happens.
There is no way to guarantee with 100 percent certainty that the path is in fact an embedded derby database because someone could be faking the directory structure. The database directory of an embedded derby database must have a service.properties file, a log directory, and a seg0 directory. If these exist and the supplied path is a directory, then the method returns true.
A convenience method for those that use File instead of Path. Calls isEmbeddedDerbyDatabase(file.toPath())
The database must already exist. It is not created. An exception is thrown if it does not exist.
The database file must already exist within the KSLDatabase.dbDir directory It is opened for reading and writing.
Sends a shutdown connection to the database.
Creates a data source that can be used to shut down an embedded derby database upon first connection.