be.SIRAPRISE.client
Class DBConnection

java.lang.Object
  extended by be.SIRAPRISE.client.DBConnection
Direct Known Subclasses:
OneShotDBConnection, ReusableDBConnection

public abstract class DBConnection
extends java.lang.Object

Class used to communicate between a program and the sira_prise dbms. When DBConnections are created, the following information must be provided :

parameter Description.
host The DNS identification of the host to connect to. It may either be its DNS name or its IP address in dotted decimal.
port The IP port to connect to.
clientID The identification of the client trying to connect.
signatureAlgorithmNames A set of Strings denoting Signature names that the client is willing and able to use in signing.
initialAutoCommitForTransactions A boolean flag indicating the default autoCommit setting that will be given to each transaction started on this connection.
requestConnectionIdleTime The idle time in milliseconds that the client requests for this connection.
encryptionAlgorithmNames A set of Strings denoting names of Cipher algorithms that the client is willing and able to use.
signer A callback object that will be called upon to compute signatures if and when message signing is used.

Constructors exist in various combinations, possibly leaving out some of the items mentioned. In such cases, default values are used. These default values are configurable for the client in the DBCONNECTION.PROPERTIES file (see the DBConnectionProperties class for more information on where the client package searches for this file). The following table mentions the property name holding this default value for each optional field, and the value the client package will use in the absence of such a property.

