com.atomikos.jdbc.nonxa
Class NonXADataSourceBean

java.lang.Object
  extended by com.atomikos.jdbc.nonxa.NonXADataSourceBean
All Implemented Interfaces:
HeuristicDataSource, Serializable, Referenceable, DataSource

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

public class NonXADataSourceBean
extends Object
implements HeuristicDataSource, Referenceable, Serializable

A Bean class for DataSource access to non-XA JDBC implementations. Instances are transaction-aware and can rollback the work done over multiple connections (provided that all work was done in one and the same thread).

See Also:
Serialized Form

Constructor Summary
NonXADataSourceBean()
          Deprecated.  
 
Method Summary
 void close()
          Deprecated. Close the instance after use.
 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 pass)
          Deprecated.  
 Connection getConnection(String user, String passwd, 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 getConnectionTimeout()
          Deprecated.  
 String getDriverClassName()
          Deprecated.  
 int getLoginTimeout()
          Deprecated.  
 PrintWriter getLogWriter()
          Deprecated.  
 String getPassword()
          Deprecated.  
 int getPoolSize()
          Deprecated.  
 Reference getReference()
          Deprecated.  
 boolean getTestOnBorrow()
          Deprecated.  
 String getUniqueResourceName()
          Deprecated.  
 String getUrl()
          Deprecated.  
 String getUser()
          Deprecated.  
 String getValidatingQuery()
          Deprecated. Get the validating query
 void setConnectionTimeout(int secs)
          Deprecated. Set the refresh timeout interval for pool connections (optional).
 void setDriverClassName(String name)
          Deprecated. Set the name of the driver class that the DriverManager should use (required).
 void setLoginTimeout(int val)
          Deprecated.  
 void setLogWriter(PrintWriter pw)
          Deprecated.  
 void setPassword(String string)
          Deprecated. Set the password to use.
 void setPoolSize(int size)
          Deprecated. Set the minimum size of the pool (optional).
 void setTestOnBorrow(boolean value)
          Deprecated. Set whether connections should be tested when gotten.
 void setUniqueResourceName(String name)
          Deprecated. Set the JNDI name to bind on (required).
 void setUrl(String url)
          Deprecated. Set the URL to use for getting connections (required).
 void setUser(String string)
          Deprecated. Set the user name to get connections with.
 void setValidatingQuery(String query)
          Deprecated. Set a validating query for easy verification of connectivity (optional).
 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

NonXADataSourceBean

public NonXADataSourceBean()
Deprecated. 
Method Detail

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(com.atomikos.icatch.HeuristicMessage)

getConnection

public Connection getConnection(String user,
                                String passwd,
                                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.
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.getConnection(java.lang.String, java.lang.String, com.atomikos.icatch.HeuristicMessage)

getReference

public Reference getReference()
                       throws NamingException
Deprecated. 
Specified by:
getReference in interface Referenceable
Throws:
NamingException
See Also:
Referenceable.getReference()

getConnection

public Connection getConnection()
                         throws SQLException
Deprecated. 
Specified by:
getConnection in interface DataSource
Throws:
SQLException
See Also:
DataSource.getConnection()

getConnection

public Connection getConnection(String user,
                                String pass)
                         throws SQLException
Deprecated. 
Specified by:
getConnection in interface DataSource
Throws:
SQLException
See Also:
DataSource.getConnection(java.lang.String, java.lang.String)

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(java.lang.String, java.lang.String, com.atomikos.icatch.HeuristicMessage)

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.getConnection(java.lang.String, java.lang.String, com.atomikos.icatch.HeuristicMessage)

getLogWriter

public PrintWriter getLogWriter()
                         throws SQLException
Deprecated. 
Specified by:
getLogWriter in interface DataSource
Throws:
SQLException
See Also:
DataSource.getLogWriter()

setLogWriter

public void setLogWriter(PrintWriter pw)
                  throws SQLException
Deprecated. 
Specified by:
setLogWriter in interface DataSource
Throws:
SQLException
See Also:
DataSource.setLogWriter(java.io.PrintWriter)

setLoginTimeout

public void setLoginTimeout(int val)
                     throws SQLException
Deprecated. 
Specified by:
setLoginTimeout in interface DataSource
Throws:
SQLException
See Also:
DataSource.setLoginTimeout(int)

getLoginTimeout

public int getLoginTimeout()
                    throws SQLException
Deprecated. 
Specified by:
getLoginTimeout in interface DataSource
Throws:
SQLException
See Also:
DataSource.getLoginTimeout()

getConnectionTimeout

public int getConnectionTimeout()
Deprecated. 
Returns:
The connection refresh timeout in secs.

getDriverClassName

public String getDriverClassName()
Deprecated. 
Returns:
The driver class to be used by the DriverManager.

getUniqueResourceName

public String getUniqueResourceName()
Deprecated. 
Returns:
The JNDI name to bind on.

getPassword

public String getPassword()
Deprecated. 
Returns:
The password.

getPoolSize

public int getPoolSize()
Deprecated. 
Returns:
The poolsize.

getUrl

public String getUrl()
Deprecated. 
Returns:
The URL to connect with.

getUser

public String getUser()
Deprecated. 
Returns:
The user to connect with.

setTestOnBorrow

public void setTestOnBorrow(boolean value)
Deprecated. 
Set whether connections should be tested when gotten.

Parameters:
value - Whether to test connections when taken out of the pool.

getTestOnBorrow

public boolean getTestOnBorrow()
Deprecated. 
Returns:
whether to test connections when gotten.

setConnectionTimeout

public void setConnectionTimeout(int secs)
Deprecated. 
Set the refresh timeout interval for pool connections (optional).

Parameters:
secs - The value in seconds.

setDriverClassName

public void setDriverClassName(String name)
Deprecated. 
Set the name of the driver class that the DriverManager should use (required).

Parameters:
name - The name.

setUniqueResourceName

public void setUniqueResourceName(String name)
Deprecated. 
Set the JNDI name to bind on (required). Should be unique.

Parameters:
name - The JNDI name.

setPassword

public void setPassword(String string)
Deprecated. 
Set the password to use.

Parameters:
string -

setPoolSize

public void setPoolSize(int size)
Deprecated. 
Set the minimum size of the pool (optional).

Parameters:
size -

setUrl

public void setUrl(String url)
Deprecated. 
Set the URL to use for getting connections (required).

Parameters:
url -

setUser

public void setUser(String string)
Deprecated. 
Set the user name to get connections with.

Parameters:
string -

setValidatingQuery

public void setValidatingQuery(String query)
Deprecated. 
Set a validating query for easy verification of connectivity (optional).

Parameters:
query -

getValidatingQuery

public String getValidatingQuery()
Deprecated. 
Get the validating query

Returns:
String The query.

close

public void close()
Deprecated. 
Close the instance after use. Calling this method will clean up the internal pool and housekeeping thread, so that the VM can exit normally.


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.


Copyright © 2011. All Rights Reserved.