|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.jboss.minerva.datasource.XAPoolDataSource
DataSource for transactional JDBC pools. This handles configuration parameters for both the pool and the JDBC connection. It is important that you set all the configuration parameters before you initialize the DataSource, and you must initialize it before you use it. All the configuration parameters are not documented here; you are instead referred to ObjectPool and XAConnectionFactory.
ObjectPool
,
XAConnectionFactory
Constructor Summary | |
XAPoolDataSource()
Creates a new XA pool data source. |
Method Summary | |
void |
close()
Shuts down this data source and the underlying pool. |
java.sql.Connection |
getConnection()
Gets a connection from the pool. |
java.sql.Connection |
getConnection(java.lang.String user,
java.lang.String password)
Gets a new connection from the pool. |
javax.sql.XADataSource |
getDataSource()
|
static XAPoolDataSource |
getDataSource(java.lang.String poolName)
Gets a specific JDBC pool data source by pool name. |
static java.util.Collection |
getDataSources()
Gets all the current JDBC pool data sources. |
long |
getGCInterval()
|
long |
getGCMinIdleTime()
|
long |
getIdleTimeout()
|
java.lang.String |
getJDBCPassword()
|
java.lang.String |
getJDBCUser()
|
java.lang.String |
getJNDIName()
Gets the JNDI name this pool is bound to. |
int |
getLoginTimeout()
This property is not used by this implementation. |
java.io.PrintWriter |
getLogWriter()
Gets a log writer used to record pool events. |
float |
getMaxIdleTimeoutPercent()
|
int |
getMaxSize()
|
int |
getMinSize()
|
java.lang.Object |
getObjectInstance(java.lang.Object obj,
javax.naming.Name name,
javax.naming.Context nameCtx,
java.util.Hashtable environment)
Decodes a reference to a specific pool data source. |
java.lang.String |
getPoolName()
|
java.lang.String |
getPoolStatus()
Returns a string describing the pool status (number of connections created, used, and maximum). |
javax.naming.Reference |
getReference()
Gets a reference to this data source. |
java.lang.String |
getTransactionManagerJNDIName()
|
void |
initialize()
Initializes the pool. |
boolean |
isBlocking()
|
boolean |
isGCEnabled()
|
boolean |
isIdleTimeoutEnabled()
|
boolean |
isInvalidateOnError()
|
boolean |
isTimestampUsed()
|
void |
setBlocking(boolean blocking)
|
void |
setDataSource(javax.sql.XADataSource ds)
|
void |
setGCEnabled(boolean allowGC)
|
void |
setGCInterval(long millis)
|
void |
setGCMinIdleTime(long millis)
|
void |
setIdleTimeout(long millis)
|
void |
setIdleTimeoutEnabled(boolean allowShrinking)
|
void |
setInvalidateOnError(boolean invalidate)
|
void |
setJDBCPassword(java.lang.String password)
|
void |
setJDBCUser(java.lang.String user)
|
void |
setJNDIName(java.lang.String name)
If you use this to set a JNDI name, this pool will be bound to that name using the default InitialContext. |
void |
setLoginTimeout(int timeout)
This property is not used by this implementation. |
void |
setLogWriter(java.io.PrintWriter writer)
Sets a log writer used to record pool events. |
void |
setMaxIdleTimeoutPercent(float percent)
|
void |
setMaxSize(int size)
|
void |
setMinSize(int size)
|
void |
setPoolName(java.lang.String name)
|
void |
setTimestampUsed(boolean timestamp)
|
void |
setTransactionManagerJNDIName(java.lang.String name)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public XAPoolDataSource()
Method Detail |
public static java.util.Collection getDataSources()
public static XAPoolDataSource getDataSource(java.lang.String poolName)
public void setJNDIName(java.lang.String name) throws javax.naming.NamingException
public java.lang.String getJNDIName()
setJNDIName(java.lang.String)
public void setDataSource(javax.sql.XADataSource ds)
public javax.sql.XADataSource getDataSource()
public void setTransactionManagerJNDIName(java.lang.String name)
public java.lang.String getTransactionManagerJNDIName()
public void setJDBCUser(java.lang.String user)
public java.lang.String getJDBCUser()
public void setJDBCPassword(java.lang.String password)
public java.lang.String getJDBCPassword()
public void setPoolName(java.lang.String name)
public java.lang.String getPoolName()
public void setMinSize(int size)
public int getMinSize()
public void setMaxSize(int size)
public int getMaxSize()
public void setBlocking(boolean blocking)
public boolean isBlocking()
public void setIdleTimeoutEnabled(boolean allowShrinking)
public boolean isIdleTimeoutEnabled()
public void setGCEnabled(boolean allowGC)
public boolean isGCEnabled()
public void setMaxIdleTimeoutPercent(float percent)
public float getMaxIdleTimeoutPercent()
public void setIdleTimeout(long millis)
public long getIdleTimeout()
public void setGCMinIdleTime(long millis)
public long getGCMinIdleTime()
public void setGCInterval(long millis)
public long getGCInterval()
public void setInvalidateOnError(boolean invalidate)
public boolean isInvalidateOnError()
public void setTimestampUsed(boolean timestamp)
public boolean isTimestampUsed()
public void initialize()
public java.lang.String getPoolStatus()
public void close()
public java.sql.Connection getConnection() throws java.sql.SQLException
getConnection
in interface javax.sql.DataSource
public java.sql.Connection getConnection(java.lang.String user, java.lang.String password) throws java.sql.SQLException
getConnection
in interface javax.sql.DataSource
public java.io.PrintWriter getLogWriter() throws java.sql.SQLException
getLogWriter
in interface javax.sql.DataSource
public void setLogWriter(java.io.PrintWriter writer) throws java.sql.SQLException
setLogWriter
in interface javax.sql.DataSource
public int getLoginTimeout() throws java.sql.SQLException
getLoginTimeout
in interface javax.sql.DataSource
public void setLoginTimeout(int timeout) throws java.sql.SQLException
setLoginTimeout
in interface javax.sql.DataSource
public javax.naming.Reference getReference()
getReference
in interface javax.naming.Referenceable
public java.lang.Object getObjectInstance(java.lang.Object obj, javax.naming.Name name, javax.naming.Context nameCtx, java.util.Hashtable environment)
getObjectInstance
in interface javax.naming.spi.ObjectFactory
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |