Package javax.ejb

Examples of javax.ejb.LockType


        Boolean initOnStartup = singletonBeanMetaData.isInitOnStartup();
        if (initOnStartup != null && initOnStartup.booleanValue() == true) {
            singletonComponentDescription.initOnStartup();
        }
        // bean level lock-type
        LockType lockType = singletonBeanMetaData.getLockType();
        singletonComponentDescription.setBeanLevelLockType(singletonComponentDescription.getEJBClassName(), lockType);

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

    }

    @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

      }
   }

   private Lock getLock(LockableComponent lockableComponent, Method method)
   {
      LockType lockType = lockableComponent.getLockType(method);
      switch (lockType)
      {
         case READ:
            return readWriteLock.readLock();
         case WRITE:
View Full Code Here

    // TODO The annotation resolution algorithm should probably be re-factored
    // in a superclass.

    AnnotatedType<?> declaringType = method.getDeclaringType();

    LockType lockType = null;

    Lock methodLevelLock = method.getAnnotation(Lock.class);

    Lock declaringClassLock = (declaringType != null) ? declaringType
        .getAnnotation(Lock.class) : null;
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.