Created
July 5, 2016 13:43
-
-
Save cosbor11/57f2e133790b9343945c3ac127f645ea to your computer and use it in GitHub Desktop.
Reconnect to the updated database.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create a database and its connection | |
PersistenceManagerFactory factory = new EmbeddedPersistenceManagerFactory(); //1 | |
factory.setCredentials("onyx", "SavingDataisFun!"); //2 | |
String pathToOnyxDB = System.getProperty("user.home") | |
+ File.separatorChar + ".onyxdb" | |
+ File.separatorChar + "sandbox" | |
+ File.separatorChar +"model-update-db.oxd"; | |
factory.setDatabaseLocation(pathToOnyxDB); //3 | |
factory.initialize(); | |
PersistenceManager manager = factory.getPersistenceManager(); //5 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment