[
https://issues.apache.org/jira/browse/ARIES-343?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12883306#action_12883306
]
Jarek Gawor commented on ARIES-343:
-----------------------------------
The OSGi JNDI specification states that the caller's bundle is determined when
the initial context is first created. That's why the caller's bundle is cached
and used throughout. The caller's bundle can be set to arbitrary bundle by
passing a JNDIConstants.BUNDLE_CONTEXT property in the environment properties.
> AbstractServiceRegistryContext caches BundleContexts inappropriately
> --------------------------------------------------------------------
>
> Key: ARIES-343
> URL: https://issues.apache.org/jira/browse/ARIES-343
> Project: Aries
> Issue Type: Bug
> Components: JNDI
> Affects Versions: 0.2
> Reporter: Holly Cummins
>
> We've recently made a change to AbstractServiceRegistryContext so that it
> gets passed a BundleContext on construction and caches it. This creates
> problems down the line because utility bundles will end up using their own
> bundle context for lookups instead of the context of the calling bundle. I've
> seen this behaviour in calls to ServiceHelper.findService().
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.