Mimer JDBC Engine 2.12

com.mimer.jdbc
Class MimerConnectionPoolDataSource

java.lang.Object
  |
  +--com.mimer.jdbc.MimerDataSource
        |
        +--com.mimer.jdbc.MimerConnectionPoolDataSource
All Implemented Interfaces:
ConnectionPoolDataSource, DataSource, Referenceable, Serializable

public class MimerConnectionPoolDataSource
extends MimerDataSource
implements ConnectionPoolDataSource, Serializable, Referenceable

MimerConnectionPoolDataSource implements the javax.sql.ConnectionPoolDataSource interface and its primary purpose is to provide a connection object to be embedded in connection pools.

The MimerConnectionDataSource object supports Javabeans. This means this class may be configured using generic IDE tools.

Before a connection is attempted by calling MimerConnectionPoolDataSource.getConnection the database name attribute must be set. This specifies database on the host to connect to. Use MimerDataSource.setDatabaseName(java.lang.String) to set this attribute.

See Also:
Serialized Form

Constructor Summary
MimerConnectionPoolDataSource()
           
 
Method Summary
 Connection getConnection()
          The plain .getConnection() method from DataSource is available but always throws an exception.
 Connection getConnection(String user, String password)
          The plain .getConnection() method from DataSource is available but always throws an exception.
 PooledConnection getPooledConnection()
          Attempts the connection to the host.
 PooledConnection getPooledConnection(String user, String password)
          Attempts the connection to the host with the specified user and password.
 
Methods inherited from class com.mimer.jdbc.MimerDataSource
getDatabaseName, getDescription, getLoginTimeout, getLogWriter, getPassword, getPortNumber, getReference, getServerName, getUser, setDatabaseName, setDescription, setLoginTimeout, setLogWriter, setPassword, setPortNumber, setServerName, setUser
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.sql.ConnectionPoolDataSource
getLoginTimeout, getLogWriter, setLoginTimeout, setLogWriter
 
Methods inherited from interface javax.naming.Referenceable
getReference
 

Constructor Detail

MimerConnectionPoolDataSource

public MimerConnectionPoolDataSource()
Method Detail

getConnection

public Connection getConnection()
                         throws SQLException
The plain .getConnection() method from DataSource is available but always throws an exception.

Specified by:
getConnection in interface DataSource
Overrides:
getConnection in class MimerDataSource
Returns:
The new connection.
SQLException

getConnection

public Connection getConnection(String user,
                                String password)
                         throws SQLException
The plain .getConnection() method from DataSource is available but always throws an exception.

Specified by:
getConnection in interface DataSource
Overrides:
getConnection in class MimerDataSource
Returns:
The new connection.
SQLException

getPooledConnection

public PooledConnection getPooledConnection()
                                     throws SQLException
Attempts the connection to the host.

Before calling this method, the following attributes should be set.

  • Database name.
  • User name. The user in the database to connect as. Use MimerDataSource.setUser(java.lang.String) to set this attribute.
  • Password. The password of the above user. Use MimerDataSource.setPassword(java.lang.String) to set this attribute.
  • Specified by:
    getPooledConnection in interface ConnectionPoolDataSource
    Returns:
    The new connection.
    Throws:
    SQLException - if an error occurs. SQLSTATE 08004 is thrown if the connection failed because of a wrong user or password, or if an attempt was made to connect to a Mimer SQL server older than 8.2. 08001 is thrown if the connection failed because the server could not be contacted, perhaps it was down.

    getPooledConnection

    public PooledConnection getPooledConnection(String user,
                                                String password)
                                         throws SQLException
    Attempts the connection to the host with the specified user and password.

    Before calling this method, the following attributes should be set.

  • Database name.

    Specified by:
    getPooledConnection in interface ConnectionPoolDataSource
    Returns:
    The new connection.
    Throws:
    SQLException - if an error occurs. SQLSTATE 08004 is thrown if the connection failed because of a wrong user or password, or if an attempt was made to connect to a Mimer SQL server older than 8.2. 08001 is thrown if the connection failed because the server could not be contacted, perhaps it was down.

  • Mimer JDBC Engine 2.12

    Submit a comment or suggestion Version 2.12 of Mimer JDBC Engine
    Copyright Upright Database Technology AB, Box 1713, SE-751 47 UPPSALA, Sweden. All Rights Reserved.