org.jpox.resource
Class ManagedConnectionFactoryImpl

java.lang.Object
  extended byorg.jpox.PMFConfiguration
      extended byorg.jpox.AbstractPersistenceManagerFactory
          extended byorg.jpox.resource.ManagedConnectionFactoryImpl
All Implemented Interfaces:
javax.resource.spi.ManagedConnectionFactory, java.io.Serializable

public class ManagedConnectionFactoryImpl
extends AbstractPersistenceManagerFactory
implements javax.resource.spi.ManagedConnectionFactory

Implementation of the JCA adapter for use of JPOX in J2EE environments. Provides an implementation of the methods for ManagedConnectionFactory as well as setters/getters for properties required in the J2EE environment.

Version:
$Revision: 1.6 $
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class org.jpox.PMFConfiguration
PMFConfiguration.ObjectPropertySetter, PMFConfiguration.StringPropertySetter
 
Field Summary
 
Fields inherited from class org.jpox.AbstractPersistenceManagerFactory
cache, lifecycleListeners, pmfContext
 
Fields inherited from class org.jpox.PMFConfiguration
ADD_UNIQUE_CONSTRAINT_MAP_INVERSE_PROPERTY, AUTO_CREATE_COLUMNS_PROPERTY, AUTO_CREATE_CONSTRAINTS_PROPERTY, AUTO_CREATE_SCHEMA_PROPERTY, AUTO_CREATE_TABLES_PROPERTY, AUTO_CREATE_WARN_ON_ERROR_PROPERTY, AUTO_START_CLASS_NAMES_PROPERTY, AUTO_START_MECHANISM_MODE_PROPERTY, AUTO_START_MECHANISM_PROPERTY, AUTO_START_MECHANISM_XML_FILE_PROPERTY, CACHE_COLLECTIONS_LAZY_PROPERTY, CACHE_COLLECTIONS_PROPERTY, CACHE_LEVEL_1_TYPE_PROPERTY, CACHE_LEVEL_2_CACHE_NAME_PROPERTY, CACHE_LEVEL_2_CONFIGURATION_FILE_PROPERTY, CACHE_LEVEL_2_PROPERTY, CACHE_LEVEL_2_TYPE_PROPERTY, CHECK_EXIST_TABLES_VIEWS_PROPERTY, CLASS_LOADER_RESOLVER_NAME_PROPERTY, configurable, CONNECTION_POOLING_CONFIGURATION_FILE_PROPERTY, CONNECTION_POOLING_TYPE_PROPERTY, DATASTORE_ADAPTER_CLASSNAME_PROPERTY, DATASTORE_CLASS_ADDITION_MAX_RETRIES_PROPERTY, DATASTORE_DELAY_OPERATIONS_UNTIL_COMMIT_PROPERTY, DATE_TIMEZONE_PROPERTY, DEFAULT_INHERITANCE_STRATEGY_PROPERTY, DETACH_ON_CLOSE_PROPERTY, FIXED_SCHEMA_PROPERTY, FOREIGN_KEY_AUTO_MODE, FOREIGN_KEY_CREATE_MODE_PROPERTY, FOREIGN_KEY_STRICT_MODE, GENERATOR_ID_CLASS_PROPERTY, IMPLEMENTATION_CREATOR_NAME_PROPERTY, INITILIAZE_PRIMARY_KEY_COLUMN_INFO, JDO_CONNECTION_FACTORY_NAME_PROPERTY, JDO_CONNECTION_FACTORY_PROPERTY, JDO_CONNECTION_FACTORY2_NAME_PROPERTY, JDO_CONNECTION_FACTORY2_PROPERTY, JDO_DATASTORE_DRIVERNAME_PROPERTY, JDO_DATASTORE_PASSWORD_PROPERTY, JDO_DATASTORE_URL_PROPERTY, JDO_DATASTORE_USERNAME_PROPERTY, JDO_DETACHALLONCOMMIT_PROPERTY, JDO_IGNORECACHE_PROPERTY, JDO_MAPPING_CATALOG_PROPERTY, JDO_MAPPING_PROPERTY, JDO_MAPPING_SCHEMA_PROPERTY, JDO_MULTITHREADED_PROPERTY, JDO_NONTRANSACTIONAL_READ_PROPERTY, JDO_NONTRANSACTIONAL_WRITE_PROPERTY, JDO_OPTIMISTIC_PROPERTY, JDO_RESTOREVALUES_PROPERTY, JDO_RETAINVALUES_PROPERTY, LOCALISER, MAX_FETCH_DEPTH_PROPERTY, METADATA_JDO_FILE_EXTENSION_PROPERTY, METADATA_JDOQUERY_FILE_EXTENSION_PROPERTY, METADATA_ORM_FILE_EXTENSION_PROPERTY, METADATA_VALIDATE_PROPERTY, PERSISTENCE_BY_REACHABILITY_AT_COMMIT, POID_TRANSACTION_ATTRIBUTE_PROPERTY, POID_TRANSACTION_ISOLATION_PROPERTY, PROPERTIES_FILE, QUERY_ALLOW_ALL_SQL_STATEMENTS, QUERY_FETCH_DIRECTION_PROPERTY, QUERY_FETCH_SIZE_PROPERTY, QUERY_RESULT_SET_CONCURRENCY_PROPERTY, QUERY_RESULT_SET_TYPE_PROPERTY, QUERY_TIMEOUT_PROPERTY, QUERY_USE_FETCH_PLAN_PROPERTY, QUERY_USE_INNER_JOINS_ONLY_PROPERTY, READ_ONLY_SCHEMA_PROPERTY, STRING_DEFAULT_LENGTH_PROPERTY, TRANSACTION_ISOLATION_PROPERTY, USE_UPDATE_LOCK_PROPERTY, VALIDATE_COLUMNS_PROPERTY, VALIDATE_CONSTRAINTS_PROPERTY, VALIDATE_TABLES_PROPERTY
 
