org.objectweb.speedo.jca
Class JdoConnectionFactory

java.lang.Object
  extended byorg.objectweb.speedo.jca.JdoConnectionFactory
All Implemented Interfaces:
javax.resource.cci.ConnectionFactory, javax.jdo.PersistenceManagerFactory, javax.naming.Referenceable, javax.resource.Referenceable, javax.resource.cci.ResourceAdapterMetaData, java.io.Serializable

public class JdoConnectionFactory
extends java.lang.Object
implements javax.resource.cci.ConnectionFactory, javax.resource.cci.ResourceAdapterMetaData, javax.jdo.PersistenceManagerFactory

Author:
P. Dechamboux
See Also:
Serialized Form

Method Summary
 void addInstanceLifecycleListener(javax.jdo.listener.InstanceLifecycleListener arg0, java.lang.Class[] arg1)
           
 void close()
           
 java.lang.String getAdapterName()
          Gives access to the adapter name metadata for the JDO.
 java.lang.String getAdapterShortDescription()
          Gives access to a short description of the JDO adapter.
 java.lang.String getAdapterVendorName()
          Gives access to the adapter vendor name metadata for the JDO.
 java.lang.String getAdapterVersion()
          Gives access to the adapter version metadata for the JDO.
 javax.resource.cci.Connection getConnection()
          Connection allocation is delegated to the ConnectionManager assigned to this factory.
 javax.resource.cci.Connection getConnection(javax.resource.cci.ConnectionSpec spec)
          Connection allocation is delegated to the ConnectionManager assigned to this factory.
 java.lang.String getConnectionDriverName()
           
 java.lang.Object getConnectionFactory()
           
 java.lang.Object getConnectionFactory2()
           
 java.lang.String getConnectionFactory2Name()
           
 java.lang.String getConnectionFactoryName()
           
 java.lang.String getConnectionURL()
           
 java.lang.String getConnectionUserName()
           
 javax.jdo.datastore.DataStoreCache getDataStoreCache()
           
 boolean getIgnoreCache()
           
 java.lang.String[] getInteractionSpecsSupported()
          No interaction is supported by the JDO adapter.
 java.lang.String getMapping()
           
 javax.resource.cci.ResourceAdapterMetaData getMetaData()
          The JdoConnectionFactory manages its metadata on its own.
 boolean getMultithreaded()
           
 boolean getNontransactionalRead()
           
 boolean getNontransactionalWrite()
           
 boolean getOptimistic()
           
 javax.jdo.PersistenceManager getPersistenceManager()
           
 javax.jdo.PersistenceManager getPersistenceManager(java.lang.String s, java.lang.String s1)
           
 java.util.Properties getProperties()
           
 javax.resource.cci.RecordFactory getRecordFactory()
          No support for record.
 javax.naming.Reference getReference()
          Returns the JNDI Reference.
 boolean getRestoreValues()
           
 boolean getRetainValues()
           
 java.lang.String getSpecVersion()
          Gives access to the specification version of the JDO.
 byte getTransactionMode()
           
 boolean isClosed()
           
 void removeInstanceLifecycleListener(javax.jdo.listener.InstanceLifecycleListener arg0)
           
 void setConnectionDriverName(java.lang.String s)
           
 void setConnectionFactory(java.lang.Object o)
           
 void setConnectionFactory2(java.lang.Object o)
           
 void setConnectionFactory2Name(java.lang.String s)
           
 void setConnectionFactoryName(java.lang.String s)
           
 void setConnectionManager(javax.resource.spi.ConnectionManager connectionManager)
           
 void setConnectionPassword(java.lang.String s)
           
 void setConnectionURL(java.lang.String s)
           
 void setConnectionUserName(java.lang.String s)
           
 void setIgnoreCache(boolean b)
           
 void setMapping(java.lang.String arg0)
           
 void setMultithreaded(boolean b)
           
 void setNontransactionalRead(boolean b)
           
 void setNontransactionalWrite(boolean b)
           
 void setOptimistic(boolean b)
           
 void setReference(javax.naming.Reference reference)
          Assigns a JNDI Reference to the adapter.
 void setRestoreValues(boolean b)
           
 void setRetainValues(boolean b)
           
 java.util.Collection supportedOptions()
           
 boolean supportsExecuteWithInputAndOutputRecord()
          No support for record.
 boolean supportsExecuteWithInputRecordOnly()
          No support for record.
 boolean supportsLocalTransactionDemarcation()
          Yes, it does support local transaction demarcation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setConnectionManager

public void setConnectionManager(javax.resource.spi.ConnectionManager connectionManager)

getConnection

public javax.resource.cci.Connection getConnection()
                                            throws javax.resource.ResourceException
Connection allocation is delegated to the ConnectionManager assigned to this factory.

Specified by:
getConnection in interface javax.resource.cci.ConnectionFactory
Throws:
javax.resource.ResourceException

getConnection

public javax.resource.cci.Connection getConnection(javax.resource.cci.ConnectionSpec spec)
                                            throws javax.resource.ResourceException
