org.apache.geronimo.transaction.manager
Class XidFactoryImpl

java.lang.Object
  extended byorg.apache.geronimo.transaction.manager.XidFactoryImpl
All Implemented Interfaces:
XidFactory

public class XidFactoryImpl
extends Object
implements XidFactory

Factory for transaction ids. The Xid is constructed of three parts:

  1. 8 byte count (LSB first)
  2. 4 byte system id
  3. 4 or 16 byte IP address of host
    1. Version:
      $Revision: 1.4 $ $Date: 2004/06/19 17:17:13 $ todo Should have a way of setting baseId

      Field Summary
      static org.apache.geronimo.gbean.GBeanInfo GBEAN_INFO
                 
       
      Constructor Summary
      XidFactoryImpl()
                 
      XidFactoryImpl(byte[] tmId)
                 
       
      Method Summary
       Xid createBranch(Xid globalId, int branch)
                 
       Xid createXid()
                 
      static org.apache.geronimo.gbean.GBeanInfo getGBeanInfo()
                 
       boolean matchesBranchId(byte[] branchQualifier)
                 
       boolean matchesGlobalId(byte[] globalTransactionId)
                 
       Xid recover(int formatId, byte[] globalTransactionid, byte[] branchQualifier)
                 
       
      Methods inherited from class java.lang.Object
      clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
       

      Field Detail

      GBEAN_INFO

      public static final org.apache.geronimo.gbean.GBeanInfo GBEAN_INFO
      Constructor Detail

      XidFactoryImpl

      public XidFactoryImpl(byte[] tmId)

      XidFactoryImpl

      public XidFactoryImpl()
      Method Detail

      createXid

      public Xid createXid()
      Specified by:
      createXid in interface XidFactory

      createBranch

      public Xid createBranch(Xid globalId,
                              int branch)
      Specified by:
      createBranch in interface XidFactory

      matchesGlobalId

      public boolean matchesGlobalId(byte[] globalTransactionId)
      Specified by:
      matchesGlobalId in interface XidFactory

      matchesBranchId

      public boolean matchesBranchId(byte[] branchQualifier)
      Specified by:
      matchesBranchId in interface XidFactory

      recover

      public Xid recover(int formatId,
                         byte[] globalTransactionid,
                         byte[] branchQualifier)
      Specified by:
      recover in interface XidFactory

      getGBeanInfo

      public static org.apache.geronimo.gbean.GBeanInfo getGBeanInfo()


      Copyright © 2003-2005 Apache Software Foundation. All Rights Reserved.