Return-Path: Delivered-To: apmail-incubator-cxf-dev-archive@locus.apache.org Received: (qmail 34361 invoked from network); 15 Dec 2006 13:43:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 Dec 2006 13:43:50 -0000 Received: (qmail 30331 invoked by uid 500); 15 Dec 2006 13:43:45 -0000 Delivered-To: apmail-incubator-cxf-dev-archive@incubator.apache.org Received: (qmail 30247 invoked by uid 500); 15 Dec 2006 13:43:44 -0000 Mailing-List: contact cxf-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cxf-dev@incubator.apache.org Delivered-To: mailing list cxf-dev@incubator.apache.org Received: (qmail 30200 invoked by uid 99); 15 Dec 2006 13:43:44 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Dec 2006 05:43:44 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of eoghan.glynn@iona.com designates 62.221.12.33 as permitted sender) Received: from [62.221.12.33] (HELO emea-smg1.iona.com) (62.221.12.33) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Dec 2006 05:43:33 -0800 Received: from emea-ems1.ionaglobal.com (dutec.ie [10.2.1.125]) by emea-smg1.iona.com (Switch-3.1.7/Switch-3.1.7) with ESMTP id kBFEfYxA013215 for ; Fri, 15 Dec 2006 14:41:34 GMT X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable Subject: RE: Injecting the configuration programmatically Date: Fri, 15 Dec 2006 13:43:06 -0000 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Injecting the configuration programmatically Thread-Index: AccgSaex8b9Ki1YNShK2pPwd7eC8YAAA3Pvg From: "Glynn, Eoghan" To: X-Virus-Checked: Checked by ClamAV on apache.org > How to register a custom implementation with the bus ? >=20 > Thanks, Sergey After you call SpringBusFactory.createBus(...) to create the Bus, use Bus.setExtension(myConfiurer, Configurer.class) to register your custom implmentation. The setExtension() API simply put()s into a Map keyed on Class, so your custom configurer will just overwrite the standard one previously registered by createBus(). One caveat though ... make sure your Configurer is registered *before* your app does anything that would require the particular Bean with programmatically injected properties to be instantiated. For example, suppose the Bean in question was the HTTPListenerConfigBean ... obviously your configurer will have to available when the first Listener is launched, e.g. before the first call to Endpoint.publish() [assuming the JAX-WS model]. Cheers, Eoghan