In JPOX, the "store" represents the datastore (for example a RDBMS), and provides a StoreManager to manage the process of accessing this store. The StoreManager has several roles
The StoreManager provides methods to add and remove support for classes, namely addClass, addClasses, and dropAllTables. These initialise/remove the specified class(es) in terms of MetaData, and in terms of the datastore table they are mapped to.
The StoreManager can utilise an "auto-start" mechanism for populating its list of classes that are supported by the associated PersistenceManager. Currently there are two options here, to use no mechanism (hence loading the classes from scratch each time), or to use the SchemaAutoStarter class. The SchemaAutoStarter stores the list of supported classes in the actual datastore that is being used in a table "JPOX_TABLES". This functionality is useful where you have a JDO-enabled application that during a session of the application encounters particular persistence capable classes and these are stored away as being supported. When the application is started the next time, the "auto-start" mechanism loads up these classes when the PersistenceManager is instantiated, so it has knowledge of what it was supporting the previous time for this datastore. It is planned to add alternative "auto-start" mechanisms in the future. |