Connection allocation is delegated to the ConnectionManager assigned to this factory.

Specified by:
getConnection in interface javax.resource.cci.ConnectionFactory
Parameters:
spec - The connection is not taken into account within JDO.
Throws:
javax.resource.ResourceException

setReference

public void setReference(javax.naming.Reference reference)
Assigns a JNDI Reference to the adapter.

Specified by:
setReference in interface javax.resource.Referenceable
Parameters:
reference - The JNDI Reference to be assigned.

getReference

public javax.naming.Reference getReference()
                                    throws javax.naming.NamingException
Returns the JNDI Reference.

Specified by:
getReference in interface javax.naming.Referenceable
Returns:
The JNDI Reference.
Throws:
javax.naming.NamingException

getRecordFactory

public javax.resource.cci.RecordFactory getRecordFactory()
                                                  throws javax.resource.ResourceException
No support for record.

Specified by:
getRecordFactory in interface javax.resource.cci.ConnectionFactory
Throws:
javax.resource.ResourceException

getMetaData

public javax.resource.cci.ResourceAdapterMetaData getMetaData()
                                                       throws javax.resource.ResourceException
The JdoConnectionFactory manages its metadata on its own.

Specified by:
getMetaData in interface javax.resource.cci.ConnectionFactory
Throws:
javax.resource.ResourceException

getAdapterVersion

public java.lang.String getAdapterVersion()
Gives access to the adapter version metadata for the JDO.

Specified by:
getAdapterVersion in interface javax.resource.cci.ResourceAdapterMetaData
Returns:
The JDO adapter version.

getAdapterVendorName

public java.lang.String getAdapterVendorName()
Gives access to the adapter vendor name metadata for the JDO.

Specified by:
getAdapterVendorName in interface javax.resource.cci.ResourceAdapterMetaData
Returns:
The JDO adapter vendor name.

getAdapterName

public java.lang.String getAdapterName()
Gives access to the adapter name metadata for the JDO.

Specified by:
getAdapterName in interface javax.resource.cci.ResourceAdapterMetaData
Returns:
The JDO adapter name.

getAdapterShortDescription

public java.lang.String getAdapterShortDescription()
Gives access to a short description of the JDO adapter.

Specified by:
getAdapterShortDescription in interface javax.resource.cci.ResourceAdapterMetaData
Returns:
The JDO short description.

getSpecVersion

public java.lang.String getSpecVersion()
Gives access to the specification version of the JDO.

Specified by:
getSpecVersion in interface javax.resource.cci.ResourceAdapterMetaData
Returns:
The JDO specification version.

getInteractionSpecsSupported

public java.lang.String[] getInteractionSpecsSupported()
No interaction is supported by the JDO adapter.

Specified by:
getInteractionSpecsSupported in interface javax.resource.cci.ResourceAdapterMetaData

supportsExecuteWithInputAndOutputRecord

public boolean supportsExecuteWithInputAndOutputRecord()
No support for record.

Specified by:
supportsExecuteWithInputAndOutputRecord in interface javax.resource.cci.ResourceAdapterMetaData

supportsExecuteWithInputRecordOnly

public boolean supportsExecuteWithInputRecordOnly()
No support for record.

Specified by:
supportsExecuteWithInputRecordOnly in interface javax.resource.cci.ResourceAdapterMetaData

supportsLocalTransactionDemarcation

public boolean supportsLocalTransactionDemarcation()
Yes, it does support local transaction demarcation.

Specified by:
supportsLocalTransactionDemarcation in interface javax.resource.cci.ResourceAdapterMetaData

getPersistenceManager

public javax.jdo.PersistenceManager getPersistenceManager()
Specified by:
getPersistenceManager in interface javax.jdo.PersistenceManagerFactory

getPersistenceManager

public javax.jdo.PersistenceManager getPersistenceManager(java.lang.String s,
                                                          java.lang.String s1)
Specified by:
getPersistenceManager in interface javax.jdo.PersistenceManagerFactory

setConnectionUserName

public void setConnectionUserName(java.lang.String s)
Specified by:
setConnectionUserName in interface javax.jdo.PersistenceManagerFactory

getConnectionUserName

public java.lang.String getConnectionUserName()
Specified by:
getConnectionUserName in interface javax.jdo.PersistenceManagerFactory

setConnectionPassword

public void setConnectionPassword(java.lang.String s)
Specified by:
setConnectionPassword in interface javax.jdo.PersistenceManagerFactory

setConnectionURL

public void setConnectionURL(java.lang.String s)
Specified by:
setConnectionURL in interface javax.jdo.PersistenceManagerFactory

getConnectionURL

public java.lang.String getConnectionURL()
Specified by:
getConnectionURL in interface javax.jdo.PersistenceManagerFactory

setConnectionDriverName

public void setConnectionDriverName(java.lang.String s)
Specified by:
setConnectionDriverName in interface javax.jdo.PersistenceManagerFactory

getConnectionDriverName

public java.lang.String getConnectionDriverName()
Specified by:
getConnectionDriverName in interface javax.jdo.PersistenceManagerFactory

