brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aledsage <>
Subject [GitHub] brooklyn-server issue #396: [WIP] A test to check rebind when bundle prefixe...
Date Mon, 07 Nov 2016 16:44:07 GMT
Github user aledsage commented on the issue:
    @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 or file a JIRA ticket
with INFRA.

View raw message