// Container configuration
ConfigurationFactory configurationFactory =
new DefaultConfigurationFactory();
LocalConfiguration configuration =
(LocalConfiguration) configurationFactory.createConfiguration(
containerId,
ConfigurationType.STANDALONE);
// Find and (if provided) set the port to use for the container.
String servletPort = System.getProperty("cargo.servlet.port");