Constructor Summary
ManagedConnectionFactoryImpl()
          Default constructor
 
Method Summary
 java.lang.Object createConnectionFactory()
          Creator for the connection factory
 java.lang.Object createConnectionFactory(javax.resource.spi.ConnectionManager cm)
          Creator for the connection factory.
 javax.resource.spi.ManagedConnection createManagedConnection(javax.security.auth.Subject subject, javax.resource.spi.ConnectionRequestInfo cri)
          Creator for a managed connection.
 boolean equals(java.lang.Object other)
          Equality operator.
 java.io.PrintWriter getLogWriter()
          Accessor for the Log writer
 int hashCode()
           
 javax.resource.spi.ManagedConnection matchManagedConnections(java.util.Set mcs, javax.security.auth.Subject subject, javax.resource.spi.ConnectionRequestInfo cri)
          Method to match managed connections.
 void setLogWriter(java.io.PrintWriter writer)
          Mutator for the Log Writer
 void setPassword(java.lang.String password)
          Deprecated.  
 void setUserName(java.lang.String userName)
          Deprecated.  
 
Methods inherited from class org.jpox.AbstractPersistenceManagerFactory
addInstanceLifecycleListener, assertIsOpen, close, freezeConfiguration, getDataStoreCache, getImplementationCreator, getLifecycleListenerSpecifications, getNontransactionalDataSource, getPmCache, getPMFConfiguration, getPMFContext, getProperties, getTransactionalDataSource, getVendorName, getVersionNumber, isClosed, releasePersistenceManager, removeInstanceLifecycleListener, supportedOptions
 
