Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id B6365200B89 for ; Wed, 21 Sep 2016 11:57:13 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id B4CA5160ADB; Wed, 21 Sep 2016 09:57:13 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id F1313160ACF for ; Wed, 21 Sep 2016 11:57:12 +0200 (CEST) Received: (qmail 81287 invoked by uid 500); 21 Sep 2016 09:57:12 -0000 Mailing-List: contact dev-help@syncope.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@syncope.apache.org Delivered-To: mailing list dev@syncope.apache.org Received: (qmail 81251 invoked by uid 99); 21 Sep 2016 09:57:12 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Sep 2016 09:57:12 +0000 Received: from mail-wm0-f47.google.com (mail-wm0-f47.google.com [74.125.82.47]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id 9F34E1A0470 for ; Wed, 21 Sep 2016 09:57:11 +0000 (UTC) Received: by mail-wm0-f47.google.com with SMTP id l132so258028494wmf.0 for ; Wed, 21 Sep 2016 02:57:11 -0700 (PDT) X-Gm-Message-State: AE9vXwNae/eOVd0O2elfexQ4TTz52PkXzUuzVCXeNmPSpJP9g8ZuCcpL0t0Fjki6oc2g+WVbiYB/qfD8PM09hQ== X-Received: by 10.28.156.16 with SMTP id f16mr2222460wme.56.1474451830221; Wed, 21 Sep 2016 02:57:10 -0700 (PDT) MIME-Version: 1.0 Reply-To: coheigea@apache.org Received: by 10.28.88.137 with HTTP; Wed, 21 Sep 2016 02:57:09 -0700 (PDT) In-Reply-To: References: <98b37986-671d-8099-11fe-d1917b0063b4@apache.org> From: Colm O hEigeartaigh Date: Wed, 21 Sep 2016 10:57:09 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Syncope + Camel + Spring problem To: "dev@syncope.apache.org" Content-Type: multipart/alternative; boundary=001a114b2ddc9437d1053d019120 archived-at: Wed, 21 Sep 2016 09:57:13 -0000 --001a114b2ddc9437d1053d019120 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Yep that works thanks! How is camelRoutesContext being picked up? Colm. On Tue, Sep 20, 2016 at 5:44 PM, Francesco Chicchiricc=C3=B2 wrote: > Il 20 settembre 2016 17:36:08 CEST, Colm O hEigeartaigh < > coheigea@apache.org> ha scritto: > >On Tue, Sep 20, 2016 at 4:02 PM, Francesco Chicchiricc=C3=B2 > > >> wrote: > > > > > >> You could do: > >> > >> ApplicationContext appContext =3D new > >> ClassPathXmlApplicationContext( > >> new String[]{"camel-beans.xml"}, > >> ApplicationContextProvider.getApplicationContext()); > >> camelContext =3D new SpringCamelContext(appContext); > >> > >> > >> e.g. setting the standard Syncope context as parent context. > >> > > > >Yes this works fine to a point. The Camel component that I am calling > >seems > >to be picking up the bean definition from the configuration file + > >working > >correctly. However, I am getting a NPE subsequently in the Camel > >Producers > >in Syncope, caused by the fact that the Syncope PropagationManager in > >PropagateComponent (which is @Autowired) is null. Does this ring any > >bells? > > Hum, not really: you can alternatively leave the Java code as is, name > your file camelRoutesContext.xml and place it in the classpath. It should > work. > > Regards. > > >> It is not clear to me, however, how we could set up things to allow > >such > >> (very useful, indeed) possibility. > >> > >> An empty "camel-beans.xml" file (maybe camelEnv.xml would better > >follow > >> the naming in use) can be added under > >> > >> fit/core-reference/src/main/resources/all/ > >> > >> and the code above could load it only when found. > >> In this way the standalone distribution will simply provide the file > >that > >> anyone could start customizing, while for the Maven project the > >reference > >> guide [1] should be updated. > >> > >> WDYT? > >> > >> Regards. > >> > >> [1] https://syncope.apache.org/docs/reference-guide.html#enable- > >> the-a-href-apache-camel-provisioning-manager-apache- > >> camel-provisioning-manager-a > > -- > Francesco Chicchiricc=C3=B2 > > Tirasa - Open Source Excellence > http://www.tirasa.net/ > > Member at The Apache Software Foundation Syncope, Cocoon, Olingo, CXF, > OpenJPA, PonyMail > http://home.apache.org/~ilgrosso/ > --=20 Colm O hEigeartaigh Talend Community Coder http://coders.talend.com --001a114b2ddc9437d1053d019120--