You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by Karl Pauls <ka...@gmail.com> on 2012/11/01 09:19:48 UTC

Re: Problem setting framework start level

I agree, this looks like a bug. We need to remove that tuple one way
or the other - nothing else makes sense.

Richard is traveling atm so I'd say, create a JIRA issue to track this
and go ahead and commit your fix to trunk referencing the issue. The
patch looks good to me.

regards,

Karl

On Wed, Oct 31, 2012 at 9:13 AM, Felix Meschberger <fm...@adobe.com> wrote:
> Hi,
>
> We experience an issue with setting the framework startlevel in the Felix.setActiveStartLevel(int, FrameworkListener[]) method.
>
> On line 1216 the bundle lock is acquired. If this fails with an IllegalStateException the loop just continues. But the bundle remains in the m_startLevelBundles set and is retried later. In the case of an uninstalled bundle, this situation will not change and the method is probabl going into an endless loop.
>
> Would it make sense to remove the bundle from the m_startLevelBundles set in the catch block starting line 1223 if the bundle has been uninstalled ?
>
> Something like:
>
>> Index: Felix.java
>> ===================================================================
>> --- Felix.java        (revision 1404016)
>> +++ Felix.java        (working copy)
>> @@ -1227,6 +1227,14 @@
>>                                  Logger.LOG_ERROR,
>>                                  "Error locking " + tuple.m_bundle._getLocation(), ex);
>>                          }
>> +                        else
>> +                        {
>> +                            synchronized (m_startLevelBundles)
>> +                            {
>> +                                m_startLevelBundles.remove(tuple);
>> +                                bundlesRemaining = !m_startLevelBundles.isEmpty();
>> +                            }
>> +                        }
>>                          continue;
>>                      }
>>
>>
>
>
> Regards
> Felix



-- 
Karl Pauls
karlpauls@gmail.com
http://twitter.com/karlpauls
http://www.linkedin.com/in/karlpauls
https://profiles.google.com/karlpauls

Re: Problem setting framework start level

Posted by Felix Meschberger <fm...@adobe.com>.
Ok. Will do. Thanks.

Regards
Felix

Am 01.11.2012 um 09:19 schrieb Karl Pauls:

> I agree, this looks like a bug. We need to remove that tuple one way
> or the other - nothing else makes sense.
> 
> Richard is traveling atm so I'd say, create a JIRA issue to track this
> and go ahead and commit your fix to trunk referencing the issue. The
> patch looks good to me.
> 
> regards,
> 
> Karl
> 
> On Wed, Oct 31, 2012 at 9:13 AM, Felix Meschberger <fm...@adobe.com> wrote:
>> Hi,
>> 
>> We experience an issue with setting the framework startlevel in the Felix.setActiveStartLevel(int, FrameworkListener[]) method.
>> 
>> On line 1216 the bundle lock is acquired. If this fails with an IllegalStateException the loop just continues. But the bundle remains in the m_startLevelBundles set and is retried later. In the case of an uninstalled bundle, this situation will not change and the method is probabl going into an endless loop.
>> 
>> Would it make sense to remove the bundle from the m_startLevelBundles set in the catch block starting line 1223 if the bundle has been uninstalled ?
>> 
>> Something like:
>> 
>>> Index: Felix.java
>>> ===================================================================
>>> --- Felix.java        (revision 1404016)
>>> +++ Felix.java        (working copy)
>>> @@ -1227,6 +1227,14 @@
>>>                                 Logger.LOG_ERROR,
>>>                                 "Error locking " + tuple.m_bundle._getLocation(), ex);
>>>                         }
>>> +                        else
>>> +                        {
>>> +                            synchronized (m_startLevelBundles)
>>> +                            {
>>> +                                m_startLevelBundles.remove(tuple);
>>> +                                bundlesRemaining = !m_startLevelBundles.isEmpty();
>>> +                            }
>>> +                        }
>>>                         continue;
>>>                     }
>>> 
>>> 
>> 
>> 
>> Regards
>> Felix
> 
> 
> 
> -- 
> Karl Pauls
> karlpauls@gmail.com
> http://twitter.com/karlpauls
> http://www.linkedin.com/in/karlpauls
> https://profiles.google.com/karlpauls