Methods inherited from class org.jpox.PMFConfiguration
assertConfigurable, getAutoCreateColumns, getAutoCreateConstraints, getAutoCreateTables, getAutoCreateWarnOnError, getAutoStartClassNames, getAutoStartMechanism, getAutoStartMechanismMode, getAutoStartMechanismXmlFile, getCalendarForDateTimezone, getCatalog, getCheckExistTablesOrViews, getClassLoaderResolverName, getConnectionDriverName, getConnectionFactory, getConnectionFactory2, getConnectionFactory2Name, getConnectionFactoryName, getConnectionPassword, getConnectionPoolingConfigurationFile, getConnectionPoolingType, getConnectionURL, getConnectionUserName, getDatastoreAdapterClassName, getDatastoreClassAdditionMaxRetries, getDatastoreDelayOperationsEnabled, getDateTimezone, getDefaultInheritanceStrategy, getDetachAllOnCommit, getDetachOnClose, getDictionary, getFixedSchema, getForeignKeyCreateMode, getIdentifierCase, getIdentifierNamingStrategy, getIdentifierTablePrefix, getIdentifierTableSuffix, getIdentifierWordSeparator, getIgnoreCache, getImplementationCreatorName, getInitializePrimaryKeyColumnInfo, getJdoCacheCollections, getJdoCacheCollectionsLazy, getJdoCacheLevel1Type, getJdoCacheLevel2, getJdoCacheLevel2CacheName, getJdoCacheLevel2ConfigurationFile, getJdoCacheLevel2Type, getJdoMetaDataFileExtension, getJdoqueryMetaDataFileExtension, getMapping, getMaxFetchDepth, getMetaDataValidate, getMultithreaded, getNontransactionalRead, getNontransactionalWrite, getOptimistic, getOptions, getOrmMetaDataFileExtension, getPersistenceByReachabilityAtCommit, getPersistentIdGenerator, getPoidTransactionAttribute, getPoidTransactionIsolationLevel, getPropertiesFile, getQueryFetchDirection, getQueryFetchSize, getQueryResultSetConcurrency, getQueryResultSetType, getQueryTimeout, getQueryUseFetchPlan, getQueryUseInnerJoinsOnly, getReadOnlySchema, getRestoreValues, getRetainValues, getSchema, getStringDefaultLength, getTransactionIsolation, getUniqueConstraintsMapInverse, getUseUpdateLock, getValidateColumns, getValidateConstraints, getValidateTables, initPropertySetters, isQueryAllowAllSQLStatements, setAutoCreateColumns, setAutoCreateConstraints, setAutoCreateSchema, setAutoCreateTables, setAutoCreateWarnOnError, setAutoStartClassNames, setAutoStartMechanism, setAutoStartMechanismMode, setAutoStartMechanismXmlFile, setCatalog, setCheckExistTablesOrViews, setClassLoaderResolverName, setConnectionDriverName, setConnectionFactory, setConnectionFactory2, setConnectionFactory2Name, setConnectionFactoryName, setConnectionPassword, setConnectionPoolingConfigurationFile, setConnectionPoolingType, setConnectionURL, setConnectionUserName, setDatastoreAdapterClassName, setDatastoreClassAdditionMaxRetries, setDatastoreDelayOperationsEnabled, setDateTimezone, setDefaultInheritanceStrategy, setDetachAllOnCommit, setDetachOnClose, setFixedSchema, setForeignKeyCreateMode, setIdentifierCase, setIdentifierNamingStrategy, setIdentifierTablePrefix, setIdentifierTableSuffix, setIdentifierWordSeparator, setIgnoreCache, setImplementationCreatorName, setInitializePrimaryKeyColumnInfo, setJdoCacheCollections, setJdoCacheCollectionsLazy, setJdoCacheLevel1Type, setJdoCacheLevel2, setJdoCacheLevel2CacheName, setJdoCacheLevel2ConfigurationFile, setJdoCacheLevel2Type, setJdoMetaDataFileExtension, setJdoqueryMetaDataFileExtension, setMapping, setMaxFetchDepth, setMetaDataValidate, setMultithreaded, setNontransactionalRead, setNontransactionalWrite, setOptimistic, setOptions, setOptions, setOrmMetaDataFileExtension, setPersistenceByReachabilityAtCommit, setPersistentIdGenerator, setPoidTransactionAttribute, setPoidTransactionIsolation, setPoidTransactionIsolation, setPropertiesFile, setQueryAllowAllSQLStatements, setQueryFetchDirection, setQueryFetchSize, setQueryResultSetConcurrency, setQueryResultSetType, setQueryTimeout, setQueryUseFetchPlan, setQueryUseInnerJoinsOnly, setReadOnlySchema, setRestoreValues, setRetainValues, setSchema, setStringDefaultLength, setTransactionIsolation, setTransactionIsolation, setUniqueConstraintsMapInverse, setUseUpdateLock, setValidateColumns, setValidateConstraints, setValidateTables
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ManagedConnectionFactoryImpl

