Java 类javax.ejb.TimedObject 实例源码

项目:tomee    文件:BeanContext.java   
public BeanContext(final String id, final Context jndiContext, final ModuleContext moduleContext, final Class beanClass, final Class mdbInterface, final Map<String, String> activationProperties) throws SystemException {
    this(id, jndiContext, moduleContext, BeanType.MESSAGE_DRIVEN, false, beanClass, false);

    this.getMdb().mdbInterface = mdbInterface;
    this.getMdb().activationProperties.putAll(activationProperties);

    if (TimedObject.class.isAssignableFrom(beanClass)) {
        try {
            this.ejbTimeout = beanClass.getMethod("ejbTimeout", Timer.class);
        } catch (final NoSuchMethodException e) {
            throw new IllegalStateException(e);
        }
    }

    this.initDefaultLock();

    this.createMethodMap();
}