Package org.jboss.cache

Examples of org.jboss.cache.GlobalTransaction


     * @return
     * @throws Exception
     */
    private GlobalTransaction registerTransaction(Transaction tx) throws Exception
    {
        GlobalTransaction gtx;
        if (isValid(tx) && transactions.put(tx, NULL) == null)
        {
            gtx = cache.getCurrentTransaction(tx);
            if (gtx.isRemote())
            {
                // should be no need to register a handler since this a remotely initiated gtx
                if (log.isTraceEnabled()) {log.trace("is a remotely initiated gtx so no need to register a tx for it");}
            }
            else
View Full Code Here


        return MethodCallFactory.create(MethodDeclarations.lookupMethod(methodId), args);
    }

    private GlobalTransaction unmarshallGlobalTransaction(ObjectInputStream in, Map refMap) throws Exception
    {
        GlobalTransaction gtx = new GlobalTransaction();
        long id = in.readLong();
        Object address = unmarshallObject(in, refMap);
        gtx.setId(id);
        gtx.setAddress((Address) address);
        return gtx;
    }
View Full Code Here

            return retval;
        }

        if (ctx.getTransaction() != null)
        {
            GlobalTransaction gtx = ctx.getGlobalTransaction();

            if (gtx == null)
            {
                throw new Exception("failed to get global transaction");
            }
View Full Code Here

      if (isBuddyGroupOrganisationMethod(m)) return super.invoke(m);


      Object result = null;

      GlobalTransaction gtx = ctx.getGlobalTransaction();

      TransactionWorkspace workspace = getTransactionWorkspace(gtx);

      if (MethodDeclarations.isCrudMethod(meth))
      {
View Full Code Here

           // If we don't do this, we leak the tx and gtx in txTable.
           // BES -- I'm using the transactions map here as a proxy for whether
           // the tx has had a synchronization registered. Not really ideal...
           if (transactions.get(ctx.getTransaction()) == null)
           {
              GlobalTransaction gtx = txTable.remove(ctx.getTransaction());
              if (gtx != null) txTable.remove(gtx);
           }
          
           suspendedTransaction = txManager.suspend();
           // set the tx in the invocation context to null now! - JBCACHE-785
View Full Code Here

    private MethodCall attachGlobalTransaction(Transaction tx, MethodCall m) throws Exception
    {
        if (log.isDebugEnabled()) log.debug(" local transaction exists - registering global tx if not present for " + Thread.currentThread());
        if (log.isTraceEnabled())
        {
            GlobalTransaction tempGtx = txTable.get(tx);
            log.trace("Associated gtx in txTable is " + tempGtx);
        }

        // register a sync handler for this tx - only if the gtx is not remotely initiated.
        GlobalTransaction gtx = registerTransaction(tx);
        if (gtx != null)
        {
            m = replaceGtx(m, gtx);
        }
        else
View Full Code Here

     * @return
     * @throws Throwable
     */
    private Object handleCommitRollback(MethodCall m) throws Throwable
    {
        GlobalTransaction gtx = findGlobalTransaction( m.getArgs() );
        Object result;

        // this must have a local transaction associated if a prepare has been
        // callled before
        //Transaction ltx = getLocalTxForGlobalTx(gtx);
View Full Code Here

     * @return
     * @throws Exception
     */
    private GlobalTransaction registerTransaction(Transaction tx) throws Exception
    {
        GlobalTransaction gtx;
        if (isValid(tx) && transactions.put(tx, NULL) == null)
        {
            gtx = cache.getCurrentTransaction(tx);
            if (gtx.isRemote())
            {
                // should be no need to register a handler since this a remotely initiated gtx
                if (log.isTraceEnabled()) {log.trace("is a remotely initiated gtx so no need to register a tx for it");}
            }
            else
View Full Code Here

TOP

Related Classes of org.jboss.cache.GlobalTransaction

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.