You may also configure the PersistenceManagerFactory using Properties containing the setting options as specified in the JDO Specification chapter "11 PersistenceManagerFactory".
The associated properties file options.properties could looks like this:
#name of the PersistenceManagerFactory implementation class of Signsoft intelliBO javax.jdo.PersistenceManagerFactoryClass= com.signsoft.ibo.client.PersistenceManagerFactoryImpl #properties defined in the JDO specification javax.jdo.option.ConnectionDriverName=org.h2.Driver javax.jdo.option.ConnectionUserName= javax.jdo.option.ConnectionPassword= javax.jdo.option.ConnectionURL=jdbc:h2:/database/data #Signsoft intelliBO properties com.signsoft.ibo.option.DatabaseSupportClassName= com.signsoft.ibo.dbsupport.h2.H2DatabaseInfo
You can now build a Properties object that way:
Properties props = new Properties();
props.load(new FileInputStream("option.properties"));
Alternatively you can set the properties directly without the separat options.properties file using the constants defined in class com.signsoft.ibo.client.PersistenceManagerFactoryProperties like this:
Properties props = new Properties(); props.setProperty(pmfp.javax_jdo_PersistenceManagerFactoryClass, "com.signsoft.ibo.client.PersistenceManagerFactoryImpl"); props.setProperty(pmfp.javax_jdo_option_ConnectionDriverName, "org.enhydra.instantdb.jdbc.idbDriver"); props.setProperty(pmfp.com_signsoft_ibo_option_DatabaseSupportClassName, "com.signsoft.ibo.dbsupport.h2.H2DatabaseInfo"); ...To get a configured PersistenceManagerFactory you use the properties in your application this way:
PersistenceManagerFactory factory = JDOHelper.getPersistenceManagerFactory(props);