Package com.arjuna.ats.arjuna.common

Examples of com.arjuna.ats.arjuna.common.Uid


        Thread.sleep(1000);

        // create test reapables some of which will not respond immediately to cancel requests

        Uid uid0 = new Uid();
        Uid uid1 = new Uid();
        Uid uid2 = new Uid();
        Uid uid3 = new Uid();

        // reapable0 will return CANCELLED from cancel and will rendezvous inside the cancel call
        // so we can delay it. prevent_commit should not get called so we don't care about the arguments
        TestReapable reapable0 = new TestReapable(uid0, true, false, false, false);
        // reapable1 will return CANCELLED from cancel and will not rendezvous inside the cancel call
View Full Code Here


        Thread.sleep(1000);

        // create test reapables some of which will not respond immediately to cancel requests

        Uid uid0 = new Uid();
        Uid uid1 = new Uid();
        Uid uid2 = new Uid();
        Uid uid3 = new Uid();

        // reapable0 will return CANCELLED from cancel and will rendezvous inside the cancel call
        // so we can delay it. prevent_commit should not get called so we don't care about the arguments
        TestReapable reapable0 = new TestReapable(uid0, true, false, false, false);
        // reapable1 will return CANCELLED from cancel and will not rendezvous inside the cancel call
View Full Code Here

    }

    public void testSaveRestore () throws Exception
    {
        final BasicObject obj = new BasicObject();
        final Uid objUid = obj.get_uid();

        obj.set(1234);
        obj.deactivate();
       
        final BasicObject rec = new BasicObject(objUid);
View Full Code Here

{
    public static void main (String[] args)
    {
        ObjectStore os = TxControl.getStore();
        OutputObjectState fluff = new OutputObjectState();
        Uid kungfuTx = new Uid();
        boolean outcome = false;
        final String tn = new AtomicAction().type();

        try
        {
            kungfuTx.pack(fluff);

            System.err.println("Creating dummy log");
           
            os.write_committed(kungfuTx, tn, fluff);
View Full Code Here

            _test_status_1 = ActionStatus.COMMITTED ;
            _test_status_2 = ActionStatus.PREPARED ;
            _test_status_3 = ActionStatus.ABORTED ;
            _test_status_4 = ActionStatus.INVALID ;

            _test_uid_1 = new Uid() ;
            _test_uid_2 = new Uid() ;
            _test_uid_3 = new Uid() ;
            _test_uid_4 = new Uid() ;
           
            _test_tran_type_1 = "_test_tran_type_1" ;
            _test_tran_type_2 = "_test_tran_type_2" ;
            _test_tran_type_3 = "_test_tran_type_3" ;
            _test_tran_type_4 = "_test_tran_type_4" ;
View Full Code Here

    // TODO check for AlreadyRegisteredException

    if (AtomicTransactionConstants.WSAT_SUB_PROTOCOL_DURABLE_2PC.equals(protocolIdentifier))
    {
      // enlist participant that wraps the requester URI.
      final String participantId = "D" + new Uid().stringForm();

      try
      {
                final Durable2PCStub participantStub = new Durable2PCStub(participantId, participantProtocolService) ;
        _coordManager.enlistParticipant(new DurableTwoPhaseCommitParticipant(participantStub, participantId));

        _coordManager.suspend();

        return getCoordinator(participantId, isSecure) ;
      }
      catch (Exception ex)
      {
        throw new InvalidStateException();
      }
    }
    else if (AtomicTransactionConstants.WSAT_SUB_PROTOCOL_VOLATILE_2PC.equals(protocolIdentifier))
    {
      // enlist participant that wraps the requester URI.
      final String participantId = "V" + new Uid().stringForm();

      try
      {
                final Volatile2PCStub participantStub = new Volatile2PCStub(participantId, participantProtocolService) ;
        _coordManager.enlistSynchronization(new VolatileTwoPhaseCommitParticipant(participantStub)) ;
View Full Code Here

      InvalidStateException, NoActivityException
    {
    if (AtomicTransactionConstants.WSAT_SUB_PROTOCOL_DURABLE_2PC.equals(protocolIdentifier))
    {
      // enlist participant that wraps the requester URI.
            final String participantId = "D" + new Uid().stringForm();

            try
            {
                final Durable2PCStub participantStub = new Durable2PCStub(participantId, participantProtocolService) ;
                theTx.enlistParticipant(new DurableTwoPhaseCommitParticipant(participantStub, participantId));

                return getCoordinator(participantId, isSecure) ;
            }
            catch (Exception ex)
            {
                throw new InvalidStateException();
            }
    }
    else if (AtomicTransactionConstants.WSAT_SUB_PROTOCOL_VOLATILE_2PC.equals(protocolIdentifier))
    {
      // enlist participant that wraps the requester URI.
            final String participantId = "V" + new Uid().stringForm();

            try
            {
                final Volatile2PCStub participantStub = new Volatile2PCStub(participantId, participantProtocolService) ;
                theTx.enlistSynchronization(new VolatileTwoPhaseCommitParticipant(participantStub)) ;
View Full Code Here

  {
      if (attr.charAt(0) == JNS.UID)
      {
    try
    {
        return new Uid(new String(attr.substring(1)));
    }
    catch (StringIndexOutOfBoundsException e)
    {
        throw new IOException("No Uid.");
    }
View Full Code Here

  return arjPropertyManager.propertyManager.removeProperty(objName+"."+attrName);
    }
   
public String uniqueAttributeName (String objName) throws IOException
    {
  Uid u = new Uid();

  return u.stringForm();
    }
View Full Code Here

  return u.stringForm();
    }
   
public ObjectName uniqueObjectName () throws IOException
    {
  Uid uid = new Uid();
  ObjectName uniqueName = new ObjectName(JNS.jnsName+uid.stringForm());

  return uniqueName;
    }
View Full Code Here

TOP

Related Classes of com.arjuna.ats.arjuna.common.Uid

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.