Package com.atomikos.datasource

Examples of com.atomikos.datasource.RecoverableResource


     * @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

      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

    } catch ( NameNotFoundException e ) {
      //ignore but log
      if ( LOGGER.isDebugEnabled() ) LOGGER.logDebug ( this + ": error removing from JNDI" , e );
    }
   
    RecoverableResource res = Configuration.getResource ( getUniqueResourceName() );
    if ( res != null ) {
      Configuration.removeResource ( getUniqueResourceName() );
      //fix for case 26005: close resource!
      res.close();
    }
   
    if ( LOGGER.isDebugEnabled() ) LOGGER.logDebug ( this + ": close done." );
  }
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

            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

     */
  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

        }

        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

        // 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

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.