Search in sources :

Example 1 with BPMNAppDeployer

use of org.wso2.carbon.application.deployer.bpmn.BPMNAppDeployer in project carbon-business-process by wso2.

the class BPMNAppDeployerDSComponent method activate.

protected void activate(ComponentContext ctxt) {
    try {
        // register bpmn deployer as an OSGi Service
        BPMNAppDeployer BPMNAppDeployer = new BPMNAppDeployer();
        appHandlerRegistration = ctxt.getBundleContext().registerService(AppDeploymentHandler.class.getName(), BPMNAppDeployer, null);
        // read required-features.xml
        URL reqFeaturesResource = ctxt.getBundleContext().getBundle().getResource(AppDeployerConstants.REQ_FEATURES_XML);
        if (reqFeaturesResource != null) {
            InputStream xmlStream = reqFeaturesResource.openStream();
            requiredFeatures = AppDeployerUtils.readRequiredFeaturs(new StAXOMBuilder(xmlStream).getDocumentElement());
        }
    } catch (Throwable e) {
        log.error("Failed to activate BPMN Application Deployer", e);
    }
}
Also used : BPMNAppDeployer(org.wso2.carbon.application.deployer.bpmn.BPMNAppDeployer) InputStream(java.io.InputStream) StAXOMBuilder(org.apache.axiom.om.impl.builder.StAXOMBuilder) URL(java.net.URL)

Aggregations

InputStream (java.io.InputStream)1 URL (java.net.URL)1 StAXOMBuilder (org.apache.axiom.om.impl.builder.StAXOMBuilder)1 BPMNAppDeployer (org.wso2.carbon.application.deployer.bpmn.BPMNAppDeployer)1