sqlg2.db
Interface IConnectionFactory

All Superinterfaces:
java.rmi.Remote
All Known Implementing Classes:
ConnectionFactory, HttpConnectionFactory, LocalConnectionFactory

public interface IConnectionFactory
extends java.rmi.Remote

Root interface for DB objects hierarchy - all other objects are produced by IConnectionFactory. When working through RMI the object of this class should be obtained by Naming, when working with direct DB connection - by LocalConnectionFactory.LocalConnectionFactory(AuthenticationHelper, DBSpecific).


Field Summary
static java.lang.String AUTH_BAD_APP
          Error message (Throwable.getMessage()) for "No access to chosen application"
static java.lang.String AUTH_BAD_PASS
          Error message (Throwable.getMessage()) for "Bad password"
static java.lang.String AUTH_BAD_USER
          Error message (Throwable.getMessage()) for "Bad username"
static java.lang.String AUTH_FAILED
          Error message (Throwable.getMessage()) for "Authentication failed (for unknown reason)"
static java.lang.String DRIVER_NOT_FOUND
          Error message (Throwable.getMessage()) for "JDBC driver not found"
 
Method Summary
 SessionInfo[] getActiveSessions()
          Returns active sessions descriptors
 IDBInterface openConnection(IDBInterface oldConnection, java.lang.String password)
          This method is rarely used directly, it is intended for use by IDBInterface.migrateTo(IConnectionFactory).
 IDBInterface openConnection(java.lang.String user, java.lang.String password)
          Connecting to DB using external authentication (server must support that) - connection properties are taken from AuthenticationHelper.
 

Field Detail

DRIVER_NOT_FOUND

static final java.lang.String DRIVER_NOT_FOUND
Error message (Throwable.getMessage()) for "JDBC driver not found"

See Also:
Constant Field Values

AUTH_FAILED

static final java.lang.String AUTH_FAILED
Error message (Throwable.getMessage()) for "Authentication failed (for unknown reason)"

See Also:
Constant Field Values

AUTH_BAD_PASS

static final java.lang.String AUTH_BAD_PASS
Error message (Throwable.getMessage()) for "Bad password"

See Also:
Constant Field Values

AUTH_BAD_APP

static final java.lang.String AUTH_BAD_APP
Error message (Throwable.getMessage()) for "No access to chosen application"

See Also:
Constant Field Values

AUTH_BAD_USER

static final java.lang.String AUTH_BAD_USER
Error message (Throwable.getMessage()) for "Bad username"

See Also:
Constant Field Values
Method Detail

openConnection

IDBInterface openConnection(java.lang.String user,
                            java.lang.String password)
                            throws java.rmi.RemoteException,
                                   java.sql.SQLException
Connecting to DB using external authentication (server must support that) - connection properties are taken from AuthenticationHelper. Given parameters are passed to AuthenticationHelper.authenticate(java.sql.Connection,String,String).

Parameters:
user - external user
password - external password
Returns:
DB connection
Throws:
java.rmi.RemoteException
java.sql.SQLException

openConnection

IDBInterface openConnection(IDBInterface oldConnection,
                            java.lang.String password)
                            throws java.rmi.RemoteException,
                                   java.sql.SQLException
This method is rarely used directly, it is intended for use by IDBInterface.migrateTo(IConnectionFactory).

Parameters:
oldConnection - already opened DB connection
password - user password
Returns:
new DB connection
Throws:
java.rmi.RemoteException
java.sql.SQLException

getActiveSessions

SessionInfo[] getActiveSessions()
                                throws java.rmi.RemoteException
Returns active sessions descriptors

Throws:
java.rmi.RemoteException