Package com.arjuna.ats.arjuna.objectstore

Examples of com.arjuna.ats.arjuna.objectstore.ObjectStore


      throw new BAD_PARAM();
    else
    {
      // if here then it is not active, so look in the object store

      ObjectStore store = com.arjuna.ats.arjuna.coordinator.TxControl.getStore();

      try
      {
        /*
         * Do we need to search server transactions too? Possibly not,
         * since an interposed coordinator can never always say with
         * certainty what the status is of the root coordinator.
         */

        int status = store.currentState(u, ArjunaTransactionImple.typeName());

        switch (status)
        {
        case ObjectStore.OS_UNKNOWN: // means no state present, so check
                       // if server transaction
View Full Code Here


  return getTransactions(os, ObjectStore.OS_UNKNOWN);
    }
    public static boolean getTransactions (InputObjectState os, int status)
    {
  ObjectStore store = new ObjectStore(com.arjuna.ats.arjuna.coordinator.TxControl.getActionStoreType());

  try
  {
      return store.allObjUids(com.arjuna.ats.internal.jts.orbspecific.coordinator.ArjunaTransactionImple.typeName(), os, status);
  }
  catch (NullPointerException ex)
  {
  }
  catch (ObjectStoreException e)
View Full Code Here

      throw new BAD_PARAM();
    else
    {
      // if here then it is not active, so look in the object store

      ObjectStore store = com.arjuna.ats.arjuna.coordinator.TxControl.getStore();

      try
      {
        /*
         * Do we need to search server transactions too? Possibly not,
         * since an interposed coordinator can never always say with
         * certainty what the status is of the root coordinator.
         */

        int status = store.currentState(u, ServerTransaction.typeName());

        switch (status)
        {
        case ObjectStore.OS_UNKNOWN: // means no state present
          return org.omg.CosTransactions.Status.StatusNoTransaction;
View Full Code Here

        Xid[] indoubt = null;

        try
        {
            ObjectStore objStore = TxControl.getStore();
            InputObjectState states = new InputObjectState();

            // only look in the JCA section of the object store

            if (objStore.allObjUids(ServerTransaction.getType(), states)
                    && (states.notempty()))
            {
                Stack values = new Stack();
                boolean finished = false;
View Full Code Here

      throw new BAD_PARAM();
    else
    {
      // if here then it is not active, so look in the object store

      ObjectStore store = com.arjuna.ats.arjuna.coordinator.TxControl.getStore();

      try
      {
        /*
         * Do we need to search server transactions too? Possibly not,
         * since an interposed coordinator can never always say with
         * certainty what the status is of the root coordinator.
         */

        int status = store.currentState(u, ArjunaTransactionImple.typeName());

        switch (status)
        {
        case ObjectStore.OS_UNKNOWN: // means no state present, so check
                       // if server transaction
View Full Code Here

  return getTransactions(os, ObjectStore.OS_UNKNOWN);
    }
    public static boolean getTransactions (InputObjectState os, int status)
    {
  ObjectStore store = TxControl.getStore();

  try
  {
      return store.allObjUids(com.arjuna.ats.internal.jts.orbspecific.coordinator.ArjunaTransactionImple.typeName(), os, status);
  }
  catch (NullPointerException ex)
  {
  }
  catch (ObjectStoreException e)
View Full Code Here

      {
         _tests_passed = 0 ;
         _tests_failed = 0 ;

         // needed to force TxControl static initialization
         ObjectStore os = TxControl.getStore() ;

         _transaction_1 = new AtomicAction() ;
         _transaction_2 = new AtomicAction() ;
         _transaction_3 = new AtomicAction() ;
View Full Code Here

  }

  private final void setObjectStore()
  {
    if (_objStore == null)
      _objStore = new ObjectStore(null, ""); // interface gets default
  }
View Full Code Here

        }

        try
        {
            Class osImple = Class.forName(storeImple);
            ObjectStore imple = (ObjectStore) osImple.newInstance();


            InputObjectState types = new InputObjectState();

            if (imple.allTypes(types))
            {
                String theName = null;
                int count = 0;

                try
                {
                    boolean endOfList = false;

                    while (!endOfList)
                    {
                        theName = types.unpackString();

                        if (theName.compareTo("") == 0)
                            endOfList = true;
                        else
                        {
                            count++;

                            System.out.println(count + ": " + theName);

                            InputObjectState uids = new InputObjectState();

                            if (imple.allObjUids(theName, uids))
                            {
                                Uid theUid = new Uid(Uid.nullUid());

                                try
                                {
                                    boolean endOfUids = false;

                                    while (!endOfUids)
                                    {
                                        theUid = UidHelper.unpackFrom(uids);

                                        if (theUid.equals(Uid.nullUid()))
                                            endOfUids = true;
                                        else
                                        {
                                            System.out.print("\t" + theUid
                                                    + " state is ");
                                            System.out.print(ObjectStore
                                                    .stateStatusString(imple
                                                            .currentState(
                                                                    theUid,
                                                                    theName)));

                                            System.out.println();
View Full Code Here

            try
            {
                Class actionStoreType = Class.forName(arjPropertyManager
                        .getCoordinatorEnvironmentBean().getActionStore());
                ObjectStore imple = (ObjectStore) actionStoreType.newInstance();

                InputObjectState types = new InputObjectState();

                startSweep();

                if (imple.allTypes(types))
                {
                    String fullPathName = null;
                    boolean found = false;

                    try
                    {
                        boolean endOfList = false;
                        DefaultMutableTreeNode currentNode = null;
                        DefaultMutableTreeNode currentRoot = top;

                        while (!endOfList)
                        {
                            fullPathName = types.unpackString();

                            if (fullPathName.compareTo("") == 0)
                                endOfList = true;
                            else
                            {
                                found = true;

                                InputObjectState uids = new InputObjectState();
                                String nodeName = stripName(fullPathName);
                                boolean added = false;

                                currentNode = findNode(fullPathName);

                                if (currentNode == null)
                                {
                                    currentNode = new DefaultMutableTreeNode(
                                            nodeName);
                                    addDirectory(currentNode, fullPathName);
                                    currentRoot.add(currentNode);

                                    /*
                                     * New, so update view.
                                     */

                                    int i[] = new int[1];

                                    i[0] = currentRoot.getChildCount() - 1;

                                    model.nodesWereInserted(currentRoot, i);

                                    added = true;
                                }

                                currentRoot = findRoot(top, currentNode);

                                if (added)
                                    currentRoot.add(currentNode);

                                if (imple.allObjUids(fullPathName, uids))
                                {
                                    Uid theUid = new Uid(Uid.nullUid());

                                    try
                                    {
                                        boolean endOfUids = false;
                                        boolean first = true;
                                        boolean haveUids = false;

                                        while (!endOfUids)
                                        {
                                            theUid = UidHelper.unpackFrom(uids);

                                            if (theUid.equals(Uid.nullUid()))
                                            {
                                                if (!haveUids)
                                                {
                                                    if (emptyDirectory(currentNode))
                                                    {
                                                        currentNode
                                                                .removeAllChildren();
                                                        model
                                                                .nodeChanged(currentNode);
                                                    }
                                                }

                                                endOfUids = true;
                                            }
                                            else
                                            {
                                                haveUids = true;

                                                if (first)
                                                {
                                                    currentNode
                                                            .removeAllChildren();

                                                    first = false;
                                                }

                                                DefaultMutableTreeNode tranID = new DefaultMutableTreeNode(
                                                        theUid.stringForm());

                                                tranID
                                                        .add(new DefaultMutableTreeNode(
                                                                new String(
                                                                        "status: "
                                                                                + statusToString(imple
                                                                                        .currentState(
                                                                                                theUid,
                                                                                                fullPathName)))));

                                                currentNode.add(tranID);
View Full Code Here

TOP

Related Classes of com.arjuna.ats.arjuna.objectstore.ObjectStore

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.