FileDocCategorySizeDatePackage
SQLPersistenceManagerFactory.javaAPI DocGlassfish v2 API36102Fri May 04 22:35:06 BST 2007com.sun.jdo.spi.persistence.support.sqlstore.impl

SQLPersistenceManagerFactory

public class SQLPersistenceManagerFactory extends Object implements com.sun.jdo.spi.persistence.support.sqlstore.PersistenceManagerFactory
author
Marina Vatkina
version
0.1

Fields Summary
private com.sun.jdo.spi.persistence.support.sqlstore.PersistenceStore
_store
private ConnectionFactory
_connectionFactory
private Object
_dataSource
private PersistenceManagerFactory
_persistenceManagerFactory
private boolean
optimistic
PersistenceManager and Transaction default flags
private boolean
retainValues
private boolean
nontransactionalRead
private boolean
ignoreCache
private int
queryTimeout
sql Statement timeouts
private int
updateTimeout
private int
minPool
Pooling size
private int
maxPool
private static com.sun.jdo.spi.persistence.utility.logging.Logger
logger
The logger
private static final ResourceBundle
messages
I18N message handler
private static int
pmCacheBucketSize
bucket size for Transactional cache of PersistenceManager instances
private static int
pmCacheInitialCapacity
initial capacity for Transactional cache of PersistenceManager instances
private Map
pmCache
Transactional cache of PersistenceManager instances
private com.sun.jdo.spi.persistence.support.sqlstore.VersionConsistencyCache
vcCache
Cache of StateManager instances that support version consistency
Constructors Summary
public SQLPersistenceManagerFactory()
Creates new SQLPersistenceManagerFactory without any user info


                
      

    
public SQLPersistenceManagerFactory(Object connectionFactory)
Creates new SQLPersistenceManagerFactory with user info

param
connectionFactory Connection Factory as java.lang.Object

        if (connectionFactory instanceof ConnectionFactory)
            _connectionFactory = (ConnectionFactory) connectionFactory;
        else
            _dataSource = connectionFactory;

        if (this instanceof PersistenceManagerFactory)
            _persistenceManagerFactory = this;

        initialize();
    
public SQLPersistenceManagerFactory(PersistenceManagerFactory persistenceManagerFactory)
Creates new SQLPersistenceManagerFactory with user parameters

param
persistenceManagerFactory PersistenceManagerFactory instance

        _persistenceManagerFactory = persistenceManagerFactory;
        Object cf = _persistenceManagerFactory.getConnectionFactory();

        if (cf instanceof ConnectionFactory)
            _connectionFactory = (ConnectionFactory) cf;
        else
            _dataSource = cf;

        initialize();
    
Methods Summary
public booleanequals(java.lang.Object obj)
Determines whether obj is a SQLPersistenceManagerFactory with the same configuration

param
obj The possibly null object to check.
return
true if obj is equal to this SQLPersistenceManagerFactory; false otherwise.

        if ((obj != null) && (obj instanceof SQLPersistenceManagerFactory)) {
            SQLPersistenceManagerFactory pmf = (SQLPersistenceManagerFactory) obj;
            return (pmf._persistenceManagerFactory.equals(this._persistenceManagerFactory));

        }
        return false;
    
private java.sql.ConnectiongetConnection(java.lang.String username, java.lang.String password)
Get Database connection for username and password.

        Connection conn = null;

        if (_connectionFactory != null) {
            conn = _connectionFactory.getConnection();
        } else if (EJBHelper.isManaged()) {
            conn = EJBHelper.getConnection(_dataSource, username, password);
        } else {
            if (username == null) {
                conn = ((DataSource)_dataSource).getConnection();
            } else {
                conn = ((DataSource)_dataSource).getConnection(username, password);
            }
        }

        return conn;            
    
public java.lang.StringgetConnectionDriverName()
Returns JDBC driver name

return
driver name

        return _persistenceManagerFactory.getConnectionDriverName();

    
