Package org.jboss.metadata.ejb.spec

Examples of org.jboss.metadata.ejb.spec.ConcurrentMethodMetaData


         methodParams.addAll(Arrays.asList(method.getParameters()));
         // set the method params on the named method metadata
         namedMethod.setMethodParams(methodParams);
      }
      // get the concurrency method metadata for this named method
      ConcurrentMethodMetaData concurrentMethodMetaData = sessionBean.getConcurrentMethods().get(namedMethod);
      AccessTimeoutMetaData accessTimeoutMetaData = null;
      // if this named method did not have concurrency metadata or access timeout metadata, then
      // check for the method named "*" and see if that has the access timeout set
      if (concurrentMethodMetaData == null || concurrentMethodMetaData.getAccessTimeout() == null)
      {
         // get access timeout for method "*"
         accessTimeoutMetaData = getAccessTimeoutApplicableForAllMethods(sessionBean);
      }
      // access timeout was not specified for this method nor for the
View Full Code Here


    */
   private AccessTimeoutMetaData getAccessTimeoutApplicableForAllMethods(JBossSessionBean31MetaData sessionBean)
   {
      NamedMethodMetaData allMethods = new NamedMethodMetaData();
      allMethods.setName("*");
      ConcurrentMethodMetaData concurrentMethod = sessionBean.getConcurrentMethods().get(allMethods);
      if (concurrentMethod == null)
      {
         return null;
      }
      return concurrentMethod.getAccessTimeout();
   }
View Full Code Here

         methodParams.addAll(Arrays.asList(method.getParameters()));
         // set the method params on the named method metadata
         namedMethod.setMethodParams(methodParams);
      }
      // get the concurrency method metadata for this named method
      ConcurrentMethodMetaData concurrentMethodMetaData = sessionBean.getConcurrentMethods().get(namedMethod);
      LockType lockType = null;
      // if this named method did not have concurrency metadata or lock metadata, then
      // check for the method named "*" and see if that has the lock type set
      if (concurrentMethodMetaData == null || concurrentMethodMetaData.getLockType() == null)
      {
         // get lock type for method "*"
         lockType = getLockTypeApplicableForAllMethods(sessionBean);
      }
      // lock type was not specified for this method nor for the
View Full Code Here

    */
   private LockType getLockTypeApplicableForAllMethods(JBossSessionBean31MetaData sessionBean)
   {
      NamedMethodMetaData allMethods = new NamedMethodMetaData();
      allMethods.setName("*");
      ConcurrentMethodMetaData concurrentMethod = sessionBean.getConcurrentMethods().get(allMethods);
      if (concurrentMethod == null)
      {
         return null;
      }
      return concurrentMethod.getLockType();
   }
View Full Code Here

      }
      ConcurrentMethodsMetaData concurrentMethods = sessionBean.getConcurrentMethods();
      if(concurrentMethods == null)
         return null;
      // get the concurrency method metadata for this named method
      ConcurrentMethodMetaData concurrentMethodMetaData = concurrentMethods.find(namedMethod);
      AccessTimeoutMetaData accessTimeoutMetaData = null;
      // if this named method did not have concurrency metadata or access timeout metadata, then
      // check for the method named "*" and see if that has the access timeout set
      if (concurrentMethodMetaData == null || concurrentMethodMetaData.getAccessTimeout() == null)
      {
         // get access timeout for method "*"
         accessTimeoutMetaData = getAccessTimeoutApplicableForAllMethods(sessionBean);
      }
      // access timeout was not specified for this method nor for the
View Full Code Here

    */
   private AccessTimeoutMetaData getAccessTimeoutApplicableForAllMethods(JBossSessionBean31MetaData sessionBean)
   {
      NamedMethodMetaData allMethods = new NamedMethodMetaData();
      allMethods.setName("*");
      ConcurrentMethodMetaData concurrentMethod = sessionBean.getConcurrentMethods().get(allMethods);
      if (concurrentMethod == null)
      {
         return null;
      }
      return concurrentMethod.getAccessTimeout();
   }
View Full Code Here

         // So return null. Later resolveClassAnnotation will pick up the correct bean level
         // lock semantics (either via the annotation or via metadata)
         return null;
      }
      // get the concurrency method metadata for this named method
      ConcurrentMethodMetaData concurrentMethodMetaData = concurrentMethods.find(namedMethod);
      LockType lockType = null;
      // if this named method did not have concurrency metadata or lock metadata, then
      // check for the method named "*" and see if that has the lock type set
      if (concurrentMethodMetaData == null || concurrentMethodMetaData.getLockType() == null)
      {
         // get lock type for method "*"
         lockType = getLockTypeApplicableForAllMethods(sessionBean);
      }
      else
      {
         lockType = concurrentMethodMetaData.getLockType();
      }
      // lock type was not specified for this method nor for the
      // method "*"
      if (lockType == null)
      {
View Full Code Here

    */
   private LockType getLockTypeApplicableForAllMethods(JBossSessionBean31MetaData sessionBean)
   {
      NamedMethodMetaData allMethods = new NamedMethodMetaData();
      allMethods.setName("*");
      ConcurrentMethodMetaData concurrentMethod = sessionBean.getConcurrentMethods().get(allMethods);
      if (concurrentMethod == null)
      {
         return null;
      }
      return concurrentMethod.getLockType();
   }
View Full Code Here

      JBossSessionBean31MetaData beanMetaData = getBeanMetaData();
      String params[] = params(method);
      ConcurrentMethodsMetaData concurrentMethods = beanMetaData.getConcurrentMethods();
      if(concurrentMethods != null)
      {
         ConcurrentMethodMetaData concurrentMethodMetaData = concurrentMethods.bestMatch(method.getName(), params);
         if(concurrentMethodMetaData != null)
         {
            // the concurrent-method might only contain a lock element, not an access-timeout
            accessTimeout = concurrentMethodMetaData.getAccessTimeout();
         }
      }
      if(accessTimeout == null)
         accessTimeout = beanMetaData.getAccessTimeout();
      return accessTimeout(accessTimeout);
View Full Code Here

      JBossSessionBean31MetaData beanMetaData = getBeanMetaData();
      String params[] = params(method);
      ConcurrentMethodsMetaData concurrentMethods = beanMetaData.getConcurrentMethods();
      if(concurrentMethods != null)
      {
         ConcurrentMethodMetaData concurrentMethodMetaData = concurrentMethods.bestMatch(method.getName(), params);
         if(concurrentMethodMetaData != null)
         {
            // the concurrent-method might only contain a lock element, not an access-timeout
            accessTimeout = concurrentMethodMetaData.getAccessTimeout();
         }
      }
      if(accessTimeout == null)
         accessTimeout = beanMetaData.getAccessTimeout();
      return accessTimeout(accessTimeout);
View Full Code Here

TOP

Related Classes of org.jboss.metadata.ejb.spec.ConcurrentMethodMetaData

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.