*
* @throws Exception
*/
private boolean isMultipleDeploymentAllowed(String aDescPath, String aCpName, boolean isConsumer)
throws Exception {
OperationalProperties op = null;
// Parse the descriptor to access Operational Properties
ResourceSpecifier resourceSpecifier = cpeFactory.getSpecifier(new File(aDescPath).toURL());
if (resourceSpecifier != null && resourceSpecifier instanceof ResourceCreationSpecifier) {
ResourceMetaData md = ((ResourceCreationSpecifier) resourceSpecifier).getMetaData();
if (md instanceof ProcessingResourceMetaData) {
op = ((ProcessingResourceMetaData) md).getOperationalProperties();
if (op == null) {
// Operational Properties not defined, so use defaults
if (isConsumer) {
return false; // the default for CasConsumer
}
return true; // default for AEs
}
return op.isMultipleDeploymentAllowed();
}
}
throw new ResourceConfigurationException(ResourceInitializationException.NOT_A_CAS_PROCESSOR,
new Object[] { aCpName, "<unknown>", aDescPath });