You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by Bruce Snyder <br...@gmail.com> on 2010/04/10 02:10:27 UTC

Re: [jira] Resolved: (AMQ-2574) Try to stop OSGi bundle when closing application context

On Wed, Jan 20, 2010 at 7:13 AM, Dejan Bosanac (JIRA) <ji...@apache.org> wrote:
>
>     [ https://issues.apache.org/activemq/browse/AMQ-2574?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
>
> Dejan Bosanac resolved AMQ-2574.
> --------------------------------
>
>    Resolution: Fixed
>
> Fixed with svn revision 901171
>
>> Try to stop OSGi bundle when closing application context
>> --------------------------------------------------------
>>
>>                 Key: AMQ-2574
>>                 URL: https://issues.apache.org/activemq/browse/AMQ-2574
>>             Project: ActiveMQ
>>          Issue Type: Improvement
>>          Components: Broker
>>    Affects Versions: 5.3.0
>>            Reporter: Dejan Bosanac
>>            Assignee: Dejan Bosanac
>>             Fix For: 5.3.1, 5.4.0
>>
>>
>> When using destroyApplicationContextOnShutdown="true", ActiveMQ will try to close application context when error such as database down is encountered. This will allow it to be cleanly stopped in an environment such as ServiceMix. However, when the broker is started as an OSGi bundle, the bundle will be left in status "started" event when the context is destroyed. We should try to stop the appropriate bundle in this case.
>

The fixes for this issue introduced required OSGi dependencies into
the XBeanBrokerService. Why would we bring OSGi into the core of the
broker in a non-optional manner? Any OSGi dependencies should be made
optional instead of required. This should have been implemented in a
separate module outside of the activemq-core by extending the
XBeanBrokerService. The OSGi Activator should also be moved out of the
activemq-core package.

Bruce
-- 
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

ActiveMQ in Action: http://bit.ly/2je6cQ
Blog: http://bruceblog.org/
Twitter: http://twitter.com/brucesnyder

Re: [jira] Resolved: (AMQ-2574) Try to stop OSGi bundle when closing application context

Posted by Bruce Snyder <br...@gmail.com>.
On Mon, Apr 12, 2010 at 3:06 PM, Hiram Chirino <hi...@hiramchirino.com> wrote:
> I agree it would be nice if osgi remained an optional dependency.  But
> I don't think you  have implement it in a separate module.  For
> example, reflection could be used to break the current hard
> dependency.

Using a separate module was only one suggestion. Reflection could
certainly be used as well. I've used this in the past for the same
type of thing on other projects.

Bruce
-- 
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

ActiveMQ in Action: http://bit.ly/2je6cQ
Blog: http://bruceblog.org/
Twitter: http://twitter.com/brucesnyder

Re: [jira] Resolved: (AMQ-2574) Try to stop OSGi bundle when closing application context

Posted by Hiram Chirino <hi...@hiramchirino.com>.
I agree it would be nice if osgi remained an optional dependency.  But
I don't think you  have implement it in a separate module.  For
example, reflection could be used to break the current hard
dependency.

On Fri, Apr 9, 2010 at 8:10 PM, Bruce Snyder <br...@gmail.com> wrote:
> On Wed, Jan 20, 2010 at 7:13 AM, Dejan Bosanac (JIRA) <ji...@apache.org> wrote:
>>
>>     [ https://issues.apache.org/activemq/browse/AMQ-2574?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
>>
>> Dejan Bosanac resolved AMQ-2574.
>> --------------------------------
>>
>>    Resolution: Fixed
>>
>> Fixed with svn revision 901171
>>
>>> Try to stop OSGi bundle when closing application context
>>> --------------------------------------------------------
>>>
>>>                 Key: AMQ-2574
>>>                 URL: https://issues.apache.org/activemq/browse/AMQ-2574
>>>             Project: ActiveMQ
>>>          Issue Type: Improvement
>>>          Components: Broker
>>>    Affects Versions: 5.3.0
>>>            Reporter: Dejan Bosanac
>>>            Assignee: Dejan Bosanac
>>>             Fix For: 5.3.1, 5.4.0
>>>
>>>
>>> When using destroyApplicationContextOnShutdown="true", ActiveMQ will try to close application context when error such as database down is encountered. This will allow it to be cleanly stopped in an environment such as ServiceMix. However, when the broker is started as an OSGi bundle, the bundle will be left in status "started" event when the context is destroyed. We should try to stop the appropriate bundle in this case.
>>
>
> The fixes for this issue introduced required OSGi dependencies into
> the XBeanBrokerService. Why would we bring OSGi into the core of the
> broker in a non-optional manner? Any OSGi dependencies should be made
> optional instead of required. This should have been implemented in a
> separate module outside of the activemq-core by extending the
> XBeanBrokerService. The OSGi Activator should also be moved out of the
> activemq-core package.
>
> Bruce
> --
> perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
> );'
>
> ActiveMQ in Action: http://bit.ly/2je6cQ
> Blog: http://bruceblog.org/
> Twitter: http://twitter.com/brucesnyder
>



-- 
Regards,
Hiram

Blog: http://hiramchirino.com

Open Source SOA
http://fusesource.com/