/** * {@inheritDoc} */ @Override protected void doConfigure(LocalContainer container) throws Exception { super.doConfigure(container); // CARGO-1272: Starting Tomcat generates warnings on not existing folders in classloader getFileHandler().createDirectory(getHome(), "common/classes"); getFileHandler().createDirectory(getHome(), "shared/classes"); getFileHandler().createDirectory(getHome(), "shared/lib"); }
/** * {@inheritDoc} */ @Override protected void doConfigure(LocalContainer container) throws Exception { super.doConfigure(container); // CARGO-1272: Starting Tomcat generates warnings on not existing folders in classloader getFileHandler().createDirectory(getHome(), "common/classes"); getFileHandler().createDirectory(getHome(), "shared/classes"); getFileHandler().createDirectory(getHome(), "shared/lib"); }
/** * {@inheritDoc} */ @Override protected void doConfigure(LocalContainer container) throws Exception { super.doConfigure(container); // CARGO-1272: Starting Tomcat generates warnings on not existing folders in classloader getFileHandler().createDirectory(getHome(), "common/lib"); }
/** * {@inheritDoc} */ @Override protected void doConfigure(LocalContainer container) throws Exception { super.doConfigure(container); // CARGO-1272: Starting Tomcat generates warnings on not existing folders in classloader getFileHandler().createDirectory(getHome(), "common/lib"); }
/** * {@inheritDoc} */ @Override protected String getOrCreateResourceConfigurationFile(Resource rs, LocalContainer container) { String confDir = getFileHandler().createDirectory(getHome(), "conf"); return getFileHandler().append(confDir, "server.xml"); }
/** * {@inheritDoc} In Tomcat 5.5+, we use context.xml to avoid configuration problems. */ @Override protected String getOrCreateResourceConfigurationFile(Resource rs, LocalContainer container) { String confDir = getFileHandler().createDirectory(getHome(), "conf"); return getFileHandler().append(confDir, "context.xml"); }
/** * {@inheritDoc} In this implementation, we will return the <code>data-sources.xml</code> file. */ @Override public String getOrCreateDataSourceConfigurationFile(DataSource ds, LocalContainer container) { String confDir = getFileHandler().createDirectory(getHome(), "conf"); return getFileHandler().append(confDir, "data-sources.xml"); }
/** * {@inheritDoc} In this implementation, we will return the <code>data-sources.xml</code> file. */ @Override public String getOrCreateDataSourceConfigurationFile(DataSource ds, LocalContainer container) { String confDir = getFileHandler().createDirectory(getHome(), "conf"); return getFileHandler().append(confDir, "data-sources.xml"); }
/** * {@inheritDoc} In Tomcat 5.5+, we use context.xml to avoid configuration problems. */ @Override protected String getOrCreateResourceConfigurationFile(Resource rs, LocalContainer container) { String confDir = getFileHandler().createDirectory(getHome(), "conf"); return getFileHandler().append(confDir, "context.xml"); }
/** * {@inheritDoc} */ @Override protected String getOrCreateResourceConfigurationFile(Resource rs, LocalContainer container) { String confDir = getFileHandler().createDirectory(getHome(), "conf"); return getFileHandler().append(confDir, "server.xml"); }
getFileHandler().createDirectory(getHome(), "/deploy"); getFileHandler().createDirectory(getHome(), "/etc"); getFileHandler().copyDirectory(containerHome + "/etc", getHome() + "/etc"); getFileHandler().createDirectory(getHome(), "/hotbundles"); getFileHandler().createDirectory(getHome(), "/repository"); getFileHandler().createDirectory(getHome(), "/var"); getFileHandler().copyDirectory(containerHome + "/var", getHome() + "/var"); String securityDir = getFileHandler().createDirectory(getHome(), "/var/security"); getResourceUtils().copyResource( RESOURCE_PATH + container.getId() + "/users.properties", new File(securityDir, "groups.properties"), filterChain, "ISO-8859-1"); getFileHandler().createDirectory(getHome(), "/var/temp");
/** * Deploy the Cargo Ping utility to the container. * * @param container the container to configure * @throws IOException if the cargo ping deployment fails */ protected void deployCargoPing(WebLogicLocalContainer container) throws IOException { // as this is an initial install, this directory will not exist, yet String deployDir = getFileHandler().createDirectory(getDomainHome(), container.getAutoDeployDirectory()); // Deploy the cargocpc web-app by copying the WAR file getResourceUtils().copyResource(RESOURCE_PATH + "cargocpc.war", getFileHandler().append(deployDir, "cargocpc.war"), getFileHandler()); }
/** * {@inheritDoc} */ @Override protected void doConfigure(LocalContainer container) throws Exception { setupConfigurationDir(); InstalledLocalContainer resinContainer = (InstalledLocalContainer) container; String confDir = getFileHandler().createDirectory(getHome(), "conf"); prepareConfigurationDirectory(container, confDir); String webappsDir = getFileHandler().createDirectory(getHome(), "webapps"); // Deploy the deployables ResinInstalledLocalDeployer deployer = new ResinInstalledLocalDeployer(resinContainer); deployer.deploy(getDeployables()); // Deploy the CPC (Cargo Ping Component) to the webapps directory. getResourceUtils().copyResource(RESOURCE_PATH + "cargocpc.war", getFileHandler().append(webappsDir, "cargocpc.war"), getFileHandler()); }
/** * Deploy the Cargo Ping utility to the container. * * @param container the container to configure * @throws IOException if the cargo ping deployment fails */ protected void deployCargoPing(WebLogicLocalContainer container) throws IOException { // as this is an initial install, this directory will not exist, yet String deployDir = getFileHandler().createDirectory(getDomainHome(), container.getAutoDeployDirectory()); // Deploy the cargocpc web-app by copying the WAR file getResourceUtils().copyResource(RESOURCE_PATH + "cargocpc.war", getFileHandler().append(deployDir, "cargocpc.war"), getFileHandler()); }
/** * Deploy the Cargo Ping utility to the container. * * @param container the container to configure * @throws IOException if the cargo ping deployment fails */ protected void deployCargoPing(WebLogicLocalContainer container) throws IOException { // as this is an initial install, this directory will not exist, yet String deployDir = getFileHandler().createDirectory(getDomainHome(), container.getAutoDeployDirectory()); // Deploy the cargocpc web-app by copying the WAR file getResourceUtils().copyResource(RESOURCE_PATH + "cargocpc.war", getFileHandler().append(deployDir, "cargocpc.war"), getFileHandler()); }
/** * {@inheritDoc} */ @Override protected void doConfigure(LocalContainer container) throws Exception { setupConfigurationDir(); InstalledLocalContainer resinContainer = (InstalledLocalContainer) container; String confDir = getFileHandler().createDirectory(getHome(), "conf"); prepareConfigurationDirectory(container, confDir); String webappsDir = getFileHandler().createDirectory(getHome(), "webapps"); // Deploy the deployables ResinInstalledLocalDeployer deployer = new ResinInstalledLocalDeployer(resinContainer); deployer.deploy(getDeployables()); // Deploy the CPC (Cargo Ping Component) to the webapps directory. getResourceUtils().copyResource(RESOURCE_PATH + "cargocpc.war", getFileHandler().append(webappsDir, "cargocpc.war"), getFileHandler()); }
/** * Creates the test file system manager. {@inheritDoc} * @throws Exception If anything goes wrong. */ @Override protected void setUp() throws Exception { super.setUp(); this.fsManager = new StandardFileSystemManager(); this.fsManager.init(); this.fileHandler = new VFSFileHandler(this.fsManager); this.fileHandler.createDirectory("ram:///", "webapps"); }
/** * Deploy the Cargo Ping utility to the container. * * @param container the container to configure * @throws IOException if the cargo ping deployment fails */ protected void deployCargoPing(WebLogicLocalContainer container) throws IOException { // as this is an initial install, this directory will not exist, yet String deployDir = getFileHandler().createDirectory(getDomainHome(), container.getAutoDeployDirectory()); // Deploy the cargocpc web-app by copying the WAR file getResourceUtils().copyResource(RESOURCE_PATH + "cargocpc.war", getFileHandler().append(deployDir, "cargocpc.war"), getFileHandler()); }
/** * {@inheritDoc} */ @Override public void doConfigure(LocalContainer container) throws Exception { try { setupConfigurationDir(); FilterChain filterChain = createJettyFilterChain(); String etcDir = getFileHandler().createDirectory(getHome(), "etc"); getResourceUtils().copyResource(RESOURCE_PATH + "cargocpc.war", new File(getHome(), "cargocpc.war")); getResourceUtils().copyResource(RESOURCE_PATH + container.getId() + "/webdefault.xml", new File(etcDir, "webdefault.xml"), filterChain, "UTF-8"); if (container.getOutput() != null) { activateLogging(container); } } catch (Exception e) { throw new ContainerException("Failed to create a " + container.getName() + " container configuration", e); } }
/** * Test the {@link FileHandler#createDirectory(java.lang.String, java.lang.String)} method. */ public void testCreateDirectory() { this.fileHandler.createDirectory("ram://test", "test"); assertTrue(this.fileHandler.exists("ram:///test/test")); assertTrue(this.fileHandler.isDirectory("ram:///test/test")); this.fileHandler.createDirectory("ram://test2/", "test"); assertTrue(this.fileHandler.exists("ram:///test2/test")); assertTrue(this.fileHandler.isDirectory("ram:///test2/test")); this.fileHandler.createDirectory("ram://test3", "/test"); assertTrue(this.fileHandler.exists("ram:///test3/test")); assertTrue(this.fileHandler.isDirectory("ram:///test3/test")); this.fileHandler.createDirectory(null, "ram://test4"); assertTrue(this.fileHandler.exists("ram:///test4")); assertTrue(this.fileHandler.isDirectory("ram:///test4")); this.fileHandler.createDirectory("ram://test5", null); assertTrue(this.fileHandler.exists("ram:///test5")); assertTrue(this.fileHandler.isDirectory("ram:///test5")); } }