KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > objectserver > persistence > impl > TestPersistenceTransaction


1 /*
2  * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
3  */

4 package com.tc.objectserver.persistence.impl;
5
6 import EDU.oswego.cs.dl.util.concurrent.LinkedQueue;
7
8 import com.tc.exception.TCRuntimeException;
9 import com.tc.objectserver.persistence.api.PersistenceTransaction;
10
11 public final class TestPersistenceTransaction implements PersistenceTransaction {
12
13   public static final TestPersistenceTransaction NULL_TRANSACTION = new TestPersistenceTransaction();
14
15   public final LinkedQueue commitContexts = new LinkedQueue();
16   public final LinkedQueue commitSyncContexts = new LinkedQueue();
17
18   public void commit() {
19     try {
20       commitContexts.put(new Object JavaDoc());
21     } catch (InterruptedException JavaDoc e) {
22       throw new TCRuntimeException(e);
23     }
24   }
25 }
Popular Tags