version = J2EEVersionConstants.J2EE_1_4_ID; } else if (moduleFile.isWARFile()) { if (publicID.equals(J2EEConstants.WEBAPP_PUBLICID_2_3) && (systemID.equals(J2EEConstants.WEBAPP_SYSTEMID_2_3)||systemID.equals(J2EEConstants.WEBAPP_ALT_SYSTEMID_2_3))) { version = J2EEVersionConstants.WEB_2_3_ID;
private static int lookupVersion(ModuleFile moduleFile, String schemaName) { int version = -1; if (moduleFile.isEARFile()) { if (schemaName.equals(J2EEConstants.APPLICATION_SCHEMA_1_4)) { version = J2EEVersionConstants.J2EE_1_4_ID; } } else if (moduleFile.isEJBJarFile()) { if ((schemaName.indexOf(J2EEConstants.EJBJAR_SCHEMA_2_1_NS)) != -1) { version = J2EEVersionConstants.EJB_2_1_ID; } } else if (moduleFile.isApplicationClientFile()) { if (schemaName.equals(J2EEConstants.APP_CLIENT_SCHEMA_1_4)) { version = J2EEVersionConstants.J2EE_1_4_ID; } } else if (moduleFile.isWARFile()) { if (schemaName.equals(J2EEConstants.WEBAPP_SCHEMA_2_4)) { version = J2EEVersionConstants.WEB_2_4_ID; } } else if (moduleFile.isRARFile()) { if (schemaName.equals(J2EEConstants.CONNECTOR_SCHEMA_1_5)) { version = J2EEVersionConstants.JCA_1_5_ID; } } return version; }
version = J2EEVersionConstants.J2EE_1_4_ID; } else if (moduleFile.isWARFile()) { if (null == versionAttr) { version = J2EEVersionConstants.WEB_2_4_ID;
public ModuleFile copy(ModuleFile aModuleFile) { /** * Timing issue; if the resources containing the bindings, extensions, and dd have not yet * be loaded, force that before the copy occurs; otherwise, they will get loaded as the * accessors are invoked during copy. Because they will be loaded but not copied into the * new archive's context, then changes will not get saved. By forcing the load before the * copy commences, the loaded resources will also be copied to the new archive */ aModuleFile.getStandardDeploymentDescriptor(); /* * RLS-8/12/2002 Hack to fix botp defect "141640-failed to install .war file with * filter-mapping" The problem is that there is a transient field on the filter mapping * class for the servlet name the relationship to the servlet is lazily populated the first * time it is requested. If we don't trip it, then it won't get copied. */ if (aModuleFile.isWARFile()) { List filterMappings = ((WARFile) aModuleFile).getDeploymentDescriptor().getFilterMappings(); for (int i = 0; i < filterMappings.size(); i++) { ((FilterMapping) filterMappings.get(i)).getServlet(); } } ModuleFile copied = (ModuleFile) copy((Archive) aModuleFile); return copied; }
protected static String[] getJ2EE13PublicAndSystemIdFor(ModuleFile moduleFile) { if (moduleFile.isEARFile()) return new String[]{J2EEConstants.APPLICATION_PUBLICID_1_3, J2EEConstants.APPLICATION_SYSTEMID_1_3}; else if (moduleFile.isEJBJarFile()) return new String[]{J2EEConstants.EJBJAR_PUBLICID_2_0, J2EEConstants.EJBJAR_SYSTEMID_2_0}; else if (moduleFile.isApplicationClientFile()) return new String[]{J2EEConstants.APP_CLIENT_PUBLICID_1_3, J2EEConstants.APP_CLIENT_SYSTEMID_1_3}; else if (moduleFile.isWARFile()) return new String[]{J2EEConstants.WEBAPP_PUBLICID_2_3, J2EEConstants.WEBAPP_SYSTEMID_2_3}; else if (moduleFile.isRARFile()) return new String[]{J2EEConstants.CONNECTOR_PUBLICID_1_0, J2EEConstants.CONNECTOR_SYSTEMID_1_0}; else return null; }
protected static String[] getJ2EE13PublicAndSystemIdFor(ModuleFile moduleFile) { if (moduleFile.isEARFile()) return new String[]{J2EEConstants.APPLICATION_PUBLICID_1_3, J2EEConstants.APPLICATION_SYSTEMID_1_3}; else if (moduleFile.isEJBJarFile()) return new String[]{J2EEConstants.EJBJAR_PUBLICID_2_0, J2EEConstants.EJBJAR_SYSTEMID_2_0}; else if (moduleFile.isApplicationClientFile()) return new String[]{J2EEConstants.APP_CLIENT_PUBLICID_1_3, J2EEConstants.APP_CLIENT_SYSTEMID_1_3}; else if (moduleFile.isWARFile()) return new String[]{J2EEConstants.WEBAPP_PUBLICID_2_3, J2EEConstants.WEBAPP_SYSTEMID_2_3}; else if (moduleFile.isRARFile()) return new String[]{J2EEConstants.CONNECTOR_PUBLICID_1_0, J2EEConstants.CONNECTOR_SYSTEMID_1_0}; else return null; }
protected Module createModuleForCopying(ModuleFile aModuleFile) { Module aModule = null; if (aModuleFile.isWARFile()) { aModule = getApplicationFactory().createWebModule(); } else if (aModuleFile.isEJBJarFile()) { aModule = getApplicationFactory().createEjbModule(); } else if (aModuleFile.isApplicationClientFile()) { aModule = getApplicationFactory().createJavaClientModule(); } else if (aModuleFile.isRARFile()) { aModule = getApplicationFactory().createConnectorModule(); } aModule.setUri(aModuleFile.getURI()); return aModule; }