Package com.atomikos.datasource

Examples of com.atomikos.datasource.RecoverableResource


     */
  private boolean tryRecoverWithEveryResourceToEnsureOurXidIsNotEndedByPresumedAbort() {
    boolean ret = false;   
    Enumeration resources = Configuration.getResources ();
        while ( resources.hasMoreElements () ) {
            RecoverableResource res = (RecoverableResource) resources.nextElement ();
            if ( res.recover ( this ) ) {
                ret = true;
            }

        }
    return ret;
View Full Code Here


            throws SysException
    {
        checkInit ();
        Iterator it = resources_.iterator();
        while ( it.hasNext() ) {
          RecoverableResource nxt = ( RecoverableResource ) it.next();
          registerResource ( nxt );
        }
        it = logAdministrators_.iterator();
        while  ( it.hasNext() ) {
          LogAdministrator nxt = ( LogAdministrator ) it.next();
View Full Code Here

        // If so, each resource needs to know that the XID
        // can be recovered, or endRecovery in one of them
        // will incorrectly rollback

        while ( resources.hasMoreElements () ) {
            RecoverableResource res = (RecoverableResource) resources
                    .nextElement ();
            if ( res.recover ( this ) ) {
                recovered = true;
            }

        }
View Full Code Here

    TransactionalResource ret = null;
    XATransactionalResource xatxres;
    Enumeration enumm = Configuration.getResources ();

        while ( enumm.hasMoreElements () ) {
            RecoverableResource rres = (RecoverableResource) enumm
                    .nextElement ();
            if ( rres instanceof XATransactionalResource ) {
                xatxres = (XATransactionalResource) rres;

                if ( xatxres.usesXAResource ( xares ) )
View Full Code Here

      return cf;
  }
 
  protected void doClose()
  {
    RecoverableResource res = Configuration.getResource ( getUniqueResourceName() );
    if ( res != null ) {
      Configuration.removeResource ( getUniqueResourceName() );
      //fix for case 26005
      res.close();
    }
  } 
View Full Code Here

      return cf;
  }
 
  protected void doClose()
  {
    RecoverableResource res = Configuration.getResource ( getUniqueResourceName() );
    if ( res != null ) {
      Configuration.removeResource ( getUniqueResourceName() );
      //fix for case 26005
      res.close();
    }
  } 
View Full Code Here

       
        // Ask the Configuration for all current resources, since
        // newly added ones are not known at init.
        Enumeration resources = Configuration.getResources ();
        while ( resources.hasMoreElements () ) {
            RecoverableResource res = (RecoverableResource) resources
                    .nextElement ();

            Configuration.removeResource ( res.getName () );
            try {
                res.close ();
            } catch ( ResourceException re ) {
                
              //Issue 10038:
              //Ignore errors in force mode: force is most likely
              //during VM exit; in that case interleaving of shutdown hooks
View Full Code Here

                // next, notify all registered resources that recovery is done:
                // any non-collected restxs should be aborted at this time
                Enumeration reslist = Configuration.getResources ();

                while ( reslist.hasMoreElements () ) {
                    RecoverableResource res = (RecoverableResource) reslist
                            .nextElement ();
                    try {
                        res.endRecovery ();
                    } catch ( Exception error ) {
                        Configuration.logWarning ( "ERROR IN RECOVERY", error );
                        // CONTINUE PROCESSING: JUST BECAUSE ONE RESOURCE
                        // DOES BAD THINGS DOESN'T MEAN EVERYONE MUST STAY
                        // IN DOUBT
View Full Code Here

  private static void purgeResources ()
    {
        Enumeration enumm = getResources ();
        while ( enumm.hasMoreElements () ) {
            RecoverableResource res = (RecoverableResource) enumm.nextElement ();
            if ( res.isClosed () )
                removeResource ( res.getName () );
        }
    }
View Full Code Here

        recoveryService_ = service;
        if ( service != null ) {
            // notify all currently registered resources
            Enumeration resources = getResources ();
            while ( resources.hasMoreElements () ) {
                RecoverableResource next = (RecoverableResource) resources
                        .nextElement ();
                next.setRecoveryService ( service );

            }
           
        }
    }
View Full Code Here

TOP

Related Classes of com.atomikos.datasource.RecoverableResource

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.