The so-called persistence manager is the most important instrument working with persistent objects in Signsoft intelliBO. A persistence manager factory ( com.signsoft.ibo.client.PersistenceManagerFactoryImpl ) provides this manager.
Therefore the factory must be initialised with the according data source. You can do this directly in the source code of the application or via the configuration file ibo-config.xml. The latter is the preferred way and hence we use the ibo-config.xml as described in the section above.
If you call the persistence manager factory with
PersistenceManagerFactoryImpl pmf = new PersistenceManagerFactoryImp();it will be initialised with the settings given in the configuration file. You will need and will use this factory during the entire runtime of your application.
With the configured factory you can now create a persistence manager:
PersistenceManager pm = pmf.getPersistenceManager();Make sure you release the reference to the persistence manager if you do not need it any longer calling close() . The persistence manager has references to resources itself. When omitting the close() call it is not ensured that all of the resources are cleaned up, so under some conditions the Java Virtual Machine cannot end the application.
pm.close();