com.sleepycat.je
Class XAEnvironment
java.lang.Object
com.sleepycat.je.Environment
com.sleepycat.je.XAEnvironment
- All Implemented Interfaces:
- Closeable, XAResource
public class XAEnvironment
- extends Environment
- implements XAResource
An Environment that implements XAResource. If JE is used in an XA
environment, this class should be used instead of Environment so that
appropriate XA functions are available.
Fields inherited from interface javax.transaction.xa.XAResource |
TMENDRSCAN, TMFAIL, TMJOIN, TMNOFLAGS, TMONEPHASE, TMRESUME, TMSTARTRSCAN, TMSUCCESS, TMSUSPEND, XA_OK, XA_RDONLY |
Methods inherited from class com.sleepycat.je.Environment |
beginTransaction, checkpoint, cleanLog, close, compress, evictMemory, flushLog, getConfig, getDatabaseNames, getHome, getLockStats, getMutableConfig, getStats, getThreadTransaction, getTransactionStats, isInternalHandle, isValid, openDatabase, openSecondaryDatabase, preload, printStartupInfo, removeDatabase, renameDatabase, setMutableConfig, setThreadTransaction, sync, truncateDatabase, verify |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XAEnvironment
public XAEnvironment(File envHome,
EnvironmentConfig configuration)
throws EnvironmentNotFoundException,
EnvironmentLockedException
- Create a database environment handle.
- Parameters:
envHome
- The database environment's home directory.configuration
- The database environment attributes. If null,
default attributes are used.
- Throws:
EnvironmentNotFoundException
EnvironmentLockedException
commit
public void commit(Xid xid,
boolean ignore)
throws XAException
- Specified by:
commit
in interface XAResource
- Throws:
XAException
end
public void end(Xid xid,
int flags)
throws XAException
- Specified by:
end
in interface XAResource
- Throws:
XAException
forget
public void forget(Xid xid)
throws XAException
- Specified by:
forget
in interface XAResource
- Throws:
XAException
isSameRM
public boolean isSameRM(XAResource rm)
throws XAException
- Specified by:
isSameRM
in interface XAResource
- Throws:
XAException
prepare
public int prepare(Xid xid)
throws XAException
- Specified by:
prepare
in interface XAResource
- Throws:
XAException
recover
public Xid[] recover(int flags)
throws XAException
- Specified by:
recover
in interface XAResource
- Throws:
XAException
rollback
public void rollback(Xid xid)
throws XAException
- Specified by:
rollback
in interface XAResource
- Throws:
XAException
getTransactionTimeout
public int getTransactionTimeout()
throws XAException
- Specified by:
getTransactionTimeout
in interface XAResource
- Throws:
XAException
setTransactionTimeout
public boolean setTransactionTimeout(int timeout)
- Specified by:
setTransactionTimeout
in interface XAResource
start
public void start(Xid xid,
int flags)
throws XAException
- Specified by:
start
in interface XAResource
- Throws:
XAException
Copyright (c) 2004-2011 Oracle. All rights reserved.