Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.atomikos.jdbc
Class SimpleDataSourceBean

    java.lang.Object
      com.atomikos.jdbc.SimpleDataSourceBean

All Implemented Interfaces:
  HeuristicDataSource, Serializable, Referenceable, ConnectionPoolDataSource, DataSource

Deprecated. As of release 3.3, the `AtomikosDataSourceBean` should be used instead.

    public class SimpleDataSourceBean

extends Object
implements HeuristicDataSource, ConnectionPoolDataSource, Serializable, Referenceable

An Atomikos DataSource implementation.

See Also:
  Serialized Form

Constructor Summary
`SimpleDataSourceBean()` Deprecated.

Method Summary
`void` | `close()` Deprecated.
`Connection` | `getConnection()` Deprecated.
`Connection` | `getConnection(HeuristicMessage msg)` Deprecated. Get a connection to the datasource for the given description of the work.
`Connection` | `getConnection(String msg)` Deprecated. Get a connection to the datasource for the given description of the work.
`Connection` | `getConnection(String user, String pw)` Deprecated.
`Connection` | `getConnection(String user, String pw, HeuristicMessage msg)` Deprecated. Get a connection to the datasource for the given description of the work.
`Connection` | `getConnection(String user, String passwd, String msg)` Deprecated. Get a connection to the datasource for the given description of the work.
`int` | `getConnectionPoolSize()` Deprecated. Get the size of the connection pool.
`int` | `getConnectionTimeout()` Deprecated. Get the timeout after which connections are checked for liveness.
`boolean` | `getExclusiveConnectionMode()` Deprecated. Get the sharing preference.
`int` | `getLoginTimeout()` Deprecated.
`PrintWriter` | `getLogWriter()` Deprecated.
`PooledConnection` | `getPooledConnection()` Deprecated.
`PooledConnection` | `getPooledConnection(String user, String pw)` Deprecated.
`Reference` | `getReference()` Deprecated.
`boolean` | `getTestOnBorrow()` Deprecated. Get whether connections should be tested when gotten.
`protected TransactionalResource` | `getTransactionalResource()` Deprecated. Get the transactional resource.
`String` | `getUniqueResourceName()` Deprecated. Get the unique resource name for this instance.
`String` | `getValidatingQuery()` Deprecated. Get the validating query.
`XADataSource` | `getXaDataSource()` Deprecated. Gets the configured XADataSource instance (if set).
`String` | `getXaDataSourceClassName()` Deprecated. Get the full name of the vendor-specific XADataSource class.
`String` | `getXaDataSourceProperties()` Deprecated. Get the XADataSource properties as one large string.
`void` | `init()` Deprecated. Init method to setup the bean for recovery and other init stuff.
`void` | `setConnectionPoolSize(int poolSize)` Deprecated. Set the size of the internal connection pool (optional).
`void` | `setConnectionTimeout(int timeout)` Deprecated. Set the timeout after which connections should be checked for liveness (optional).
`void` | `setExclusiveConnectionMode(boolean mode)` Deprecated. Set the sharing preferences (optional).
`void` | `setLoginTimeout(int seconds)` Deprecated.
`void` | `setLogWriter(PrintWriter out)` Deprecated.
`void` | `setTestOnBorrow(boolean value)` Deprecated. Set whether connections should be tested when gotten (optional).
`void` | `setUniqueResourceName(String resourceName)` Deprecated. Set the identifying name for this data source (required).
`void` | `setValidatingQuery(String query)` Deprecated. Set the validating query for this datasource (optional).
`void` | `setXaDataSource(XADataSource xads)` Deprecated. Sets the (preconfigured) XADataSource instance.
`void` | `setXaDataSourceClassName(String name)` Deprecated. Set the fully qualified name of the XADataSource class to use (required).
`void` | `setXaDataSourceProperties(String properties)` Deprecated. Set the XADataSource-specific properties as a semicolon-separated list of string values (required unless the XADataSource instance is set directly).
`void` | `validate()` Deprecated. Perform validation based on the validating query.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SimpleDataSourceBean

    public SimpleDataSourceBean()

  Deprecated.

Method Detail

### init

    public void init()
              throws SQLException

  Deprecated.
  Init method to setup the bean for recovery and other init stuff.

  Throws:
    `SQLException`

### setUniqueResourceName

    public void setUniqueResourceName(String resourceName)

  Deprecated.
  Set the identifying name for this data source (required). Used by the transaction logging mechanism. NOTE: the value should not exceed 45 bytes in length.

  Parameters:
    `resourceName` -

### getUniqueResourceName

    public String getUniqueResourceName()

  Deprecated.
  Get the unique resource name for this instance.

  Returns:
    String The name.