public ManagedConnectionFactoryImpl()
Default constructor

Method Detail

setUserName

public void setUserName(java.lang.String userName)
Deprecated.  

Set the user name for the data store connection.

Parameters:
userName - the user name for the data store connection.

setPassword

public void setPassword(java.lang.String password)
Deprecated.  

Set the password for the data store connection.

Parameters:
password - the password for the data store connection.

equals

public boolean equals(java.lang.Object other)
Equality operator.

Specified by:
equals in interface javax.resource.spi.ManagedConnectionFactory
Overrides:
equals in class PMFConfiguration
Parameters:
other - The object to compare with
Returns:
Whether the objects are equal

hashCode

public int hashCode()
Specified by:
hashCode in interface javax.resource.spi.ManagedConnectionFactory

createConnectionFactory

public java.lang.Object createConnectionFactory()
                                         throws javax.resource.ResourceException
Creator for the connection factory

Specified by:
createConnectionFactory in interface javax.resource.spi.ManagedConnectionFactory
Returns:
The connection factory
Throws:
javax.resource.ResourceException - Thrown if an error occurs

createConnectionFactory

public java.lang.Object createConnectionFactory(javax.resource.spi.ConnectionManager cm)
                                         throws javax.resource.ResourceException
Creator for the connection factory.

Specified by:
createConnectionFactory in interface javax.resource.spi.ManagedConnectionFactory
Parameters:
cm - ConnectionManager
Returns:
The connection factory.
Throws:
javax.resource.ResourceException - Thrown if an error occurs

createManagedConnection

public javax.resource.spi.ManagedConnection createManagedConnection(javax.security.auth.Subject subject,
                                                                    javax.resource.spi.ConnectionRequestInfo cri)
                                                             throws javax.resource.ResourceException
Creator for a managed connection.

Specified by:
createManagedConnection in interface javax.resource.spi.ManagedConnectionFactory
Parameters:
subject - The subject (what ?)
cri - Connection request info.
Returns:
The managed connection.
Throws:
javax.resource.ResourceException - Thrown if an error occurs

matchManagedConnections

public javax.resource.spi.ManagedConnection matchManagedConnections(java.util.Set mcs,
                                                                    javax.security.auth.Subject subject,
                                                                    javax.resource.spi.ConnectionRequestInfo cri)
                                                             throws javax.resource.ResourceException
Method to match managed connections.

Specified by:
matchManagedConnections in interface javax.resource.spi.ManagedConnectionFactory
Parameters:
mcs -
subject -
cri -
Returns:
Throws:
javax.resource.ResourceException - Thrown if an error occurs

getLogWriter

public java.io.PrintWriter getLogWriter()
                                 throws javax.resource.ResourceException
Accessor for the Log writer

Specified by:
getLogWriter in interface javax.resource.spi.ManagedConnectionFactory
Returns:
The Log Writer
Throws:
javax.resource.ResourceException - Thrown if an error occurs.

setLogWriter

public void setLogWriter(java.io.PrintWriter writer)
                  throws javax.resource.ResourceException
Mutator for the Log Writer

Specified by:
setLogWriter in interface javax.resource.spi.ManagedConnectionFactory
Parameters:
writer - The log writer
Throws:
javax.resource.ResourceException - Thrown if an error occurs


Copyright © -2007 . All Rights Reserved.