org.sourceforge.bdbadapter.cci
Class ManagedConnectionFactoryImpl
java.lang.Object
|
+--org.sourceforge.bdbadapter.cci.ManagedConnectionFactoryImpl
- All Implemented Interfaces:
- javax.resource.spi.ManagedConnectionFactory, java.io.Serializable
- public class ManagedConnectionFactoryImpl
- extends java.lang.Object
- implements javax.resource.spi.ManagedConnectionFactory
Copyright (C) 2003 Joerg Winter
This Resource Adapter is licensed by
the GNU General Public License (GPL)
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
, clone, finalize, getClass, notify, notifyAll, registerNatives, toString, wait, wait, wait |
logWriter
private java.io.PrintWriter logWriter
- The log-writer set by the container.
Currently not used, instead log-output goes to SimpleLogger.
- See Also:
logger
,
JCA 1.0 specification and JavaDoc
resourceAdapterMetaData
private static transient javax.resource.cci.ResourceAdapterMetaData resourceAdapterMetaData
- See Also:
1.0 specification and JavaDoc
logger
private static transient org.sourceforge.jcalogger.SimpleLogger logger
- All log-output goes to this instance of SimpleLogger.
Special logging-classes are used to have more control
over what gets logged and to get a chronological view
of events. The more standard log-output through a container
supplied PrintWriter may be used in a future version.
- See Also:
logWriter
env
private transient AdapterEnv env
propertyUrl
private java.lang.String propertyUrl
dbEnvPath
private java.lang.String dbEnvPath
cacheSizeGigabytes
private java.lang.Integer cacheSizeGigabytes
cacheSizeBytes
private java.lang.Integer cacheSizeBytes
cachePieces
private java.lang.Integer cachePieces
dbName
private java.lang.String dbName
logDirectory
private java.lang.String logDirectory
logSwitch
private java.lang.String logSwitch
noLogging
private static boolean noLogging
ManagedConnectionFactoryImpl
public ManagedConnectionFactoryImpl()
createConnectionFactory
public java.lang.Object createConnectionFactory(javax.resource.spi.ConnectionManager cxManager)
throws javax.resource.ResourceException
- Specified by:
createConnectionFactory
in interface javax.resource.spi.ManagedConnectionFactory
createConnectionFactory
public java.lang.Object createConnectionFactory()
throws javax.resource.ResourceException
- Specified by:
createConnectionFactory
in interface javax.resource.spi.ManagedConnectionFactory
createManagedConnection
public javax.resource.spi.ManagedConnection createManagedConnection(javax.security.auth.Subject subject,
javax.resource.spi.ConnectionRequestInfo info)
throws javax.resource.ResourceException
- Specified by:
createManagedConnection
in interface javax.resource.spi.ManagedConnectionFactory
getDatabasePath
java.lang.String getDatabasePath()
matchManagedConnections
public javax.resource.spi.ManagedConnection matchManagedConnections(java.util.Set connectionSet,
javax.security.auth.Subject subject,
javax.resource.spi.ConnectionRequestInfo info)
throws javax.resource.ResourceException
- Specified by:
matchManagedConnections
in interface javax.resource.spi.ManagedConnectionFactory
setLogWriter
public void setLogWriter(java.io.PrintWriter out)
throws javax.resource.ResourceException
- Specified by:
setLogWriter
in interface javax.resource.spi.ManagedConnectionFactory
getLogWriter
public java.io.PrintWriter getLogWriter()
throws javax.resource.ResourceException
- Specified by:
getLogWriter
in interface javax.resource.spi.ManagedConnectionFactory
getPropertyUrl
public java.lang.String getPropertyUrl()
setPropertyUrl
public void setPropertyUrl(java.lang.String propertyUrl)
getDbEnvPath
public java.lang.String getDbEnvPath()
setDbEnvPath
public void setDbEnvPath(java.lang.String dbEnvPath)
getCacheSizeGigabytes
public java.lang.Integer getCacheSizeGigabytes()
setCacheSizeGigabytes
public void setCacheSizeGigabytes(java.lang.Integer cacheSizeGigabytes)
getCacheSizeBytes
public java.lang.Integer getCacheSizeBytes()
setCacheSizeBytes
public void setCacheSizeBytes(java.lang.Integer cacheSizeBytes)
getCachePieces
public java.lang.Integer getCachePieces()
setCachePieces
public void setCachePieces(java.lang.Integer cachePieces)
getDbName
public java.lang.String getDbName()
setDbName
public void setDbName(java.lang.String dbName)
getLogDirectory
public java.lang.String getLogDirectory()
setLogDirectory
public void setLogDirectory(java.lang.String logDirectory)
getLogSwitch
public java.lang.String getLogSwitch()
setLogSwitch
public void setLogSwitch(java.lang.String logSwitch)
equals
public boolean equals(java.lang.Object o)
- Specified by:
equals
in interface javax.resource.spi.ManagedConnectionFactory
- Overrides:
equals
in class java.lang.Object
hashCode
public int hashCode()
- Specified by:
hashCode
in interface javax.resource.spi.ManagedConnectionFactory
- Overrides:
hashCode
in class java.lang.Object
getResourceAdapterMetaData
javax.resource.cci.ResourceAdapterMetaData getResourceAdapterMetaData()
getEnv
AdapterEnv getEnv()
openEnvironment
void openEnvironment(java.lang.String dbEnvPath,
int cacheSizeGigabytes,
int cacheSizeBytes,
int cachePieces)
throws javax.resource.ResourceException
log
static void log(java.lang.String message,
java.lang.String source)
- Helper method for log-output.
- Parameters:
message
- The message to appear int the corresponding log output-file.source
- This string determines the name of the ouput-file.
printDbException
static void printDbException(com.sleepycat.db.DbException e)
printException
static void printException(java.lang.Exception e)
reset
public static void reset()
writeObject
private void writeObject(java.io.ObjectOutputStream out)
throws java.io.IOException
readObject
private void readObject(java.io.ObjectInputStream in)
throws java.io.IOException,
java.lang.ClassNotFoundException