You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Dejan Bosanac (JIRA)" <ji...@apache.org> on 2010/01/20 13:51:44 UTC

[jira] Created: (AMQ-2574) Try to stomp OSGi bundle when closing application context

Try to stomp 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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/

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

Posted by Bruce Snyder <br...@gmail.com>.
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

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

Posted by "Dejan Bosanac (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-2574?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dejan Bosanac reopened AMQ-2574:
--------------------------------


Make OSGi an optional dependency.

> 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Posted by "Dejan Bosanac (JIRA)" <ji...@apache.org>.
     [ 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 964847

Incidentally, destroyApplicationContextOnStop and destroyApplicationContextOnShutdown broker attributes became obsolete and we should use shutdown hooks instead, like

{code}        <shutdownHooks>
           <bean xmlns="http://www.springframework.org/schema/beans" id="hook" class="org.apache.activemq.hooks.SpringContextHook" />
        </shutdownHooks> {code}

More stuff for blueprint support, refactorings and documentation is coming.

> 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.4.0, 5.3.1
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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

Posted by "Dejan Bosanac (JIRA)" <ji...@apache.org>.
     [ 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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

Posted by "Dejan Bosanac (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-2574?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dejan Bosanac updated AMQ-2574:
-------------------------------

    Summary: Try to stop OSGi bundle when closing application context  (was: Try to stomp OSGi bundle when closing application context)

> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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

Posted by "Bruce Snyder (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQ-2574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61226#action_61226 ] 

Bruce Snyder commented on AMQ-2574:
-----------------------------------

A few items of note: 

# The {{XBeanBrokerService.destroyApplicationContextOnStop}} and the {{XBeanBrokerService.destroyApplicationContextOnShutdown}} methods: 
#* Are [available in 5.3.1|http://fisheye6.atlassian.com/browse/activemq/tags/activemq-5.3.1/activemq-core/src/main/java/org/apache/activemq/xbean/XBeanBrokerService.java?r=HEAD] 
#* But are [deprecated in 5.4.0|http://fisheye6.atlassian.com/browse/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/xbean/XBeanBrokerService.java?r=965820] 
# The [{{SpringContextHook}}|http://fisheye6.atlassian.com/browse/activemq/trunk/activemq-spring/src/main/java/org/apache/activemq/hooks/SpringContextHook.java#r964847] class is only available in 5.4.0 

> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.