Examples of lock()


Examples of org.jboss.as.ejb3.timerservice.TimerImpl.lock()

            }

            //we lock the timer for this check, because if a cancel is in progress then
            //we do not want to do the isActive check, but wait for the cancelling transaction to finish
            //one way or another
            timer.lock();
            try {
                if (!timer.isActive()) {
                    ROOT_LOGGER.debug("Timer is not active, skipping this scheduled execution at: " + now + "for " + timer);
                    return;
                }
View Full Code Here

Examples of org.jboss.as.ejb3.tx.OwnableReentrantLock.lock()

        // we obtain a lock in this synchronization interceptor because the lock needs to be tied to the synchronization
        // so that it can released on the tx synchronization callbacks
        final Object lockOwner = getLockOwner(transactionSynchronizationRegistry);
        lock.pushOwner(lockOwner);
        try {
            lock.lock();
            boolean syncRegistered = false;
            synchronized (lock) {

                //if the previous transaction was rolled back we re-load the entity bean state in the current TX
                if(instance.isReloadRequired()) {
View Full Code Here

Examples of org.jboss.cache.lock.LockManager.lock()

   {

      LockManager lm = ((CacheSPI<Serializable, Object>)cache).getComponentRegistry().getComponent(LockManager.class);
      try
      {
         return lm.lock(Fqn.fromRelativeFqn(PARAMETER_ROOT, Fqn.fromString(name)), lockType, Integer.MAX_VALUE);
      }
      catch (InterruptedException e)
      {
         log.warn("An error occurs while tryning to lock the node " + name, e);
      }
View Full Code Here

Examples of org.jboss.ejb.EnterpriseContext.lock()

      // set the context on the Invocation
      mi.setEnterpriseContext(ctx);
     
      // It is a new context for sure so we can lock it
      ctx.lock();
     
      // Set the current security information
      /**
       * JBAS-3976: Setting principal on the context has been moved to a separate interceptor
       */
View Full Code Here

Examples of org.jboss.ejb.EntityEnterpriseContext.lock()

                    + ctx.getId().toString());
         }
      }
      try
      {
         ctx.lock();
         return getNext().invoke(mi);
      }
      finally
      {
         ctx.unlock();
View Full Code Here

Examples of org.jboss.ha.framework.server.lock.AbstractClusterLockSupport.lock()

      handler.lockFromCluster(eq("test"), eq(node1), anyLong());
     
      replay(partition);
      replay(handler);
     
      assertTrue(testee.lock("test", 200000));
     
      verify(partition);
      verify(handler);
     
   }
View Full Code Here

Examples of org.jboss.ha.framework.server.lock.NonGloballyExclusiveClusterLockSupport.lock()

                                           aryEq(AbstractClusterLockSupport.RELEASE_REMOTE_LOCK_TYPES),
                                           eq(true))).andReturn(new ArrayList<Object>()).atLeastOnce();
      replay(partition);
      replay(handler);
     
      assertFalse(testee.lock("test", 10));
     
      verify(partition);
      verify(handler);
   }
  
View Full Code Here

Examples of org.jboss.jca.core.spi.transaction.local.TransactionLocal.lock()

               ManagedConnectionPool mcp = (ManagedConnectionPool)cl.getContext();
               SubPoolContext subPool = mcp.getSubPool();
               TransactionLocal trackByTx = subPool.getTrackByTx();
               try
               {
                  trackByTx.lock();
               }
               catch (Throwable t)
               {
                  rethrowAsSystemException("Unable to begin transaction with JCA lazy enlistment scenario",
                                           trackByTx.getTransaction(), t);
View Full Code Here

Examples of org.jboss.tm.TransactionLocal.lock()

              InternalManagedConnectionPool imcp = (InternalManagedConnectionPool)cl.getContext();
              JBossManagedConnectionPool.SubPoolContext subPool = imcp.getSubPoolContext();
              TransactionLocal trackByTx = subPool.getTrackByTx();
              try
              {
                trackByTx.lock();
              }
              catch (Throwable t)
                {
                rethrowAsSystemException("Unable to begin transaction with JCA lazy enlistment scenario", trackByTx.getTransaction(), t);
                }             
View Full Code Here

Examples of org.jboss.weld.context.beanstore.BeanStore.lock()

            return beanInstance.getInstance();
        } else if (creationalContext != null) {
            LockedBean lock = null;
            try {
                if (multithreaded) {
                    lock = beanStore.lock(id);
                    beanInstance = beanStore.get(id);
                    if (beanInstance != null) {
                        return beanInstance.getInstance();
                    }
                }
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.