setConnectionFactoryName

public void setConnectionFactoryName(java.lang.String s)
Specified by:
setConnectionFactoryName in interface javax.jdo.PersistenceManagerFactory

getConnectionFactoryName

public java.lang.String getConnectionFactoryName()
Specified by:
getConnectionFactoryName in interface javax.jdo.PersistenceManagerFactory

setConnectionFactory

public void setConnectionFactory(java.lang.Object o)
Specified by:
setConnectionFactory in interface javax.jdo.PersistenceManagerFactory

getConnectionFactory

public java.lang.Object getConnectionFactory()
Specified by:
getConnectionFactory in interface javax.jdo.PersistenceManagerFactory

setConnectionFactory2Name

public void setConnectionFactory2Name(java.lang.String s)
Specified by:
setConnectionFactory2Name in interface javax.jdo.PersistenceManagerFactory

getConnectionFactory2Name

public java.lang.String getConnectionFactory2Name()
Specified by:
getConnectionFactory2Name in interface javax.jdo.PersistenceManagerFactory

setConnectionFactory2

public void setConnectionFactory2(java.lang.Object o)
Specified by:
setConnectionFactory2 in interface javax.jdo.PersistenceManagerFactory

getConnectionFactory2

public java.lang.Object getConnectionFactory2()
Specified by:
getConnectionFactory2 in interface javax.jdo.PersistenceManagerFactory

setMultithreaded

public void setMultithreaded(boolean b)
Specified by:
setMultithreaded in interface javax.jdo.PersistenceManagerFactory

getMultithreaded

public boolean getMultithreaded()
Specified by:
getMultithreaded in interface javax.jdo.PersistenceManagerFactory

setOptimistic

public void setOptimistic(boolean b)
Specified by:
setOptimistic in interface javax.jdo.PersistenceManagerFactory

getOptimistic

public boolean getOptimistic()
Specified by:
getOptimistic in interface javax.jdo.PersistenceManagerFactory

setRetainValues

public void setRetainValues(boolean b)
Specified by:
setRetainValues in interface javax.jdo.PersistenceManagerFactory

getRetainValues

public boolean getRetainValues()
Specified by:
getRetainValues in interface javax.jdo.PersistenceManagerFactory

setRestoreValues

public void setRestoreValues(boolean b)
Specified by:
setRestoreValues in interface javax.jdo.PersistenceManagerFactory

getRestoreValues

public boolean getRestoreValues()
Specified by:
getRestoreValues in interface javax.jdo.PersistenceManagerFactory

setNontransactionalRead

public void setNontransactionalRead(boolean b)
Specified by:
setNontransactionalRead in interface javax.jdo.PersistenceManagerFactory

getNontransactionalRead

public boolean getNontransactionalRead()
Specified by:
getNontransactionalRead in interface javax.jdo.PersistenceManagerFactory

setNontransactionalWrite

public void setNontransactionalWrite(boolean b)
Specified by:
setNontransactionalWrite in interface javax.jdo.PersistenceManagerFactory

getNontransactionalWrite

public boolean getNontransactionalWrite()
Specified by:
getNontransactionalWrite in interface javax.jdo.PersistenceManagerFactory

setIgnoreCache

public void setIgnoreCache(boolean b)
Specified by:
setIgnoreCache in interface javax.jdo.PersistenceManagerFactory

getIgnoreCache

public boolean getIgnoreCache()
Specified by:
getIgnoreCache in interface javax.jdo.PersistenceManagerFactory

getProperties

public java.util.Properties getProperties()
Specified by:
getProperties in interface javax.jdo.PersistenceManagerFactory

supportedOptions

public java.util.Collection supportedOptions()
Specified by:
supportedOptions in interface javax.jdo.PersistenceManagerFactory

close

public void close()
Specified by:
close in interface javax.jdo.PersistenceManagerFactory

getDataStoreCache

public javax.jdo.datastore.DataStoreCache getDataStoreCache()
Specified by:
getDataStoreCache in interface javax.jdo.PersistenceManagerFactory

getMapping

public java.lang.String getMapping()
Specified by:
getMapping in interface javax.jdo.PersistenceManagerFactory

isClosed

public boolean isClosed()
Specified by:
isClosed in interface javax.jdo.PersistenceManagerFactory

setMapping

public void setMapping(java.lang.String arg0)
Specified by:
setMapping in interface javax.jdo.PersistenceManagerFactory

addInstanceLifecycleListener

public void addInstanceLifecycleListener(javax.jdo.listener.InstanceLifecycleListener arg0,
                                         java.lang.Class[] arg1)
Specified by:
addInstanceLifecycleListener in interface javax.jdo.PersistenceManagerFactory

removeInstanceLifecycleListener

public void removeInstanceLifecycleListener(javax.jdo.listener.InstanceLifecycleListener arg0)
Specified by:
removeInstanceLifecycleListener in interface javax.jdo.PersistenceManagerFactory

getTransactionMode

public byte getTransactionMode()