Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
| SolarMetric Kodo JDO 2.4.3 generated on March 27 2003
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.solarmetric.kodo.impl.jdbc
Class JDBCPersistenceManagerFactory

    java.lang.Object
      |
      +--com.solarmetric.kodo.runtime.PersistenceManagerFactoryImpl
            |
            +--com.solarmetric.kodo.impl.jdbc.JDBCPersistenceManagerFactory

All Implemented Interfaces:
  PersistenceManagerFactory, Serializable

Direct Known Subclasses:
  EEPersistenceManagerFactory

public class JDBCPersistenceManagerFactory
extends PersistenceManagerFactoryImpl

PersistenceManagerFactory type for use with the JDBC runtime.

See Also:
  Serialized Form

Constructor Summary
`JDBCPersistenceManagerFactory()` Default constructor.
`JDBCPersistenceManagerFactory(InputStream propertyStream)` Create a factory that will access the data store with a `Properties` instantiated from the specified `InputStream`.
`JDBCPersistenceManagerFactory(JDBCConfiguration conf)` Construct the factory with the given option settings.
`JDBCPersistenceManagerFactory(Properties props)` Create a factory that will access the data store with the specified `Properties`.

Method Summary
`void` | `close()` API extension.
`protected void` | `configurePersistenceManager(PersistenceManager pm)` Register the PersistenceManagerImpl as being opened from this factory, and flush any pending class registrations if necessary.
`int` | `countDeferredRegistrations()`
`static Object` | `createConnectionFactory(JDBCConfiguration conf)`
`static Object` | `createConnectionFactory(JDBCConfiguration conf, ClassResolver resolver)`
`protected void` | `finalize()`
`Collection` | `getDeferredRegistrations()`
`protected JDBCConfiguration` | `getJDBCConfiguration()`
`protected PersistenceManagerImpl` | `getOpenPersistenceManager()` Returns any open `PersistenceManagerImpl` for this factory.
`static PersistenceManagerFactory` | `getPersistenceManagerFactory(Properties p)` Factory method for constructing a PersistenceManagerFactory from properties.
`Set` | `getRegisteredClasses()`
`org.apache.commons.logging.Log` | `getRuntimeLog()`
`String` | `getVersionInformation()` Return a string describing this factory version, such as "JDBC Enterprise".
`protected Object` | `newConnectionFactory()` Instantiate a connection factory from the current configuration.
`StoreManager` | `newStoreManager()` Return a new StoreManager for this runtime.
`protected boolean` | `registerClass(Class clazz)` Register a new persistent class.
`protected boolean` | `registerClassInternal(Class clazz)`
`protected void` | `removeUnsupportedOptions(Collection options)` Remove the options not supported by this runtime from the given collection.
`protected void` | `setup()` Setup transient state used by this factory based on the current configuration, which will subsequenty be locked down.
`protected void` | `setupImplHelper()`

Methods inherited from class com.solarmetric.kodo.runtime.PersistenceManagerFactoryImpl
`findPersistenceManager, freeze, getConfiguration, getConnectionDriverName, getConnectionFactory, getConnectionFactory2, getConnectionFactory2Name, getConnectionFactoryName, getConnectionPassword, getConnectionURL, getConnectionUserName, getIgnoreCache, getMaxPool, getMinPool, getMsWait, getMultithreaded, getNontransactionalRead, getNontransactionalWrite, getOptimistic, getPersistenceManager, getPersistenceManager, getProperties, getRestoreValues, getRetainValues, lock, newPersistenceManager, readObject, setConnectionDriverName, setConnectionFactory, setConnectionFactory2, setConnectionFactory2Name, setConnectionFactoryName, setConnectionPassword, setConnectionURL, setConnectionUserName, setIgnoreCache, setMaxPool, setMinPool, setMsWait, setMultithreaded, setNontransactionalRead, setNontransactionalWrite, setOptimistic, setRestoreValues, setRetainValues, supportedOptions, unlock`

Methods inherited from class java.lang.Object
`clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### JDBCPersistenceManagerFactory

    public JDBCPersistenceManagerFactory()

  Default constructor.

### JDBCPersistenceManagerFactory

    public JDBCPersistenceManagerFactory(JDBCConfiguration conf)

  Construct the factory with the given option settings.

### JDBCPersistenceManagerFactory

    public JDBCPersistenceManagerFactory(Properties props)
                                  throws IOException

  Create a factory that will access the data store with the specified `Properties`.

### JDBCPersistenceManagerFactory

    public JDBCPersistenceManagerFactory(InputStream propertyStream)
                                  throws IOException

  Create a factory that will access the data store with a `Properties` instantiated from the specified `InputStream`.

Method Detail

### getPersistenceManagerFactory

    public static PersistenceManagerFactory getPersistenceManagerFactory(Properties p)

  Factory method for constructing a PersistenceManagerFactory from properties. Invoked from `JDOHelper#getPersistenceManagerFactory`.

### getRuntimeLog

    public org.apache.commons.logging.Log getRuntimeLog()

### getVersionInformation

    public String getVersionInformation()

  Description copied from class: `PersistenceManagerFactoryImpl`
  Return a string describing this factory version, such as "JDBC Enterprise".
  Overrides:
    `getVersionInformation` in class `PersistenceManagerFactoryImpl`

