in_tx = false; $this->obj = array(); } public function in_tx() { return $this->in_tx; } public function register($obj) { $this->obj[] = $obj; } public function begin() { try { foreach($this->obj as $v) $v->begin(); $this->in_tx = true; } catch(Exception $ex) { throw new dtc_abort_ex(); } } public function commit() { try { foreach($this->obj as $v) $v->commit(); $this->in_tx = false; } catch(Exception $ex) { throw new dtc_abort_ex(); } } public function rollback() { try { foreach($this->obj as $v) $v->rollback(); $this->in_tx = false; } catch(Exception $ex) { throw new dtc_abort_ex(); } } } ?>