public java.lang.ObjectgetConnectionFactory()
Returns ConnectionFactory

return
Connection Factory as java.lang.Object

        if (_dataSource != null)
            return _dataSource;

        return _connectionFactory;
    
public java.lang.StringgetConnectionFactoryName()
Returns ConnectionFactory name

return
ConnectionFactoryName

        return _persistenceManagerFactory.getConnectionFactoryName();
    
public java.io.PrintWritergetConnectionLogWriter()
Returns the LogWriter to which messages should be sent

return
LogWriter

        return _persistenceManagerFactory.getConnectionLogWriter();
    
public intgetConnectionLoginTimeout()
Returns the number of seconds to wait for a new connection to be established to the data source

return
wait time in seconds

        return _persistenceManagerFactory.getConnectionLoginTimeout();
    
public intgetConnectionMaxPool()
Returns maximum number of connections in the connection pool

return
connectionMaxPool

        return _persistenceManagerFactory.getConnectionMaxPool();
    
public intgetConnectionMinPool()
Returns minimum number of connections in the connection pool

return
connectionMinPool

        return _persistenceManagerFactory.getConnectionMinPool();
    
public intgetConnectionMsInterval()
Returns the amount of time, in milliseconds, between the connection manager's attempts to get a pooled connection.

return
the length of the interval between tries in milliseconds

        return _persistenceManagerFactory.getConnectionMsInterval();
    
public intgetConnectionMsWait()
Returns the number of milliseconds to wait for an available connection from the connection pool before throwing an exception

return
number in milliseconds

        return _persistenceManagerFactory.getConnectionMsWait();
    
public intgetConnectionTransactionIsolation()
Returns current transaction isolation level for connections of this PersistenceManagerFactory.

return
the current transaction isolation mode value as java.sql.Connection.TRANSACTION_*

        return _persistenceManagerFactory.getConnectionTransactionIsolation();
    
public java.lang.StringgetConnectionURL()
Returns connection URL

return
connection URL

        return _persistenceManagerFactory.getConnectionURL();

    
public java.lang.StringgetConnectionUserName()
Returns database user name

return
current database user name

        return _persistenceManagerFactory.getConnectionUserName();
    
private PersistenceManagerImplgetFromPool(javax.transaction.Transaction tx, java.lang.String username, java.lang.String password)
Returns an instance of PersistenceManagerImpl from available pool or creates a new one


        boolean debug = logger.isLoggable(Logger.FINEST);
        if (debug) {
            logger.finest("sqlstore.sqlpersistencemgrfactory.getfrompool"); // NOI18N
        }

        synchronized (this) {
            if (_store == null) {
                initializeSQLStoreManager(username, password);
            }
        }

        // create new PersistenceManager object and set its atributes
        PersistenceManagerImpl pm = new PersistenceManagerImpl(this, tx, username, password);
        pm.setStore(_store);
        if (debug) {
            Object[] items = new Object[] {pm,tx};
            logger.finest("sqlstore.sqlpersistencemgrfactory.getfrompool.pmt",items); // NOI18N
        }

        return pm;

    
public java.lang.StringgetIdentifier()
Gets Identifier.

return
identifier

        return _persistenceManagerFactory.getIdentifier();
    
public booleangetIgnoreCache()
Returns the boolean value for the flag that allows the user to request that queries be optimized to return approximate results by ignoring changed values in the cache.

return
boolean setting for the flag

        return _persistenceManagerFactory.getIgnoreCache();
    
public intgetMaxPool()
Returns maximum number of PersistenceManager instances in the pool

return
maxPool

        return maxPool;
    
public intgetMinPool()
Returns minimum number of PersistenceManager instances in the pool

return
minPool

        return minPool;
    
public booleangetNontransactionalRead()
Returns the boolean value for the flag that allows non-transactional instances to be managed in the cache.

return
boolean setting for the flag

        return _persistenceManagerFactory.getNontransactionalRead();
    
