01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package com.tc.objectserver.persistence.impl;
05:
06: import com.tc.objectserver.persistence.api.PersistenceTransaction;
07: import com.tc.objectserver.persistence.api.PersistenceTransactionProvider;
08:
09: public class NullPersistenceTransactionProvider implements
10: PersistenceTransactionProvider {
11:
12: private static final PersistenceTransaction NULL_TRANSACTION = new NullPersistenceTransaction();
13:
14: public PersistenceTransaction newTransaction() {
15: return NULL_TRANSACTION;
16: }
17:
18: public PersistenceTransaction nullTransaction() {
19: return NULL_TRANSACTION;
20: }
21:
22: private final static class NullPersistenceTransaction implements
23: PersistenceTransaction {
24: public void commit() {
25: return;
26: }
27:
28: public Object getProperty(Object key) {
29: return null;
30: }
31:
32: public Object setProperty(Object key, Object value) {
33: return null;
34: }
35: }
36:
37: }
|