Ok, I don't think shutting down Jetty is necessary, I don't need to release the 
port 9000 necessarily when the route is shutdown. However, how do I get 2nd or 
3rd activation of the route work properly when Jetty is up already?

Now it works so that only the first activation of the route makes my endpoint 
available behind port 9000 properly. All route activations after that won't 
bring the endpoint up on the same URI as the first time. On the log all look 
ok, but I can't get the WSDL from the same endpoint as I could after the first 
activation.

- Petri

________________________________
From: Willem.Jiang [via Camel] [mailto:[email protected]]
Sent: 28. marraskuuta 2012 10:24
To: Riipinen Petri
Subject: Re: Releasing CXF-endpoint port on context shutdown

We don't shutdown the Jetty engine when the bundle is stop, as we are using CXF 
bus to manage the life cycle of the Jetty engine.
If you are using Spring or Blueprint, they can take care of the bus shutdown 
issue.

But if you create the CamelContext by yourself, you need to manage the bus 
which camel-cxf component is used by yourself.

--
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) 
(English)
          http://jnn.javaeye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang
Weibo: willemjiang





On Wednesday, November 28, 2012 at 3:31 PM, Urppa wrote:

> I have a programmatic CamelContext and route configuration inside an
> OSGi-bundle that I deploy on Karaf 2.3.0. There are no Blueprint/Spring
> XML-files, this is all done programmatically because I need some
> programmatic stuff before the route setup.
>
> The route has a CXF-endpoint offering a SOAP-webservice on port 9000. The
> configuration is activated on my Activators start-method and works just
> fine, i.e. I can get the WSDL and call the WS-methods once the route is
> active after I drop the bundle into the Karafs deploy-folder.
>
> When I remove the bundle from the Karafs deploy-folder, the bundle is
> stopped properly and on the activator.stop-method I have the
> camelContext-shutdown-call. And looking at the log output, the camelContext
> is shutdown and the route is removed gracefully. Also on port 9000 I start
> getting error from Jetty and can't access the WSDL-anymore, hence my route
> is gone (but note that Jetty is still running on port 9000...).
>
> So, now port 9000 is still reserved on the Karaf-java process. And if I
> restart the bundle, the same route gets added again and I get some second
> port 9000 (looking at netstat -a) that has connection to my computer on some
> 50xxx port. And if I remove the bundle and then deploy it again, AGAIN the
> port 9000 gets some connection to some 5xxxx port.
>
> How to gracefully release port 9000 when the CamelContext and route is
> shutdown? I looked at the CxfEndpoint-class, doStop method and it only has a
> comment // noop... Is this the issue, or am I looking at wrong place at the
> code wrt shutdown of the CXF-endpoint?
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Releasing-CXF-endpoint-port-on-context-shutdown-tp5723329.html
> Sent from the Camel - Users mailing list archive at Nabble.com 
> (http://Nabble.com).




________________________________
If you reply to this email, your message will be added to the discussion below:
http://camel.465427.n5.nabble.com/Releasing-CXF-endpoint-port-on-context-shutdown-tp5723329p5723335.html
To unsubscribe from Releasing CXF-endpoint port on context shutdown, click 
here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5723329&code=cGV0cmkucmlpcGluZW5AaW5zdGEuZml8NTcyMzMyOXw1OTU2OTkzMzg=>.
NAML<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>




--
View this message in context: 
http://camel.465427.n5.nabble.com/Releasing-CXF-endpoint-port-on-context-shutdown-tp5723329p5723337.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to