GitHub user ahgittin opened a pull request:
https://github.com/apache/brooklyn-server/pull/718
WIP - DO NOT MERGE - improve OSGi serialization strategies
Discovered that the current deserialization strategy for OSGi does not work
in the following case:
`foo-wrapped` extending yaml type `foo` which depends on bundle
`foo-bundle` and extends java type `foo.Foo` in `foo-bundle`. The
class-loading-context for `foo-wrapped` does not look in `foo-bundle`.
Creating `foo-wrapped` works because it creates `foo` but trying to load class
`foo.Foo` using the CLC for `foo-wrapped` fails. This impacts _specs_: we
fail if we rebind a cluster whose member spec is a `foo-wrapped` for this
reason. The serialized form of `EntitySpec` records `type` as `foo.Foo` and --
for lookup purposes -- `catalogItemId` `foo-wrapped`.
So far this just adds a failing test, but provides a better place for
discussing than IRC. I will summarise IRC discussion here and @geomacy @neykov
@aledsage we can continue the discussion.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/ahgittin/brooklyn-server
osgi-serialization-better
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/brooklyn-server/pull/718.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 #718
----
commit a3d256d7ddf28f76bd6e0b00b0b17b446025752b
Author: Alex Heneveld <[email protected]>
Date: 2017-06-06T13:20:21Z
failing test to illustrate osgi entity spec descendant rebind bug
----
---
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.
---