Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.messaging.core.tx
Class Transaction

    java.lang.Object
      org.jboss.messaging.core.tx.Transaction

public class Transaction
extends java.lang.Object

A JMS Server local transaction

Version:
  $Revision 1.1$
Author:
  Tim Fox, Ovidiu Feodorov

Field Summary
`protected java.util.List` | `callbacks`
`protected long` | `id`
`protected java.util.Map` | `keyedCallbackMap`
`protected java.util.List` | `keyedCallbacks`
`protected int` | `state`
`static int` | `STATE_ACTIVE`
`static int` | `STATE_COMMITTED`
`static int` | `STATE_PREPARED`
`static int` | `STATE_ROLLBACK_ONLY`
`static int` | `STATE_ROLLEDBACK`
`protected javax.transaction.xa.Xid` | `xid`

Method Summary
`void` | `addCallback(TxCallback callback)`
`void` | `addKeyedCallback(TxCallback callback, java.lang.Object key)`
`void` | `commit()`
`long` | `getId()`
`TxCallback` | `getKeyedCallback(java.lang.Object key)`
`int` | `getState()`
`javax.transaction.xa.Xid` | `getXid()`
`void` | `prepare()`
`void` | `rollback()`
`void` | `setRollbackOnly()`
`java.lang.String` | `stateToString(int state)`
`java.lang.String` | `toString()`

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

Field Detail

### id

    protected long id

### state

    protected int state

### xid

    protected javax.transaction.xa.Xid xid

### callbacks

    protected java.util.List callbacks

### keyedCallbacks

    protected java.util.List keyedCallbacks

### keyedCallbackMap

    protected java.util.Map keyedCallbackMap

### STATE_ACTIVE

    public static final int STATE_ACTIVE

See Also:
  Constant Field Values

### STATE_PREPARED

    public static final int STATE_PREPARED

See Also:
  Constant Field Values

### STATE_COMMITTED

    public static final int STATE_COMMITTED

See Also:
  Constant Field Values

### STATE_ROLLEDBACK

    public static final int STATE_ROLLEDBACK

See Also:
  Constant Field Values

### STATE_ROLLBACK_ONLY

    public static final int STATE_ROLLBACK_ONLY

See Also:
  Constant Field Values

Method Detail

### stateToString

    public java.lang.String stateToString(int state)

### getState

    public int getState()

### getXid

    public javax.transaction.xa.Xid getXid()

### addCallback

    public void addCallback(TxCallback callback)

### addKeyedCallback

    public void addKeyedCallback(TxCallback callback,
                                 java.lang.Object key)

### getKeyedCallback

    public TxCallback getKeyedCallback(java.lang.Object key)

### commit

    public void commit()
                throws java.lang.Exception

  Throws:
    `java.lang.Exception`

### prepare

    public void prepare()
                 throws java.lang.Exception

  Throws:
    `java.lang.Exception`

### rollback

    public void rollback()
                  throws java.lang.Exception

  Throws:
    `java.lang.Exception`

### setRollbackOnly

    public void setRollbackOnly()
                         throws java.lang.Exception

  Throws:
    `java.lang.Exception`

### getId

    public long getId()

### toString

    public java.lang.String toString()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006 JBoss Inc. All Rights Reserved.