Subversion Repositories bacoAlunos

Rev

Rev 1310 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 fvelez 1
/*
2
BERSERK - a BusinEss Runtime and SEcurity Resources Kit
3
Copyright (C) 2003 Goncalo Luiz
4
 
5
This library is free software; you can redistribute it and/or
6
modify it under the terms of the GNU Lesser General Public
7
License as published by the Free Software Foundation; either
8
version 2.1 of the License, or (at your option) any later version.
9
 
10
This library is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
Lesser General Public License for more details.
14
 
15
You should have received a copy of the GNU Lesser General Public
16
License along with this library; if not, write to the Free Software
17
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18
 
19
To contact Goncalo Luiz use the following e-mail address (use an @ instead of the _):
20
gedl_mega.ist.utl.pt
21
*/
22
/*
23
 * @author Goncalo Luiz gedl [AT] rnl [DOT] ist [DOT] utl [DOT] pt
24
 *
25
 *
26
 * Created at 19/Out/2003 , 14:56:47
27
 *
28
 */
29
package pt.utl.ist.berserk.storage.empty;
30
import pt.utl.ist.berserk.storage.ITransactionBroker;
31
import pt.utl.ist.berserk.storage.exceptions.StorageException;
1781 jmachado 32
import sun.reflect.generics.reflectiveObjects.NotImplementedException;
33
 
34
import java.util.List;
1 fvelez 35
/**
36
 * Does absolutely nothing.<br/>
37
 * Use this if you don't want a transictional manager.<br/>
38
 * You must specify one. Otherwise BERSERK doesn't work.
39
 * @author Goncalo Luiz gedl [AT] rnl [DOT] ist [DOT] utl [DOT] pt
40
 *
41
 *
42
 * Created at 19/Out/2003 , 14:56:47
43
 *
44
 */
45
public class TransactionBrokerEmpty implements ITransactionBroker
46
{
47
        static private TransactionBrokerEmpty instance;
48
        private TransactionBrokerEmpty()
49
        {
50
        }
51
        public static TransactionBrokerEmpty getInstance()
52
        {
53
                if (instance == null)
54
                        instance = new TransactionBrokerEmpty();
55
                return instance;
56
        }
1781 jmachado 57
    public boolean isTransactionActive() throws StorageException
58
    {
59
        throw new NotImplementedException();
60
    }
1 fvelez 61
        public void beginTransaction() throws StorageException
62
        {
63
        }
64
        public void commitTransaction() throws StorageException
65
        {
66
        }
67
        public void abortTransaction() throws StorageException
68
        {
69
        }
70
        public void lockRead(5+0%2Fdocs%2Fapi+List">List list) throws StorageException
71
        {
72
        }
73
        public void lockRead(5+0%2Fdocs%2Fapi+Object">Object obj) throws StorageException
74
        {
75
        }
76
        public void lockWrite(5+0%2Fdocs%2Fapi+Object">Object obj) throws StorageException
77
        {
78
        }
79
}