Configuring a Persistence Manager Factory


Every persistence manager factory is configured at some point, either by a properties file, or before being stored in JNDI, or by calling the property mutators on a constructed object that implements the PersistenceManagerFactory interface. Nevertheless, for most of the application's life, it works with a persistence manager factory that is not configurable. When persistence manager factories are obtained from JNDI or from properties, they cannot be reconfigured. Even a configurable factory becomes frozen after it produces its first persistence manager. The configuration that is discussed in this section is the configuration that occurs before the persistence manager factory becomes frozen.

As a convenience, the factory provides configuration for two properties, IgnoreCache and Multithreaded, that are inherited by every persistence manager that the factory produces. Likewise, the persistence manager factory provides configuration for the five transactional properties, Optimistic, RetainValues, RestoreValues, NontransactionalRead, and NontransactionalWrite, that are inherited by the transaction belonging to the persistence manager. As the earlier discussion implies, the factory constructs the Transaction object at the same time that it constructs the PersistenceManager object. Chapters 3 and 4 describe the PersistenceManager and Transaction interfaces and their properties.




Using and Understanding Java Data Objects
Using and Understanding Java Data Objects
ISBN: 1590590430
EAN: 2147483647
Year: 2005
Pages: 156
Authors: David Ezzio

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net