Home Previous Up Next Index

Connection

Overview

local interface Connection

A connection to a database (database environment with Berkeley DB). If you want to use a connection concurrently in multiple threads, you need to serialize access to this connection.

Operation Index

beginTransaction
Create a new transaction.
currentTransaction
Returns the transaction associated with this connection.
close
Closes this connection.
getCommunicator
Returns the communicator associated with this connection.
getName
The name of the connected system (for example, the Berkeley DB environment).

Operations

Transaction beginTransaction()

Create a new transaction. Only one transaction at a time can be associated with a connection.

Return Value

The new transaction.

Exceptions

TransactionAlreadyInProgressException
Raised if a transaction is already associated with this connection.

Transaction currentTransaction()

Returns the transaction associated with this connection.

Return Value

The current transaction if there is one, null otherwise.

void close()

Closes this connection. If there is an associated transaction, it is rolled back.

::Ice::Communicator getCommunicator()

Returns the communicator associated with this connection.

string getName()

The name of the connected system (for example, the Berkeley DB environment).


Home Previous Up Next Index