KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > cache > transaction > BatchModeTransactionManager


1 package org.jboss.cache.transaction;
2
3 import org.apache.commons.logging.Log;
4 import org.apache.commons.logging.LogFactory;
5
6 /**
7  * Not really a transaction manager in the truest sense of the word. Only used to batch up operations. Proper
8  * transactional symantics of rollbacks and recovery are NOT used here. This is used by PojoCache.
9  *
10  * @author bela
11  * @version $Revision: 1.4 $
12  * Date: May 15, 2003
13  * Time: 4:11:37 PM
14  */

15 public class BatchModeTransactionManager extends DummyBaseTransactionManager {
16    static BatchModeTransactionManager instance=null;
17    static Log log=LogFactory.getLog(BatchModeTransactionManager.class);
18    private static final long serialVersionUID = 5656602677430350961L;
19
20    public BatchModeTransactionManager() {
21       ;
22    }
23
24    public static BatchModeTransactionManager getInstance() {
25       if(instance == null) {
26          instance=new BatchModeTransactionManager();
27       }
28       return instance;
29    }
30
31    public static void destroy() {
32       if(instance == null) return;
33       instance.setTransaction(null);
34       instance=null;
35    }
36
37 }
38
Popular Tags