Package com.atomikos.datasource

Examples of com.atomikos.datasource.RecoverableResource


        }

        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


        Stack errors = new Stack ();

        TransactionalResource res = null;
        Enumeration enumm = Configuration.getResources ();
        while ( enumm.hasMoreElements () ) {
            RecoverableResource rres = (RecoverableResource) enumm
                    .nextElement ();
            if ( rres instanceof XATransactionalResource ) {
                XATransactionalResource xatxres = (XATransactionalResource) rres;
                if ( xatxres.usesXAResource ( xares ) )
                    res = xatxres;
View Full Code Here

                    }
                }

                Enumeration reslist = Configuration.getResources ();
                while ( reslist.hasMoreElements () ) {
                    RecoverableResource res = (RecoverableResource) reslist
                            .nextElement ();
                    try {
                        res.endRecovery ();
                    } catch ( Exception error ) {
                        LOGGER.logWarning ( "ERROR IN RECOVERY", error );
                        // continue processing to avoid indoubts for other resources
                    }
                }
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

  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

     * @return RecoverableResource The removed object.
     */

    public static RecoverableResource removeResource ( String name )
    {
        RecoverableResource ret = null;
        if ( name != null ) {
          ret = (RecoverableResource) resources_.remove ( name );
          if ( ret != null ) resourceList_.remove ( ret );

        }
View Full Code Here

     *            The name to find.
     */

    public static RecoverableResource getResource ( String name )
    {
        RecoverableResource res = null;
        if ( name != null ) res = (RecoverableResource) resources_.get ( name );
        return res;
    }
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

    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 ) ) ret = xatxres;
            }
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.