public booleangetOptimistic()
Returns the boolean value of the optimistic flag for all PersistenceManagers

return
boolean optimistic flag

        return _persistenceManagerFactory.getOptimistic();
    
public PersistenceManagergetPersistenceManager()
Creates new PersistenceManager without specific info.

return
the persistence manager
exception
JDOUserException if data source info is not set

        return getPersistenceManager(null, null);
    
public PersistenceManagergetPersistenceManager(java.lang.String username, java.lang.String password)
Creates new PersistenceManager with specific username and password. Used to call ConnectionFactory.getConnection(String, String)

param
username datasource user
param
password datasource user password
return
the persistence manager
exception
JDOUserException if data source info is not set

        boolean debug = logger.isLoggable(Logger.FINEST);

        if (_connectionFactory == null && _dataSource == null) {
            throw new JDOUserException(I18NHelper.getMessage(messages,
                    "jdo.persistencemanagerfactoryimpl.getpersistencemanager.notconfigured"));// NOI18N
        }

        if (debug) {
             logger.finest("sqlstore.sqlpersistencemgrfactory.getpersistencemgr",Thread.currentThread()); // NOI18N
        }

        // Check if we are in managed environment and PersistenceManager is cached
        PersistenceManagerImpl pm = null;
        javax.transaction.Transaction t = EJBHelper.getTransaction();

        if (t != null) {
            if (debug) {
                Object[] items = new Object[] {Thread.currentThread(),t};
                logger.finest("sqlstore.sqlpersistencemgrfactory.getpersistencemgr.found",items); // NOI18N
            }

            pm = (PersistenceManagerImpl) pmCache.get(t);
            if (pm == null) {
                // Not found
                pm = getFromPool(t, username, password);
                pmCache.put(t, pm);
            } else if(pm.isClosed()) {
                if (debug) {
                     Object[] items = new Object[] {Thread.currentThread(),t};
                     logger.finest("sqlstore.sqlpersistencemgrfactory.getpersistencemgr.pmclosedfor",items); // NOI18N
                }
                throw new JDOFatalInternalException(I18NHelper.getMessage(messages,
                        "jdo.persistencemanagerfactoryimpl.getpersistencemanager.closed", // NOI18N
                        t));
            }

            // We know we are in the managed environment and
            // JTA transaction is  active. We need to start
            // JDO Transaction internally if it is not active.

            com.sun.jdo.spi.persistence.support.sqlstore.Transaction tx =
                    (com.sun.jdo.spi.persistence.support.sqlstore.Transaction) pm.currentTransaction();
            if (debug) {
                logger.finest("sqlstore.sqlpersistencemgrfactory.getpersistencemgr.jdotx",tx); // NOI18N
            }

            if (!tx.isActive()) {
                tx.begin(t);
            }

            if (!(pm.verify(username, password))) {
                ;
                throw new JDOUserException(I18NHelper.getMessage(messages,
                        "jdo.persistencemanagerfactoryimpl.getpersistencemanager.error")); // NOI18N
            }
        } else {
            if (debug) {
                logger.finest("sqlstore.sqlpersistencemgrfactory.getpersistencemgr.jdotx.notfound"); // NOI18N
            }
            // We don't know if we are in the managed environment or not
            // If Yes, it is BMT with JDO Transaction and it will register
            // itself at the begin().
            pm = getFromPool(null, username, password);
        }

        if (debug) {
            Object[] items = new Object[] {Thread.currentThread(),pm,t};
            logger.finest("sqlstore.sqlpersistencemgrfactory.getpersistencemgr.pmt",items); // NOI18N
        }

        // Always return a wrapper
        return new PersistenceManagerWrapper(pm);

    
public PersistenceManagerFactorygetPersistenceManagerFactory()
Returns instance of PersistenceManagerFactory

        return _persistenceManagerFactory;
    
public java.util.PropertiesgetProperties()
Returns non-operational properties to be available to the application via a Properties instance.

