com.evermind.sql
Class OrionCMTDataSource

java.lang.Object
  extended by com.evermind.sql.OrionPooledDataSource
      extended by com.evermind.sql.OrionCMTDataSource
All Implemented Interfaces:
com.evermind.util.LoggingDestroyable, java.io.Serializable, java.lang.Runnable, javax.sql.DataSource

public class OrionCMTDataSource
extends OrionPooledDataSource
implements java.io.Serializable

A DataSource implementation that handles distributed transactions and connection pooling. It either acts on a vendor-supplied XADataSource implementation or an emulating XADataSource implementation (DriverManagerXADataSource) provided by Orion.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.evermind.sql.OrionPooledDataSource
OrionPooledDataSource.User
 
Field Summary
 OrionPooledDataSource nonTXSource
           
 
Fields inherited from class com.evermind.sql.OrionPooledDataSource
serialVersionUID
 
Constructor Summary
OrionCMTDataSource()
           
 
Method Summary
 void addDataSourceListener(com.evermind.sql.DataSourceListener listener)
           
 int getCachedConnections()
           
 java.sql.Connection getConnection()
           
 java.sql.Connection getConnection(java.lang.String username, java.lang.String password)
           
 com.evermind.server.administration.DataSourceRuntimeInfo getRuntimeInfo()
           
 int getUsedConnections()
           
 void removeCache()
           
 void setMaxConnections(int maxConnections)
           
 void setNonTXDataSource(javax.sql.ConnectionPoolDataSource source, com.evermind.server.DataSourceConfig config, javax.naming.Context context, java.io.PrintWriter logWriter)
           
 void setNonTXDataSource(javax.sql.DataSource source, com.evermind.server.DataSourceConfig config, javax.naming.Context context, java.io.PrintWriter logWriter)
           
 void setTimeout(int timeout)
           
 void setXADataSource(javax.sql.XADataSource source)
           
 
Methods inherited from class com.evermind.sql.OrionPooledDataSource
checkIntegrity, destroy, getLocation, getLoginTimeout, getLogWriter, getOpenConnections, getPooledInstance, getPooledInstance, getUserSource, initialize, run, setAlivePollQuery, setAutoCommit, setConnectionRetryInterval, setDataSource, setDataSourceName, setLocation, setLoginTimeout, setLogWriter, setMaxConnectionAttempts, setMinConnections, setPassword, setStaleness, setUsername, setWaitTimeout, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

nonTXSource

public OrionPooledDataSource nonTXSource
Constructor Detail

OrionCMTDataSource

public OrionCMTDataSource()
Method Detail

setXADataSource

public void setXADataSource(javax.sql.XADataSource source)

getConnection

public java.sql.Connection getConnection()
                                  throws java.sql.SQLException
Specified by:
getConnection in interface javax.sql.DataSource
Overrides:
getConnection in class OrionPooledDataSource
Throws:
java.sql.SQLException

getConnection

public java.sql.Connection getConnection(java.lang.String username,
                                         java.lang.String password)
                                  throws java.sql.SQLException
Specified by:
getConnection in interface javax.sql.DataSource
Overrides:
getConnection in class OrionPooledDataSource
Throws:
java.sql.SQLException

setNonTXDataSource

public void setNonTXDataSource(javax.sql.ConnectionPoolDataSource source,
                               com.evermind.server.DataSourceConfig config,
                               javax.naming.Context context,
                               java.io.PrintWriter logWriter)
                        throws java.lang.InstantiationException
Throws:
java.lang.InstantiationException

setNonTXDataSource

public void setNonTXDataSource(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

removeCache

public void removeCache()
Overrides:
removeCache in class OrionPooledDataSource

setTimeout

public void setTimeout(int timeout)
Overrides:
setTimeout in class OrionPooledDataSource

setMaxConnections

public void setMaxConnections(int maxConnections)
Overrides:
setMaxConnections in class OrionPooledDataSource

getCachedConnections

public int getCachedConnections()
Overrides:
getCachedConnections in class OrionPooledDataSource

getUsedConnections

public int getUsedConnections()
Overrides:
getUsedConnections in class OrionPooledDataSource

getRuntimeInfo

public com.evermind.server.administration.DataSourceRuntimeInfo getRuntimeInfo()
Overrides:
getRuntimeInfo in class OrionPooledDataSource

addDataSourceListener

public void addDataSourceListener(com.evermind.sql.DataSourceListener listener)