Return-Path: Delivered-To: apmail-incubator-cxf-dev-archive@locus.apache.org Received: (qmail 44778 invoked from network); 8 May 2007 15:17:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 May 2007 15:17:39 -0000 Received: (qmail 77466 invoked by uid 500); 8 May 2007 15:17:45 -0000 Delivered-To: apmail-incubator-cxf-dev-archive@incubator.apache.org Received: (qmail 77428 invoked by uid 500); 8 May 2007 15:17:45 -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 77417 invoked by uid 99); 8 May 2007 15:17:45 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 May 2007 08:17:45 -0700 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; Tue, 08 May 2007 08:17:37 -0700 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 l48GDL68015691 for ; Tue, 8 May 2007 16:13:21 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: Determining the Features applied to an endpoint, from ServerLifeCycleListener.startServer() Date: Tue, 8 May 2007 16:17:13 +0100 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Determining the Features applied to an endpoint, from ServerLifeCycleListener.startServer() Thread-Index: AceRg/KxXsFKu8TtRke7qPnXu11PUQ== From: "Glynn, Eoghan" To: X-Virus-Checked: Checked by ClamAV on apache.org Folks, I'd like to customize the behavior of a ServerLifeCycleListener on the basis of the features applied to the corresponding endpoint. Now the problem is how to determine which features have been applied to the endpoint in question. The problem sortta boils down to the way the feature mechanism is specific to JAX-WS, as opposed to being common to all frontends. If I could assume the endpoint was published via JAX-WS (as opposed to say the simple frontend), then you'd think it would just be a simple case of: Public class FeatureAwareServerLifecycleListener implements ServerLifecycleListener { public void startServer(Server server) { List appliedFeatures =3D =20 ((org.apache.cxf.jaxws.EndpointImpl)server.getEndpoint()).getFeatures(); //... } //... } Apart from the cast above being ugly and error-prone, it doesn't seem to give me what I need anyway, as this endpoint is an instance of org.apache.cxf.jaxws.support.JaxWsEndpointImpl (which doesn't expose the applied Features) as opposed to org.apache.cxf.jaxws.EndpointImpl (which does).=20 I guess I could add something like JaxWsEndpointImpl.setFrontendEndpoint() so as to allow navigation between the two Endpoint impls, but this approach is beginning to look really messy, not least because JaxWsEndpointImpl is used on the client-side also. So it would seem more logical that the feature mechanism be made independent of JAX-WS, so we wouldn't have to resort to the above hoop-jumping (as the applied features would then presumably be available from org.apache.cxf.endpoint.EndpointImpl, or maybe via the Server instance directly instead).=20 So is there any reason why the should be specific to JAX-WS?=20 For example, are there any aspects of that don't naturally map onto say the simple frontend?=20 Cheers, Eoghan