/** * create or obtain an embedded archive within this abstraction. * * @param name the name of the embedded archive. */ public ReadableArchive getSubArchive(String name) throws IOException { InputStream is = getEntry(name); if (is!=null) { ReadableArchive archive = new MemoryMappedArchive(is); is.close(); return archive; } return null; }
public static String getResourceAdapterClassName (String rarLocation) { //Use the deployment APIs to get the name of the resourceadapter //class through the connector descriptor try { FileInputStream fis = new FileInputStream(rarLocation); MemoryMappedArchive mma = new MemoryMappedArchive(fis); ConnectorArchivist ca = new ConnectorArchivist(); ConnectorDescriptor cd = (ConnectorDescriptor) ca.open(mma); return cd.getResourceAdapterClass(); } catch (IOException e) { _logger.info(e.getMessage()); if(_logger.isLoggable(Level.FINE)) { _logger.log(Level.FINE, "Error while trying to read connector" + "descriptor to get resource-adapter properties", e); } } catch (SAXParseException e) { _logger.info(e.getMessage()); if(_logger.isLoggable(Level.FINE)) { _logger.log(Level.FINE, "Error while trying to read connector" + "descriptor to get resource-adapter properties", e); } } return null; }
moduleArchive = new MemoryMappedArchive(moduleStream); if (deploymentPlanStream != null) { deploymentPlanArchive = new MemoryMappedArchive(deploymentPlanStream);
moduleArchive = new MemoryMappedArchive(moduleStream); if (deploymentPlanStream != null) { deploymentPlanArchive = new MemoryMappedArchive(deploymentPlanStream);