Package javax.ejb

Examples of javax.ejb.ConcurrencyManagementType


                        if (sessionBean.getSessionType() == SessionType.SINGLETON) {

                            if (sessionBean.getConcurrencyType() == null) {
                                ConcurrencyManagement tx = getInheritableAnnotation(clazz, ConcurrencyManagement.class);
                                ConcurrencyManagementType concurrencyType = ConcurrencyManagementType.CONTAINER;
                                if (tx != null) {
                                    concurrencyType = tx.value();
                                }
                                switch (concurrencyType) {
                                    case BEAN:
View Full Code Here


      if (metaData.isSession() == false || (metaData instanceof JBossSessionBean31MetaData) == false)
      {
         return null;
      }
      JBossSessionBean31MetaData sessionBean = (JBossSessionBean31MetaData) metaData;
      ConcurrencyManagementType concurrencyManagementType = sessionBean.getConcurrencyManagementType();
      if (concurrencyManagementType == null)
      {
         return null;
      }
      ConcurrencyManagement conManagement = new ConcurrencyManagementImpl(concurrencyManagementType);
View Full Code Here

            return;
        }
        SessionBeanMetaData data = componentConfiguration.getDescriptorData();
        if (data instanceof SessionBean31MetaData) {
            SessionBean31MetaData descriptor = (SessionBean31MetaData) data;
            final ConcurrencyManagementType type = descriptor.getConcurrencyManagementType();
            if (type != null) {
                componentConfiguration.setConcurrencyManagementType(type);
            }
        }
    }
View Full Code Here

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

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

                mergedBean.setTransactionManagementType(original.getTransactionManagementType());
            }
        }

        // concurrency management type
        ConcurrencyManagementType overrideConcurrencyMgmtType = override.getConcurrencyManagementType();
        if (overrideConcurrencyMgmtType != null) {
            if (overrideConcurrencyMgmtType == ConcurrencyManagementType.BEAN) {
                mergedBean.beanManagedConcurrency();
            } else {
                mergedBean.containerManagedConcurrency();
            }
        } else {
            ConcurrencyManagementType originalConcurrencyManagemenType = original.getConcurrencyManagementType();
            if (originalConcurrencyManagemenType != null) {
                if (originalConcurrencyManagemenType == ConcurrencyManagementType.BEAN) {
                    mergedBean.beanManagedConcurrency();
                } else {
                    mergedBean.containerManagedConcurrency();
View Full Code Here

                singletonComponentDescription.setLockType(methodLockType, method);
            }
        }

        // concurrency management type
        ConcurrencyManagementType concurrencyManagementType = singletonBeanMetaData.getConcurrencyManagementType();
        if (concurrencyManagementType == ConcurrencyManagementType.BEAN) {
            singletonComponentDescription.beanManagedConcurrency();
        } else {
            singletonComponentDescription.containerManagedConcurrency();
        }
View Full Code Here

                mergedBean.setTransactionManagementType(original.getTransactionManagementType());
            }
        }

        // concurrency management type
        ConcurrencyManagementType overrideConcurrencyMgmtType = override.getConcurrencyManagementType();
        if (overrideConcurrencyMgmtType != null) {
            if (overrideConcurrencyMgmtType == ConcurrencyManagementType.BEAN) {
                mergedBean.beanManagedConcurrency();
            } else {
                mergedBean.containerManagedConcurrency();
            }
        } else {
            ConcurrencyManagementType originalConcurrencyManagemenType = original.getConcurrencyManagementType();
            if (originalConcurrencyManagemenType != null) {
                if (originalConcurrencyManagemenType == ConcurrencyManagementType.BEAN) {
                    mergedBean.beanManagedConcurrency();
                } else {
                    mergedBean.containerManagedConcurrency();
View Full Code Here

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

        AnnotationInstance concurrencyMgmtAnnotation = concurrencyMgmtAnnotations.get(0);
        if (concurrencyMgmtAnnotation.target() instanceof ClassInfo == false) {
            throw new DeploymentUnitProcessingException("@ConcurrencyManagement can appear only on a class. Target: " + concurrencyMgmtAnnotation.target() + " is not a class");
        }
        AnnotationValue conMgmtAnnVal = concurrencyMgmtAnnotation.value();
        ConcurrencyManagementType concurrencyManagementType = ConcurrencyManagementType.valueOf(conMgmtAnnVal.asEnum());
        switch (concurrencyManagementType) {
            case CONTAINER:
                componentDescription.containerManagedConcurrency();
                break;
            case BEAN:
View Full Code Here

TOP

Related Classes of javax.ejb.ConcurrencyManagementType

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.