Examples of unit()


Examples of javax.ejb.AccessTimeout.unit()

         if (accessTimeoutOnMethod.value() < 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: " + accessTimeoutOnMethod.value() + " and timeout unit: "
                    + accessTimeoutOnMethod.unit().name() + ". Will default to timeout value: " + defaultAccessTimeout.value()
                    + " and timeout unit: " + defaultAccessTimeout.unit().name());
         }
         else
         {
            // use the explicit access timeout values specified on the method
View Full Code Here

Examples of javax.ejb.AccessTimeout.unit()

         }
         else
         {
            // use the explicit access timeout values specified on the method
            time = accessTimeoutOnMethod.value();
            unit = accessTimeoutOnMethod.unit();
         }
      }
      // try getting the lock
      boolean success = lock.tryLock(time, unit);
      if (!success)
View Full Code Here

Examples of javax.ejb.AccessTimeout.unit()

                      apiMethod, apiClass,
                      implementationMethod, implementationClass);

    if (accessTimeoutAttribute != null) {
      _lockTimeout = accessTimeoutAttribute.timeout();
      _lockTimeoutUnit = accessTimeoutAttribute.unit();
    }
  }

  /**
   * Generates the class prologue.
View Full Code Here

Examples of javax.ejb.StatefulTimeout.unit()

          rawAnnType, annotatedType, lazyGenerator);
   
    StatefulTimeout timeout = annotatedType.getAnnotation(StatefulTimeout.class);
   
    if (timeout != null) {
      _idleTimeout = timeout.unit().toMillis(timeout.value());
     
    }
   
    if (_idleTimeout < 0)
      _idleTimeout = Long.MAX_VALUE / 2;
View Full Code Here

Examples of javax.ejb.StatefulTimeout.unit()

                            if (sessionBean.getStatefulTimeout() == null) {
                                final StatefulTimeout annotation = getInheritableAnnotation(clazz, StatefulTimeout.class);
                                if(annotation != null) {
                                    final Timeout timeout = new Timeout();
                                    timeout.setTimeout(annotation.value());
                                    timeout.setUnit(annotation.unit());
                                    sessionBean.setStatefulTimeout(timeout);
                                }
                            }

                            /*
 
View Full Code Here

Examples of javax.ejb.StatefulTimeout.unit()

                            if (sessionBean.getStatefulTimeout() == null) {
                                final StatefulTimeout annotation = getInheritableAnnotation(clazz, StatefulTimeout.class);
                                if (annotation != null) {
                                    final Timeout timeout = new Timeout();
                                    timeout.setTimeout(annotation.value());
                                    timeout.setUnit(annotation.unit());
                                    sessionBean.setStatefulTimeout(timeout);
                                }
                            }

                            /*
 
View Full Code Here

Examples of javax.ejb.StatefulTimeout.unit()

                            if (sessionBean.getStatefulTimeout() == null) {
                                final StatefulTimeout annotation = getInheritableAnnotation(clazz, StatefulTimeout.class);
                                if(annotation != null) {
                                    final Timeout timeout = new Timeout();
                                    timeout.setTimeout(annotation.value());
                                    timeout.setUnit(annotation.unit());
                                    sessionBean.setStatefulTimeout(timeout);
                                }
                            }

                            /*
 
View Full Code Here

Examples of javax.ejb.StatefulTimeout.unit()

                            if (sessionBean.getStatefulTimeout() == null) {
                                final StatefulTimeout annotation = getInheritableAnnotation(clazz, StatefulTimeout.class);
                                if(annotation != null) {
                                    final Timeout timeout = new Timeout();
                                    timeout.setTimeout(annotation.value());
                                    timeout.setUnit(annotation.unit());
                                    sessionBean.setStatefulTimeout(timeout);
                                }
                            }

                            /*
 
View Full Code Here

Examples of javax.ejb.StatefulTimeout.unit()

                            if (sessionBean.getStatefulTimeout() == null) {
                                final StatefulTimeout annotation = getInheritableAnnotation(clazz, StatefulTimeout.class);
                                if (annotation != null) {
                                    final Timeout timeout = new Timeout();
                                    timeout.setTimeout(annotation.value());
                                    timeout.setUnit(annotation.unit());
                                    sessionBean.setStatefulTimeout(timeout);
                                }
                            }

                            /*
 
View Full Code Here

Examples of javax.ejb.StatefulTimeout.unit()

                            if (sessionBean.getStatefulTimeout() == null) {
                                final StatefulTimeout annotation = getInheritableAnnotation(clazz, StatefulTimeout.class);
                                if (annotation != null) {
                                    final Timeout timeout = new Timeout();
                                    timeout.setTimeout(annotation.value());
                                    timeout.setUnit(annotation.unit());
                                    sessionBean.setStatefulTimeout(timeout);
                                }
                            }

                            /*
 
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.