|
© 2005 BEA Systems, Inc. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.bea.p13n.util.jdbc.DatabaseFactory
The DatabaseFactory
class provides a means for creating and
returning specific Database
instances relative to the
database being used. This is necessary for CLOB and BLOB column processing.
There are many different ways JDBC driver vendors choose to implement CLOB
and BLOB handling. Here we address the need for driver-specific Database
objects and attempt to handle them appropriately.
A java.sql.Connection
object is passed in and the
java.sql.DatabaseMetaData
for that object is used to determine
which database driver is responsible for creating the connection. A driver-specific
Database
instance will then be returned.
Database
Constructor Summary | |
DatabaseFactory()
|
Method Summary | |
static void |
deregisterDatabase(Database instance)
Deprecated. In order to improve performance, dynamically registering/deregistering of databases with the DatabaseFactory is no longer supported. To change the list of supported databases you must modify database-registry.properties and restart your server. |
static Connection |
getConnection(DataSource src,
int retries)
Deprecated. Use DataSource.getConnection(), set retries by configuring the Pool |
static Connection |
getConnection(DataSource src,
int retries,
long waitTime)
Deprecated. Use DataSource.getConnection(), set retries and waitTime by configuring the Pool |
static Database |
getInstance(Connection connection)
Get the driver-specific Database instance. |
static void |
registerDatabase(Database instance)
Deprecated. In order to improve performance, dynamically registering/deregistering of databases with the DatabaseFactory is no longer supported. To change the list of supported databases you must modify database-registry.properties and restart your server. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DatabaseFactory()
Method Detail |
public static void deregisterDatabase(Database instance)
instance
- The Database instance.public static Connection getConnection(DataSource src, int retries) throws SQLException
This method no longer honors the retry parameter; it will use the 'Connection Reserve Timeout' parameter set on the JdbcConnectionPool via the WLS console.
src
- The DataSource.retries
- No longer used - the settings on the pool are now used
SQLException
- Thrown on an error when getting a connection.public static Connection getConnection(DataSource src, int retries, long waitTime) throws SQLException
This method no longer honors the retry parameter; it will use the 'Connection Reserve Timeout' parameter set on the JdbcConnectionPool via the WLS console.
src
- The DataSource.retries
- No longer used - the settings on the pool are now usedwaitTime
- No longer used - the settings on the pool are now used
SQLException
- Thrown when trying to get a connection.public static Database getInstance(Connection connection) throws SQLException
connection
- A java.sql.Connection object.
SQLException
- Cannot create or cannot find Database instance
for the connection.public static void registerDatabase(Database instance)
instance
- The Database instance.
|
© 2005 BEA Systems, Inc. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |