Hello. Ideally, I'd like to replace the long repetitive code from all the existing projects blueprints (and future projects too). We have something like the following sequence in every project :
<?xml version="1.0" encoding="UTF-8"?> <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0" xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprintz.xsd http://camel.apache.org/schema/blueprint http://camel.apache.org/schema/blueprint/camel-blueprint.xsd http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0 http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.1.0.xsd"> <reference id="myUnitOfWorkFactory" interface="x.y.z.MyMDCUnitOfWorkFactory" /> <reference id="support" interface="x.y.z.Support" /> <bean id="oneEventNotifier" class="org.apache.camel.spi.EventNotifier" factory-ref="support" factory-method="makeSupportEventNotifierForX" /> <bean id="otherEventNotifier" class="org.apache.camel.spi.EventNotifier" factory-ref="support" factory-method="makeSupportEventNotifierForY" /> <reference id="tools" interface="x.y.z.Tools" /> <reference id="myDS" interface="javax.sql.DataSource" filter="(osgi.jndi.service.name=jdbc/our-ds)" /> <camelContext id="my-context" streamCache="true" useMDCLogging="true" xmlns="http://camel.apache.org/schema/blueprint"> And it should be easier to manage provided services, beans and so on changing only the CamelContext or its associated registry. Something like that : <?xml version="1.0" encoding="UTF-8"?> <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0" xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprintz.xsd http://camel.apache.org/schema/blueprint http://camel.apache.org/schema/blueprint/camel-blueprint.xsd http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0 http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.1.0.xsd"> <reference id="myCamelContextFactory" interface="???" /> <camelContext id="my-context" streamCache="true" useMDCLogging="true" xmlns="http://camel.apache.org/schema/blueprint"> Then, adding new services from an external part of the system doesn't need projects modifications any more. What is my problem, is what kind of "hook" I can use to change the CamelContext a,d/or its Registry. Is it clearer ? Anyway, thanks again for your help. Regards. Le ven. 17 juin 2022 à 14:28, ski n <raymondmees...@gmail.com> a écrit : > > Hi, > > It's good to provide a code example to see what you tried. > > Have you also tried to combine it with route configuration? > > https://camel.apache.org/manual/route-configuration.html > > This is available from 3.12. > > Raymond > > On Thu, Jun 16, 2022 at 7:43 PM j vh <jvh...@hotmail.com> wrote: > > > Hello, > > btw... I'm using Camel 3.13.0 for this work. > > ...jvh003