Package org.datanucleus.store.federation
Class FederatedStoreManager
- java.lang.Object
-
- org.datanucleus.store.federation.FederatedStoreManager
-
- All Implemented Interfaces:
StoreManager
public class FederatedStoreManager extends Object implements StoreManager
A federated StoreManager orchestrates the persistence/retrieval for multiple datastores. It is responsible for creating the individual StoreManager instances for the datastore(s) that are being federated. Has a "primary" StoreManager where data is stored by default when no metadata is specified for a class, and then has a map of "secondary" StoreManagers keyed by name that can be used for persistence as defined in metadata. When a request comes in to persist some data, this class is responsible for selecting the appropriate StoreManager for persistence. When a request comes in to query some data, this class is responsible for selecting the appropriate StoreManager to query.Assumes that there are persistence properties of the form
datanucleus.datastore.SecondStore=secondstore.properties datanucleus.datastore.ThirdStore=thirdstore.properties
where these properties files have the properties for the secondary stores with names "SecondStore", "ThirdStore".
-
-
Field Summary
Fields Modifier and Type Field Description protected PersistenceNucleusContext
nucleusContext
protected StorePersistenceHandler
persistenceHandler
Persistence handler.protected StoreManager
primaryStoreMgr
Primary StoreManager.static String
PROPERTY_DATA_FEDERATION_DATASTORE_NAME
protected QueryManager
queryMgr
Query Manager.protected Map<String,StoreManager>
secondaryStoreMgrMap
Map of secondary StoreManager keyed by their symbolic name.-
Fields inherited from interface org.datanucleus.store.StoreManager
OPTION_APPLICATION_COMPOSITE_ID, OPTION_APPLICATION_ID, OPTION_DATASTORE_ID, OPTION_DATASTORE_TIME_STORES_MILLISECS, OPTION_DATASTORE_TIME_STORES_NANOSECS, OPTION_DATASTORE_TIMEOUT, OPTION_NONDURABLE_ID, OPTION_ORM, OPTION_ORM_EMBEDDED_ARRAY, OPTION_ORM_EMBEDDED_ARRAY_NESTED, OPTION_ORM_EMBEDDED_COLLECTION, OPTION_ORM_EMBEDDED_COLLECTION_NESTED, OPTION_ORM_EMBEDDED_MAP, OPTION_ORM_EMBEDDED_MAP_NESTED, OPTION_ORM_EMBEDDED_PC, OPTION_ORM_EMBEDDED_PC_NESTED, OPTION_ORM_FOREIGN_KEYS, OPTION_ORM_INHERITANCE_COMPLETE_TABLE, OPTION_ORM_INHERITANCE_JOINED_TABLE, OPTION_ORM_INHERITANCE_SINGLE_TABLE, OPTION_ORM_SECONDARY_TABLE, OPTION_ORM_SERIALISED_ARRAY_ELEMENT, OPTION_ORM_SERIALISED_COLLECTION_ELEMENT, OPTION_ORM_SERIALISED_MAP_KEY, OPTION_ORM_SERIALISED_MAP_VALUE, OPTION_ORM_SERIALISED_PC, OPTION_QUERY_CANCEL, OPTION_QUERY_JDOQL_BITWISE_OPS, OPTION_QUERY_JDOQL_BULK_DELETE, OPTION_QUERY_JDOQL_BULK_INSERT, OPTION_QUERY_JDOQL_BULK_UPDATE, OPTION_QUERY_JPQL_BULK_DELETE, OPTION_QUERY_JPQL_BULK_INSERT, OPTION_QUERY_JPQL_BULK_UPDATE, OPTION_TRANSACTION_ACID, OPTION_TXN_ISOLATION_READ_COMMITTED, OPTION_TXN_ISOLATION_READ_UNCOMMITTED, OPTION_TXN_ISOLATION_REPEATABLE_READ, OPTION_TXN_ISOLATION_SERIALIZABLE, RELATION_IDENTITY_STORAGE_PERSISTABLE_IDENTITY
-
-
Constructor Summary
Constructors Constructor Description FederatedStoreManager(ClassLoaderResolver clr, PersistenceNucleusContext nucleusContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
ApiAdapter
getApiAdapter()
Accessor for the API adapter.Boolean
getBooleanObjectProperty(String name)
boolean
getBooleanProperty(String name)
boolean
getBooleanProperty(String name, boolean resultIfNotSet)
String
getClassNameForObjectID(Object id, ClassLoaderResolver clr, ExecutionContext ec)
Returns the class corresponding to the given object identity.ManagedConnection
getConnection(int isolation_level)
ManagedConnection
getConnection(ExecutionContext ec)
ManagedConnection
getConnection(ExecutionContext ec, Map options)
String
getConnectionDriverName()
Convenience accessor for the driver name to use for the connections (where supported).Object
getConnectionFactory()
Convenience accessor for the primary connection factory (when a factory was provided by the user).Object
getConnectionFactory2()
Convenience accessor for the secondary connection factory (when a factory was provided by the user).String
getConnectionFactory2Name()
Convenience accessor for the factory (JNDI) name for the secondary connection factory (when provided by the user).String
getConnectionFactoryName()
Convenience accessor for the factory (JNDI) name for the primary connection factory (when provided by the user).ConnectionManager
getConnectionManager()
Accessor for the connection manager for this store manager.String
getConnectionPassword()
Convenience accessor for the password to use for the connections (where required).String
getConnectionURL()
Convenience accessor for the URL for the connections.String
getConnectionUserName()
Convenience accessor for the user name to use for the connections (where required).Date
getDatastoreDate()
Get the date/time of the datastore.String
getDefaultObjectProviderClassName()
Extent
getExtent(ExecutionContext ec, Class c, boolean subclasses)
Interface to getting an Extent for a class.FlushProcess
getFlushProcess()
int
getIntProperty(String name)
MetaDataManager
getMetaDataManager()
NamingFactory
getNamingFactory()
String
getNativeQueryLanguage()
Accessor for the native query language of this store.NucleusConnection
getNucleusConnection(ExecutionContext ec)
Method to return a connection to the user for the ExecutionContext.PersistenceNucleusContext
getNucleusContext()
Accessor for the context in which this StoreManager is running.NucleusSequence
getNucleusSequence(ExecutionContext ec, SequenceMetaData seqmd)
Method to return a datastore sequence for this datastore matching the passed sequence MetaData.StorePersistenceHandler
getPersistenceHandler()
Object
getProperty(String name)
String
getQueryCacheKey()
Accessor for the key used for representing this store manager in the query cache.QueryManager
getQueryManager()
StoreSchemaHandler
getSchemaHandler()
StoreData
getStoreDataForClass(String className)
StoreManager
getStoreManagerForClass(String className, ClassLoaderResolver clr)
Accessor for the StoreManager to use for the specified class.StoreManager
getStoreManagerForClass(AbstractClassMetaData cmd)
Accessor for the StoreManager to use for persisting the specified class.String
getStoreManagerKey()
Accessor for the key for this store manager.String
getStringProperty(String name)
Collection<String>
getSubClassesForClass(String className, boolean includeDescendents, ClassLoaderResolver clr)
Utility to return the names of the classes that are known subclasses of the provided class.Collection
getSupportedOptions()
Strings representing features that are supported by this datastore.Collection<String>
getSupportedQueryLanguages()
Accessor for the supported query languages.ValueGenerationManager
getValueGenerationManager()
Accessor for the ValueGenerationManager for generating field values.String
getValueGenerationStrategyForNative(AbstractClassMetaData cmd, int absFieldNumber)
Method defining which value-strategy to use when the user specifies "native"/"auto".Object
getValueGenerationStrategyValue(ExecutionContext ec, AbstractClassMetaData cmd, int absoluteFieldNumber)
Method to retrieve the value for a value generation strategy for a particular field.boolean
hasProperty(String name)
boolean
isJdbcStore()
Returns whether the datastore is a "JDBC datastore".boolean
isValueGenerationStrategyDatastoreAttributed(AbstractClassMetaData cmd, int absFieldNumber)
Convenience method to return whether the value generation strategy used by the specified class/member is generated in the datastore during a persist.void
manageClasses(ClassLoaderResolver clr, String... classNames)
Manage the specified classes.String
manageClassForIdentity(Object id, ClassLoaderResolver clr)
Convenience method to ensure that the class defined by the passed DatastoreId/SingleFieldId is managed by the store.boolean
managesClass(String className)
Accessor for whether the specified class is managed currentlyQuery
newQuery(String language, ExecutionContext ec)
Method to return a new query, for the specified language and ExecutionContext.Query
newQuery(String language, ExecutionContext ec, String queryString)
Method to return a new query, for the specified language and ExecutionContext, using the specified query string.Query
newQuery(String language, ExecutionContext ec, Query q)
Method to return a new query, for the specified language and ExecutionContext, using the specified existing query to copy from.void
printInformation(String category, PrintStream ps)
Method to output particular information owned by this datastore.boolean
supportsQueryLanguage(String language)
Accessor for whether this query language is supported.boolean
supportsValueGenerationStrategy(String language)
Accessor for whether this value generation strategy is supported.void
transactionCommitted(ExecutionContext ec)
Method to inform the StoreManager that a transaction has committed for the specified execution context.void
transactionRolledBack(ExecutionContext ec)
Method to inform the StoreManager that a transaction has rolled back for the specified execution context.void
transactionStarted(ExecutionContext ec)
Method to inform the StoreManager that a transaction has started for the specified execution context.void
unmanageAllClasses(ClassLoaderResolver clr)
Remove all classes from the persistence model for the datastore.void
unmanageClass(ClassLoaderResolver clr, String className, boolean removeFromDatastore)
Method to remove knowledge of the specified class from this StoreManager.boolean
useBackedSCOWrapperForMember(AbstractMemberMetaData mmd, ExecutionContext ec)
Method to return whether the specified member should use a backed SCO wrapper.boolean
usesBackedSCOWrappers()
Whether this store manager uses backing-store based SCO wrappers.
-
-
-
Field Detail
-
PROPERTY_DATA_FEDERATION_DATASTORE_NAME
public static final String PROPERTY_DATA_FEDERATION_DATASTORE_NAME
- See Also:
- Constant Field Values
-
primaryStoreMgr
protected StoreManager primaryStoreMgr
Primary StoreManager.
-
secondaryStoreMgrMap
protected Map<String,StoreManager> secondaryStoreMgrMap
Map of secondary StoreManager keyed by their symbolic name.
-
nucleusContext
protected PersistenceNucleusContext nucleusContext
-
persistenceHandler
protected StorePersistenceHandler persistenceHandler
Persistence handler.
-
queryMgr
protected QueryManager queryMgr
Query Manager. Lazy initialised, so use getQueryManager() to access.
-
-
Constructor Detail
-
FederatedStoreManager
public FederatedStoreManager(ClassLoaderResolver clr, PersistenceNucleusContext nucleusContext)
-
-
Method Detail
-
getNucleusContext
public PersistenceNucleusContext getNucleusContext()
Description copied from interface:StoreManager
Accessor for the context in which this StoreManager is running.- Specified by:
getNucleusContext
in interfaceStoreManager
- Returns:
- Returns the context.
-
getMetaDataManager
public MetaDataManager getMetaDataManager()
- Specified by:
getMetaDataManager
in interfaceStoreManager
-
getFlushProcess
public FlushProcess getFlushProcess()
- Specified by:
getFlushProcess
in interfaceStoreManager
-
close
public void close()
- Specified by:
close
in interfaceStoreManager
-
getStoreManagerForClass
public StoreManager getStoreManagerForClass(AbstractClassMetaData cmd)
Accessor for the StoreManager to use for persisting the specified class. TODO Extend this so that we can persist some objects of one type into one datastore, and other objects of that type into a different datastore.- Parameters:
cmd
- Metadata for the class- Returns:
- The StoreManager to use
-
getStoreManagerForClass
public StoreManager getStoreManagerForClass(String className, ClassLoaderResolver clr)
Accessor for the StoreManager to use for the specified class.- Parameters:
className
- Name of the classclr
- ClassLoader resolver- Returns:
- The StoreManager to use
-
manageClasses
public void manageClasses(ClassLoaderResolver clr, String... classNames)
Description copied from interface:StoreManager
Manage the specified classes. This method is primarily useful for applications that wish to perform all of their datastore initialization up front, rather than wait for the runtime to do it on-demand.- Specified by:
manageClasses
in interfaceStoreManager
- Parameters:
clr
- The ClassLoaderResolverclassNames
- The class(es) to be managed
-
getNamingFactory
public NamingFactory getNamingFactory()
- Specified by:
getNamingFactory
in interfaceStoreManager
-
getApiAdapter
public ApiAdapter getApiAdapter()
Description copied from interface:StoreManager
Accessor for the API adapter.- Specified by:
getApiAdapter
in interfaceStoreManager
- Returns:
- API adapter
-
getClassNameForObjectID
public String getClassNameForObjectID(Object id, ClassLoaderResolver clr, ExecutionContext ec)
Description copied from interface:StoreManager
Returns the class corresponding to the given object identity. If the object is datastore-identity, return the PC class specified in the identity. If the object is single-field identity, return the PC class specified in the identity If the object is an AppID PK, return the PC class that uses it. If the object is a SCOID, return the SCO class. If the object is a persistable class, return the class.- Specified by:
getClassNameForObjectID
in interfaceStoreManager
- Parameters:
id
- The identity of some object.clr
- ClassLoader resolverec
- execution context- Returns:
- For datastore identity, return the class of the corresponding object. For application identity, return the class of the corresponding object or null if object does not exist.
-
getDatastoreDate
public Date getDatastoreDate()
Description copied from interface:StoreManager
Get the date/time of the datastore.- Specified by:
getDatastoreDate
in interfaceStoreManager
- Returns:
- Date/time of the datastore
-
getExtent
public Extent getExtent(ExecutionContext ec, Class c, boolean subclasses)
Description copied from interface:StoreManager
Interface to getting an Extent for a class.- Specified by:
getExtent
in interfaceStoreManager
- Parameters:
ec
- execution contextc
- The class requiring the Extentsubclasses
- Whether to include subclasses of 'c'- Returns:
- The Extent.
-
isJdbcStore
public boolean isJdbcStore()
Description copied from interface:StoreManager
Returns whether the datastore is a "JDBC datastore". If it is then the JDO spec needs to return a connection that implements java.sql.Connection. RDBMS is the only one that will return true from here (or certainly as we can foresee now).- Specified by:
isJdbcStore
in interfaceStoreManager
- Returns:
- Whether this is a JDBC datastore
-
getNucleusConnection
public NucleusConnection getNucleusConnection(ExecutionContext ec)
Description copied from interface:StoreManager
Method to return a connection to the user for the ExecutionContext. Typically provides a wrapper to the currently in-use ManagedConnection.- Specified by:
getNucleusConnection
in interfaceStoreManager
- Parameters:
ec
- execution context- Returns:
- The datastore Connection
-
getNucleusSequence
public NucleusSequence getNucleusSequence(ExecutionContext ec, SequenceMetaData seqmd)
Description copied from interface:StoreManager
Method to return a datastore sequence for this datastore matching the passed sequence MetaData.- Specified by:
getNucleusSequence
in interfaceStoreManager
- Parameters:
ec
- execution contextseqmd
- SequenceMetaData- Returns:
- The Sequence
-
getSchemaHandler
public StoreSchemaHandler getSchemaHandler()
- Specified by:
getSchemaHandler
in interfaceStoreManager
-
getStoreDataForClass
public StoreData getStoreDataForClass(String className)
- Specified by:
getStoreDataForClass
in interfaceStoreManager
-
getPersistenceHandler
public StorePersistenceHandler getPersistenceHandler()
- Specified by:
getPersistenceHandler
in interfaceStoreManager
-
getQueryManager
public QueryManager getQueryManager()
- Specified by:
getQueryManager
in interfaceStoreManager
-
getSupportedQueryLanguages
public Collection<String> getSupportedQueryLanguages()
Description copied from interface:StoreManager
Accessor for the supported query languages.- Specified by:
getSupportedQueryLanguages
in interfaceStoreManager
- Returns:
- The supported query languages
-
newQuery
public Query newQuery(String language, ExecutionContext ec)
Description copied from interface:StoreManager
Method to return a new query, for the specified language and ExecutionContext.- Specified by:
newQuery
in interfaceStoreManager
- Parameters:
language
- The query languageec
- ExecutionContext- Returns:
- The query
-
newQuery
public Query newQuery(String language, ExecutionContext ec, String queryString)
Description copied from interface:StoreManager
Method to return a new query, for the specified language and ExecutionContext, using the specified query string.- Specified by:
newQuery
in interfaceStoreManager
- Parameters:
language
- The query languageec
- ExecutionContextqueryString
- The query string- Returns:
- The query
-
newQuery
public Query newQuery(String language, ExecutionContext ec, Query q)
Description copied from interface:StoreManager
Method to return a new query, for the specified language and ExecutionContext, using the specified existing query to copy from.- Specified by:
newQuery
in interfaceStoreManager
- Parameters:
language
- The query languageec
- ExecutionContextq
- Existing query- Returns:
- The query
-
getValueGenerationManager
public ValueGenerationManager getValueGenerationManager()
Description copied from interface:StoreManager
Accessor for the ValueGenerationManager for generating field values.- Specified by:
getValueGenerationManager
in interfaceStoreManager
- Returns:
- The ValueGenerationManager for this datastore
-
getStoreManagerKey
public String getStoreManagerKey()
Description copied from interface:StoreManager
Accessor for the key for this store manager.- Specified by:
getStoreManagerKey
in interfaceStoreManager
- Returns:
- StoreManager key
-
getQueryCacheKey
public String getQueryCacheKey()
Description copied from interface:StoreManager
Accessor for the key used for representing this store manager in the query cache.- Specified by:
getQueryCacheKey
in interfaceStoreManager
- Returns:
- Key for the query cache
-
getValueGenerationStrategyValue
public Object getValueGenerationStrategyValue(ExecutionContext ec, AbstractClassMetaData cmd, int absoluteFieldNumber)
Description copied from interface:StoreManager
Method to retrieve the value for a value generation strategy for a particular field.- Specified by:
getValueGenerationStrategyValue
in interfaceStoreManager
- Parameters:
ec
- execution contextcmd
- AbstractClassMetaData for the classabsoluteFieldNumber
- The field number- Returns:
- The generated value
-
isValueGenerationStrategyDatastoreAttributed
public boolean isValueGenerationStrategyDatastoreAttributed(AbstractClassMetaData cmd, int absFieldNumber)
Description copied from interface:StoreManager
Convenience method to return whether the value generation strategy used by the specified class/member is generated in the datastore during a persist.- Specified by:
isValueGenerationStrategyDatastoreAttributed
in interfaceStoreManager
- Parameters:
cmd
- Metadata for the classabsFieldNumber
- number of the field (or -1 if for datastore-id)- Returns:
- if the object for the value generation strategy is attributed by the database ("identity", etc)
-
getValueGenerationStrategyForNative
public String getValueGenerationStrategyForNative(AbstractClassMetaData cmd, int absFieldNumber)
Description copied from interface:StoreManager
Method defining which value-strategy to use when the user specifies "native"/"auto".- Specified by:
getValueGenerationStrategyForNative
in interfaceStoreManager
- Parameters:
cmd
- Class requiring the strategyabsFieldNumber
- Field of the class- Returns:
- The value generation strategy used when "native"/"auto" is specified
-
getSubClassesForClass
public Collection<String> getSubClassesForClass(String className, boolean includeDescendents, ClassLoaderResolver clr)
Description copied from interface:StoreManager
Utility to return the names of the classes that are known subclasses of the provided class. Actually uses the MetaDataManager for determining what is a subclass since the MetaData is often registered before being needed by the Store. The important difference is that this method will then register the subclass as required- Specified by:
getSubClassesForClass
in interfaceStoreManager
- Parameters:
className
- Class for which we search for subclasses.includeDescendents
- Whether to include subclasses of subclasses etcclr
- The ClassLoaderResolver- Returns:
- Set of classes that are subclasses of the input class.
-
manageClassForIdentity
public String manageClassForIdentity(Object id, ClassLoaderResolver clr)
Description copied from interface:StoreManager
Convenience method to ensure that the class defined by the passed DatastoreId/SingleFieldId is managed by the store.- Specified by:
manageClassForIdentity
in interfaceStoreManager
- Parameters:
id
- identityclr
- ClassLoader resolver- Returns:
- The class name of the class associated to this identity
-
managesClass
public boolean managesClass(String className)
Description copied from interface:StoreManager
Accessor for whether the specified class is managed currently- Specified by:
managesClass
in interfaceStoreManager
- Parameters:
className
- The name of the class- Returns:
- Whether it is managed
-
printInformation
public void printInformation(String category, PrintStream ps) throws Exception
Description copied from interface:StoreManager
Method to output particular information owned by this datastore. Each StoreManager can support whichever categories it likes.- Specified by:
printInformation
in interfaceStoreManager
- Parameters:
category
- Category of informationps
- PrintStream- Throws:
Exception
- Thrown if an error occurs in the output process
-
unmanageAllClasses
public void unmanageAllClasses(ClassLoaderResolver clr)
Description copied from interface:StoreManager
Remove all classes from the persistence model for the datastore. This empties the datastore of all datastore objects managed by us. All objects of types not managed are left untouched. In the case of RDBMS this means drop all tables for types managed by us.- Specified by:
unmanageAllClasses
in interfaceStoreManager
- Parameters:
clr
- The ClassLoaderResolver
-
unmanageClass
public void unmanageClass(ClassLoaderResolver clr, String className, boolean removeFromDatastore)
Description copied from interface:StoreManager
Method to remove knowledge of the specified class from this StoreManager. This can optionally also remove it from the datastore.- Specified by:
unmanageClass
in interfaceStoreManager
- Parameters:
clr
- ClassLoader resolverclassName
- Name of the classremoveFromDatastore
- Whether to also remove it from the datastore (otherwise just from the StoreManager)
-
supportsQueryLanguage
public boolean supportsQueryLanguage(String language)
Description copied from interface:StoreManager
Accessor for whether this query language is supported.- Specified by:
supportsQueryLanguage
in interfaceStoreManager
- Parameters:
language
- The language- Returns:
- Whether it is supported.
-
getNativeQueryLanguage
public String getNativeQueryLanguage()
Description copied from interface:StoreManager
Accessor for the native query language of this store.- Specified by:
getNativeQueryLanguage
in interfaceStoreManager
- Returns:
- The native query language (e.g "SQL")
-
supportsValueGenerationStrategy
public boolean supportsValueGenerationStrategy(String language)
Description copied from interface:StoreManager
Accessor for whether this value generation strategy is supported.- Specified by:
supportsValueGenerationStrategy
in interfaceStoreManager
- Parameters:
language
- The value generation strategy- Returns:
- Whether it is supported.
-
getSupportedOptions
public Collection getSupportedOptions()
Description copied from interface:StoreManager
Strings representing features that are supported by this datastore. Refer to the Strings in org.datanucleus.store.StoreManager with prefix "OPTION_".- Specified by:
getSupportedOptions
in interfaceStoreManager
- Returns:
- The supported options
-
getConnectionManager
public ConnectionManager getConnectionManager()
Description copied from interface:StoreManager
Accessor for the connection manager for this store manager.- Specified by:
getConnectionManager
in interfaceStoreManager
- Returns:
- connection manager
-
getConnection
public ManagedConnection getConnection(ExecutionContext ec)
-
getConnection
public ManagedConnection getConnection(ExecutionContext ec, Map options)
-
getConnection
public ManagedConnection getConnection(int isolation_level)
-
getConnectionDriverName
public String getConnectionDriverName()
Description copied from interface:StoreManager
Convenience accessor for the driver name to use for the connections (where supported).- Specified by:
getConnectionDriverName
in interfaceStoreManager
- Returns:
- driver name
-
getConnectionURL
public String getConnectionURL()
Description copied from interface:StoreManager
Convenience accessor for the URL for the connections.- Specified by:
getConnectionURL
in interfaceStoreManager
- Returns:
- connection URL
-
getConnectionUserName
public String getConnectionUserName()
Description copied from interface:StoreManager
Convenience accessor for the user name to use for the connections (where required).- Specified by:
getConnectionUserName
in interfaceStoreManager
- Returns:
- user name
-
getConnectionPassword
public String getConnectionPassword()
Description copied from interface:StoreManager
Convenience accessor for the password to use for the connections (where required).- Specified by:
getConnectionPassword
in interfaceStoreManager
- Returns:
- Password
-
getConnectionFactory
public Object getConnectionFactory()
Description copied from interface:StoreManager
Convenience accessor for the primary connection factory (when a factory was provided by the user).- Specified by:
getConnectionFactory
in interfaceStoreManager
- Returns:
- Connection Factory (primary)
-
getConnectionFactory2
public Object getConnectionFactory2()
Description copied from interface:StoreManager
Convenience accessor for the secondary connection factory (when a factory was provided by the user).- Specified by:
getConnectionFactory2
in interfaceStoreManager
- Returns:
- Connection Factory (secondary)
-
getConnectionFactory2Name
public String getConnectionFactory2Name()
Description copied from interface:StoreManager
Convenience accessor for the factory (JNDI) name for the secondary connection factory (when provided by the user).- Specified by:
getConnectionFactory2Name
in interfaceStoreManager
- Returns:
- Connection Factory name (secondary)
-
getConnectionFactoryName
public String getConnectionFactoryName()
Description copied from interface:StoreManager
Convenience accessor for the factory (JNDI) name for the primary connection factory (when provided by the user).- Specified by:
getConnectionFactoryName
in interfaceStoreManager
- Returns:
- Connection Factory name (primary)
-
getProperty
public Object getProperty(String name)
- Specified by:
getProperty
in interfaceStoreManager
-
hasProperty
public boolean hasProperty(String name)
- Specified by:
hasProperty
in interfaceStoreManager
-
getIntProperty
public int getIntProperty(String name)
- Specified by:
getIntProperty
in interfaceStoreManager
-
getBooleanProperty
public boolean getBooleanProperty(String name)
- Specified by:
getBooleanProperty
in interfaceStoreManager
-
getBooleanProperty
public boolean getBooleanProperty(String name, boolean resultIfNotSet)
- Specified by:
getBooleanProperty
in interfaceStoreManager
-
getBooleanObjectProperty
public Boolean getBooleanObjectProperty(String name)
- Specified by:
getBooleanObjectProperty
in interfaceStoreManager
-
getStringProperty
public String getStringProperty(String name)
- Specified by:
getStringProperty
in interfaceStoreManager
-
transactionStarted
public void transactionStarted(ExecutionContext ec)
Description copied from interface:StoreManager
Method to inform the StoreManager that a transaction has started for the specified execution context. This allows the StoreManager to initialise any objects as required.- Specified by:
transactionStarted
in interfaceStoreManager
- Parameters:
ec
- ExecutionContext
-
transactionCommitted
public void transactionCommitted(ExecutionContext ec)
Description copied from interface:StoreManager
Method to inform the StoreManager that a transaction has committed for the specified execution context. This allows the StoreManager to close any objects as required.- Specified by:
transactionCommitted
in interfaceStoreManager
- Parameters:
ec
- ExecutionContext
-
transactionRolledBack
public void transactionRolledBack(ExecutionContext ec)
Description copied from interface:StoreManager
Method to inform the StoreManager that a transaction has rolled back for the specified execution context. This allows the StoreManager to close any objects as required.- Specified by:
transactionRolledBack
in interfaceStoreManager
- Parameters:
ec
- ExecutionContext
-
useBackedSCOWrapperForMember
public boolean useBackedSCOWrapperForMember(AbstractMemberMetaData mmd, ExecutionContext ec)
Description copied from interface:StoreManager
Method to return whether the specified member should use a backed SCO wrapper.- Specified by:
useBackedSCOWrapperForMember
in interfaceStoreManager
- Parameters:
mmd
- Metadata for the memberec
- ExecutionContext- Returns:
- Whether to use a back SCO wrapper (false means use a simple SCO wrapper).
-
usesBackedSCOWrappers
public boolean usesBackedSCOWrappers()
Description copied from interface:StoreManager
Whether this store manager uses backing-store based SCO wrappers.- Specified by:
usesBackedSCOWrappers
in interfaceStoreManager
- Returns:
- Whether this store provides backing stores for SCO wrappers.
-
getDefaultObjectProviderClassName
public String getDefaultObjectProviderClassName()
- Specified by:
getDefaultObjectProviderClassName
in interfaceStoreManager
-
-