com.beasys.commerce.foundation.plugin.weblogic
Class WeblogicConnectionPool
java.lang.Object
|
+--com.beasys.commerce.foundation.plugin.weblogic.WeblogicConnectionPool
- public class WeblogicConnectionPool
- extends java.lang.Object
- implements SmartConnectionPool
Defines the interface for Application Server independent connection pooling. This allows
for specification of Connection objects at deployment time.
Method Summary |
java.sql.Connection |
getConnection()
Returns the SQL Connection for this Transaction. |
java.sql.PreparedStatement |
getPreparedStatement(java.sql.Connection connection,
java.lang.Object handle,
java.lang.String szText)
Initializes the PreparedStatement cache |
java.lang.Object |
initializePreparedStatementCache(java.lang.Object requestor,
int nInitialSize,
int nMaxSize)
Initializes the PreparedStatement cache |
void |
releaseConnection(java.sql.Connection connection)
Releases the SQL Connection for this Transaction. |
void |
setJNDIContext(javax.naming.Context JNDIContext)
Inform provider of ejbContext. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
WeblogicConnectionPool
public WeblogicConnectionPool()
setJNDIContext
public void setJNDIContext(javax.naming.Context JNDIContext)
throws BMPException
- Inform provider of ejbContext.
The implementation of this interface has have a public, default
no-args constructor.
The provider relies on properties in the bean's deployment descriptor
as documented in a provider or Theory Center specified protocol.
- Specified by:
- setJNDIContext in interface SmartConnectionPool
- Parameters:
ejbContext
- the bean's ejbContext.
getConnection
public java.sql.Connection getConnection()
throws BMPException
- Returns the SQL Connection for this Transaction. The actual implementation
may choose to implement connection pooling etc.
- Specified by:
- getConnection in interface SmartConnectionPool
- Returns:
- conn Connection object.
- Throws:
- BMPException - implementation specific exception occurred
releaseConnection
public void releaseConnection(java.sql.Connection connection)
throws BMPException
- Releases the SQL Connection for this Transaction.
- Specified by:
- releaseConnection in interface SmartConnectionPool
- Parameters:
conn
- Connection object.- Throws:
- BMPException - implementation specific exception occurred
initializePreparedStatementCache
public java.lang.Object initializePreparedStatementCache(java.lang.Object requestor,
int nInitialSize,
int nMaxSize)
- Initializes the PreparedStatement cache
- Parameters:
requestor
- - the object using the cachenInitialSize
- - the expected number of statements to cachenMaxSize
- - the maximum number of statements to cache- Returns:
- the handle to use in subsequent calls to getPreparedStatement
getPreparedStatement
public java.sql.PreparedStatement getPreparedStatement(java.sql.Connection connection,
java.lang.Object handle,
java.lang.String szText)
throws java.sql.SQLException
- Initializes the PreparedStatement cache
- Parameters:
handle
- - the handle to identify the requestor, returned from initializePreparedStatementCacheszText
- - the text for the prepared statement- Returns:
- the PreparedStatement for use
Copyright © 2000 BEA Systems, Inc. All Rights Reserved