return
Properties object

        return _persistenceManagerFactory.getProperties();
    
public intgetQueryTimeout()
Gets the number of seconds to wait for a query statement to execute in the datastore associated with this PersistenceManagerFactory.

return
timout value in seconds; zero means unlimited

        return _persistenceManagerFactory.getQueryTimeout();
    
public booleangetRequireCopyObjectId()
Returns the default value of the requireCopyObjectId flag. If set to false, PersistenceManagers will not create a copy of an ObjectId for PersistenceManager.getObjectId(Object pc) and PersistenceManager.getObjectById(Object oid) requests.

see
PersistenceManager#getObjectId(Object pc)
see
PersistenceManager#getObjectById(Object oid)
return
boolean requireCopyObjectId flag

         return _persistenceManagerFactory.getRequireCopyObjectId();
     
public booleangetRequireTrackedSCO()
Returns the boolean value of the requireTrackedSCO flag for this PersistenceManagerFactory. If set to false, by default the PersistenceManager will not create tracked SCO instances for new persistent instances at commit with retainValues set to true and while retrieving data from a datastore.

return
boolean requireTrackedSCO flag

        return _persistenceManagerFactory.getRequireTrackedSCO();
    
public booleangetRetainValues()
Returns the boolean value for the flag that will not cause the eviction of persistent instances after transaction completion.

return
boolean setting for the flag

        return _persistenceManagerFactory.getRetainValues();
    
public booleangetSupersedeDeletedInstance()
Returns the boolean value of the supersedeDeletedInstance flag for all PersistenceManagers. If set to true, deleted instances are allowed to be replaced with persistent-new instances with the equal Object Id.

return
boolean supersedeDeletedInstance flag

        return _persistenceManagerFactory.getSupersedeDeletedInstance();
    
public intgetUpdateTimeout()
Gets the number of seconds to wait for an update statement to execute in the datastore associated with this PersistenceManagerFactory.

return
timout value in seconds; zero means unlimited

        return _persistenceManagerFactory.getUpdateTimeout();
    
public com.sun.jdo.spi.persistence.support.sqlstore.VersionConsistencyCachegetVersionConsistencyCache()
Creates if necessary, and returns, this PMF's instance of its VersionConsistencyCache.

return
This PMF's VersionConsistencyCache.

        if (null == vcCache) {
            if (_store == null) {
                // Store should be configured already.
                throw new JDOFatalInternalException(I18NHelper.getMessage(messages,
                        "jdo.persistencemanagerfactoryimpl.getversionconsistencycache.nullstore")); // NOI18N
            }
            vcCache = VersionConsistencyCacheImpl.create();
            _store.getConfigCache().setVersionConsistencyCache(vcCache);
        }
        return vcCache;
    
public inthashCode()
Computes the hash code of this PersistenceManagerFactory.

return
A hash code of the owning PersistenceManagerFactory as an int.

        return this._persistenceManagerFactory.hashCode();
    
private voidinitialize()


        logger.finest("sqlstore.sqlpersistencemgrfactory.init"); // NOI18N
        optimistic = _persistenceManagerFactory.getOptimistic();
        retainValues = _persistenceManagerFactory.getRetainValues();
        nontransactionalRead = _persistenceManagerFactory.getNontransactionalRead();
        ignoreCache = _persistenceManagerFactory.getIgnoreCache();
        queryTimeout = _persistenceManagerFactory.getQueryTimeout();
        updateTimeout = _persistenceManagerFactory.getUpdateTimeout();
        minPool = _persistenceManagerFactory.getMinPool();
        maxPool = _persistenceManagerFactory.getMaxPool();
    