Field Property Default if property absent
signatureAlgorithmNames DEFAULTSIGNATUREALGORITHMNAMES (property value must be a comma-separated list of algorithm names) SPS, MD5withRSA, MD2withRSA, SHA1withRSA, SHA1withDSA
initialAutoCommitForTransactions DEFAULTAUTOCOMMITFORTRANSACTIONS False
transationMode TRANSACTIONSREADONLY (property value is a boolean ; required value for backward compatibility is 'False') False
requestConnectionIdleTime DEFAULTCONNECTIONIDLETIME 0
encryptionAlgorithmNames DEFAULTENCRYPTIONALGORITHMNAMES (property value must be a comma-separated list of Cipher algorithm names SPE


Though this may look complicated, it only means that the constructors use the following sources of information, in the order given :
  1. The info explicitly provided by the constructor
  2. The default configured for this client in DBCONNECTION.PROPERTIES
  3. The default defined by the client package itself


Constructor Summary
DBConnection(java.lang.String host, int port, java.util.Set<java.lang.String> signatureAlgorithmNames, java.lang.String clientID, boolean initialAutoCommitForTransactions, long requestConnectionIdleTime, java.util.Set<java.lang.String> encryptionAlgorithmNames, Signer signer)
          Creates a connection to the server on the specified host and port with the given autoCommit setting, and opens it for communication.
DBConnection(java.lang.String host, int port, java.util.Set<java.lang.String> signatureAlgorithmNames, java.lang.String clientID, boolean initialAutoCommitForTransactions, long requestConnectionIdleTime, Signer signer)
          Creates a connection to the server on the specified host and port with the given autoCommit setting, and opens it for communication.
DBConnection(java.lang.String host, int port, java.util.Set<java.lang.String> signatureAlgorithmNames, java.lang.String clientID, boolean initialAutoCommitForTransactions, java.util.Set<java.lang.String> encryptionAlgorithmNames, Signer signer)
          Creates a connection to the server on the specified host and port, and opens it for communication.
DBConnection(java.lang.String host, int port, java.util.Set<java.lang.String> signatureAlgorithmNames, java.lang.String clientID, boolean initialAutoCommitForTransactions, Signer privateKeyProvider)
          Creates a connection to the server on the specified host and port, and opens it for communication.
DBConnection(java.lang.String host, int port, java.util.Set<java.lang.String> signatureAlgorithmNames, java.lang.String clientID, long requestConnectionIdleTime, java.util.Set<java.lang.String> encryptionAlgorithmNames, Signer signer)
          Creates a connection to the server on the specified host and port, and opens it for communication.
DBConnection(java.lang.String host, int port, java.util.Set<java.lang.String> signatureAlgorithmNames, java.lang.String clientID, long requestConnectionIdleTime, Signer signer)
          Creates a connection to the server on the specified host and port, and opens it for communication.
DBConnection(java.lang.String host, int port, java.util.Set<java.lang.String> signatureAlgorithmNames, java.lang.String clientID, java.util.Set<java.lang.String> encryptionAlgorithmNames, Signer signer)
          Creates a connection to the server on the specified host and port, and opens it for communication.
DBConnection(java.lang.String host, int port, java.util.Set<java.lang.String> signatureAlgorithmNames, java.lang.String clientID, Signer signer)
          Creates a connection to the server on the specified host and port, and opens it for communication.
DBConnection(java.lang.String host, int port, java.lang.String clientID, boolean initialAutoCommitForTransactions, long requestConnectionIdleTime, java.util.Set<java.lang.String> encryptionAlgorithmNames, Signer signer)
          Creates a connection to the server on the specified host and port with the given autoCommit setting, and opens it for communication.
DBConnection(java.lang.String host, int port, java.lang.String clientID, boolean initialAutoCommitForTransactions, long requestConnectionIdleTime, Signer signer)
          Creates a connection to the server on the specified host and port with the given autoCommit setting, and opens it for communication.
DBConnection(java.lang.String host, int port, java.lang.String clientID, boolean initialAutoCommitForTransactions, java.util.Set<java.lang.String> encryptionAlgorithmNames, Signer signer)
          Creates a connection to the server on the specified host and port, and opens it for communication.
DBConnection(java.lang.String host, int port, java.lang.String clientID, boolean initialAutoCommitForTransactions, Signer signer)
          Creates a connection to the server on the specified host and port, and opens it for communication.
DBConnection(java.lang.String host, int port, java.lang.String clientID, long requestConnectionIdleTime, java.util.Set<java.lang.String> encryptionAlgorithmNames, Signer signer)
          Creates a connection to the server on the specified host and port, and opens it for communication.
DBConnection(java.lang.String host, int port, java.lang.String clientID, long requestConnectionIdleTime, Signer signer)
          Creates a connection to the server on the specified host and port, and opens it for communication.
DBConnection(java.lang.String host, int port, java.lang.String clientID, java.util.Set<java.lang.String> encryptionAlgorithmNames, Signer signer)
          Creates a connection to the server on the specified host and port, and opens it for communication.
DBConnection(java.lang.String host, int port, java.lang.String clientID, Signer signer)
          Creates a connection to the server on the specified host and port, and opens it for communication.
 
Method Summary
abstract  void close()
          Closes the connection.
 void commit()
          Deprecated. Use the commit() method of the DBTransaction object instead
 AbstractRelation compileAndCacheQuery(java.lang.String query)
          Deprecated. use the compileAndCacheQuery() method from the DBTransaction instead
 AbstractRelation compileQuery(java.lang.String query)
          Deprecated. use compileQuery() on the DBTransaction object (obtained from startTransaction()) instead.
 void endTransaction(boolean commit)
          Deprecated. instead, use end() on the DBTransaction object obtained from startTransaction().
 AbstractRelation execDmlCommand(java.lang.String cmd)
          Deprecated. Use the execDmlCommand() method from the DBTransaction instead
 AbstractRelation execDmlCommandAndEndTransaction(java.lang.String cmd)
          Deprecated. instead, use execDmlCommandAndEndTransaction() on the DBTransaction object obtained from startTransaction()
 AbstractRelation execMultipleStatement(java.util.Collection<?> commands)
          Deprecated. replace this method by the execMultipleStatementAndEndTransaction() of the DBTransaction object obtained from startTransaction()
 AbstractRelation execMultipleStatement(java.lang.String[] commands)
          Deprecated. replace this method by the execMultipleStatementAndEndTransaction() of the DBTransaction object obtained from startTransaction()
 AbstractRelation execMultipleStatementAndEndTransaction(java.util.Collection<?> commands)
          Deprecated. replace this method by the execMultipleStatementAndEndTransaction() of the DBTransaction object obtained from startTransaction()
 AbstractRelation execMultipleStatementAndEndTransaction(java.lang.String[] commands)
          Deprecated. replace this method by the execMultipleStatementAndEndTransaction() of the DBTransaction object obtained from startTransaction()
 AbstractRelation[] execQueries(java.lang.String[] expression)
          Deprecated. replace this method by the execQueries() method of the DBTransaction object obtained from startTransaction()
 AbstractRelation[] execQueriesAndEndTransaction(java.lang.String[] expression)
          Deprecated. replace this method by the execQueriesAndEndTransaction() method of the DBTransaction object obtained from startTransaction()
 AbstractRelation execQuery(java.lang.String expression)
          Deprecated. replace this method by the execQuery() method of the DBTransaction object obtained from startTransaction()
 AbstractRelation execQueryAndEndTransaction(java.lang.String expression)
          Deprecated. replace this method by the execQueryAndEndTransaction() method of the DBTransaction object obtained from startTransaction()
 boolean getDefaultTransactionAutoCommit()
          Gets The default autocommit setting for all transactions created on this connection
 Version getSpecificationVersionForServer()
          Gets The specification version to use in communications with the server
static boolean isDefaultInitialAutoCommitForTransactions()
          Gets defaultInitialAutoCommitForTransactions
 boolean isOpen()
          Checks whether a connection is open
 void rollback()
          Deprecated. Use the rollback() method of the DBTransaction object obtained from the connection instead
 void setDefaultTransactionAutoCommit(boolean autoCommit)
          Sets The default autocommit setting for all transactions created on this connection
 DBTransaction startTransaction()
          Starts an anonymous transaction on the connection with the default autocommit, transactionmode and ddl capture settings for transactions created on this connection
 DBTransaction startTransaction(boolean autoCommit)
          Starts an anonymous transaction on the connection with the given autocommit setting
 DBTransaction startTransaction(boolean autoCommit, DDLCapture ddlCapture)
          Starts an anonymous transaction on the connection with the given autocommit and ddl capture settings
 DBTransaction startTransaction(boolean autoCommit, TransactionMode transactionMode)
          Starts an anonymous transaction in the given transaction mode on the connection with the given autocommit setting
 DBTransaction startTransaction(boolean autoCommit, TransactionMode transactionMode, DDLCapture ddlCapture)
          Starts an anonymous transaction in the given transaction mode on the connection with the given autocommit setting
 DBTransaction startTransaction(DDLCapture ddlCapture)
          Starts an anonymous transaction on the connection with the default autocommit and transactionmode settings for transactions created on this connection, and the given ddl capture setting
 DBTransaction startTransaction(java.lang.String userID, boolean userAuthenticatedByClient, java.lang.String signatureAlgorithm, byte[] signature)
          Starts a transaction on the connection with the default autocommit setting for transactions created on this connection
 DBTransaction startTransaction(java.lang.String userID, boolean userAuthenticatedByClient, java.lang.String signatureAlgorithm, byte[] signature, boolean autoCommit, TransactionMode transactionMode)
          Starts a transaction on the connection with the given autoCommit setting
 DBTransaction startTransaction(java.lang.String userID, boolean userAuthenticatedByClient, java.lang.String signatureAlgorithm, byte[] signature, boolean autoCommit, TransactionMode transactionMode, DDLCapture captureDDL)
          Starts a transaction on the connection with the given autoCommit setting
 DBTransaction startTransaction(java.lang.String userID, boolean userAuthenticatedByClient, java.lang.String signatureAlgorithm, byte[] signature, DDLCapture ddlCapture)
          Starts a transaction on the connection with the default autocommit setting for transactions created on this connection
 DBTransaction startTransaction(java.lang.String userID, boolean userAuthenticatedByClient, java.lang.String signatureAlgorithm, byte[] signature, TransactionMode transactionMode)
          Starts a transaction on the connection with the default autocommit setting for transactions created on this connection
 DBTransaction startTransaction(java.lang.String userID, boolean userAuthenticatedByClient, java.lang.String signatureAlgorithm, byte[] signature, TransactionMode transactionMode, DDLCapture ddlCapture)
          Starts a transaction on the connection with the default autocommit setting for transactions created on this connection
 DBTransaction startTransaction(java.lang.String userID, Signer userIDSigner)
          Starts a transaction on the connection for the named user and with the default autocommit setting for transactions created on this connection.
 DBTransaction startTransaction(java.lang.String userID, Signer userIDSigner, boolean autoCommit)
          Starts a transaction on the connection for the named user and with the default autocommit setting for transactions created on this connection.
 DBTransaction startTransaction(java.lang.String userID, Signer userIDSigner, boolean autoCommit, TransactionMode transactionMode)
          Starts a transaction in the given transaction mode on the connection for the named user and with the default autocommit setting for transactions created on this connection.
 DBTransaction startTransaction(java.lang.String userID, Signer userIDSigner, TransactionMode transactionMode)
          Starts a transaction in the given read-only mode on the connection for the named user and with the default autocommit setting for transactions created on this connection.
 DBTransaction startTransaction(TransactionMode transactionMode)
          Starts an anonymous transaction in the given transaction mode on the connection with the default autocommit setting for transactions created on this connection
 DBTransaction startTransaction(TransactionMode transactionMode, DDLCapture ddlCapture)
          Starts an anonymous transaction in the given transaction mode on the connection with the default autocommit setting for transactions created on this connection
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DBConnection

public DBConnection(java.lang.String host,
                    int port,
                    java.util.Set<java.lang.String> signatureAlgorithmNames,
                    java.lang.String clientID,
                    boolean initialAutoCommitForTransactions,
                    long requestConnectionIdleTime,
                    java.util.Set<java.lang.String> encryptionAlgorithmNames,
                    Signer signer)
             throws DBException,
                    java.io.IOException,
                    CommunicationProtocolException
Creates a connection to the server on the specified host and port with the given autoCommit setting, and opens it for communication.

Parameters:
host - The identification of the host. It may either be its DNS name or its IP address in dotted decimal.
port - The port to which to connect.
signatureAlgorithmNames - a specified set of usable signature algorithm names
clientID - The ID identifying the client of this connection to sira_prise
initialAutoCommitForTransactions - true if the transactions created on this connection should have their autocommit set to true
requestConnectionIdleTime - The requested time in milliseconds that the connection is allowed to stay idle
encryptionAlgorithmNames - A specified set of usable encryption protocol names
signer - The Signer object that will be called upon to compute the needed signature
Throws:
java.io.IOException - if an I/O error occurs when creating the TCP socket.
CommunicationProtocolException - If an unexpected message was received during the handshake
DBException - If an error was detected on the server during the handshake

DBConnection

public DBConnection(java.lang.String host,
                    int port,
                    java.util.Set<java.lang.String> signatureAlgorithmNames,
                    java.lang.String clientID,
                    boolean initialAutoCommitForTransactions,
                    long requestConnectionIdleTime,
                    Signer signer)
             throws java.io.IOException,
                    CommunicationProtocolException,
                    DBException
Creates a connection to the server on the specified host and port with the given autoCommit setting, and opens it for communication.

Parameters:
host - The identification of the host. It may either be its DNS name or its IP address in dotted decimal.
port - The port to which to connect.
signatureAlgorithmNames - a specified set of usable signature algorithm names
clientID - The ID identifying the client of this connection to sira_prise
initialAutoCommitForTransactions - true if the transactions created on this connection should have their autocommit set to true
requestConnectionIdleTime - The requested time in milliseconds that the connection is allowed to stay idle
signer - The Signer object that will be called upon to compute the needed signature
Throws:
java.io.IOException - if an I/O error occurs when creating the TCP socket.
CommunicationProtocolException - If an unexpected message was received during the handshake
DBException - If an error was detected on the server during the handshake

DBConnection

public DBConnection(java.lang.String host,
                    int port,
                    java.util.Set<java.lang.String> signatureAlgorithmNames,
                    java.lang.String clientID,
                    boolean initialAutoCommitForTransactions,
                    java.util.Set<java.lang.String> encryptionAlgorithmNames,
                    Signer signer)
             throws java.io.IOException,
                    CommunicationProtocolException,
                    DBException
Creates a connection to the server on the specified host and port, and opens it for communication. AutoCommit will be OFF. The requested connection idle time is the default time configured in the client properties.

Parameters:
host - The identification of the host. It may either be its DNS name or its IP address in dotted decimal.
port - The port to which to connect.
signatureAlgorithmNames - a specified set of usable signature algorithm names
clientID - The userID identifying the user of this connection to sira_prise
initialAutoCommitForTransactions - true if the transactions created on this connection should have their autocommit set to true
encryptionAlgorithmNames - a specified set of usable encryption protocol names
signer - The Signer object that will be called upon to compute the needed signature
Throws:
java.io.IOException - if an I/O error occurs when creating the TCP socket.
CommunicationProtocolException - If an unexpected message was received during the handshake
DBException - If an error was detected on the server during the handshake

DBConnection

public DBConnection(java.lang.String host,
                    int port,
                    java.util.Set<java.lang.String> signatureAlgorithmNames,
                    java.lang.String clientID,
                    boolean initialAutoCommitForTransactions,
                    Signer privateKeyProvider)
             throws java.io.IOException,
                    CommunicationProtocolException,
                    DBException
Creates a connection to the server on the specified host and port, and opens it for communication. AutoCommit will be OFF. The requested connection idle time is the default time configured in the client properties.

Parameters:
host - The identification of the host. It may either be its DNS name or its IP address in dotted decimal.
port - The port to which to connect.
signatureAlgorithmNames - a specified set of usable signature algorithm names
clientID - The userID identifying the user of this connection to sira_prise
initialAutoCommitForTransactions - true if the transactions created on this connection should have their autocommit set to true
privateKeyProvider - The Signer object that will be called upon to compute the needed signature
Throws:
java.io.IOException - if an I/O error occurs when creating the TCP socket.
CommunicationProtocolException - If an unexpected message was received during the handshake
DBException - If an error was detected on the server during the handshake

DBConnection

public DBConnection(java.lang.String host,
                    int port,
                    java.util.Set<java.lang.String> signatureAlgorithmNames,
                    java.lang.String clientID,
                    long requestConnectionIdleTime,
                    java.util.Set<java.lang.String> encryptionAlgorithmNames,
                    Signer signer)
             throws java.io.IOException,
                    CommunicationProtocolException,
                    DBException
Creates a connection to the server on the specified host and port, and opens it for communication. AutoCommit will be OFF. The requested connection idle time is the default time configured in the client properties.

Parameters:
host - The identification of the host. It may either be its DNS name or its IP address in dotted decimal.
port - The port to which to connect.
signatureAlgorithmNames - a specified set of usable signature algorithm names
clientID - The userID identifying the user of this connection to sira_prise
requestConnectionIdleTime - The requested time in milliseconds that the connection is allowed to stay idle
encryptionAlgorithmNames - a specified set of usable encryption protocol names
signer - The Signer object that will be called upon to compute the needed signature
Throws:
java.io.IOException - if an I/O error occurs when creating the TCP socket.
CommunicationProtocolException - If an unexpected message was received during the handshake
DBException - If an error was detected on the server during the handshake

DBConnection

public DBConnection(java.lang.String host,
                    int port,
                    java.util.Set<java.lang.String> signatureAlgorithmNames,
                    java.lang.String clientID,
                    long requestConnectionIdleTime,
                    Signer signer)
             throws java.io.IOException,
                    CommunicationProtocolException,
                    DBException
Creates a connection to the server on the specified host and port, and opens it for communication. AutoCommit will be OFF. The requested connection idle time is the default time configured in the client properties.

Parameters:
host - The identification of the host. It may either be its DNS name or its IP address in dotted decimal.
port - The port to which to connect.
signatureAlgorithmNames - a specified set of usable signature algorithm names
clientID - The userID identifying the user of this connection to sira_prise
requestConnectionIdleTime - The requested time in milliseconds that the connection is allowed to stay idle
signer - The Signer object that will be called upon to compute the needed signature
Throws:
java.io.IOException - if an I/O error occurs when creating the TCP socket.
CommunicationProtocolException - If an unexpected message was received during the handshake
DBException - If an error was detected on the server during the handshake

DBConnection

public DBConnection(java.lang.String host,
                    int port,
                    java.util.Set<java.lang.String> signatureAlgorithmNames,
                    java.lang.String clientID,
                    java.util.Set<java.lang.String> encryptionAlgorithmNames,
                    Signer signer)
             throws java.io.IOException,
                    CommunicationProtocolException,
                    DBException
Creates a connection to the server on the specified host and port, and opens it for communication. AutoCommit will be OFF. The requested connection idle time is the default time configured in the client properties.

Parameters:
host - The identification of the host. It may either be its DNS name or its IP address in dotted decimal.
port - The port to which to connect.
signatureAlgorithmNames - a specified set of usable signature algorithm names
clientID - The userID identifying the user of this connection to sira_prise
encryptionAlgorithmNames - a specified set of usable encryption protocol names
signer - The Signer object that will be called upon to compute the needed signature
Throws:
java.io.IOException - if an I/O error occurs when creating the TCP socket.
CommunicationProtocolException - If an unexpected message was received during the handshake
DBException - If an error was detected on the server during the handshake

DBConnection

public DBConnection(java.lang.String host,
                    int port,
                    java.util.Set<java.lang.String> signatureAlgorithmNames,
                    java.lang.String clientID,
                    Signer signer)
             throws java.io.IOException,
                    CommunicationProtocolException,
                    DBException
Creates a connection to the server on the specified host and port, and opens it for communication. AutoCommit will be OFF. The requested connection idle time is the default time configured in the client properties.

Parameters:
host - The identification of the host. It may either be its DNS name or its IP address in dotted decimal.
port - The port to which to connect.
signatureAlgorithmNames - a specified set of usable signature algorithm names
clientID - The userID identifying the user of this connection to sira_prise
signer - The Signer object that will be called upon to compute the needed signature
Throws:
java.io.IOException - if an I/O error occurs when creating the TCP socket.
CommunicationProtocolException - If an unexpected message was received during the handshake
DBException - If an error was detected on the server during the handshake

DBConnection

public DBConnection(java.lang.String host,
                    int port,
                    java.lang.String clientID,
                    boolean initialAutoCommitForTransactions,
                    long requestConnectionIdleTime,
                    java.util.Set<java.lang.String> encryptionAlgorithmNames,
                    Signer signer)
             throws java.io.IOException,
                    CommunicationProtocolException,
                    DBException
Creates a connection to the server on the specified host and port with the given autoCommit setting, and opens it for communication.

Parameters:
host - The identification of the host. It may either be its DNS name or its IP address in dotted decimal.
port - The port to which to connect.
clientID - The ID identifying the client of this connection to sira_prise
initialAutoCommitForTransactions - true if the transactions created on this connection should have their autocommit set to true
requestConnectionIdleTime - The requested time in milliseconds that the connection is allowed to stay idle
encryptionAlgorithmNames - A specified set of usable encryption protocol names
signer - The Signer object that will be called upon to compute the needed signature
Throws:
java.io.IOException - if an I/O error occurs when creating the TCP socket.
CommunicationProtocolException - If an unexpected message was received during the handshake
DBException - If an error was detected on the server during the handshake

DBConnection

public DBConnection(java.lang.String host,
                    int port,
                    java.lang.String clientID,
                    boolean initialAutoCommitForTransactions,
                    long requestConnectionIdleTime,
                    Signer signer)
             throws java.io.IOException,
                    CommunicationProtocolException,
                    DBException
Creates a connection to the server on the specified host and port with the given autoCommit setting, and opens it for communication.

Parameters:
host - The identification of the host. It may either be its DNS name or its IP address in dotted decimal.
port - The port to which to connect.
clientID - The ID identifying the client of this connection to sira_prise
initialAutoCommitForTransactions - true if the transactions created on this connection should have their autocommit set to true
requestConnectionIdleTime - The requested time in milliseconds that the connection is allowed to stay idle
signer - The Signer object that will be called upon to compute the needed signature
Throws:
java.io.IOException - if an I/O error occurs when creating the TCP socket.
CommunicationProtocolException - If an unexpected message was received during the handshake
DBException - If an error was detected on the server during the handshake

DBConnection

public DBConnection(java.lang.String host,
                    int port,
                    java.lang.String clientID,
                    boolean initialAutoCommitForTransactions,
                    java.util.Set<java.lang.String> encryptionAlgorithmNames,
                    Signer signer)
             throws java.io.IOException,
                    CommunicationProtocolException,
                    DBException
Creates a connection to the server on the specified host and port, and opens it for communication. AutoCommit will be OFF. The requested connection idle time is the default time configured in the client properties.

Parameters:
host - The identification of the host. It may either be its DNS name or its IP address in dotted decimal.
port - The port to which to connect.
clientID - The userID identifying the user of this connection to sira_prise
initialAutoCommitForTransactions - true if the transactions created on this connection should have their autocommit set to true
encryptionAlgorithmNames - a specified set of usable encryption protocol names
signer - The Signer object that will be called upon to compute the needed signature
Throws:
java.io.IOException - if an I/O error occurs when creating the TCP socket.
CommunicationProtocolException - If an unexpected message was received during the handshake
DBException - If an error was detected on the server during the handshake

DBConnection

public DBConnection(java.lang.String host,
                    int port,
                    java.lang.String clientID,
                    boolean initialAutoCommitForTransactions,
                    Signer signer)
             throws java.io.IOException,
                    CommunicationProtocolException,
                    DBException
Creates a connection to the server on the specified host and port, and opens it for communication. AutoCommit will be OFF. The requested connection idle time is the default time configured in the client properties.

Parameters:
host - The identification of the host. It may either be its DNS name or its IP address in dotted decimal.
port - The port to which to connect.
clientID - The userID identifying the user of this connection to sira_prise
initialAutoCommitForTransactions - true if the transactions created on this connection should have their autocommit set to true
signer - The Signer object that will be called upon to compute the needed signature
Throws:
java.io.IOException - if an I/O error occurs when creating the TCP socket.
CommunicationProtocolException - If an unexpected message was received during the handshake
DBException - If an error was detected on the server during the handshake

DBConnection

public DBConnection(java.lang.String host,
                    int port,
                    java.lang.String clientID,
                    long requestConnectionIdleTime,
                    java.util.Set<java.lang.String> encryptionAlgorithmNames,
                    Signer signer)
             throws java.io.IOException,
                    CommunicationProtocolException,
                    DBException
Creates a connection to the server on the specified host and port, and opens it for communication. AutoCommit will be OFF. The requested connection idle time is the default time configured in the client properties.

Parameters:
host - The identification of the host. It may either be its DNS name or its IP address in dotted decimal.
port - The port to which to connect.
clientID - The userID identifying the user of this connection to sira_prise
requestConnectionIdleTime - The requested time in milliseconds that the connection is allowed to stay idle
encryptionAlgorithmNames - a specified set of usable encryption protocol names
signer - The Signer object that will be called upon to compute the needed signature
Throws:
java.io.IOException - if an I/O error occurs when creating the TCP socket.
CommunicationProtocolException - If an unexpected message was received during the handshake
DBException - If an error was detected on the server during the handshake

DBConnection

public DBConnection(java.lang.String host,
                    int port,
                    java.lang.String clientID,
                    long requestConnectionIdleTime,
                    Signer signer)
             throws java.io.IOException,
                    CommunicationProtocolException,
                    DBException
Creates a connection to the server on the specified host and port, and opens it for communication. AutoCommit will be OFF. The requested connection idle time is the default time configured in the client properties.

Parameters:
host - The identification of the host. It may either be its DNS name or its IP address in dotted decimal.
port - The port to which to connect.
clientID - The userID identifying the user of this connection to sira_prise
requestConnectionIdleTime - The requested time in milliseconds that the connection is allowed to stay idle
signer - The Signer object that will be called upon to compute the needed signature
Throws:
java.io.IOException - if an I/O error occurs when creating the TCP socket.
CommunicationProtocolException - If an unexpected message was received during the handshake
DBException - If an error was detected on the server during the handshake

DBConnection

public DBConnection(java.lang.String host,
                    int port,
                    java.lang.String clientID,
                    java.util.Set<java.lang.String> encryptionAlgorithmNames,
                    Signer signer)
             throws java.io.IOException,
                    CommunicationProtocolException,
                    DBException
Creates a connection to the server on the specified host and port, and opens it for communication. AutoCommit will be OFF. The requested connection idle time is the default time configured in the client properties.

Parameters:
host - The identification of the host. It may either be its DNS name or its IP address in dotted decimal.
port - The port to which to connect.
clientID - The userID identifying the user of this connection to sira_prise
encryptionAlgorithmNames - a specified set of usable encryption protocol names
signer - The Signer object that will be called upon to compute the needed signature
Throws:
java.io.IOException - if an I/O error occurs when creating the TCP socket.
CommunicationProtocolException - If an unexpected message was received during the handshake
DBException - If an error was detected on the server during the handshake

DBConnection

public DBConnection(java.lang.String host,
                    int port,
                    java.lang.String clientID,
                    Signer signer)
             throws java.io.IOException,
                    CommunicationProtocolException,
                    DBException
Creates a connection to the server on the specified host and port, and opens it for communication. AutoCommit will be OFF. The requested connection idle time is the default time configured in the client properties.

Parameters:
host - The identification of the host. It may either be its DNS name or its IP address in dotted decimal.
port - The port to which to connect.
clientID - The userID identifying the user of this connection to sira_prise
signer - The Signer object that will be called upon to compute the needed signature
Throws:
java.io.IOException - if an I/O error occurs when creating the TCP socket.
CommunicationProtocolException - If an unexpected message was received during the handshake
DBException - If an error was detected on the server during the handshake
Method Detail

isDefaultInitialAutoCommitForTransactions

public static final boolean isDefaultInitialAutoCommitForTransactions()
Gets defaultInitialAutoCommitForTransactions

Returns:
defaultInitialAutoCommitForTransactions.

close

public abstract void close()
Closes the connection. If an uncommitted transaction is still pending on the connection, it will be rolled back and ended.


commit

public void commit()
            throws ConnectionClosedException
Deprecated. Use the commit() method of the DBTransaction object instead

Commits the non-autocommit transaction that is currently started on the connection.

Throws:
ConnectionClosedException - If the connection was closed due to an I/O error that occurred during communication with the server

compileAndCacheQuery

public AbstractRelation compileAndCacheQuery(java.lang.String query)
                                      throws DBException,
                                             ConnectionClosedException
Deprecated. use the compileAndCacheQuery() method from the DBTransaction instead

Sends a query expression to the server for compilation-and-caching.

Parameters:
query - the query to be compiled-and-cached, in textual form.
Returns:
the result of the compilation. That result is a relation with the following attributes :
  1. QUERYID(LONG(...)) The internal ID of the compiled query, by which the query can later be referenced
  2. HEADING(RELATION(...)) The description of the heading of the relation as it will be output by the query
  3. PARMS(RELATION(...)) The description of all parameters required by the query
The heading of the 'HEADING' relation is as follows :
  1. ATTRIBUTENAME(NAME(...)) The name of an attribute in the output of the query
  2. TYPENAME(NAME(...)) The name of the type of that attribute in the output of the query
The heading of the 'PARMS' relation is as follows :
  1. PARAMETERNAME(NAME(...)) The name of a parameter required by the query
  2. TYPENAME(NAME(...)) The name of the type of that parameter
Throws:
DBException - If the connection has already been closed, no transaction was started, or an error was found in the compilation.
ConnectionClosedException - If the connection was closed due to an I/O error that occurred during communication with the server

compileQuery

public AbstractRelation compileQuery(java.lang.String query)
                              throws DBException,
                                     ConnectionClosedException
Deprecated. use compileQuery() on the DBTransaction object (obtained from startTransaction()) instead.

Sends a query expression to the server for verification only.

Parameters:
query - the query to be verified, in textual form.
Returns:
the result of the verification. That result is a relation with the following attributes :
  1. HEADING(RELATION(...)) The description of the heading of the relation as it will be output by the query
  2. PARMS(RELATION(...)) The description of all parameters required by the query
The heading of the 'HEADING' relation is as follows :
  1. ATTRIBUTENAME(NAME(...)) The name of an attribute in the output of the query
  2. TYPENAME(NAME(...)) The name of the type of that attribute in the output of the query
The heading of the 'PARMS' relation is as follows :
  1. PARAMETERNAME(NAME(...)) The name of a parameter required by the query
  2. TYPENAME(NAME(...)) The name of the type of that parameter
Throws:
DBException - If the connection has already been closed, no transaction was started, or an error was found in the compilation.
ConnectionClosedException - If the connection was closed due to an I/O error that occurred during communication with the server

endTransaction

public void endTransaction(boolean commit)
                    throws ConnectionClosedException
Deprecated. instead, use end() on the DBTransaction object obtained from startTransaction().

Ends the transaction, issuing either a commit or a rollback.

Parameters:
commit - true if the transaction is to be committed, false if it is to be rolled back.
Throws:
ConnectionClosedException - If the connection was closed due to an I/O error that occurred during communication with the server

execDmlCommand

public AbstractRelation execDmlCommand(java.lang.String cmd)
                                throws DBException,
                                       ConnectionClosedException
Deprecated. Use the execDmlCommand() method from the DBTransaction instead

Sends a command to the server and returns the result obtained. If that result indicates any kind of error, then the connection will be closed.

Parameters:
cmd - the command to be executed, in textual form.
Returns:
the result of the command. If the connection has already been closed, then a DBException is thrown.
Throws:
DBException - If the connection has already been closed, no transaction was started, or an error was found.
ConnectionClosedException - If the connection was closed due to an I/O error that occurred during communication with the server

execDmlCommandAndEndTransaction

public AbstractRelation execDmlCommandAndEndTransaction(java.lang.String cmd)
                                                 throws DBException,
                                                        ConnectionClosedException
Deprecated. instead, use execDmlCommandAndEndTransaction() on the DBTransaction object obtained from startTransaction()

Sends a command to the server and returns the result obtained. After execution of the command, the transaction is committed and ended.

Parameters:
cmd - the command to be executed, in textual form.
Returns:
The result of executing the command. Null if the command is an assignment command.
Throws:
DBException - If the connection has already been closed, no transaction was started, or an error was found.
ConnectionClosedException - If the connection was closed due to an I/O error that occurred during communication with the server

execMultipleStatement

public AbstractRelation execMultipleStatement(java.util.Collection<?> commands)
                                       throws DBException,
                                              ConnectionClosedException
Deprecated. replace this method by the execMultipleStatementAndEndTransaction() of the DBTransaction object obtained from startTransaction()

Executes a series of single-assignment commands as a multiple-assignment command. Optionally closes the connection immediately after succesfull execution of the series of assignments. If the result indicates any kind of error, then the connection will be closed.

Parameters:
commands - The commands to be executed. Execution is in the obvious order, and thus not randomly, or in reverse order, or whatever.
Returns:
the DBResponse obtained.
Throws:
DBException - If the connection has already been closed, no transaction was started, or an error was found.
ConnectionClosedException - If the connection was closed due to an I/O error that occurred during communication with the server

execMultipleStatement

public AbstractRelation execMultipleStatement(java.lang.String[] commands)
                                       throws DBException,
                                              ConnectionClosedException
Deprecated. replace this method by the execMultipleStatementAndEndTransaction() of the DBTransaction object obtained from startTransaction()

Executes a series of single-assignment commands as a multiple-assignment command. If the result indicates any kind of error, then the connection will be closed.

Parameters:
commands - The single-assignment commands to be executed. Execution is in the obvious order, and thus not randomly, or in reverse order, or whatever.
Returns:
the DBResponse obtained.
Throws:
DBException - If the connection has already been closed, no transaction was started, or an error was found.
ConnectionClosedException - If the connection was closed due to an I/O error that occurred during communication with the server

execMultipleStatementAndEndTransaction

public AbstractRelation execMultipleStatementAndEndTransaction(java.util.Collection<?> commands)
                                                        throws DBException,
                                                               ConnectionClosedException
Deprecated. replace this method by the execMultipleStatementAndEndTransaction() of the DBTransaction object obtained from startTransaction()

Executes a series of single-assignment commands as a multiple-assignment command.

Parameters:
commands - The commands to be executed. Execution is in the obvious order, and thus not randomly, or in reverse order, or whatever.
Returns:
the DBResponse obtained.
Throws:
DBException - If the connection has already been closed, no transaction was started, or an error was found.
ConnectionClosedException - If the connection was closed due to an I/O error that occurred during communication with the server

execMultipleStatementAndEndTransaction

public AbstractRelation execMultipleStatementAndEndTransaction(java.lang.String[] commands)
                                                        throws DBException,
                                                               ConnectionClosedException
Deprecated. replace this method by the execMultipleStatementAndEndTransaction() of the DBTransaction object obtained from startTransaction()

Executes a series of single-assignment commands as a multiple-assignment command.

Parameters:
commands - The single-assignment commands to be executed. Execution is in the obvious order, and thus not randomly, or in reverse order, or whatever.
Returns:
the DBResponse obtained.
Throws:
DBException - If the connection has already been closed, no transaction was started, or an error was found.
ConnectionClosedException - If the connection was closed due to an I/O error that occurred during communication with the server

execQueries

public AbstractRelation[] execQueries(java.lang.String[] expression)
                               throws DBException,
                                      ConnectionClosedException
Deprecated. replace this method by the execQueries() method of the DBTransaction object obtained from startTransaction()

Executes a series of inquire commands on the server.

Parameters:
expression - The expressions of the relational algebra to be inquired.
Returns:
response A DBResponse array holding the values of the corresponding queried expressions.
Throws:
DBException - If the connection has already been closed, no transaction was started, or an error was found.
ConnectionClosedException - If the connection was closed due to an I/O error that occurred during communication with the server

execQueriesAndEndTransaction

public AbstractRelation[] execQueriesAndEndTransaction(java.lang.String[] expression)
                                                throws DBException,
                                                       ConnectionClosedException
Deprecated. replace this method by the execQueriesAndEndTransaction() method of the DBTransaction object obtained from startTransaction()

Executes a series of inquire commands on the server.

Parameters:
expression - The expressions of the relational algebra to be inquired.
Returns:
response A DBResponse array holding the values of the corresponding queried expressions.
Throws:
DBException - If the connection has already been closed, no transaction was started, or an error was found.
ConnectionClosedException - If the connection was closed due to an I/O error that occurred during communication with the server

execQuery

public AbstractRelation execQuery(java.lang.String expression)
                           throws DBException,
                                  ConnectionClosedException
Deprecated. replace this method by the execQuery() method of the DBTransaction object obtained from startTransaction()

Executes an inquire command on the server. If the result indicates any kind of error, then the connection will be closed.

Parameters:
expression - The expression of the relational algebra to be inquired.
Returns:
response A DBResponse holding the value of the queried expression.
Throws:
DBException - If the connection has already been closed, no transaction was started, or an error was found.
ConnectionClosedException - If the connection was closed due to an I/O error that occurred during communication with the server

execQueryAndEndTransaction

public AbstractRelation execQueryAndEndTransaction(java.lang.String expression)
                                            throws DBException,
                                                   ConnectionClosedException
Deprecated. replace this method by the execQueryAndEndTransaction() method of the DBTransaction object obtained from startTransaction()

Executes an inquire command on the server. Optionally closes the connection immediately after succesfull execution of the query. If the result indicates any kind of error, then the connection will be closed.

Parameters:
expression - The expression of the relational algebra to be inquired.
Returns:
response A DBResponse holding the value of the queried expression.
Throws:
DBException - If the connection has already been closed, no transaction was started, or an error was found.
ConnectionClosedException - If the connection was closed due to an I/O error that occurred during communication with the server

getDefaultTransactionAutoCommit

public boolean getDefaultTransactionAutoCommit()
Gets The default autocommit setting for all transactions created on this connection

Returns:
The default autocommit setting for all transactions created on this connection

getSpecificationVersionForServer

public final Version getSpecificationVersionForServer()
Gets The specification version to use in communications with the server

Returns:
The specification version to use in communications with the server

isOpen

public boolean isOpen()
Checks whether a connection is open

Returns:
true if the connection is open

rollback

public void rollback()
              throws DBException,
                     ConnectionClosedException
Deprecated. Use the rollback() method of the DBTransaction object obtained from the connection instead

Rolls back the uncommitted updates on the connection. After completion, the connection will be closed.

Throws:
DBException - If the connection has already been closed, no transaction was started, or an error was found.
ConnectionClosedException - If the connection was closed due to an I/O error that occurred during communication with the server

setDefaultTransactionAutoCommit

public void setDefaultTransactionAutoCommit(boolean autoCommit)
Sets The default autocommit setting for all transactions created on this connection

Parameters:
autoCommit - The new default autocommit setting for all transactions created on this connection

startTransaction

public final DBTransaction startTransaction()
                                     throws ConnectionClosedException,
                                            ErrorMessageException
Starts an anonymous transaction on the connection with the default autocommit, transactionmode and ddl capture settings for transactions created on this connection

Returns:
The started transaction
Throws:
ConnectionClosedException - If the connection was closed due to an I/O error that occurred during communication with the server
ErrorMessageException - If the response obtained from the server was not a confirmation, but an error message instead

startTransaction

public final DBTransaction startTransaction(boolean autoCommit)
                                     throws ConnectionClosedException,
                                            ErrorMessageException
Starts an anonymous transaction on the connection with the given autocommit setting

Parameters:
autoCommit - The autoCommit setting for the transaction
Returns:
The started transaction
Throws:
ConnectionClosedException - If the connection was closed due to an I/O error that occurred during communication with the server
ErrorMessageException - If the response obtained from the server was not a confirmation, but an error message instead

startTransaction

public final DBTransaction startTransaction(boolean autoCommit,
                                            DDLCapture ddlCapture)
                                     throws ConnectionClosedException,
                                            ErrorMessageException
Starts an anonymous transaction on the connection with the given autocommit and ddl capture settings

Parameters:
autoCommit - The autoCommit setting for the transaction
ddlCapture - Flag indicating whether DDL capture is to be used in this transaction
Returns:
The started transaction
Throws:
ConnectionClosedException - If the connection was closed due to an I/O error that occurred during communication with the server
ErrorMessageException - If the response obtained from the server was not a confirmation, but an error message instead

startTransaction

public final DBTransaction startTransaction(boolean autoCommit,
                                            TransactionMode transactionMode)
                                     throws ConnectionClosedException,
                                            ErrorMessageException
Starts an anonymous transaction in the given transaction mode on the connection with the given autocommit setting

Parameters:
autoCommit - The autoCommit setting for the transaction
transactionMode - The transaction mode
Returns:
The started transaction
Throws:
ConnectionClosedException - If the connection was closed due to an I/O error that occurred during communication with the server
ErrorMessageException - If the response obtained from the server was not a confirmation, but an error message instead

startTransaction

public final DBTransaction startTransaction(boolean autoCommit,
                                            TransactionMode transactionMode,
                                            DDLCapture ddlCapture)
                                     throws ConnectionClosedException,
                                            ErrorMessageException
Starts an anonymous transaction in the given transaction mode on the connection with the given autocommit setting

Parameters:
autoCommit - The autoCommit setting for the transaction
transactionMode - The transaction mode
ddlCapture - Flag indicating whether DDL capture is to be used in this transaction
Returns:
The started transaction
Throws:
ConnectionClosedException - If the connection was closed due to an I/O error that occurred during communication with the server
ErrorMessageException - If the response obtained from the server was not a confirmation, but an error message instead

startTransaction

public final DBTransaction startTransaction(DDLCapture ddlCapture)
                                     throws ConnectionClosedException,
                                            ErrorMessageException
Starts an anonymous transaction on the connection with the default autocommit and transactionmode settings for transactions created on this connection, and the given ddl capture setting

Parameters:
ddlCapture - Flag indicating whether DDL capture is to be used in this transaction
Returns:
The started transaction
Throws:
ConnectionClosedException - If the connection was closed due to an I/O error that occurred during communication with the server
ErrorMessageException - If the response obtained from the server was not a confirmation, but an error message instead

startTransaction

public final DBTransaction startTransaction(java.lang.String userID,
                                            boolean userAuthenticatedByClient,
                                            java.lang.String signatureAlgorithm,
                                            byte[] signature)
                                     throws ConnectionClosedException,
                                            ErrorMessageException
Starts a transaction on the connection with the default autocommit setting for transactions created on this connection

Parameters:
userID - The identification of the user starting the transaction
userAuthenticatedByClient - true if the user has been authenticated by the client
signatureAlgorithm - The name of the signature algorithm that can be used by the server to verify the authenticity of the userID
signature - the user's signature
Returns:
The started transaction
Throws:
ConnectionClosedException - If the connection was closed due to an I/O error that occurred during communication with the server
ErrorMessageException - If the response obtained from the server was not a confirmation, but an error message instead

startTransaction

public final DBTransaction startTransaction(java.lang.String userID,
                                            boolean userAuthenticatedByClient,
                                            java.lang.String signatureAlgorithm,
                                            byte[] signature,
                                            boolean autoCommit,
                                            TransactionMode transactionMode)
                                     throws ConnectionClosedException,
                                            ErrorMessageException
Starts a transaction on the connection with the given autoCommit setting

Parameters:
userID - The identification of the user starting the transaction
userAuthenticatedByClient - true if the user has been authenticated by the client
signatureAlgorithm - The name of the signature algorithm that can be used by the server to verify the authenticity of the userID
signature - the user's signature
autoCommit - The autoCommit setting for the transaction
transactionMode - the mode for the transaction
Returns:
The started transaction
Throws:
ConnectionClosedException - If the connection was closed due to an I/O error that occurred during communication with the server
ErrorMessageException - If the response obtained from the server was not a confirmation, but an error message instead

startTransaction

public final DBTransaction startTransaction(java.lang.String userID,
                                            boolean userAuthenticatedByClient,
                                            java.lang.String signatureAlgorithm,
                                            byte[] signature,
                                            boolean autoCommit,
                                            TransactionMode transactionMode,
                                            DDLCapture captureDDL)
                                     throws ConnectionClosedException,
                                            ErrorMessageException
Starts a transaction on the connection with the given autoCommit setting

Parameters:
userID - The identification of the user starting the transaction
userAuthenticatedByClient - true if the user has been authenticated by the client
signatureAlgorithm - The name of the signature algorithm that can be used by the server to verify the authenticity of the userID
signature - the user's signature
autoCommit - The autoCommit setting for the transaction
transactionMode - the mode for the transaction
captureDDL - Flag indicating whether DDL capture is to be used in this transaction
Returns:
The started transaction
Throws:
ConnectionClosedException - If the connection was closed due to an I/O error that occurred during communication with the server
ErrorMessageException - If the response obtained from the server was not a confirmation, but an error message instead

startTransaction

public final DBTransaction startTransaction(java.lang.String userID,
                                            boolean userAuthenticatedByClient,
                                            java.lang.String signatureAlgorithm,
                                            byte[] signature,
                                            DDLCapture ddlCapture)
                                     throws ConnectionClosedException,
                                            ErrorMessageException
Starts a transaction on the connection with the default autocommit setting for transactions created on this connection

Parameters:
userID - The identification of the user starting the transaction
userAuthenticatedByClient - true if the user has been authenticated by the client
signatureAlgorithm - The name of the signature algorithm that can be used by the server to verify the authenticity of the userID
signature - the user's signature
ddlCapture - Flag indicating whether DDL capture is to be used in this transaction
Returns:
The started transaction
Throws:
ConnectionClosedException - If the connection was closed due to an I/O error that occurred during communication with the server
ErrorMessageException - If the response obtained from the server was not a confirmation, but an error message instead

startTransaction

public final DBTransaction startTransaction(java.lang.String userID,
                                            boolean userAuthenticatedByClient,
                                            java.lang.String signatureAlgorithm,
                                            byte[] signature,
                                            TransactionMode transactionMode)
                                     throws ConnectionClosedException,
                                            ErrorMessageException
Starts a transaction on the connection with the default autocommit setting for transactions created on this connection

Parameters:
userID - The identification of the user starting the transaction
userAuthenticatedByClient - true if the user has been authenticated by the client
signatureAlgorithm - The name of the signature algorithm that can be used by the server to verify the authenticity of the userID
signature - the user's signature
transactionMode - The transaction mode
Returns:
The started transaction
Throws:
ConnectionClosedException - If the connection was closed due to an I/O error that occurred during communication with the server
ErrorMessageException - If the response obtained from the server was not a confirmation, but an error message instead

startTransaction

public final DBTransaction startTransaction(java.lang.String userID,
                                            boolean userAuthenticatedByClient,
                                            java.lang.String signatureAlgorithm,
                                            byte[] signature,
                                            TransactionMode transactionMode,
                                            DDLCapture ddlCapture)
                                     throws ConnectionClosedException,
                                            ErrorMessageException
Starts a transaction on the connection with the default autocommit setting for transactions created on this connection

Parameters:
userID - The identification of the user starting the transaction
userAuthenticatedByClient - true if the user has been authenticated by the client
signatureAlgorithm - The name of the signature algorithm that can be used by the server to verify the authenticity of the userID
signature - the user's signature
transactionMode - The transaction mode
ddlCapture - Flag indicating whether DDL capture is to be used in this transaction
Returns:
The started transaction
Throws:
ConnectionClosedException - If the connection was closed due to an I/O error that occurred during communication with the server
ErrorMessageException - If the response obtained from the server was not a confirmation, but an error message instead

startTransaction

public final DBTransaction startTransaction(java.lang.String userID,
                                            Signer userIDSigner)
                                     throws DBException,
                                            ConnectionClosedException,
                                            ErrorMessageException
Starts a transaction on the connection for the named user and with the default autocommit setting for transactions created on this connection. The user identity signature is selected from the set of signatures that are supported both by the server and the client JVM, and for which the given Signer is able to provide a valid private key.

Parameters:
userID - The identification of the user starting the transaction
userIDSigner - The Signer object that will be called upon to compute the needed signature
Returns:
The started transaction
Throws:
DBException
ConnectionClosedException - If the connection was closed due to an I/O error that occurred during communication with the server
ErrorMessageException - If the response obtained from the server was not a confirmation, but an error message instead

startTransaction

public final DBTransaction startTransaction(java.lang.String userID,
                                            Signer userIDSigner,
                                            boolean autoCommit)
                                     throws DBException,
                                            ConnectionClosedException,
                                            ErrorMessageException
Starts a transaction on the connection for the named user and with the default autocommit setting for transactions created on this connection. The user identity signature is selected from the set of signatures that are supported both by the server and the client JVM, and for which the given Signer is able to provide a valid private key.

Parameters:
userID - The identification of the user starting the transaction
userIDSigner - The Signer object that will be called upon to compute the needed signature
autoCommit - The autoCommit setting for the transaction
Returns:
The started transaction
Throws:
DBException
ConnectionClosedException
ErrorMessageException

startTransaction

public final DBTransaction startTransaction(java.lang.String userID,
                                            Signer userIDSigner,
                                            boolean autoCommit,
                                            TransactionMode transactionMode)
                                     throws DBException,
                                            ConnectionClosedException,
                                            ErrorMessageException
Starts a transaction in the given transaction mode on the connection for the named user and with the default autocommit setting for transactions created on this connection. The user identity signature is selected from the set of signatures that are supported both by the server and the client JVM, and for which the given Signer is able to provide a valid private key.

Parameters:
userID - The identification of the user starting the transaction
userIDSigner - The Signer object that will be called upon to compute the needed signature
autoCommit - The autoCommit setting for the transaction
transactionMode - The transaction mode
Returns:
The started transaction
Throws:
DBException
ConnectionClosedException
ErrorMessageException

startTransaction

public final DBTransaction startTransaction(java.lang.String userID,
                                            Signer userIDSigner,
                                            TransactionMode transactionMode)
                                     throws DBException,
                                            ConnectionClosedException,
                                            ErrorMessageException
Starts a transaction in the given read-only mode on the connection for the named user and with the default autocommit setting for transactions created on this connection. The user identity signature is selected from the set of signatures that are supported both by the server and the client JVM, and for which the given Signer is able to provide a valid private key.

Parameters:
userID - The identification of the user starting the transaction
userIDSigner - The Signer object that will be called upon to compute the needed signature
transactionMode - The transaction mode
Returns:
The started transaction
Throws:
DBException
ConnectionClosedException - If the connection was closed due to an I/O error that occurred during communication with the server
ErrorMessageException - If the response obtained from the server was not a confirmation, but an error message instead

startTransaction

public final DBTransaction startTransaction(TransactionMode transactionMode)
                                     throws ConnectionClosedException,
                                            ErrorMessageException
Starts an anonymous transaction in the given transaction mode on the connection with the default autocommit setting for transactions created on this connection

Parameters:
transactionMode - The transaction mode
Returns:
The started transaction
Throws:
ConnectionClosedException - If the connection was closed due to an I/O error that occurred during communication with the server
ErrorMessageException - If the response obtained from the server was not a confirmation, but an error message instead

startTransaction

public final DBTransaction startTransaction(TransactionMode transactionMode,
                                            DDLCapture ddlCapture)
                                     throws ConnectionClosedException,
                                            ErrorMessageException
Starts an anonymous transaction in the given transaction mode on the connection with the default autocommit setting for transactions created on this connection

Parameters:
transactionMode - The transaction mode
ddlCapture - Flag indicating whether DDL capture is to be used in this transaction
Returns:
The started transaction
Throws:
ConnectionClosedException - If the connection was closed due to an I/O error that occurred during communication with the server
ErrorMessageException - If the response obtained from the server was not a confirmation, but an error message instead