Examples of UserTransactionImpl


Examples of com.caucho.jca.pool.UserTransactionImpl

        xa.registerSynchronization(new EntityManagerSynchronization(em));

        return em;
      }

      UserTransactionImpl ut = _ut.getCurrentUserTransactionImpl();

      if (ut != null && ut.isInContext()) {
        em = _emf.createEntityManager(_persistenceUnit.getProperties());

        _threadEntityManager.set(em);

        ut.enlistCloseResource(new EntityManagerCloseResource(em));

        return em;
      }
     
      return null;
View Full Code Here

Examples of com.caucho.transaction.UserTransactionImpl

    UserPoolItem userPoolItem = null;

    try {
      while(true){
        userPoolItem = null;
        UserTransactionImpl transaction = _tm.getUserTransaction();

        if (transaction != null)
          userPoolItem = allocateShared(transaction, mcf, subject, info);

        if (userPoolItem == null)
View Full Code Here

Examples of com.caucho.transaction.UserTransactionImpl

    Thread thread = Thread.currentThread();
    ClassLoader oldLoader = thread.getContextClassLoader();

    WebApp webApp = _webApp;

    UserTransactionImpl ut = null;
    if (_isTop)
      ut = _utm.getUserTransaction();

    try {
      thread.setContextClassLoader(webApp.getClassLoader());

      if (! webApp.enterWebApp() && webApp.getConfigException() == null) {
        if (response instanceof HttpServletResponse) {
          HttpServletResponse res = (HttpServletResponse) response;

          res.sendError(HttpServletResponse.SC_SERVICE_UNAVAILABLE);
        }

        return;
      }

      _next.doFilter(request, response);
    } catch (Throwable e) {
      _errorPageManager.sendServletError(e, request, response);
    } finally {
      webApp.exitWebApp();

      // put finish() before access log so the session isn't tied up while
      // logging

      // needed for things like closing the session
      if (request instanceof HttpServletRequestImpl)
        ((HttpServletRequestImpl) request).finishInvocation();

      // server/1ld5
      if (_isTop) {
        ((CauchoResponse) response).close();

        try {
          if (ut != null)
            ut.abortTransaction();
        } catch (Throwable e) {
          log.log(Level.WARNING, e.toString(), e);
        }
      }
View Full Code Here

Examples of com.caucho.transaction.UserTransactionImpl

    Thread thread = Thread.currentThread();
    ClassLoader oldLoader = thread.getContextClassLoader();

    WebApp webApp = _webApp;

    UserTransactionImpl ut = null;
    ut = _utm.getUserTransaction();

    try {
      thread.setContextClassLoader(webApp.getClassLoader());

      if (! webApp.enterWebApp() && webApp.getConfigException() == null) {
        throw new IllegalStateException("Cannot enter web-app");
      }

      _next.doFilter(request, response);
    } catch (Throwable e) {
      log.log(Level.WARNING, e.toString(), e);
    } finally {
      webApp.exitWebApp();

      // put finish() before access log so the session isn't tied up while
      // logging

      // needed for things like closing the session
      if (request instanceof HttpServletRequestImpl)
        ((HttpServletRequestImpl) request).finishInvocation();

      // ((CauchoResponse) response).close();

      try {
        if (ut != null)
          ut.abortTransaction();
      } catch (Throwable e) {
        log.log(Level.WARNING, e.toString(), e);
      }

      thread.setContextClassLoader(oldLoader);
View Full Code Here

Examples of com.caucho.transaction.UserTransactionImpl

      // connection.  The delegates tie the PoolItems managed by
      // the same resource manager together.

      _xid = xid;

      UserTransactionImpl trans = _cm.getTransaction();

      if (trans != null) {
        ManagedPoolItem xaHead = _cm.findJoin(trans, this);

        if (xaHead != null) {
View Full Code Here

Examples of com.caucho.transaction.UserTransactionImpl

  public void destroy()
  {
    ManagedConnection mConn = _mConn;
    _mConn = null;

    UserTransactionImpl transaction = _transaction;
    _transaction = null;

    if (mConn == null)
      return;
View Full Code Here

Examples of com.sun.enterprise.distributedtx.UserTransactionImpl

    private J2EETransactionManager getTransactionManagerImpl() {
        J2EETransactionManager tm = Switch.getSwitch().getTransactionManager();
  if (tm != null)
            return tm;
  new UserTransactionImpl(); // Hack to make clients work using this class
  tm = Switch.getSwitch().getTransactionManager();
  return tm;
    }
View Full Code Here

Examples of com.sun.enterprise.distributedtx.UserTransactionImpl

          BaseContainer container = (BaseContainer) inv.container;
          container.checkUserTransactionLookup(inv);
      }
        }
        // UserTransactionImpl is mutable so return new instance
        return new UserTransactionImpl();
    }
    else if ( fullName.equals(EJB_TIMER_SERVICE) ) {
        // return the EJB Timer Service.  Only works for ejbs.
        return Switch.getSwitch().getContainerFactory().
                        getEJBContextObject("javax.ejb.TimerService");
View Full Code Here

Examples of net.sourceforge.jivalo.fw.lite.transaction.UserTransactionImpl

    throws SecurityException, IllegalStateException, RollbackException,
      HeuristicMixedException, HeuristicRollbackException, SystemException
  {
   
    if (isTransactionInitiatedByThis()) {
      UserTransactionImpl transaction =
          (UserTransactionImpl)ctx.getUserTransaction();
      if (transaction != null) {
          transaction.finish();
          ContainerTransactionManager.removeContainerTransaction(transaction);
      }
    }
  }
View Full Code Here

Examples of org.apache.geronimo.transaction.UserTransactionImpl

                mockConnection.close();
                return null;
            }
        };
        transactionContextManager.newUnspecifiedTransactionContext();
        userTransaction = new UserTransactionImpl();
        userTransaction.setUp(transactionContextManager, connectionTrackingCoordinator);
        userTransaction.setOnline(true);
        defaultComponentInterceptor.invoke(defaultComponentContext);
        MockXAResource mockXAResource = (MockXAResource) mockManagedConnection.getXAResource();
        assertEquals("XAResource should know 1 xid", 1, mockXAResource.getKnownXids().size());
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.