camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Urppa <petri.riipi...@insta.fi>
Subject Releasing CXF-endpoint port on context shutdown
Date Wed, 28 Nov 2012 07:31:07 GMT
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.

Mime
View raw message