The akka camel extension invokes stop on the DefaultCamelContext it has
created. I think that is supposed to stop all routes/components/endpoints
etc and clear internal state/cache.

I don't know if this is a specific problem with the jetty websocket enpoint
or something in general.

Please open a ticket with description (or test code) of how to reproduce.
http://doc.akka.io/docs/akka/current/project/issue-tracking.html

You should be able to work around the problem by accessing CamelContext, as
I can see that you are trying. If you find something that is working that
would be useful information.

Thanks,
Patrik



On Tue, Dec 24, 2013 at 1:32 AM, Bob Thorman <[email protected]> wrote:

> Just finished upgrading to akka 2.1.4, camel 2.11, jetty 7.6.7 and spring
> 4.0.0 and the same results.  Seems like akka/camel is not shutting down the
> websocket server on any of the following attempts...
>
>                 _wsProducer.tell(PoisonPill.getInstance(), null);
>                 _actorSystem.stop(_wsProducer);
>
> or
>
>             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);
>             }
>
>
>
>
>
> On Monday, December 23, 2013 2:02:25 PM UTC-6, Bob Thorman wrote:
>>
>> 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.
>



-- 

Patrik Nordwall
Typesafe <http://typesafe.com/> -  Reactive apps on the JVM
Twitter: @patriknw

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