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.nonxa
Class NonXAConnectionFactory

    java.lang.Object
      com.atomikos.jdbc.nonxa.NonXAConnectionFactory

All Implemented Interfaces:
  ConnectionFactory

    public class NonXAConnectionFactory

extends Object
implements ConnectionFactory

Constructor Summary
`NonXAConnectionFactory(DataSource dataSource, String userName, String password)` Create a new instance.

Method Summary
`protected DataSource` | `getDataSource()`
`int` | `getLoginTimeout()` Get the login timeout in seconds
`PrintWriter` | `getLogWriter()` Gets the log writer for debugging.
`protected String` | `getPassword()`
`XPooledConnection` | `getPooledConnection()`
`protected String` | `getUserName()`
`void` | `setLoginTimeout(int secs)` Sets the login timeout.
`void` | `setLogWriter(PrintWriter pw)` Sets the log writer for debugging.

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

Constructor Detail

### NonXAConnectionFactory

    public NonXAConnectionFactory(DataSource dataSource,
                                  String userName,
                                  String password)

  Create a new instance.

  Parameters:
    `dataSource` - The underlying (non-XA) datasource to use. For instance, a MySQL datasource.
    `userName` - The user name, or empty string if not applicable.
    `password` - The password for the given user, or empty if the user is empty.

Method Detail

### getUserName

    protected String getUserName()

### getPassword

    protected String getPassword()

### getDataSource

    protected DataSource getDataSource()

### getPooledConnection

    public XPooledConnection getPooledConnection()
                                          throws SQLException

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

### getLogWriter

    public PrintWriter getLogWriter()
                             throws SQLException

  Description copied from interface: `ConnectionFactory`
  Gets the log writer for debugging.

  Specified by:
    `getLogWriter` in interface `ConnectionFactory`
  Returns:
    PrintWriter The log writer; null if none or if not supported.
  Throws:
    `SQLException` - On error.
  See Also:
    `ConnectionFactory.getLogWriter()`

### setLogWriter

    public void setLogWriter(PrintWriter pw)
                      throws SQLException

  Description copied from interface: `ConnectionFactory`
  Sets the log writer for debugging.

  Specified by:
    `setLogWriter` in interface `ConnectionFactory`
  Parameters:
    `pw` - The print writer to log to.
  Throws:
    `SQLException` - On error.
  See Also:
    `ConnectionFactory.setLogWriter(java.io.PrintWriter)`

### getLoginTimeout

    public int getLoginTimeout()
                        throws SQLException

  Description copied from interface: `ConnectionFactory`
  Get the login timeout in seconds

  Specified by:
    `getLoginTimeout` in interface `ConnectionFactory`
  Returns:
    int The no of secs before login times out.
  Throws:
    `SQLException` - On error.
  See Also:
    `ConnectionFactory.getLoginTimeout()`

### setLoginTimeout

    public void setLoginTimeout(int secs)
                         throws SQLException

  Description copied from interface: `ConnectionFactory`
  Sets the login timeout.

  Specified by:
    `setLoginTimeout` in interface `ConnectionFactory`
  Parameters:
    `secs` - The no of seconds.
  Throws:
    `SQLException` - On error.
  See Also:
    `ConnectionFactory.setLoginTimeout(int)`

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.