sqlg2.db
Class ConnectionFactory
java.lang.Object
java.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.server.UnicastRemoteObject
sqlg2.db.ConnectionFactory
- All Implemented Interfaces:
- java.io.Serializable, java.rmi.Remote, IConnectionFactory
public class ConnectionFactory
- extends java.rmi.server.UnicastRemoteObject
- implements IConnectionFactory
RMI wrapper for IConnectionFactory
.
- See Also:
- Serialized Form
Fields inherited from class java.rmi.server.RemoteObject |
ref |
Methods inherited from class java.rmi.server.UnicastRemoteObject |
clone, exportObject, exportObject, exportObject, unexportObject |
Methods inherited from class java.rmi.server.RemoteServer |
getClientHost, getLog, setLog |
Methods inherited from class java.rmi.server.RemoteObject |
equals, getRef, hashCode, toString, toStub |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
ConnectionFactory
public ConnectionFactory(AuthenticationHelper auth,
DBSpecific specific)
throws java.rmi.RemoteException
- Constructor of the root object for RMI.
- Parameters:
auth
- authentication helper object. Cannot be null.specific
- database-specific object
- Throws:
java.rmi.RemoteException
openConnection
public IDBInterface openConnection(java.lang.String user,
java.lang.String password)
throws java.rmi.RemoteException,
java.sql.SQLException
- Description copied from interface:
IConnectionFactory
- 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)
.
- Specified by:
openConnection
in interface IConnectionFactory
- Parameters:
user
- external userpassword
- external password
- Returns:
- DB connection
- Throws:
java.rmi.RemoteException
java.sql.SQLException
openConnection
public IDBInterface openConnection(IDBInterface oldConnection,
java.lang.String password)
throws java.rmi.RemoteException,
java.sql.SQLException
- Description copied from interface:
IConnectionFactory
- This method is rarely used directly, it is intended for use by
IDBInterface.migrateTo(IConnectionFactory)
.
- Specified by:
openConnection
in interface IConnectionFactory
- Parameters:
oldConnection
- already opened DB connectionpassword
- user password
- Returns:
- new DB connection
- Throws:
java.rmi.RemoteException
java.sql.SQLException
getActiveSessions
public SessionInfo[] getActiveSessions()
throws java.rmi.RemoteException
- Description copied from interface:
IConnectionFactory
- Returns active sessions descriptors
- Specified by:
getActiveSessions
in interface IConnectionFactory
- Throws:
java.rmi.RemoteException
shutdown
public void shutdown()
- Server shutdown.
setSqlTrace
public void setSqlTrace(SqlTrace trace)