Return-Path: X-Original-To: apmail-cxf-issues-archive@www.apache.org Delivered-To: apmail-cxf-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4727910758 for ; Fri, 25 Oct 2013 16:11:05 +0000 (UTC) Received: (qmail 26956 invoked by uid 500); 25 Oct 2013 16:10:51 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 26818 invoked by uid 500); 25 Oct 2013 16:10:44 -0000 Mailing-List: contact issues-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list issues@cxf.apache.org Received: (qmail 26709 invoked by uid 99); 25 Oct 2013 16:10:35 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Oct 2013 16:10:35 +0000 Date: Fri, 25 Oct 2013 16:10:35 +0000 (UTC) From: "Ivan Bondarenko (JIRA)" To: issues@cxf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (CXF-5362) Spring jaxrs scheme and bean definition parser must allow alternative property setting MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CXF-5362?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13805411#comment-13805411 ] Ivan Bondarenko edited comment on CXF-5362 at 10/25/13 4:10 PM: ---------------------------------------------------------------- Looks like in this case (o instanceof Collection) will always be true. But more important that this affects only "serviceBeans" property, while there are some other lists. Also I think non-spring classes must not be touched here. So the code similar to yours can be provided to JAXRSServerFactoryBeanDefinitionParser.mapElement(...). for example piece of code like {code}List list = ctx.getDelegate().parseListElement(el, bean.getBeanDefinition()); bean.addPropertyValue(blahBlah, list);{code} can be converted to method {code}protected mapListProperty(name) { List list = ctx.getDelegate().parseListElement(el, bean.getBeanDefinition()); //Here the list is handled somehow bean.addPropertyValue(name, list); }{code} However writing some code is more close to workaround as for me. was (Author: buzzeri): Looks like in this case (o instanceof Collection) will always be true. But more important that this affects only "serviceBeans" property, while there are some other lists. Also I think non-spring classes must not be touched here. So the code similar to yours can be provided to JAXRSServerFactoryBeanDefinitionParser.mapElement(...). for example piece of code like {code}List list = ctx.getDelegate().parseListElement(el, bean.getBeanDefinition()); bean.addPropertyValue(blahBlah, list);{code} can be converted to method {code}protected mapListProperty(name) { List list = ctx.getDelegate().parseListElement(el, bean.getBeanDefinition()); //Here the list is handled somehow bean.addPropertyValue(name, list);{code} } However writing some code is more close to workaround as for me. > Spring jaxrs scheme and bean definition parser must allow alternative property setting > -------------------------------------------------------------------------------------- > > Key: CXF-5362 > URL: https://issues.apache.org/jira/browse/CXF-5362 > Project: CXF > Issue Type: Improvement > Components: JAX-RS > Reporter: Ivan Bondarenko > > http://cxf.apache.org/schemas/jaxrs.xsd scheme in conjunction with JAXRSServerFactoryBeanDefinitionParser class must allow alternative property set. > For example to set 'serviceBeans' now one must write: > {code} > > > ... > > > {code} > However there is no way to set this if number and set of beans is unknown beforehand (in case of different configurations etc). > The easiest and most non-breaking way I see is to allow in scheme the default bean tags everywhere properties can be set. So user can do e.g. following: > {code} > > _something_here_ > > {code} > Thus user can put almost anything (probably calculated in a complicated way) into 'serviceBeans' (and other properties). -- This message was sent by Atlassian JIRA (v6.1#6144)