You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by neykov <gi...@git.apache.org> on 2016/10/31 15:23:31 UTC
[GitHub] brooklyn-server pull request #396: [WIP] A test to check rebind when bundle ...
GitHub user neykov opened a pull request:
https://github.com/apache/brooklyn-server/pull/396
[WIP] A test to check rebind when bundle prefixes are used to load classes
Do not merge until fixed as will lead to test failure.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/neykov/brooklyn-server test/osgi-prefix-rebind
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/brooklyn-server/pull/396.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 #396
----
commit ae67c47695cc45840654d00b7d86447daa6f856d
Author: Svetoslav Neykov <sv...@cloudsoftcorp.com>
Date: 2016-10-31T15:22:37Z
A test to check rebind when bundle prefixes are used to load classes in catalog items
----
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] brooklyn-server issue #396: [WIP] A test to check rebind when bundle prefixe...
Posted by aledsage <gi...@git.apache.org>.
Github user aledsage commented on the issue:
https://github.com/apache/brooklyn-server/pull/396
@neykov This is replaced by https://github.com/apache/brooklyn-server/pull/442 - do you want to close this PR?
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] brooklyn-server issue #396: [WIP] A test to check rebind when bundle prefixe...
Posted by aledsage <gi...@git.apache.org>.
Github user aledsage commented on the issue:
https://github.com/apache/brooklyn-server/pull/396
@neykov thanks for the pointers. The problem is that the entity's memento is written with the plain type (i.e. not having the OSGi bundle name). The `BasicEntityMemento.type` is a string of the implementation type, set in `MementoGenerators.populateBrooklynObjectMementoBuilder`.
When we go to load that, we therefore don't know which bundle it came from. And we can't tell the bundle from the catalog item either (because we're trying to load from an arbitrary bundle, rather than a bundle that was in this catalog item's `libraries` section).
Note that for "normal" class names, we write the OSGi prefix inside `XmlMementoSerializer.OsgiClassnameMapper.serializedClass`.
---
It's not obvious where the best place is to fix this. The `MementoGenerators` currently know nothing about OSGi etc.
And the `XmlMementoSerializer` does not really want to poke around inside `BasicEntityMemento` etc. It could register a `Converter` for it (and for all the other subtypes of `AbstractMemento`), but that doesn't feel ideal.
On balance, I think putting something in the `MementoGenerators` is the best bet. I'll explore that more.
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] brooklyn-server issue #396: [WIP] A test to check rebind when bundle prefixe...
Posted by neykov <gi...@git.apache.org>.
Github user neykov commented on the issue:
https://github.com/apache/brooklyn-server/pull/396
Superseded by https://github.com/apache/brooklyn-server/pull/442, closing.
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] brooklyn-server pull request #396: [WIP] A test to check rebind when bundle ...
Posted by neykov <gi...@git.apache.org>.
Github user neykov closed the pull request at:
https://github.com/apache/brooklyn-server/pull/396
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] brooklyn-server issue #396: [WIP] A test to check rebind when bundle prefixe...
Posted by aledsage <gi...@git.apache.org>.
Github user aledsage commented on the issue:
https://github.com/apache/brooklyn-server/pull/396
@neykov see https://github.com/neykov/brooklyn-server/pull/4 for the changes that should fix this test. Can you review and merge that into your branch, which should automatically add the commit to your pull request.
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---