BundleActivator instance = (BundleActivator) componentInstance.getInstance();
deployment.addAttachment(BundleActivator.class, instance);
}
OperationAssociation.INSTANCE.setAssociation(new ModelNode("deploy"));
try {
bundleManager.startBundle(bundle, Bundle.START_ACTIVATION_POLICY);
depUnit.putAttachment(Attachments.BUNDLE_STATE_KEY, BundleState.ACTIVE);
} catch (BundleException ex) {
throw MESSAGES.cannotStartBundle(ex, bundle);
} finally {
OperationAssociation.INSTANCE.removeAssociation();