private voidinitializeSQLStoreManager(java.lang.String username, java.lang.String password)

        Connection conn = null;
        try { 
             conn = getConnection(username, password);
            if (conn != null) {
                _store = new SQLStoreManager(conn.getMetaData(),
                            getIdentifier() );
            }
        } catch(Exception e) {
            if (logger.isLoggable(Logger.WARNING)) {
                logger.log(Logger.WARNING, "jdo.sqlpersistencemanagerfactory.errorgettingDatabaseInfo", e); //NOI18N
            }

            if (e instanceof JDOException) {
                throw (JDOException) e;
            } else {
                throw new JDOFatalInternalException(I18NHelper.getMessage(messages,
                        "core.configuration.getvendortypefailed"), e); // NOI18N
            }
        } finally {
            if (conn != null) {
                try {
                    conn.close();
                } catch(Exception ex) {}
            }
        }
        
    
public voidregisterPersistenceManager(com.sun.jdo.spi.persistence.support.sqlstore.PersistenceManager pm, javax.transaction.Transaction t)
Registers PersistenceManager in the transactional cache in managed environment in case of BMT with JDO Transaction. There is no javax.transaction.Transaction available before the user starts the transaction.


        boolean debug = logger.isLoggable(Logger.FINEST);
        if (debug) {
            Object[] items = new Object[] {pm,t};
            logger.finest("sqlstore.sqlpersistencemgrfactory.registerpersistencemgr.pmt",items); // NOI18N
        }
        PersistenceManager pm1 = (PersistenceManager) pmCache.get(t);
        // double-check locking has been removed
        if (pm1 == null) {
            pmCache.put(t, pm);
            ((PersistenceManagerImpl) pm).setJTATransaction(t);
            return;
        }

        if (pm1 != pm) {
            Object[] items = new Object[] {t, pm1};
            throw new JDOFatalInternalException(I18NHelper.getMessage(messages,
                    "jdo.persistencemanagerfactoryimpl.registerpm.registered", // NOI18N
                    items));
        } else {
            // do nothing ???
        }
    
public voidreleasePersistenceManager(com.sun.jdo.spi.persistence.support.sqlstore.PersistenceManager pm, javax.transaction.Transaction t)
Releases closed PersistenceManager that is not in use



        boolean debug = logger.isLoggable(Logger.FINEST);
        if (debug) {
            Object[] items = new Object[] {pm,t};
            logger.finest("sqlstore.sqlpersistencemgrfactory.releasepm.pmt",items); // NOI18N
            
        }

        if (t != null) {
            // Managed environment
            // Deregister only
            PersistenceManager pm1 = (PersistenceManager) pmCache.get(t);
            if (pm1 == null || pm1 != pm) {
                Object[] items = new Object[] {t, pm1};
                throw new JDOFatalInternalException(I18NHelper.getMessage(messages,
                        "jdo.persistencemanagerfactoryimpl.registerpm.registered", // NOI18N
                        items));
            } else {
                pmCache.remove(t);
            }
        } else {
            returnToPool(pm);
        }
    
private voidreturnToPool(PersistenceManager pm)
Returns unused PersistenceManager to the free pool

        // do nothing for now
        logger.finest("sqlstore.sqlpersistencemgrfactory.returnToPool"); // NOI18N
    
public voidsetConnectionDriverName(java.lang.String driverName)
Sets JDBC driver name

param
driver name

        throw new JDOUnsupportedOptionException(I18NHelper.getMessage(messages,
                "jdo.persistencemanagerfactoryimpl.notsupported")); //NOI18N
    
public voidsetConnectionFactory(java.lang.Object cf)
Sets ConnectionFactory

param
ConnectionFactory as java.lang.Object

        throw new JDOUnsupportedOptionException(I18NHelper.getMessage(messages,
                "jdo.persistencemanagerfactoryimpl.notsupported")); //NOI18N
    
public voidsetConnectionFactoryName(java.lang.String connectionFactoryName)
Sets ConnectionFactory name

param
connectionFactoryName ConnectionFactory name

        throw new JDOUnsupportedOptionException(I18NHelper.getMessage(messages,
                "jdo.persistencemanagerfactoryimpl.notsupported")); //NOI18N
    
