Package com.sun.enterprise.transaction.api

Examples of com.sun.enterprise.transaction.api.JavaEETransactionManager.enlistResource()


        //The other case might or might not work
        if( h != null && h.getResourceState().isUnenlisted()) {
            try {
                //Enable the suspended lazyenlistment so as to enlist the resource.
                    h.setEnlistmentSuspended(false);
                    tm.enlistResource( tran, h );
                //Suspend it back
                    h.setEnlistmentSuspended(true);
            } catch( Exception e ) {
                //In the rare cases where enlistResource throws exception, we
              //should return the resource to the pool
View Full Code Here


    public void enlistResource(ResourceHandle handle) throws PoolingException{
        try {
            JavaEETransactionManager tm = ConnectorRuntime.getRuntime().getTransactionManager();
            Transaction tran = tm.getTransaction();
      if (tran != null) {
                tm.enlistResource(tran, handle);
            }
  } catch (Exception ex) {
            _logger.log(Level.SEVERE,"poolmgr.unexpected_exception",ex);
            throw new PoolingException(ex.toString(), ex);
        }          
View Full Code Here

                    tm.registerComponentResource(handle);
                }
               
                if (tran != null) {
          try{           
              tm.enlistResource(tran, handle);
          } catch (Exception ex) {
                        if(_logger.isLoggable(Level.FINE)) {
                  _logger.fine("Exception whle trying to enlist resource " + ex.getMessage());
                        }
              //If transactional, remove the connection handle from the
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.