private AdapterTransaction CreateTransaction(string instanceId)
        {
            try
            {
                WarehouseAdapterEndPoint endPoint    = CreateEndPoint(instanceId);
                IDbTransaction           transaction = endPoint.Connection.BeginTransaction(IsolationLevel.ReadCommitted);

                AdapterTransaction adapterTransaction = new AdapterTransaction(instanceId, transaction, endPoint);
                adapterTransaction.State = TransactionState.Started;

                return(adapterTransaction);
            }
            catch (InvalidOperationException ex)
            {
                throw new AdapterException("Failed to start transaction for Warehouse instance: \"" + instanceId + "\".", ex);
            }
            catch (OracleException ex)
            {
                throw new AdapterException("Failed to start transaction for Warehouse instance: \"" + instanceId + "\".", ex);
            }
            catch (DbException ex)
            {
                throw new AdapterException("Failed to start transaction for Warehouse instance: \"" + instanceId + "\".", ex);
            }
        }
        private WarehouseAdapterEndPoint CreateEndPoint(string instanceId)
        {
            try
            {
                IDbConnection connection = new OracleConnection(Configuration.ReadAsString(instanceId));

                connection.Open();

                WarehouseAdapterEndPoint endPoint = new WarehouseAdapterEndPoint(this, instanceId, connection);

                OnEndPointCreated(endPoint);

                return(endPoint);
            }
            catch (InvalidOperationException ex)
            {
                throw new AdapterException("No connection could be made to Warehouse instance: \"" + instanceId + "\".", ex);
            }
            catch (OracleException ex)
            {
                throw new AdapterException("No connection could be made to Warehouse instance: \"" + instanceId + "\".", ex);
            }
            catch (DbException ex)
            {
                throw new AdapterException("No connection could be made to Warehouse instance: \"" + instanceId + "\".", ex);
            }
        }