| java.lang.Object org.ofbiz.minerva.pool.jdbc.xa.wrapper.XADataSourceImpl
XADataSourceImpl | public class XADataSourceImpl implements XADataSource(Code) | | Transactional DataSource wrapper for JDBC 1.0 drivers. This is very
lightweight - it just passes requests through to an underlying driver, and
wraps the results with an XAConnection. The XAConnection and corresponding
XAResource are responsible for closing the connection when appropriate.
Note that the underlying driver may perform pooling, but need not. This
class does not add any pooling capabilities.
author: Aaron Mulder (ammulder@alumni.princeton.edu) |
Method Summary | |
public PrintWriter | getLogWriter() Gets the log writer used to record when XAConnections are opened. | public int | getLoginTimeout() This is not used by the current implementation, since the effect would
differ depending on the underlying driver. | public String | getPassword() Gets the JDBC password used to open an underlying connection. | public Properties | getProperties() Gets the JDBC properties used to open an underlying connection. | public boolean | getSaveStackTrace() Have XAClientConnections save a stack trace on creation
This is useful for debugging non-closed connections. | public String | getURL() Gets the JDBC URL used to open an underlying connection. | public String | getUser() Gets the JDBC user name used to open an underlying connection. | public XAConnection | getXAConnection() Gets an XAConnection. | public XAConnection | getXAConnection(String user, String password) Gets an XAConnection. | public void | setDriver(String driverName) | public void | setLogWriter(PrintWriter writer) Sets a log writer used to record when XAConnections are opened. | public void | setLoginTimeout(int timeout) This is not used by the current implementation, since the effect would
differ depending on the underlying driver. | public void | setPassword(String password) Sets the JDBC password used to open an underlying connection. | public void | setProperties(Properties properties) Sets the JDBC properties used to open an underlying connection. | public void | setSaveStackTrace(boolean save) | public void | setURL(String url) Sets the JDBC URL used to open an underlying connection. | public void | setUser(String user) Sets the JDBC user name used to open an underlying connection. |
XADataSourceImpl | public XADataSourceImpl()(Code) | | Empty constructure for beans, reflection, etc.
|
XADataSourceImpl | public XADataSourceImpl(String url, Properties properties)(Code) | | Specifies the URL and properties to connect to the underlying driver.
If the properties are null, they will not be used.
|
getLoginTimeout | public int getLoginTimeout() throws SQLException(Code) | | This is not used by the current implementation, since the effect would
differ depending on the underlying driver.
|
getPassword | public String getPassword()(Code) | | Gets the JDBC password used to open an underlying connection.
|
getProperties | public Properties getProperties()(Code) | | Gets the JDBC properties used to open an underlying connection.
|
getSaveStackTrace | public boolean getSaveStackTrace()(Code) | | Have XAClientConnections save a stack trace on creation
This is useful for debugging non-closed connections.
It must be used with ReleaseOnCommit option
|
getURL | public String getURL()(Code) | | Gets the JDBC URL used to open an underlying connection.
|
getUser | public String getUser()(Code) | | Gets the JDBC user name used to open an underlying connection.
|
getXAConnection | public XAConnection getXAConnection() throws SQLException(Code) | | Gets an XAConnection. This first gets a java.sql.Connection from the
underlying driver, and then wraps it in an XAConnection and XAResource.
This uses the URL, user, password, and properties (or as many as you
have specified) to make the connection.
|
getXAConnection | public XAConnection getXAConnection(String user, String password) throws SQLException(Code) | | Gets an XAConnection. This first gets a java.sql.Connection from the
underlying driver, and then wraps it in an XAConnection and XAResource.
Note that we never change the default userid and password, but instead
only set the userid and password for this one connection.
|
setLogWriter | public void setLogWriter(PrintWriter writer) throws SQLException(Code) | | Sets a log writer used to record when XAConnections are opened.
|
setLoginTimeout | public void setLoginTimeout(int timeout) throws SQLException(Code) | | This is not used by the current implementation, since the effect would
differ depending on the underlying driver.
|
setPassword | public void setPassword(String password)(Code) | | Sets the JDBC password used to open an underlying connection.
This is optional - use it only if your underlying driver requires it.
|
setProperties | public void setProperties(Properties properties)(Code) | | Sets the JDBC properties used to open an underlying connection.
This is optional - use it only if your underlying driver requires it.
|
setSaveStackTrace | public void setSaveStackTrace(boolean save)(Code) | | |
setURL | public void setURL(String url)(Code) | | Sets the JDBC URL used to open an underlying connection.
|
setUser | public void setUser(String user)(Code) | | Sets the JDBC user name used to open an underlying connection.
This is optional - use it only if your underlying driver requires it.
|
|
|