FileDocCategorySizeDatePackage
ConnectionFactory.javaAPI DocGlassfish v2 API6118Fri May 04 22:34:54 BST 2007com.sun.jdo.api.persistence.support

ConnectionFactory

public interface ConnectionFactory
author
Craig Russell
version
0.1

Fields Summary
Constructors Summary
Methods Summary
public java.sql.ConnectiongetConnection()
Returns java.sql.Connection

return
connection as java.sql.Connection

public java.lang.StringgetDriverName()
Returns JDBC driver name

return
driver name

public java.io.PrintWritergetLogWriter()
Returns the LogWriter to which messages should be sent

return
logWriter

public intgetLoginTimeout()
Returns the number of seconds to wait for a new connection to be established to the data source

return
wait time in seconds

public intgetMaxPool()
Returns maximum number of connections in the connection pool

return
connection maxPool

public intgetMinPool()
Returns minimum number of connections in the connection pool

return
connection minPool

public intgetMsInterval()
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

public intgetMsWait()
Returns the number of milliseconds to wait for an available connection from the connection pool before throwing an exception

return
number in milliseconds

public intgetTransactionIsolation()
Returns current transaction isolation level for connections of this ConnectionFactory.

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

public java.lang.StringgetURL()
Returns connection URL

return
connection URL

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

return
current database user name

public voidsetDriverName(java.lang.String driverName)
Sets JDBC driver name

param
driverName JDBC driver name

public voidsetLogWriter(java.io.PrintWriter logWriter)
Sets the LogWriter to which messages should be sent

param
pw logWriter

public voidsetLoginTimeout(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

public voidsetMaxPool(int maxPool)
Sets maximum number of connections in the connection pool

param
maxPool maximum number of connections

public voidsetMinPool(int minPool)
Sets minimum number of connections in the connection pool

param
minPool minimum number of connections

public voidsetMsInterval(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.

public voidsetMsWait(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

public voidsetPassword(java.lang.String password)
Sets database user password

param
password database user password

public voidsetTransactionIsolation(int level)
Sets transaction isolation level for all connections of this ConnectionFactory. 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

public voidsetURL(java.lang.String URL)
Sets JDBC connection URL

param
URL connection URL

public voidsetUserName(java.lang.String userName)
Sets database user

param
userName database user