GitHub user neykov opened a pull request:
https://github.com/apache/brooklyn-server/pull/233
Karaf fixes - class loading
* Disables loading `catalog.bom` (can be enabled through a feature flag).
* Moves all `catalog.bom` items to be loaded through `default.catalog.bom`
* Fallback class loading - replace `Class.forName(..)`,
`classLoader.loadClass(...)` usages with a centralized logic.
Class loading logic:
* Supports embedding the bundle's symbolidName and version in the class
name (for example
`org.apache.brooklyn.core:0.10.0.SNAPHOT:org.apache.brooklyn.core.mgmt.entitlement.PerUserEntitlementManager`
* try to load from the entity's catalog item libraries
* Class.forName, using the calling class' class loader
* mgmt.getCatalogClassLoader.loadClass
* scanning all bundles matching `org.apache.brooklyn.*:0.10.0-SNAPSHOT`
by default. Can be overriden with a system property.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/neykov/brooklyn-server misc-osgi
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/brooklyn-server/pull/233.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #233
----
commit 28e9c2fb14b147d27f6d83a39496421f6836472a
Author: Svetoslav Neykov <[email protected]>
Date: 2016-07-05T09:36:02Z
Hide bundle catalog.bom loading behind a feature flag
commit 67a98d6a0af33d97ed795b43903d6fab062ad970
Author: Svetoslav Neykov <[email protected]>
Date: 2016-07-05T09:37:13Z
Propagate the catalog loading list
commit 7c7b145316d222952e467d163581aa22cd920b0b
Author: Svetoslav Neykov <[email protected]>
Date: 2016-07-05T09:39:45Z
Replicate catalog.bom using standard default.catalog.bom
Loading catalog.bom from bundles is disabled due to not interacting with
persistence nicely. Load same catalog items through the default.catalog.bom
mechanism instead.
commit 6a52d179747bbae71c51e87e56640f494fb61574
Author: Svetoslav Neykov <[email protected]>
Date: 2016-07-05T18:00:53Z
Centralize class loading and implement fallback bundle scanning
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---