Hi Christian, I think the easiest way would be to add a Service to the route[1], there is a handy ServiceSupport[2] base that you can use as a starting point for your service.
zoran [1] https://github.com/apache/camel/blob/master/camel-core/src/main/java/org/apache/camel/Route.java#L126 [2] https://github.com/apache/camel/blob/master/camel-core/src/main/java/org/apache/camel/support/ServiceSupport.java On Thu, Apr 26, 2018 at 11:37 AM, <[email protected]> wrote: > Hi there, > > I have a route that opens a resource and keeps it open. However, when the > camel context performs a soft shutdown, I want to release that resource. > Therefore, I'm looking for a shutdown hook that is triggered to each route > before the shutdown is performed. > > I could not find a feature like that. Has anybody an idea? > > Kind regards, > Christian Jacob > > Innogy SE > Retail IT > Integration and Digital Solutions (AFS-IGI) > Rellinghauser Str. 37 > 45128 Essen > T intern: 70-20581 > T extern: +49 (0)201 12 20582 > T mobil: +49 (0)1622843981 > Fax: +49 (0)201 12 24796 > mailto: [email protected] > > ---------------------------------------------------------------- > innogy SE > Vorsitzender des Aufsichtsrates: Dr. Erhard Schipporeit > Vorstand: Uwe Tigges (Vorsitzender), Dr. Hans Buenting, > Dr. Bernhard Guenther, Martin Herrmann, Hildegard Mueller > Sitz der Gesellschaft: Essen, Eingetragen beim Amtsgericht Essen, > Handelsregister-Nr. HRB 27091, USt-IdNr. DE304171711 -- Zoran Regvart
