Ide Start stop problem Netbeans

38 views
Skip to first unread message

İsmail Köksal

unread,
Nov 1, 2013, 4:50:48 AM11/1/13
to membrane...@googlegroups.com
Hi,

I use Netbeans for development. When I start IdeStart membrane successfully start. But When I want to stop it, it won't stop until I kill it. Do you know why it happens ? Or is it occur on Eclipse too?

Thomas Bayer

unread,
Nov 11, 2013, 4:45:18 AM11/11/13
to membrane...@googlegroups.com
Hi,
sorry for waiting. Can you describe how you start Membrane?

--
Thomas


Am 11/1/13 9:50 AM, schrieb İsmail Köksal:
> --
> You received this message because you are subscribed to the Google
> Groups "membrane-monitor" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to membrane-monit...@googlegroups.com.
> To post to this group, send email to membrane...@googlegroups.com.
> Visit this group at http://groups.google.com/group/membrane-monitor.
> For more options, visit https://groups.google.com/groups/opt_out.

Tobias Polley

unread,
Nov 12, 2013, 10:04:22 AM11/12/13
to membrane...@googlegroups.com
Hi Ismail,

there is currently no way of properly shutting down the standalone version of Membrane. I usually use Ctrl+C or Eclipse's stop button, which effectively kills the process.

Do you have a use case where a proper shutdown is required? I would be interested in hearing about it.



Note that Membrane already has some shutdown behaviour, but there is no way of triggering a proper shutdown with Membrane's standalone deployment. The shutdown logic exists to support reloading of the proxies.xml configuration file, as well as other deployment methods (OSGi, J2EE web app). When either the proxies.xml changed or the Membrane OSGi bundle is stopped or the Membrane J2EE web app is undeployed, any listening TCP server ports are closed. This allows restarting Membrane's spring context (as well as the OSGi bundle or web app) without restarting the container.

Internally, Membrane uses a Spring context and the Spring life-cycle phase 0 to manage its objects. For standalone deployment, this gives you the the following structure of nested components:

[RouterCLI [spring-context [Router [Transport [TCP ports] ] [interceptors] ] ]

Currently,
* RouterCLI has no method of triggering a shutdown. (Modifying the proxies.xml configuration file triggers a shutdown of the spring-context (and the nested Router and Transport, closing the TCP ports), but this shutdown is always followed immediately by a restart).
* The Interceptor interface has no counterpart of init() for shutdown. (Effectively interceptors currently do not have the concept of shutting down.)


The last issue can be worked around though:

In proxies.xml, define

    <spring:bean
        id="myInterceptor"
        class="com.predic8.example.MyInterceptor" />
    <router>
        <serviceProxy name="localhost" port="2001" >
            <spring:ref bean="myInterceptor" />
            <target host="localhost" port="8080"/>
        </serviceProxy>


and implement

package com.predic8.example;
public class MyInterceptor extends com.predic8.membrane.core.interceptor.AbstractInterceptor implements org.springframework.context.Lifecycle { ... }

This way, your interceptor can implement start() and stop() methods, which will be called by Spring.

Best, Tobias

İsmail Köksal

unread,
Nov 13, 2013, 5:16:17 AM11/13/13
to membrane...@googlegroups.com
I tried early version of membrane there was not a problem. May be it is Netbeans problem

İsmail Köksal

unread,
Nov 29, 2013, 8:02:15 AM11/29/13
to membrane...@googlegroups.com


--
You received this message because you are subscribed to a topic in the Google Groups "membrane-monitor" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/membrane-monitor/uiX72Lk8q4g/unsubscribe.
To unsubscribe from this group and all its topics, send an email to membrane-monit...@googlegroups.com.

Thomas Bayer

unread,
Nov 29, 2013, 8:35:16 AM11/29/13
to membrane...@googlegroups.com
thanks Ismail. Good to know.

Am 11/29/13 2:02 PM, schrieb İsmail Köksal:
You received this message because you are subscribed to the Google Groups "membrane-monitor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to membrane-monit...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages