Package javax.ejb

Examples of javax.ejb.ConcurrencyManagement


    * @param advisor
    * @return
    */
   private boolean isContainerManagedConcurrency(Advisor advisor)
   {
      ConcurrencyManagement cm = (ConcurrencyManagement) advisor.resolveAnnotation(ConcurrencyManagement.class);
      // 4.8.5.3 By default, a singleton bean has container managed concurrency demarcation if the concurrency management type is not specified.
      if(cm == null)
         return true;
      return cm.value() == ConcurrencyManagementType.CONTAINER;
   }
View Full Code Here


    }

    protected HandlerProcessingResult processAnnotation(AnnotationInfo ainfo,
            EjbContext[] ejbContexts) throws AnnotationProcessorException {

        ConcurrencyManagement cmAn = (ConcurrencyManagement) ainfo.getAnnotation();

        ConcurrencyManagementType cmType = cmAn.value();

        for (EjbContext ejbContext : ejbContexts) {
            EjbDescriptor ejbDesc = ejbContext.getDescriptor();
            if (ejbDesc instanceof EjbSessionDescriptor) {
View Full Code Here

  @Override
  public void introspect(ApiMethod apiMethod, ApiMethod implementationMethod)
  {
    ApiClass apiClass = apiMethod.getDeclaringClass();

    ConcurrencyManagement concurrencyManagementAnnotation
      = apiClass.getAnnotation(ConcurrencyManagement.class);

    if ((concurrencyManagementAnnotation != null)
        && (concurrencyManagementAnnotation.value() != CONTAINER)) {
      _isContainerManaged = false;
      return;
    }

    ApiClass implementationClass = null;
View Full Code Here

                            /*
                             * @ConcurrencyManagement
                             */
                            if (sessionBean.getConcurrencyManagementType() == null) {
                                ConcurrencyManagement tx = getInheritableAnnotation(clazz, ConcurrencyManagement.class);
                                javax.ejb.ConcurrencyManagementType concurrencyType = javax.ejb.ConcurrencyManagementType.CONTAINER;
                                if (tx != null) {
                                    concurrencyType = tx.value();
                                }
                                switch (concurrencyType) {
                                    case BEAN:
                                        sessionBean.setConcurrencyManagementType(ConcurrencyManagementType.BEAN);
                                        break;
View Full Code Here

TOP

Related Classes of javax.ejb.ConcurrencyManagement

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.