use of org.camunda.bpm.container.impl.tomcat.deployment.TomcatParseBpmPlatformXmlStep in project camunda-bpm-platform by camunda.
the class TomcatBpmPlatformBootstrap method deployBpmPlatform.
protected void deployBpmPlatform(LifecycleEvent event) {
final StandardServer server = (StandardServer) event.getSource();
containerDelegate.getServiceContainer().createDeploymentOperation("deploy BPM platform").addAttachment(TomcatAttachments.SERVER, server).addStep(new TomcatParseBpmPlatformXmlStep()).addStep(new DiscoverBpmPlatformPluginsStep()).addStep(new StartManagedThreadPoolStep()).addStep(new StartJobExecutorStep()).addStep(new PlatformXmlStartProcessEnginesStep()).execute();
LOG.camundaBpmPlatformSuccessfullyStarted(server.getServerInfo());
}
use of org.camunda.bpm.container.impl.tomcat.deployment.TomcatParseBpmPlatformXmlStep in project camunda-bpm-platform by camunda.
the class BpmPlatformXmlLocationTest method getBpmPlatformXmlLocationFromJndi.
@Test
public void getBpmPlatformXmlLocationFromJndi() throws NamingException, MalformedURLException {
Context context = new InitialContext();
context.bind("java:comp/env/" + BPM_PLATFORM_XML_LOCATION, BPM_PLATFORM_XML_FILE_ABSOLUTE_LOCATION);
URL url = new TomcatParseBpmPlatformXmlStep().lookupBpmPlatformXmlLocationFromJndi();
assertEquals(new File(BPM_PLATFORM_XML_FILE_ABSOLUTE_LOCATION).toURI().toURL(), url);
}
use of org.camunda.bpm.container.impl.tomcat.deployment.TomcatParseBpmPlatformXmlStep in project camunda-bpm-platform by camunda.
the class BpmPlatformXmlLocationTest method getBpmPlatformXmlFromCatalinaConfDirectory.
@Test
public void getBpmPlatformXmlFromCatalinaConfDirectory() throws MalformedURLException {
System.setProperty(CATALINA_HOME, BPM_PLATFORM_XML_LOCATION_PARENT_DIR);
try {
URL url = new TomcatParseBpmPlatformXmlStep().lookupBpmPlatformXmlFromCatalinaConfDirectory();
assertEquals(new File(BPM_PLATFORM_XML_FILE_ABSOLUTE_LOCATION).toURI().toURL(), url);
} finally {
System.clearProperty(CATALINA_HOME);
}
}
use of org.camunda.bpm.container.impl.tomcat.deployment.TomcatParseBpmPlatformXmlStep in project camunda-bpm-platform by camunda.
the class BpmPlatformXmlLocationTest method getBpmPlatformXmlFromSystemPropertyAsFileLocation.
@Test
public void getBpmPlatformXmlFromSystemPropertyAsFileLocation() throws MalformedURLException {
try {
System.setProperty(BPM_PLATFORM_XML_SYSTEM_PROPERTY, BPM_PLATFORM_XML_FILE_ABSOLUTE_LOCATION);
URL url = new TomcatParseBpmPlatformXmlStep().lookupBpmPlatformXmlLocationFromEnvironmentVariable();
assertEquals(new File(BPM_PLATFORM_XML_FILE_ABSOLUTE_LOCATION).toURI().toURL(), url);
} finally {
System.clearProperty(BPM_PLATFORM_XML_SYSTEM_PROPERTY);
}
}
use of org.camunda.bpm.container.impl.tomcat.deployment.TomcatParseBpmPlatformXmlStep in project camunda-bpm-platform by camunda.
the class BpmPlatformXmlLocationTest method checkValidBpmPlatformXmlResourceLocationForFile.
@Test
public void checkValidBpmPlatformXmlResourceLocationForFile() throws NamingException, MalformedURLException {
TomcatParseBpmPlatformXmlStep tomcatParseBpmPlatformXmlStep = new TomcatParseBpmPlatformXmlStep();
URL url = tomcatParseBpmPlatformXmlStep.checkValidFileLocation(BPM_PLATFORM_XML_LOCATION_RELATIVE_PATH);
assertNull("Relative path is invalid.", url);
url = tomcatParseBpmPlatformXmlStep.checkValidFileLocation(BPM_PLATFORM_XML_FILE_ABSOLUTE_LOCATION);
assertEquals(new File(BPM_PLATFORM_XML_FILE_ABSOLUTE_LOCATION).toURI().toURL(), url);
url = tomcatParseBpmPlatformXmlStep.checkValidFileLocation(BPM_PLATFORM_XML_LOCATION_FILE_INVALID_PATH_WINDOWS);
assertNull("Path is invalid.", url);
assertNull(tomcatParseBpmPlatformXmlStep.checkValidFileLocation(BPM_PLATFORM_XML_LOCATION_URL_HTTP_PROTOCOL));
assertNull(tomcatParseBpmPlatformXmlStep.checkValidFileLocation(BPM_PLATFORM_XML_LOCATION_URL_HTTPS_PROTOCOL));
}
Aggregations