/** * print a meaningful string for this object */ public void print(StringBuffer toStringBuffer) { super.print(toStringBuffer); toStringBuffer.append("\n Module Type = ").append(getModuleType()); toStringBuffer.append("\n Module spec version = ").append(getSpecVersion()); if (moduleID!=null) toStringBuffer.append("\n Module ID = ").append(moduleID); if (getSchemaLocation()!=null) toStringBuffer.append("\n Client SchemaLocation = ").append(getSchemaLocation()); }
/** * @ return true for following cases: * a. ejb module and schema version earlier than 3.0; * b. web module and schema version earlier than 2.5; * c. appclient module and schema version earlier than 5.0. * d. connector module and schema version earlier than 1.6 */ public boolean isDDWithNoAnnotationAllowed() { XModuleType mType = getModuleType(); double specVersion = Double.parseDouble(getSpecVersion()); // we do not process annotations for earlier versions of DD if ( (mType.equals(XModuleType.EJB) && specVersion < ANNOTATION_EJB_VER) || (mType.equals(XModuleType.WAR) && specVersion < ANNOTATION_WAR_VER) || (mType.equals(XModuleType.CAR) && specVersion < ANNOTATION_CAR_VER) || (mType.equals(XModuleType.RAR) && specVersion < ANNOTATION_RAR_VER)) { return true; } else { return false; } }
"enterprise.deployment.oldDDwithAnnotation", "{0} in archive {1} is of version {2}, which cannot support annotations in an application. Please upgrade the deployment descriptor to be a version supported by Java EE 5.0 (or later).", new Object[]{ddName, archiveName, bundleDesc.getSpecVersion()}));