org.tranql.connector.derby
Class EmbeddedLocalMCF

java.lang.Object
  extended by org.tranql.connector.jdbc.AbstractLocalDataSourceMCF
      extended by org.tranql.connector.derby.EmbeddedLocalMCF
All Implemented Interfaces:
java.io.Serializable, javax.resource.spi.ManagedConnectionFactory, org.tranql.connector.UserPasswordManagedConnectionFactory

public class EmbeddedLocalMCF
extends org.tranql.connector.jdbc.AbstractLocalDataSourceMCF

ManagedConnectionFactory that wraps a Derby EmbeddedDataSource for use in-VM.

Version:
$Revision: 297 $ $Date: 2005-12-07 00:52:14 -0500 (Wed, 07 Dec 2005) $
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.tranql.connector.jdbc.AbstractLocalDataSourceMCF
dataSource
 
Constructor Summary
EmbeddedLocalMCF()
          Default constructor for a Derby Embedded Local DataSource.
 
Method Summary
 java.lang.Boolean getCreateDatabase()
          Return whether the database should be created if it does not already exist.
 java.lang.String getDatabaseName()
          Return the database name.
 java.lang.String getPassword()
          Return the password credential used to establish the connection.
 java.lang.String getShutdownDatabase()
           
 java.lang.String getUserName()
          Return the user name used to establish the connection.
 void setCreateDatabase(java.lang.Boolean create)
          Set whether the database should be created if it does not already exist.
 void setDatabaseName(java.lang.String name)
          Set the database name.
 void setPassword(java.lang.String password)
          Set the user password credential establish the connection.
 void setShutdownDatabase(java.lang.String shutDown)
          Set this property if one wishes to shutdown the database identified by databaseName.
 void setUserName(java.lang.String user)
          Set the user name used establish the connection.
 
Methods inherited from class org.tranql.connector.jdbc.AbstractLocalDataSourceMCF
createConnectionFactory, createConnectionFactory, createManagedConnection, equals, getLoginTimeout, getLogWriter, getPhysicalConnection, hashCode, matchManagedConnections, setLoginTimeout, setLogWriter, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EmbeddedLocalMCF

public EmbeddedLocalMCF()
Default constructor for a Derby Embedded Local DataSource.

Method Detail

getUserName

public java.lang.String getUserName()
Return the user name used to establish the connection.

Returns:
the user name used to establish the connection

setUserName

public void setUserName(java.lang.String user)
Set the user name used establish the connection. This value is used if no connection information is supplied by the application when attempting to create a connection.

Parameters:
user - the user name used to establish the connection; may be null

getPassword

public java.lang.String getPassword()
Return the password credential used to establish the connection.

Returns:
the password credential used to establish the connection

setPassword

public void setPassword(java.lang.String password)
Set the user password credential establish the connection. This value is used if no connection information is supplied by the application when attempting to create a connection.

Parameters:
password - the password credential used to establish the connection; may be null

getDatabaseName

public java.lang.String getDatabaseName()
Return the database name.

Returns:
the database name

setDatabaseName

public void setDatabaseName(java.lang.String name)
Set the database name.

Parameters:
name - the database name

getCreateDatabase

public java.lang.Boolean getCreateDatabase()
Return whether the database should be created if it does not already exist.

Returns:
true if the database should be created

setCreateDatabase

public void setCreateDatabase(java.lang.Boolean create)
Set whether the database should be created if it does not already exist.

Parameters:
create - TRUE if the database should be created

setShutdownDatabase

public void setShutdownDatabase(java.lang.String shutDown)
Set this property if one wishes to shutdown the database identified by databaseName.

Parameters:
shutdown - - if set to the string "shutdown", this data source will shutdown the database if it is running.

getShutdownDatabase

public java.lang.String getShutdownDatabase()
Returns:
String "shutdown" if shutdown is set, or null if not


Copyright © 2006 The Codehaus. All Rights Reserved.