Last active
September 4, 2015 20:32
-
-
Save cosbor11/a45a23d703b3de36e1a3 to your computer and use it in GitHub Desktop.
onyx embedded persistence manager factory
This file contains 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
PersistenceManagerFactory factory = new EmbeddedPersistenceManagerFactory(); //1 | |
factory.setCredentials("username", "password"); //2 | |
String pathToOnyxDB = System.getProperty("user.home") | |
+ File.separatorChar + ".onyxdb" | |
+ File.separatorChar + "sandbox" | |
+ File.separatorChar +"embedded-db.oxd"; | |
factory.setDatabaseLocation(pathToOnyxDB); //3 | |
factory.initialize(); //4 | |
PersistenceManager manager = factory.getPersistenceManager(); //5 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For more information see: Embedded Persistence Manager Factory Tutorial