public voidsetConnectionLogWriter(java.io.PrintWriter pw)
Sets the LogWriter to which messages should be sent

param
pw LogWriter

        throw new JDOUnsupportedOptionException(I18NHelper.getMessage(messages,
                "jdo.persistencemanagerfactoryimpl.notsupported")); //NOI18N
    
public voidsetConnectionLoginTimeout(int LoginTimeout)
Sets the number of seconds to wait for a new connection to be established to the data source

param
LoginTimeout wait time in seconds

        throw new JDOUnsupportedOptionException(I18NHelper.getMessage(messages,
                "jdo.persistencemanagerfactoryimpl.notsupported")); //NOI18N
    
public voidsetConnectionMaxPool(int MaxPool)
Sets maximum number of connections in the connection pool

param
MaxPool maximum number of connections

        throw new JDOUnsupportedOptionException(I18NHelper.getMessage(messages,
                "jdo.persistencemanagerfactoryimpl.notsupported")); //NOI18N
    
public voidsetConnectionMinPool(int MinPool)
Sets minimum number of connections in the connection pool

param
MinPool minimum number of connections

        throw new JDOUnsupportedOptionException(I18NHelper.getMessage(messages,
                "jdo.persistencemanagerfactoryimpl.notsupported")); //NOI18N
    
public voidsetConnectionMsInterval(int MsInterval)
Sets the amount of time, in milliseconds, between the connection manager's attempts to get a pooled connection.

param
MsInterval the interval between attempts to get a database connection, in milliseconds.

        throw new JDOUnsupportedOptionException(I18NHelper.getMessage(messages,
                "jdo.persistencemanagerfactoryimpl.notsupported")); //NOI18N
    
public voidsetConnectionMsWait(int MsWait)
Sets the number of milliseconds to wait for an available connection from the connection pool before throwing an exception

param
MsWait number in milliseconds

        throw new JDOUnsupportedOptionException(I18NHelper.getMessage(messages,
                "jdo.persistencemanagerfactoryimpl.notsupported")); //NOI18N
    
public voidsetConnectionPassword(java.lang.String password)
Sets database user password

param
database user password

        throw new JDOUnsupportedOptionException(I18NHelper.getMessage(messages,
                "jdo.persistencemanagerfactoryimpl.notsupported")); //NOI18N
    
public voidsetConnectionTransactionIsolation(int level)
Sets transaction isolation level for all connections of this PersistenceManagerFactory. All validation is done by java.sql.Connection itself, so e.g. while Oracle will not allow to set solation level to TRANSACTION_REPEATABLE_READ, this method does not have any explicit restrictions

param
level - one of the java.sql.Connection.TRANSACTION_* isolation values

        throw new JDOUnsupportedOptionException(I18NHelper.getMessage(messages,
                "jdo.persistencemanagerfactoryimpl.notsupported")); //NOI18N
    
public voidsetConnectionURL(java.lang.String url)
Sets connection URL

param
connection URL

        throw new JDOUnsupportedOptionException(I18NHelper.getMessage(messages,
                "jdo.persistencemanagerfactoryimpl.notsupported")); //NOI18N
    
public voidsetConnectionUserName(java.lang.String userName)
Sets database user name

param
database user name

        throw new JDOUnsupportedOptionException(I18NHelper.getMessage(messages,
                "jdo.persistencemanagerfactoryimpl.notsupported")); //NOI18N
    
public voidsetIdentifier(java.lang.String identifier)
Sets Identifier.

param
identifier

		throw new JDOUnsupportedOptionException(I18NHelper.getMessage(messages,
				"jdo.persistencemanagerfactoryimpl.notsupported")); //NOI18N
    
public voidsetIgnoreCache(boolean flag)
Sets the flag that allows the user to request that queries be optimized to return approximate results by ignoring changed values in the cache.

param
flag boolean flag passed

        throw new JDOUnsupportedOptionException(I18NHelper.getMessage(messages,
                "jdo.persistencemanagerfactoryimpl.notsupported")); //NOI18N
    
