Examples of XATerminator


Examples of javax.resource.spi.XATerminator

            throw new EZBComponentException("Work manager was not injected. Reason: Missing workmanager=\"#workmanager\""
                    + " in the easybeans.xml configuration file ?");
        }

        // Create BootstrapContext
        XATerminator xaTerminator = null;
        try {
            xaTerminator = this.transactionComponent.getXATerminator();
        } catch (XAException e) {
            throw new EZBComponentException("Cannot get the XA terminator", e);
        }
View Full Code Here

Examples of javax.resource.spi.XATerminator

      return (TransactionManager) ctx.lookup("java:/TransactionManager");
   }
  
   public void basicTest() throws Exception
   {
      XATerminator xt = adapter.ctx.getXATerminator();
      WorkManager wm = adapter.ctx.getWorkManager();
      TestWork work = new TestWork();
      ExecutionContext ec = new ExecutionContext();
      Xid xid = new MyXid(1);
      ec.setXid(xid);

      wm.doWork(work, 0l, ec, null);
      if (work.complete == false)
         throw new Exception("Work was not done");
      if (work.e != null)
         throw work.e;
      if (work.enlisted == false)
         throw new Exception("Not enlisted");
      if (work.delisted)
         throw new Exception("Should not be ended yet");
      if (work.committed)
         throw new Exception("Should not be committed yet");

      xt.commit(xid, true);
      if (work.delisted == false)
         throw new Exception("Should be ended");
      if (work.committed == false)
         throw new Exception("Should be committed");
   }
View Full Code Here

Examples of javax.resource.spi.XATerminator

     */
    public void testGetSetXATerminator() {
        TransactionContextManager transactionContextManager = new TransactionContextManager();
        GeronimoWorkManager manager = new GeronimoWorkManager(pool, pool, pool, transactionContextManager);
        BootstrapContextImpl context = new BootstrapContextImpl(manager);
        XATerminator xat = context.getXATerminator();

        assertSame("Make sure it is the same object", transactionContextManager, xat);
    }
View Full Code Here

Examples of javax.resource.spi.XATerminator

     */
    public void testGetSetXATerminator() {
        TransactionContextManager transactionContextManager = new TransactionContextManager();
        GeronimoWorkManager manager = new GeronimoWorkManager(1, transactionContextManager);
        BootstrapContextImpl context = new BootstrapContextImpl(manager);
        XATerminator xat = context.getXATerminator();

        assertSame("Make sure it is the same object", transactionContextManager, xat);
    }
View Full Code Here

Examples of javax.resource.spi.XATerminator

      return (TransactionManager) ctx.lookup("java:/TransactionManager");
   }
  
   public void basicTest() throws Exception
   {
      XATerminator xt = adapter.ctx.getXATerminator();
      WorkManager wm = adapter.ctx.getWorkManager();
      TestWork work = new TestWork();
      ExecutionContext ec = new ExecutionContext();
      Xid xid = new MyXid(1);
      ec.setXid(xid);

      wm.doWork(work, 0l, ec, null);
      if (work.complete == false)
         throw new Exception("Work was not done");
      if (work.e != null)
         throw work.e;
      if (work.enlisted == false)
         throw new Exception("Not enlisted");
      if (work.delisted)
         throw new Exception("Should not be ended yet");
      if (work.committed)
         throw new Exception("Should not be committed yet");

      xt.commit(xid, true);
      if (work.delisted == false)
         throw new Exception("Should be ended");
      if (work.committed == false)
         throw new Exception("Should be committed");
   }
View Full Code Here

Examples of javax.resource.spi.XATerminator

     */
    public void testGetSetXATerminator() throws Exception {
        GeronimoTransactionManager transactionManager = new GeronimoTransactionManager();
        GeronimoWorkManager manager = new GeronimoWorkManager(pool, pool, pool, transactionManager);
        GeronimoBootstrapContext context = new GeronimoBootstrapContext(manager, transactionManager);
        XATerminator xat = context.getXATerminator();

        assertSame("Make sure it is the same object", transactionManager, xat);
    }
View Full Code Here

Examples of javax.resource.spi.XATerminator

     */
    public void testGetSetXATerminator() {
        TransactionContextManager transactionContextManager = new TransactionContextManager();
        GeronimoWorkManager manager = new GeronimoWorkManager(pool, pool, pool, transactionContextManager);
        BootstrapContextImpl context = new BootstrapContextImpl(manager);
        XATerminator xat = context.getXATerminator();

        assertSame("Make sure it is the same object", transactionContextManager, xat);
    }
View Full Code Here

Examples of javax.resource.spi.XATerminator

        final TransactionManager transactionManager = this.transactionsRepository.getTransactionManager();
        transactionManager.resume(transaction);
    }

    protected SubordinateTransaction tryRecoveryForImportedTransaction() throws Exception {
        final XATerminator xaTerminator = SubordinationManager.getXATerminator();
        if (xaTerminator instanceof XATerminatorImple) {
            EjbLogger.ROOT_LOGGER.debug("Trying to recover an imported transaction for Xid " + this.xidTransactionID.getXid());
            // We intentionally pass null for Xid since passing the specific Xid doesn't seem to work for some reason.
            // As for null for parentNodeName, we do that intentionally since we aren't aware of the parent node on which
            // the transaction originated
View Full Code Here

Examples of javax.resource.spi.XATerminator

     */
    public void testGetSetXATerminator() throws Exception {
        GeronimoTransactionManager transactionManager = new GeronimoTransactionManager();
        GeronimoWorkManager manager = new GeronimoWorkManager(pool, pool, pool, transactionManager);
        GeronimoBootstrapContext context = new GeronimoBootstrapContext(manager, transactionManager);
        XATerminator xat = context.getXATerminator();

        assertSame("Make sure it is the same object", transactionManager, xat);
    }
View Full Code Here

Examples of javax.resource.spi.XATerminator

     */
    public void testGetSetXATerminator() {
        TransactionContextManager transactionContextManager = new TransactionContextManager();
        GeronimoWorkManager manager = new GeronimoWorkManager(1, transactionContextManager);
        BootstrapContextImpl context = new BootstrapContextImpl(manager);
        XATerminator xat = context.getXATerminator();

        assertSame("Make sure it is the same object", transactionContextManager, xat);
    }
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.