Package org.jboss.cache.transaction

Examples of org.jboss.cache.transaction.GlobalTransaction


    */
   public void clearData(Fqn fqn)
   {
      InvocationContext ctx = invocationContextContainer.get();
      cacheStatusCheck(ctx);
      GlobalTransaction tx = getCurrentTransaction();
      invoker.invoke(ctx, commandsFactory.buildClearDataCommand(tx, fqn));
   }
View Full Code Here


   }

   private Object dataGravitationCleanupOnCommit(InvocationContext ctx, VisitableCommand command)
         throws Throwable
   {
      GlobalTransaction gtx = ctx.getGlobalTransaction();
      try
      {
         doCommit(gtx);
         return invokeNextInterceptor(ctx, command);
      }
View Full Code Here

   private void cleanBackupData(BackupData backup, InvocationContext ctx) throws Throwable
   {

      DataGravitationCleanupCommand cleanupCommand = commandsFactory.buildDataGravitationCleanupCommand(backup.primaryFqn, backup.backupFqn);
      GlobalTransaction gtx = ctx.getGlobalTransaction();

      if (gtx == null)
      {
         // broadcast removes
         // remove main Fqn
View Full Code Here

    */
   protected GlobalTransaction getGlobalTransaction(InvocationContext ctx) throws CacheException
   {
      Transaction tx = ctx.getTransaction();
      if (tx == null) throw new CacheException("Transaction associated with the current invocation is null!");
      GlobalTransaction gtx = ctx.getGlobalTransaction();
      if (gtx == null) throw new CacheException("GlobalTransaction associated with the current invocation is null!");
      return gtx;
   }
View Full Code Here

      if (inTransaction())
      {
         if (ctx.getTransactionContext().hasAnyModifications())
         {
            // this is a commit call.
            GlobalTransaction gtx = command.getGlobalTransaction();
            if (trace) log.trace("Calling loader.commit() for gtx " + gtx);
            // sync call (a write) on the loader
            // ignore modified FQNs
            // List fqnsModified = getFqnsFromModificationList(txTable.get(globalTransaction).getCacheLoaderModifications());
            try
View Full Code Here

      if (inTransaction())
      {
         if (trace) log.trace("transactional so don't put stuff in the cloader yet.");
         if (ctx.getTransactionContext().hasAnyModifications())
         {
            GlobalTransaction gtx = command.getGlobalTransaction();
            // this is a rollback method
            if (preparingTxs.containsKey(gtx))
            {
               preparingTxs.remove(gtx);
               loader.rollback(gtx);
View Full Code Here

      // we do nothing if targetFqn is null
      if (targetFqn == null) return;

      boolean debug = log.isDebugEnabled();

      GlobalTransaction gtx = getGlobalTransaction(ctx);
      TransactionWorkspace workspace = getTransactionWorkspace(ctx);

      WorkspaceNode workspaceNode;

      List<Fqn> nodesCreated = new ArrayList<Fqn>();
View Full Code Here

   private boolean lock(InvocationContext ctx, Fqn fqn, LockType lockType, boolean createIfNotExists, long timeout,
                        boolean acquireWriteLockOnParent, boolean reverseRemoveCheck, List<NodeSPI> createdNodes, boolean skipNotification)
         throws TimeoutException, LockingException, InterruptedException
   {
      Thread currentThread = Thread.currentThread();
      GlobalTransaction gtx = ctx.getGlobalTransaction();
      boolean created = false;
      // if the tx associated with the current thread is rolling back, barf! JBCACHE-923
      if (gtx != null) TransactionTable.assertTransactionValid(ctx);

      Object owner = (gtx != null) ? gtx : currentThread;
View Full Code Here

         throws Throwable
   {
      Object result = invokeCommand(ctx, command);
      if (notOptimisticLocking && ctx.isValidTransaction())
      {
         GlobalTransaction gtx = ctx.getGlobalTransaction();
         if (gtx == null)
         {
            if (log.isDebugEnabled())
            {
               log.debug("didn't find GlobalTransaction for " + ctx.getTransaction() + "; won't add modification to transaction list");
View Full Code Here

   }

   @Override
   public Object visitCommitCommand(InvocationContext ctx, CommitCommand command) throws Throwable
   {
      GlobalTransaction gtx = ctx.getGlobalTransaction();
      try
      {
         doCommit(gtx);
         return invokeNextInterceptor(ctx, command);
      }
View Full Code Here

TOP

Related Classes of org.jboss.cache.transaction.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.