I have a websocket server instantiated in a UntypedProducerActor and its 
working very well except for shutting down.  I have the following postStop 
method overridden and it gets called when I ask the akkaSystem to shutdown 
the actors; however the embedded jetty websocket server does not shutdown 
and my web application will not terminate.  Any ideas how I can get a 
reference to the websocket server to force it to shutdown?  

    @Override
    public void postStop() {
        super.postStop();
        try {
            _logger.info("!!!!!!!!!!!!!!!! webSocketProducer postStop 
called !!!!!!!!!!!!!!!!!!!!!!");
            _logger.info(String.format("webSocketProducer is %s", 
getEndpointUri()));

            CamelContext cc = getCamelContext();
            WebsocketComponent c = cc.getComponent("websocket", 
WebsocketComponent.class);

            while (!c.isStopped()) {
                _logger.info("trying to stop jetty");
                c.stop();
                c.shutdown();
                c.doStop();
                if (c.isStopped())
                    _logger.info("WebsocketComponet is stopped");
                Thread.sleep(1000);
            }

            _logger.info("!!!!!!!!!!!!!!!! webSocketProducer postStop 
complete !!!!!!!!!!!!!!!!!!!!!!");

        } catch (Exception ex) {
            _logger.error(ex);
        }
    }


akka 2.10
jetty 7.5.4
camel 2.10


-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: http://akka.io/faq/
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to