public voidsetMaxPool(int MaxPool)
Sets maximum number of PersistenceManager instances in the pool

param
MaxPool maximum number of PersistenceManager instances

        throw new JDOUnsupportedOptionException(I18NHelper.getMessage(messages,
                "jdo.persistencemanagerfactoryimpl.notsupported")); //NOI18N
    
public voidsetMinPool(int MinPool)
Sets minimum number of PersistenceManager instances in the pool

param
MinPool minimum number of PersistenceManager instances

        throw new JDOUnsupportedOptionException(I18NHelper.getMessage(messages,
                "jdo.persistencemanagerfactoryimpl.notsupported")); //NOI18N
    
public voidsetNontransactionalRead(boolean flag)
Sets the flag that allows non-transactional instances to be managed in the cache.

param
flag boolean flag passed

        throw new JDOUnsupportedOptionException(I18NHelper.getMessage(messages,
                "jdo.persistencemanagerfactoryimpl.notsupported")); //NOI18N
    
public voidsetOptimistic(boolean flag)
Sets the optimistic flag for all PersistenceManagers

param
flag boolean optimistic flag

        throw new JDOUnsupportedOptionException(I18NHelper.getMessage(messages,
                "jdo.persistencemanagerfactoryimpl.notsupported")); //NOI18N
    
public voidsetQueryTimeout(int timeout)
Sets the number of seconds to wait for a query statement to execute in the datastore associated with this PersistenceManagerFactory.

param
timeout new timout value in seconds; zero means unlimited

        throw new JDOUnsupportedOptionException(I18NHelper.getMessage(messages,
                "jdo.persistencemanagerfactoryimpl.notsupported")); //NOI18N
    
public voidsetRequireCopyObjectId(boolean flag)
Sets the default value of the requireCopyObjectId. If set to false, PersistenceManagers will not create a copy of an ObjectId for PersistenceManager.getObjectId(Object pc) and PersistenceManager.getObjectById(Object oid) requests.

see
PersistenceManager#getObjectId(Object pc)
see
PersistenceManager#getObjectById(Object oid)
param
flag boolean requireCopyObjectId flag

         throw new JDOUnsupportedOptionException(I18NHelper.getMessage(messages,
                "jdo.persistencemanagerfactoryimpl.notsupported")); //NOI18N
     
public voidsetRequireTrackedSCO(boolean flag)
Sets the requireTrackedSCO flag for this PersistenceManagerFactory. If set to false, by default the PersistenceManager will not create tracked SCO instances for new persistent instances at commit with retainValues set to true requests and while retrieving data from a datastore.

param
flag boolean requireTrackedSCO flag

        throw new JDOUnsupportedOptionException(I18NHelper.getMessage(messages,
                "jdo.persistencemanagerfactoryimpl.notsupported")); //NOI18N
    
public voidsetRetainValues(boolean flag)
Sets flag that will not cause the eviction of persistent instances after transaction completion.

param
flag boolean flag passed

        throw new JDOUnsupportedOptionException(I18NHelper.getMessage(messages,
                "jdo.persistencemanagerfactoryimpl.notsupported")); //NOI18N
    
public voidsetSupersedeDeletedInstance(boolean flag)
Sets the supersedeDeletedInstance flag for all PersistenceManagers.

param
flag boolean supersedeDeletedInstance flag

        throw new JDOUnsupportedOptionException(I18NHelper.getMessage(messages,
                "jdo.persistencemanagerfactoryimpl.notsupported")); //NOI18N
    
public voidsetUpdateTimeout(int timeout)
Sets the number of seconds to wait for an update statement to execute in the datastore associated with this PersistenceManagerFactory.

param
timeout new timout value in seconds; zero means unlimited

        throw new JDOUnsupportedOptionException(I18NHelper.getMessage(messages,
                "jdo.persistencemanagerfactoryimpl.notsupported")); //NOI18N