Package com.caucho.transaction

Examples of com.caucho.transaction.TransactionManagerImpl


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

      TransactionImpl xa = tm.getTransaction();
     
      if (xa != null)
        xa.setAttribute("allowRollback", Boolean.FALSE);
    } catch (RuntimeException e) {
      throw e;
View Full Code Here


   * @return The current transaction if it exists.
   */
  public TransactionImpl getTransaction()
  {
    try {
      TransactionManagerImpl tm = TransactionManagerImpl.getLocal();

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

   * Resumes transaction.
   */
  public void resume(Transaction xa)
  {
    try {
      TransactionManagerImpl tm = TransactionManagerImpl.getLocal();

      tm.resume(xa);
    } 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

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

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

   * Resumes transaction.
   */
  public void resume(Transaction xa)
  {
    try {
      TransactionManagerImpl tm = TransactionManagerImpl.getLocal();

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

   * Enlists a resource
   */
  public void enlist(XAResource xaResource)
  {
    try {
      TransactionManagerImpl tm = TransactionManagerImpl.getLocal();

      Transaction xa = tm.getTransaction();

      if (xa != null && xaResource != null)
        xa.enlistResource(xaResource);
    } catch (RuntimeException e) {
      throw e;
View Full Code Here

   * Enlists a resource
   */
  public void registerSynchronization(SessionSynchronization sync)
  {
    try {
      TransactionManagerImpl tm = TransactionManagerImpl.getLocal();

      Transaction xa = tm.getTransaction();

      if (xa != null && sync != null) {
        sync.afterBegin();

        xa.registerSynchronization(new SynchronizationAdapter(sync));
View Full Code Here

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

      Transaction xa = tm.getTransaction();

      if (xa == null)
        throw new EJBTransactionRequiredException(L
            .l("Transaction required for 'Mandatory' transaction attribute"));
    } catch (RuntimeException 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.