Search in sources :

Example 1 with EJBBusinessMethod

use of org.jboss.as.ejb3.component.EJBBusinessMethod in project wildfly by wildfly.

the class StatefulSessionComponent method getAccessTimeout.

/**
     * 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();
}
Also used : EJBBusinessMethod(org.jboss.as.ejb3.component.EJBBusinessMethod) AccessTimeoutDetails(org.jboss.as.ejb3.concurrency.AccessTimeoutDetails)

Example 2 with EJBBusinessMethod

use of org.jboss.as.ejb3.component.EJBBusinessMethod in project wildfly by wildfly.

the class SingletonComponent method getLockType.

@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;
}
Also used : EJBBusinessMethod(org.jboss.as.ejb3.component.EJBBusinessMethod) LockType(javax.ejb.LockType)

Example 3 with EJBBusinessMethod

use of org.jboss.as.ejb3.component.EJBBusinessMethod in project wildfly by wildfly.

the class SingletonComponent method getAccessTimeout.

@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();
}
Also used : EJBBusinessMethod(org.jboss.as.ejb3.component.EJBBusinessMethod) AccessTimeoutDetails(org.jboss.as.ejb3.concurrency.AccessTimeoutDetails)

Aggregations

EJBBusinessMethod (org.jboss.as.ejb3.component.EJBBusinessMethod)3 AccessTimeoutDetails (org.jboss.as.ejb3.concurrency.AccessTimeoutDetails)2 LockType (javax.ejb.LockType)1