You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@aries.apache.org by "Alasdair Nottingham (JIRA)" <ji...@apache.org> on 2009/10/23 17:17:24 UTC
[jira] Assigned: (ARIES-41) In JNDI ServiceHelper we should also
check for the current thread's context classloader's parent
[ https://issues.apache.org/jira/browse/ARIES-41?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alasdair Nottingham reassigned ARIES-41:
----------------------------------------
Assignee: Alasdair Nottingham
> In JNDI ServiceHelper we should also check for the current thread's context classloader's parent
> ------------------------------------------------------------------------------------------------
>
> Key: ARIES-41
> URL: https://issues.apache.org/jira/browse/ARIES-41
> Project: Aries
> Issue Type: Bug
> Components: JNDI
> Reporter: Lin Sun
> Assignee: Alasdair Nottingham
> Priority: Minor
>
> Hi,
> In the ServiceHelper.getBundleContext(), if the current thread's context classloader is not an instance of BundleReference, we should also try to check its parent to see if it is an instance of BundleReference. If it is, then grab the bundle context accordingly. What do people think?
> Proposed change:
> ClassLoader cl = Thread.currentThread().getContextClassLoader();
> if (cl instanceof BundleReference) {
> result = ((BundleReference)cl).getBundle().getBundleContext();
> + } else if (cl.getParent() instanceof BundleReference) {
> + result = ((BundleReference)cl.getParent()).getBundle().getBundleContext();
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.