Berkeley DB Java Edition version 3.2.76

## com.sleepycat.je
Class XAEnvironment

    java.lang.Object
      com.sleepycat.je.Environment
          com.sleepycat.je.XAEnvironment

All Implemented Interfaces:
  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.

Field Summary

Fields inherited from class com.sleepycat.je.Environment
`CHECKPOINTER_NAME, CLEANER_NAME, INCOMP_NAME`

Fields inherited from interface javax.transaction.xa.XAResource
`TMENDRSCAN, TMFAIL, TMJOIN, TMNOFLAGS, TMONEPHASE, TMRESUME, TMSTARTRSCAN, TMSUCCESS, TMSUSPEND, XA_OK, XA_RDONLY`

Constructor Summary
`XAEnvironment(File envHome, EnvironmentConfig configuration)` Create a database environment handle.

Method Summary
`void` `commit(Xid xid, boolean ignore)`
`void` `end(Xid xid, int flag)`
`void` `forget(Xid xid)`
`int` `getTransactionTimeout()`
`Transaction` `getXATransaction(Xid xid)` This method can be used by the application to get the Transaction object given an XA Xid.
`boolean` `isSameRM(XAResource rm)`
`int` `prepare(Xid xid)`
`Xid[]` `recover(int flag)`
`void` `rollback(Xid xid)`
`boolean` `setTransactionTimeout(int timeout)`
`void` `setXATransaction(Xid xid, Transaction txn)` This method can be used by the application to set the Transaction object for an XA Xid.
`void` `start(Xid xid, int flag)`

Methods inherited from class com.sleepycat.je.Environment
`beginTransaction, checkpoint, cleanLog, close, compress, evictMemory, getConfig, getDatabaseNames, getHome, getLockStats, getMutableConfig, getStats, getThreadTransaction, getTransactionStats, openDatabase, openSecondaryDatabase, removeDatabase, renameDatabase, scanLog, setMutableConfig, setThreadTransaction, sync, truncateDatabase, verify`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### XAEnvironment

    public XAEnvironment(File envHome,
                         EnvironmentConfig configuration)
                  throws DatabaseException

  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:
    `DatabaseException`

Method Detail

### getXATransaction

    public Transaction getXATransaction(Xid xid)
                                 throws DatabaseException

  This method can be used by the application to get the Transaction object given an XA Xid.

  Throws:
    `DatabaseException`

### setXATransaction

    public void setXATransaction(Xid xid,
                                 Transaction txn)
                          throws DatabaseException

  This method can be used by the application to set the Transaction object for an XA Xid.

  Throws:
    `DatabaseException`

### 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 flag)
             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`

### getTransactionTimeout

    public int getTransactionTimeout()
                              throws XAException

  Specified by:
    `getTransactionTimeout` 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 flag)
                  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`

### setTransactionTimeout

    public boolean setTransactionTimeout(int timeout)
                                  throws XAException

  Specified by:
    `setTransactionTimeout` in interface `XAResource`
  Throws:
    `XAException`

### start

    public void start(Xid xid,
                      int flag)
               throws XAException

  Specified by:
    `start` in interface `XAResource`
  Throws:
    `XAException`

Berkeley DB Java Edition version 3.2.76

Copyright 1996,2008 Oracle. All rights reserved.