private static ValidationContext getValidationContext() { return getModule().getValidation(); }
private static ValidationContext getValidationContext() { return getModule().getValidation(); }
private static ValidationContext getValidationContext() { return getModule().getValidation(); }
private boolean isLocalBean(Class clazz) { DeploymentModule module = getModule(); if (module instanceof EjbModule) { Set<String> localbeans = new HashSet<String>(); EjbModule ejbModule = (EjbModule) module; for (EnterpriseBean bean : ejbModule.getEjbJar().getEnterpriseBeans()) { if (bean instanceof SessionBean) { if (((SessionBean) bean).getLocalBean() != null) { localbeans.add(bean.getEjbClass()); } } } if (localbeans.contains(clazz.getName())) { return true; } } return false; }
private boolean isValidEjbInterface(String b, Class clazz, String refName) { if (!clazz.isInterface()) { DeploymentModule module = getModule(); if (module instanceof EjbModule) { Set<String> beanClasses = new HashSet<String>(); EjbModule ejbModule = (EjbModule) module; for (EnterpriseBean bean : ejbModule.getEjbJar().getEnterpriseBeans()) { beanClasses.add(bean.getEjbClass()); } if (beanClasses.contains(clazz.getName())) { fail(b, "ann.ejb.beanClass", clazz.getName(), refName); } else { fail(b, "ann.ejb.notInterface", clazz.getName(), refName); } } else { fail(b, "ann.ejb.notInterface", clazz.getName(), refName); } return false; } else if (EJBObject.class.isAssignableFrom(clazz)) { fail(b, "ann.ejb.ejbObject", clazz.getName(), refName); return false; } else if (EJBLocalObject.class.isAssignableFrom(clazz)) { fail(b, "ann.ejb.ejbLocalObject", clazz.getName(), refName); return false; } return true; }
private String getProperty(final String key, final String defaultValue) { String value = SystemInstance.get().getOptions().get(key, defaultValue); final DeploymentModule module = getModule(); if (module instanceof EjbModule) { final EjbModule ejbModule = (EjbModule) module; final OpenejbJar openejbJar = ejbModule.getOpenejbJar(); if (openejbJar != null && openejbJar.getProperties() != null) { value = openejbJar.getProperties().getProperty(key, value); } } return value; }
private String getProperty(final String key, final String defaultValue) { String value = SystemInstance.get().getOptions().get(key, defaultValue); final DeploymentModule module = getModule(); if (module instanceof EjbModule) { final EjbModule ejbModule = (EjbModule) module; final OpenejbJar openejbJar = ejbModule.getOpenejbJar(); if (openejbJar != null && openejbJar.getProperties() != null) { value = openejbJar.getProperties().getProperty(key, value); } } return value; }