### setConnectionPoolSize

    public void setConnectionPoolSize(int poolSize)

  Deprecated.
  Set the size of the internal connection pool (optional). Note: this class also implements ConnectionPoolDataSource, meaning that it can be used for third-party connection pools. In that case, the internal connection pool size can still be configured to have pooling at two levels.

  Parameters:
    `poolSize` - The size of the pool.

### getConnectionPoolSize

    public int getConnectionPoolSize()

  Deprecated.
  Get the size of the connection pool.

  Returns:
    int The size.

### setTestOnBorrow

    public void setTestOnBorrow(boolean value)

  Deprecated.
  Set whether connections should be tested when gotten (optional). Default is false.

  Parameters:
    `value` - True if connections should be tested when gotten.

### getTestOnBorrow

    public boolean getTestOnBorrow()

  Deprecated.
  Get whether connections should be tested when gotten.

  Returns:

### setConnectionTimeout

    public void setConnectionTimeout(int timeout)

  Deprecated.
  Set the timeout after which connections should be checked for liveness (optional).

  Parameters:
    `timeout` - The timeout in seconds.

### getConnectionTimeout

    public int getConnectionTimeout()

  Deprecated.
  Get the timeout after which connections are checked for liveness.

  Returns:
    int The timeout.

### setExclusiveConnectionMode

    public void setExclusiveConnectionMode(boolean mode)

  Deprecated.
  Set the sharing preferences (optional).

  Parameters:
    `mode` - The mode. If true, then connections are not shared when they are in a transaction. This is the safest setting and allows to avoid problems with databases that don't implement XA correctly (such as Oracle). Setting this to true will slightly affect performance of connection pooling in a negative way. Default is true.

### getExclusiveConnectionMode

    public boolean getExclusiveConnectionMode()

  Deprecated.
  Get the sharing preference.

  Returns:
    boolean true if exclusive, false if not.

### getTransactionalResource

    protected TransactionalResource getTransactionalResource()

  Deprecated.
  Get the transactional resource.

  Returns:
    TransactionalResource The resource as it is used by the transaction service during recovery.

### setValidatingQuery

    public void setValidatingQuery(String query)

  Deprecated.
  Set the validating query for this datasource (optional). This optional property allows you to give a test query to see if the configuration works.

  Parameters:
    `query` - The SQL query that should work if the connectivity is made.

### getValidatingQuery

    public String getValidatingQuery()

  Deprecated.
  Get the validating query.

  Returns:
    String The query.

### setXaDataSourceClassName

    public void setXaDataSourceClassName(String name)

  Deprecated.
  Set the fully qualified name of the XADataSource class to use (required).

  Parameters:
    `name` - The vendor-specific XADataSource class to use. Ignored if the XADataSource instance is set directly.

### getXaDataSourceClassName

    public String getXaDataSourceClassName()

  Deprecated.
  Get the full name of the vendor-specific XADataSource class.

  Returns:
    String The fully qualified name.

### setXaDataSourceProperties

    public void setXaDataSourceProperties(String properties)

  Deprecated.
  Set the XADataSource-specific properties as a semicolon-separated list of string values (required unless the XADataSource instance is set directly).

  Parameters:
    `properties` - The properties expressed as a semi-colon separated list. For example: port=8000;user=demo;password=sa Ignored if the XADataSource instance is set directly.

### getXaDataSourceProperties

    public String getXaDataSourceProperties()

  Deprecated.
  Get the XADataSource properties as one large string.

  Returns:
    String The poperty list as set previously by setXaDataSourceProperties.

### setXaDataSource

    public void setXaDataSource(XADataSource xads)

  Deprecated.
  Sets the (preconfigured) XADataSource instance.

  Parameters:
    `xads` - The instance.

### getXaDataSource

    public XADataSource getXaDataSource()

  Deprecated.
  Gets the configured XADataSource instance (if set).

  Returns:
    The XADataSource - or null if not set.

### validate

    public void validate()
                  throws SQLException

  Deprecated.
  Perform validation based on the validating query. This method does nothing if no query was specified.

  Throws:
    `SQLException` - If validation fails.

### getConnection

    public Connection getConnection()
                             throws SQLException

  Deprecated.
  Specified by:
    `getConnection` in interface `DataSource`
  Throws:
    `SQLException`
  See Also:
    `HeuristicDataSource`

### getConnection

    public Connection getConnection(String user,
                                    String pw)
                             throws SQLException

  Deprecated.
  Specified by:
    `getConnection` in interface `DataSource`
  Throws:
    `SQLException`
  See Also:
    `HeuristicDataSource`

