Package javax.ejb

Examples of javax.ejb.LockType


    }

    @Override
    public LockType getLockType(Method method) {
        EJBBusinessMethod beanMethod = new EJBBusinessMethod(method.getName(), method.getParameterTypes());
        LockType lockType = this.methodLockTypes.get(beanMethod);
        if (lockType != null) {
            return lockType;
        }
        // check bean level lock type
        if (this.beanLevelLockType != null) {
View Full Code Here


                }
            }
        }

        // bean level lock type
        LockType overrideBeanLockType = override.getBeanLevelLockType();
        if (overrideBeanLockType != null) {
            mergedBean.setBeanLevelLockType(overrideBeanLockType);
        } else {
            LockType originalBeanLockType = original.getBeanLevelLockType();
            if (originalBeanLockType != null) {
                mergedBean.setBeanLevelLockType(originalBeanLockType);
            }
        }
View Full Code Here

            return;
        }

        for (AnnotationInstance annotationInstance : annotations) {
            AnnotationTarget target = annotationInstance.target();
            LockType lockType = LockType.valueOf(annotationInstance.value().asEnum());
            if (target instanceof ClassInfo) {
                // bean level
                componentDescription.setBeanLevelLockType(lockType);
                logger.debug("Bean " + componentDescription.getEJBName() + " marked for lock type " + lockType);
            } else if (target instanceof MethodInfo) {
View Full Code Here

        Boolean initOnStartup = singletonBeanMetaData.isInitOnStartup();
        if (initOnStartup != null && initOnStartup.booleanValue() == true) {
            singletonComponentDescription.initOnStartup();
        }
        // bean level lock-type
        LockType lockType = singletonBeanMetaData.getLockType();
        singletonComponentDescription.setBeanLevelLockType(lockType);
        // add method level lock type to the description
        ConcurrentMethodsMetaData concurrentMethods = singletonBeanMetaData.getConcurrentMethods();
        if (concurrentMethods != null) {
            for (ConcurrentMethodMetaData concurrentMethod : concurrentMethods) {
                LockType methodLockType = concurrentMethod.getLockType();
                EJBMethodDescription method = this.getEJBMethodDescription(concurrentMethod.getMethod());
                singletonComponentDescription.setLockType(methodLockType, method);
            }
        }
View Full Code Here

    }

    @Override
    public LockType getLockType(Method method) {
        final EJBBusinessMethod ejbMethod = new EJBBusinessMethod(method);
        final LockType lockType = this.methodLockTypes.get(ejbMethod);
        if (lockType != null) {
            return lockType;
        }
        // check bean level lock type
        final LockType type = this.beanLevelLockType.get(method.getDeclaringClass().getName());
        if (type != null) {
            return type;
        }
        // default WRITE lock type
        return LockType.WRITE;
View Full Code Here

                }
            }
        }

        // bean level lock type
        LockType overrideBeanLockType = override.getBeanLevelLockType().get(mergedBean.getEJBClassName());
        if (overrideBeanLockType != null) {
            mergedBean.setBeanLevelLockType(mergedBean.getEJBClassName(), overrideBeanLockType);
        } else {
            LockType originalBeanLockType = original.getBeanLevelLockType().get(mergedBean.getEJBClassName());
            if (originalBeanLockType != null) {
                mergedBean.setBeanLevelLockType(mergedBean.getEJBClassName(), originalBeanLockType);
            }
        }
View Full Code Here

            return;
        }

        for (AnnotationInstance annotationInstance : annotations) {
            AnnotationTarget target = annotationInstance.target();
            LockType lockType = LockType.valueOf(annotationInstance.value().asEnum());
            if (target instanceof ClassInfo) {
                // bean level
                componentDescription.setBeanLevelLockType(lockType);
                logger.debug("Bean " + componentDescription.getEJBName() + " marked for lock type " + lockType);
            } else if (target instanceof MethodInfo) {
View Full Code Here

    }

    @Override
    public LockType getLockType(Method method) {
        EJBBusinessMethod beanMethod = new EJBBusinessMethod(method.getName(), toString(method.getParameterTypes()));
        LockType lockType = this.methodLockTypes.get(beanMethod);
        if (lockType != null) {
            return lockType;
        }
        // check bean level lock type
        if (this.beanLevelLockType != null) {
View Full Code Here

    }

    @Override
    public LockType getLockType(Method method) {
        final EJBBusinessMethod ejbMethod = new EJBBusinessMethod(method);
        final LockType lockType = this.methodLockTypes.get(ejbMethod);
        if (lockType != null) {
            return lockType;
        }
        // check bean level lock type
        final LockType type = this.beanLevelLockType.get(method.getDeclaringClass().getName());
        if (type != null) {
            return type;
        }
        // default WRITE lock type
        return LockType.WRITE;
View Full Code Here

    * @param invocation
    * @return
    */
   private Lock getLock(Invocation invocation)
   {
      LockType lockType = getLockType(invocation);
      switch(lockType)
      {
         case READ:
            return readWriteLock.readLock();
         case WRITE:
View Full Code Here

TOP

Related Classes of javax.ejb.LockType

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.