Package com.caucho.transaction

Examples of com.caucho.transaction.TransactionManagerImpl


   * Begins a never transaction.
   */
  public void beginNever()
  {
    try {
      TransactionManagerImpl tm = TransactionManagerImpl.getLocal();

      Transaction xa = tm.getTransaction();

      if (xa != null)
        throw new EJBException(L
            .l("Transaction forbidden for 'Never' transaction attribute"));
    } catch (RuntimeException e) {
View Full Code Here


   * @return the current transaction if it exists
   */
  public Transaction beginRequired()
  {
    try {
      TransactionManagerImpl tm = TransactionManagerImpl.getLocal();

      Transaction xa = tm.getTransaction();

      if (xa != null)
        return xa;

      _ut.begin();
View Full Code Here

   * @return the current transaction if it exists
   */
  public Transaction beginRequiresNew()
  {
    try {
      TransactionManagerImpl tm = TransactionManagerImpl.getLocal();

      Transaction xa = tm.suspend();

      _ut.begin();

      return xa;
    } catch (RuntimeException e) {
View Full Code Here

    } catch (Exception e) {
      throw new EJBException(e);
    } finally {
      try {
        if (xa != null) {
          TransactionManagerImpl tm = TransactionManagerImpl.getLocal();

          tm.resume(xa);
        }
      } catch (RuntimeException e) {
        throw e;
      } catch (Exception e) {
        throw new EJBException(e);
View Full Code Here

   * @return the current transaction if it exists
   */
  public Transaction beginNotSupported()
  {
    try {
      TransactionManagerImpl tm = TransactionManagerImpl.getLocal();

      return tm.suspend();
    } catch (RuntimeException e) {
      throw e;
    } catch (Exception e) {
      throw new EJBException(e);
    }
View Full Code Here

    init();
  }

  private void init() throws Exception
  {
    TransactionManagerImpl tm = TransactionManagerImpl.getInstance();
    UserTransactionProxy ut = UserTransactionProxy.getInstance();

    // server/16g0
    // Applications are incorrectly using TransactionManager
    // as an extended UserTransaction
    Jndi.bindDeep("java:comp/TransactionManager", tm);
    //TODO Is this alias used?
    Jndi.bindDeep("java:/TransactionManager", tm);
    Jndi.bindDeep("java:comp/TransactionSynchronizationRegistry",
                  tm.getSyncRegistry());
    Jndi.bindDeep("java:comp/UserTransaction", ut);
    Jndi.bindDeep("java:comp/ThreadPool",
                  ResinThreadPoolExecutor.getThreadPool());
  }
View Full Code Here

      if (_manager.getPath() != null)
  _xaLog.setPath(_manager.getPath().lookup(_path));
      else
  _xaLog.setPath(Vfs.lookup(_path));

      TransactionManagerImpl tm = TransactionManagerImpl.getLocal();

      tm.setXALogManager(_xaLog);

      _xaLog.start();
    } catch (IOException e) {
      throw ConfigException.create(e);
    }
View Full Code Here

TOP

Related Classes of com.caucho.transaction.TransactionManagerImpl

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.