Package javax.ejb

Examples of javax.ejb.ConcurrencyManagementType


    public Map<EJBBusinessMethod, AccessTimeout> getMethodApplicableAccessTimeouts() {
        return this.methodAccessTimeouts;
    }

    private boolean isContainerManagedConcurrency(SingletonComponentDescription singletonComponentDescription) {
        ConcurrencyManagementType concurrencyMgmtType = singletonComponentDescription.getConcurrencyManagementType();
        if (concurrencyMgmtType == ConcurrencyManagementType.BEAN) {
            return false;
        }
        return true;
    }
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

                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

    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

        // bean level lock-type
        LockType lockType = singletonBeanMetaData.getLockType();
        singletonComponentDescription.setBeanLevelLockType(singletonComponentDescription.getEJBClassName(), lockType);

        // concurrency management type
        ConcurrencyManagementType concurrencyManagementType = singletonBeanMetaData.getConcurrencyManagementType();
        if (concurrencyManagementType == ConcurrencyManagementType.BEAN) {
            singletonComponentDescription.beanManagedConcurrency();
        } else {
            singletonComponentDescription.containerManagedConcurrency();
        }
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

        // bean level lock-type
        LockType lockType = singletonBeanMetaData.getLockType();
        singletonComponentDescription.setBeanLevelLockType(singletonComponentDescription.getEJBClassName(), lockType);

        // concurrency management type
        ConcurrencyManagementType concurrencyManagementType = singletonBeanMetaData.getConcurrencyManagementType();
        if (concurrencyManagementType == ConcurrencyManagementType.BEAN) {
            singletonComponentDescription.beanManagedConcurrency();
        } else {
            singletonComponentDescription.containerManagedConcurrency();
        }
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

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.