Examples of AccessTimeoutEffigy


Examples of org.jboss.ejb3.effigy.AccessTimeoutEffigy

   }

   @Override
   public AccessTimeoutEffigy getAccessTimeout(Method method)
   {
      AccessTimeoutEffigy timeout = accessTimeoutCache.get(method);
      if(timeout == null)
      {
         timeout = findAccessTimeout(method);
         if(timeout == null)
            timeout = JBossAccessTimeoutEffigy.NULL;
View Full Code Here

Examples of org.jboss.ejb3.effigy.AccessTimeoutEffigy

   }

   @Override
   public AccessTimeoutEffigy getAccessTimeout(Method method)
   {
      AccessTimeoutEffigy timeout = accessTimeoutCache.get(method);
      if(timeout == null)
      {
         timeout = findAccessTimeout(method);
         if(timeout == null)
            timeout = JBossAccessTimeoutEffigy.NULL;
View Full Code Here

Examples of org.jboss.ejb3.effigy.AccessTimeoutEffigy

   public Object invoke(Invocation invocation) throws Throwable
   {
      Lock lock = getLock(invocation);
      long time = DEFAULT_MAX_TIMEOUT_VALUE;
      TimeUnit unit = DEFAULT_MAX_TIMEOUT_UNIT;
      AccessTimeoutEffigy timeout = getAccessTimeout((MethodInvocation) invocation);
      if(timeout != null)
      {
         if (timeout.getTimeout() < 0)
         {
            // for any negative value of timeout, we just default to max timeout val and max timeout unit.
            // violation of spec! But we don't want to wait indefinitely.
            logger.debug("Ignoring a negative @AccessTimeout value: " + timeout.getTimeout() + " and timeout unit: "
                  + timeout.getUnit().name() + ". Will default to timeout value: " + DEFAULT_MAX_TIMEOUT_VALUE
                  + " and timeout unit: " + DEFAULT_MAX_TIMEOUT_UNIT.name());
         }
         else
         {
            time = timeout.getTimeout();
            unit = timeout.getUnit();
         }
      }
      boolean success = lock.tryLock(time, unit);
      if(!success)
      {
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.