### getConnection

    public Connection getConnection(HeuristicMessage msg)
                             throws SQLException

  Deprecated.
  Description copied from interface: `HeuristicDataSource`
  Get a connection to the datasource for the given description of the work.

  Specified by:
    `getConnection` in interface `HeuristicDataSource`
  Parameters:
    `msg` - The heuristic message that best describes the work about to be done.
  Returns:
    Connection The connection.
  Throws:
    `SQLException` - On error.
  See Also:
    `HeuristicDataSource`

### getConnection

    public Connection getConnection(String user,
                                    String pw,
                                    HeuristicMessage msg)
                             throws SQLException

  Deprecated.
  Description copied from interface: `HeuristicDataSource`
  Get a connection to the datasource for the given description of the work.

  Specified by:
    `getConnection` in interface `HeuristicDataSource`
  Parameters:
    `user` - The user name to use.
    `pw` - The password.
    `msg` - The heuristic message that best describes the work about to be done.
  Returns:
    Connection The connection.
  Throws:
    `SQLException` - On error.
  See Also:
    `HeuristicDataSource`

### getConnection

    public Connection getConnection(String msg)
                             throws SQLException

  Deprecated.
  Description copied from interface: `HeuristicDataSource`
  Get a connection to the datasource for the given description of the work.

  Specified by:
    `getConnection` in interface `HeuristicDataSource`
  Parameters:
    `msg` - The heuristic message that best describes the work about to be done.
  Returns:
    Connection The connection.
  Throws:
    `SQLException` - On error.
  See Also:
    `HeuristicDataSource`

### getConnection

    public Connection getConnection(String user,
                                    String passwd,
                                    String msg)
                             throws SQLException

  Deprecated.
  Description copied from interface: `HeuristicDataSource`
  Get a connection to the datasource for the given description of the work.

  Specified by:
    `getConnection` in interface `HeuristicDataSource`
  Parameters:
    `user` - The user name to use.
    `passwd` - The password.
    `msg` - The heuristic message that best describes the work about to be done.
  Returns:
    Connection The connection.
  Throws:
    `SQLException` - On error.
  See Also:
    `HeuristicDataSource`

### getLoginTimeout

    public int getLoginTimeout()
                        throws SQLException

  Deprecated.
  Specified by:
    `getLoginTimeout` in interface `ConnectionPoolDataSource`
  Specified by:
    `getLoginTimeout` in interface `DataSource`
  Throws:
    `SQLException`
  See Also:
    `HeuristicDataSource`

### getLogWriter

    public PrintWriter getLogWriter()
                             throws SQLException

  Deprecated.
  Specified by:
    `getLogWriter` in interface `ConnectionPoolDataSource`
  Specified by:
    `getLogWriter` in interface `DataSource`
  Throws:
    `SQLException`
  See Also:
    `HeuristicDataSource`

### setLoginTimeout

    public void setLoginTimeout(int seconds)
                         throws SQLException

  Deprecated.
  Specified by:
    `setLoginTimeout` in interface `ConnectionPoolDataSource`
  Specified by:
    `setLoginTimeout` in interface `DataSource`
  Throws:
    `SQLException`
  See Also:
    `HeuristicDataSource`

### setLogWriter

    public void setLogWriter(PrintWriter out)
                      throws SQLException

  Deprecated.
  Specified by:
    `setLogWriter` in interface `ConnectionPoolDataSource`
  Specified by:
    `setLogWriter` in interface `DataSource`
  Throws:
    `SQLException`
  See Also:
    `HeuristicDataSource`

### close

    public void close()
               throws SQLException

  Deprecated.
  Throws:
    `SQLException`
  See Also:
    `HeuristicDataSource`

### getReference

    public Reference getReference()
                           throws NamingException

  Deprecated.
  Specified by:
    `getReference` in interface `Referenceable`
  Throws:
    `NamingException`
  See Also:
    `Referenceable`

### getPooledConnection

    public PooledConnection getPooledConnection()
                                         throws SQLException

  Deprecated.
  Specified by:
    `getPooledConnection` in interface `ConnectionPoolDataSource`
  Throws:
    `SQLException`
  See Also:
    `ConnectionPoolDataSource.getPooledConnection()`

### getPooledConnection

    public PooledConnection getPooledConnection(String user,
                                                String pw)
                                         throws SQLException

  Deprecated.
  Specified by:
    `getPooledConnection` in interface `ConnectionPoolDataSource`
  Throws:
    `SQLException`
  See Also:
    `ConnectionPoolDataSource.getPooledConnection(java.lang.String, java.lang.String)`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2012. All Rights Reserved.