com.evermind.sql
Class DriverManagerXADataSource
java.lang.Object
com.evermind.sql.DriverManagerXADataSource
- All Implemented Interfaces:
- com.evermind.util.ExternalComparator, com.evermind.util.LoggingDestroyable, java.io.Serializable, java.lang.Runnable, javax.sql.XADataSource
public class DriverManagerXADataSource
- extends java.lang.Object
- implements javax.sql.XADataSource, java.io.Serializable, com.evermind.util.ExternalComparator, java.lang.Runnable, com.evermind.util.LoggingDestroyable
A XADataSource implementation that wraps ordinary JDBC connections.
Used for JDBC drivers that doesnt provide a "true" XADataSource implementation
to emulate distributed transactions.
- See Also:
- Serialized Form
| Fields inherited from interface com.evermind.util.ExternalComparator |
DEFAULT_COMPARATOR |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
DriverManagerXADataSource
public DriverManagerXADataSource()
DriverManagerXADataSource
public DriverManagerXADataSource(javax.sql.DataSource source)
getLogWriter
public java.io.PrintWriter getLogWriter()
- Specified by:
getLogWriter in interface javax.sql.XADataSource
setLogWriter
public void setLogWriter(java.io.PrintWriter logWriter)
throws java.sql.SQLException
- Specified by:
setLogWriter in interface javax.sql.XADataSource
- Throws:
java.sql.SQLException
getLoginTimeout
public int getLoginTimeout()
- Specified by:
getLoginTimeout in interface javax.sql.XADataSource
setLoginTimeout
public void setLoginTimeout(int loginTimeout)
- Specified by:
setLoginTimeout in interface javax.sql.XADataSource
setDataSource
public void setDataSource(javax.sql.DataSource source,
com.evermind.server.DataSourceConfig config,
javax.naming.Context context,
java.io.PrintWriter logWriter)
throws java.lang.InstantiationException
- Throws:
java.lang.InstantiationException
setDataSource
public void setDataSource(OrionPooledDataSource source)
getXAConnection
public javax.sql.XAConnection getXAConnection()
throws java.sql.SQLException
- Specified by:
getXAConnection in interface javax.sql.XADataSource
- Throws:
java.sql.SQLException
getXAConnection
public javax.sql.XAConnection getXAConnection(java.lang.String username,
java.lang.String password)
throws java.sql.SQLException
- Specified by:
getXAConnection in interface javax.sql.XADataSource
- Throws:
java.sql.SQLException
equals
public boolean equals(java.lang.Object a,
java.lang.Object b)
- Specified by:
equals in interface com.evermind.util.ExternalComparator
hashCode
public int hashCode(java.lang.Object object)
- Specified by:
hashCode in interface com.evermind.util.ExternalComparator
getDefaultConnection
public java.sql.Connection getDefaultConnection()
throws java.sql.SQLException
- Throws:
java.sql.SQLException
run
public void run()
- Specified by:
run in interface java.lang.Runnable
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
setTimeout
public void setTimeout(int timeout)
setMaxConnections
public void setMaxConnections(int maxConnections)
setMinConnections
public void setMinConnections(int minConnections)
getRuntimeInfo
public com.evermind.server.administration.DataSourceRuntimeInfo getRuntimeInfo()
setDataSourceName
public void setDataSourceName(java.lang.String name)
getAutoCommitConnection
public java.sql.Connection getAutoCommitConnection(java.lang.String username,
java.lang.String password)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
getNonAutoCommitConnection
public java.sql.Connection getNonAutoCommitConnection(java.lang.String username,
java.lang.String password)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
destroy
public void destroy(Logger logger)
- Specified by:
destroy in interface com.evermind.util.LoggingDestroyable
getPool
public javax.sql.DataSource getPool()
getAutoCommitPool
public javax.sql.DataSource getAutoCommitPool()