### newStoreManager

    public StoreManager newStoreManager()

  Description copied from class: `PersistenceManagerFactoryImpl`
  Return a new StoreManager for this runtime. Note that the instance returned here may be wrapped before being passed to the `PersistenceManagerFactoryImpl.newPersistenceManager(java.lang.String, java.lang.String, com.solarmetric.kodo.runtime.StoreManager)` method. However, the `PersistenceManagerImpl.getStoreManager()` method will return the original native store manager.
  Overrides:
    `newStoreManager` in class `PersistenceManagerFactoryImpl`

### getJDBCConfiguration

    protected JDBCConfiguration getJDBCConfiguration()

### newConnectionFactory

    protected Object newConnectionFactory()

  Description copied from class: `PersistenceManagerFactoryImpl`
  Instantiate a connection factory from the current configuration. This method returns null by default.
  Overrides:
    `newConnectionFactory` in class `PersistenceManagerFactoryImpl`

### createConnectionFactory

    public static Object createConnectionFactory(JDBCConfiguration conf)

### createConnectionFactory

    public static Object createConnectionFactory(JDBCConfiguration conf,
                                                 ClassResolver resolver)

### setup

    protected void setup()

  Description copied from class: `PersistenceManagerFactoryImpl`
  Setup transient state used by this factory based on the current configuration, which will subsequenty be locked down. This method will be called before the first PersistenceManager is requested, and will be re-called each time the factory is deserialized into a JVM that has no configuration for this data store.
  Overrides:
    `setup` in class `PersistenceManagerFactoryImpl`

### setupImplHelper

    protected void setupImplHelper()

### getDeferredRegistrations

    public Collection getDeferredRegistrations()

### registerClass

    protected boolean registerClass(Class clazz)

  Register a new persistent class. This will create mappings for the classes, and optionally refresh the schema (if the SynchronizeSchema attribute is true).

  Special consideration needs to be taken to prevent recursive registrations, since parsing the metadata can result in new classes being loaded, and thus firing the `JDOImplHelper`'s register class listeners, and thus referencing a partially parsed class metadata file. In order to prevent this, if we are currently in the process of registering classes, any invocation of registerClass will defer the registration of those classes until later. The `#flushDeferredRegistrations` method will be called to flush any classes that have been deferred.

  Furthermore, special considerations need to be taken for performance, since paring metadata files can be a slow process. If classes are loaded in multiple separate ClassLoader's, excessive metadata parsing can occur. Thus, we defer registration in the following cases:

  - There are no open, active PersistenceManagers for this factory
  - This factory is currently in the process of registering a class
  - This factory has been closed
  - This factory is currently in the setup() method
  Since:
    2.4

### registerClassInternal

    protected boolean registerClassInternal(Class clazz)

### countDeferredRegistrations

    public int countDeferredRegistrations()

### removeUnsupportedOptions

    protected void removeUnsupportedOptions(Collection options)

  Description copied from class: `PersistenceManagerFactoryImpl`
  Remove the options not supported by this runtime from the given collection. The Collection will initially consist of the following options:
  - javax.jdo.option.TransientTransactional
  - javax.jdo.option.NontransactionalRead
  - javax.jdo.option.NontransactionalWrite
  - javax.jdo.option.RetainValues
  - javax.jdo.option.RestoreValues
  - javax.jdo.option.Optimistic
  - javax.jdo.option.ApplicationIdentity
  - javax.jdo.option.DatastoreIdentity
  - javax.jdo.option.ArrayList
  - javax.jdo.option.HashMap
  - javax.jdo.option.Hashtable
  - javax.jdo.option.LinkedList
  - javax.jdo.option.TreeMap
  - javax.jdo.option.TreeSet
  - javax.jdo.option.Vector
  - javax.jdo.option.Map
  - javax.jdo.option.List
  - javax.jdo.option.Array
  - javax.jdo.option.NullCollection
  - javax.jdo.query.JDOQL
  Overrides:
    `removeUnsupportedOptions` in class `PersistenceManagerFactoryImpl`

### close

    public void close()

  Description copied from class: `PersistenceManagerFactoryImpl`
  API extension. Closes the PersistenceManagerFactory, freeing any resources needed by this factory. After this method is invoked, the factory and associated PersistenceManagers should no longer be used.
  Overrides:
    `close` in class `PersistenceManagerFactoryImpl`

### finalize

    protected void finalize()
                     throws Throwable

  Overrides:
    `finalize` in class `Object`

### getOpenPersistenceManager

    protected PersistenceManagerImpl getOpenPersistenceManager()

  Returns any open `PersistenceManagerImpl` for this factory. This is used to create a `Connector` object for interacting with the data store during class registration.

### configurePersistenceManager

    protected final void configurePersistenceManager(PersistenceManager pm)

  Register the PersistenceManagerImpl as being opened from this factory, and flush any pending class registrations if necessary.
  Overrides:
    `configurePersistenceManager` in class `PersistenceManagerFactoryImpl`
  Since:
    2.4
  See Also:
    `PersistenceManagerFactoryImpl.configurePersistenceManager(PersistenceManager)`

### getRegisteredClasses

    public Set getRegisteredClasses()

Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
| SolarMetric Kodo JDO 2.4.3 generated on March 27 2003
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 2001,2002 SolarMetric, Inc. All Rights Reserved.