001: /*
002: * (C) Copyright 2001 Nabh Information Systems, Inc.
003: *
004: * All copyright notices regarding Nabh's products MUST remain
005: * intact in the scripts and in the outputted HTML.
006: * This program is free software; you can redistribute it and/or
007: * modify it under the terms of the GNU Lesser General Public License
008: * as published by the Free Software Foundation; either version 2.1
009: * of the License, or (at your option) any later version.
010: *
011: * This program is distributed in the hope that it will be useful,
012: * but WITHOUT ANY WARRANTY; without even the implied warranty of
013: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
014: * GNU Lesser General Public License for more details.
015: *
016: * You should have received a copy of the GNU Lesser General Public License
017: * along with this program; if not, write to the Free Software
018: * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
019: *
020: */
021:
022: package com.nabhinc.util.db;
023:
024: import java.lang.IllegalStateException;
025:
026: /**
027: * A dummy implementation of TransactionManager interface. This is used when
028: * StringBeans is deployed without JTA.
029: *
030: * @author Padmanabh Dabke
031: * (c) 2001 Nabh Information Systems, Inc. All Rights Reserved.
032: */
033: public class DummyTransactionManager implements
034: javax.transaction.TransactionManager {
035:
036: /**
037: * Default constructor.
038: */
039: public DummyTransactionManager() {
040: super ();
041: }
042:
043: /**
044: * begin method comment.
045: */
046: public void begin() throws javax.transaction.NotSupportedException,
047: javax.transaction.SystemException {
048: }
049:
050: /**
051: * commit method comment.
052: */
053: public void commit() throws javax.transaction.RollbackException,
054: IllegalStateException, javax.transaction.SystemException,
055: javax.transaction.HeuristicRollbackException,
056: SecurityException,
057: javax.transaction.HeuristicMixedException {
058: }
059:
060: /**
061: * getStatus method comment.
062: */
063: public int getStatus() throws javax.transaction.SystemException {
064: return javax.transaction.Status.STATUS_NO_TRANSACTION;
065: }
066:
067: /**
068: * getTransaction method comment.
069: */
070: public javax.transaction.Transaction getTransaction()
071: throws javax.transaction.SystemException {
072: return null;
073: }
074:
075: /**
076: * resume method comment.
077: */
078: public void resume(javax.transaction.Transaction arg1)
079: throws IllegalStateException,
080: javax.transaction.SystemException,
081: javax.transaction.InvalidTransactionException {
082: }
083:
084: /**
085: * rollback method comment.
086: */
087: public void rollback() throws IllegalStateException,
088: javax.transaction.SystemException, SecurityException {
089: }
090:
091: /**
092: * setRollbackOnly method comment.
093: */
094: public void setRollbackOnly() throws IllegalStateException,
095: javax.transaction.SystemException {
096: }
097:
098: /**
099: * setTransactionTimeout method comment.
100: */
101: public void setTransactionTimeout(int arg1)
102: throws javax.transaction.SystemException {
103: }
104:
105: /**
106: * suspend method comment.
107: */
108: public javax.transaction.Transaction suspend()
109: throws javax.transaction.SystemException {
110: return null;
111: }
112: }
|