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; }
public EJBBusinessMethod(MethodIntf view, String methodName, Class<?>... paramTypes) { if (methodName == null) { throw EjbLogger.ROOT_LOGGER.methodNameIsNull(); } this.methodName = methodName; this.methodParamTypes = paramTypes == null ? new Class<?>[0] : paramTypes; this.viewType = view == null ? MethodIntf.BEAN : view; this.hashCode = this.generateHashCode(); }
public AccessTimeoutDetails getAccessTimeout(Method method) { final EJBBusinessMethod ejbMethod = new EJBBusinessMethod(method); final AccessTimeoutDetails accessTimeout = this.methodAccessTimeouts.get(ejbMethod); if (accessTimeout != null) { return accessTimeout; } // check bean level access timeout final AccessTimeoutDetails beanTimeout = this.beanLevelAccessTimeout.get(method.getDeclaringClass().getName()); if (beanTimeout != null) { return beanTimeout; } return getDefaultAccessTimeout(); }
public EJBBusinessMethod(MethodIntf view, String methodName, Class<?>... paramTypes) { if (methodName == null) { throw MESSAGES.methodNameIsNull(); } this.methodName = methodName; this.methodParamTypes = paramTypes == null ? new Class<?>[0] : paramTypes; this.viewType = view == null ? MethodIntf.BEAN : view; this.hashCode = this.generateHashCode(); }
/** * Returns the {@link javax.ejb.AccessTimeout} applicable to given method */ public AccessTimeoutDetails getAccessTimeout(Method method) { final EJBBusinessMethod ejbMethod = new EJBBusinessMethod(method); final AccessTimeoutDetails accessTimeout = this.methodAccessTimeouts.get(ejbMethod); if (accessTimeout != null) { return accessTimeout; } // check bean level access timeout final AccessTimeoutDetails timeout = this.beanLevelAccessTimeout.get(method.getDeclaringClass().getName()); if (timeout != null) { return timeout; } return defaultAccessTimeoutProvider.getDefaultAccessTimeout(); }
private EJBBusinessMethod getEJBBusinessMethod(final MethodIdentifier method) { final ClassLoader classLoader = this.getComponentClass().getClassLoader(); final String methodName = method.getName(); final String[] types = method.getParameterTypes(); if (types == null || types.length == 0) { return new EJBBusinessMethod(methodName); } Class<?>[] paramTypes = new Class<?>[types.length]; int i = 0; for (String type : types) { try { paramTypes[i++] = PrimitiveClassLoaderUtil.loadClass(type, classLoader); } catch (ClassNotFoundException e) { throw new RuntimeException(e); } } return new EJBBusinessMethod(methodName, paramTypes); }
@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; }
@Override public AccessTimeoutDetails getAccessTimeout(Method method) { final EJBBusinessMethod ejbMethod = new EJBBusinessMethod(method); final AccessTimeoutDetails accessTimeout = this.methodAccessTimeouts.get(ejbMethod); if (accessTimeout != null) { return accessTimeout; } // check bean level access timeout final AccessTimeoutDetails beanTimeout = this.beanLevelAccessTimeout.get(method.getDeclaringClass().getName()); if (beanTimeout != null) { return beanTimeout; } return getDefaultAccessTimeout(); }
/** * Returns the {@link AccessTimeout} applicable to given method */ public AccessTimeoutDetails getAccessTimeout(Method method) { final EJBBusinessMethod ejbMethod = new EJBBusinessMethod(method); final AccessTimeoutDetails accessTimeout = this.methodAccessTimeouts.get(ejbMethod); if (accessTimeout != null) { return accessTimeout; } // check bean level access timeout final AccessTimeoutDetails timeout = this.beanLevelAccessTimeout.get(method.getDeclaringClass().getName()); if (timeout != null) { return timeout; } return defaultAccessTimeoutProvider.getDefaultAccessTimeout(); }
private EJBBusinessMethod getEJBBusinessMethod(final MethodIdentifier method) { final ClassLoader classLoader = this.getComponentClass().getClassLoader(); final String methodName = method.getName(); final String[] types = method.getParameterTypes(); if (types == null || types.length == 0) { return new EJBBusinessMethod(methodName); } Class<?>[] paramTypes = new Class<?>[types.length]; int i = 0; for (String type : types) { try { paramTypes[i++] = PrimitiveClassLoaderUtil.loadClass(type, classLoader); } catch (ClassNotFoundException e) { throw new RuntimeException(e); } } return new EJBBusinessMethod(methodName, paramTypes); }