Return-Path: X-Original-To: apmail-cxf-dev-archive@www.apache.org Delivered-To: apmail-cxf-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8811D9FFD for ; Mon, 21 May 2012 14:41:44 +0000 (UTC) Received: (qmail 45474 invoked by uid 500); 21 May 2012 14:41:44 -0000 Delivered-To: apmail-cxf-dev-archive@cxf.apache.org Received: (qmail 45355 invoked by uid 500); 21 May 2012 14:41:43 -0000 Mailing-List: contact dev-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 dev@cxf.apache.org Received: (qmail 45337 invoked by uid 99); 21 May 2012 14:41:43 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 May 2012 14:41:43 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [64.85.173.253] (HELO server.dankulp.com) (64.85.173.253) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 May 2012 14:41:38 +0000 Received: by server.dankulp.com (Postfix, from userid 5000) id B5A01182B3B; Mon, 21 May 2012 10:41:17 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on server.dankulp.com X-Spam-Level: X-Msg-File: /tmp/mailfilter-dev@cxf.apache.org.UPwVIZSJQ4 Received: from dilbert.dankulp.com (c-24-91-72-253.hsd1.ma.comcast.net [24.91.72.253]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by server.dankulp.com (Postfix) with ESMTPSA id BEC82182A77 for ; Mon, 21 May 2012 10:41:16 -0400 (EDT) From: Daniel Kulp To: dev@cxf.apache.org Subject: Re: svn commit: r1340905 - in /cxf/trunk/rt/features/clustering: ./ src/main/java/org/apache/cxf/clustering/blueprint/ src/main/resources/META-INF/ src/main/resources/OSGI-INF/ src/main/resources/OSGI-INF/blueprint/ src/main/resources/schemas/ src/main/res... Date: Mon, 21 May 2012 10:41:12 -0400 Message-ID: <1672238.nEBggqZn8p@dilbert.dankulp.com> User-Agent: KMail/4.8.3 (Linux/3.2.2; KDE/4.8.3; x86_64; ; ) In-Reply-To: <20120521070000.DF69C2388A56@eris.apache.org> References: <20120521070000.DF69C2388A56@eris.apache.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No, score=-102.9 required=3.0 tests=ALL_TRUSTED,BAYES_00, SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.3.2 Willem, Can we do this without having separate Blueprint and Spring schemas? Since this is effectively a new schema for both, I'd hate to have 2 schemas when one could do. The configuration/wsrm-manager.xsd did something similar at one point and ended up defining a very small "identifiedType" complexType to stick the attributes that are required instead of pulling them from Spring or Blueprint. Also: the blueprint xsd is invalid. There is a missing closing element and the Apache header is missing. But if you get rid of it... problem solved. :-) Thanks! Dan On Monday, May 21, 2012 07:00:00 AM ningjiang@apache.org wrote: > Author: ningjiang > Date: Mon May 21 06:59:59 2012 > New Revision: 1340905 > > URL: http://svn.apache.org/viewvc?rev=1340905&view=rev > Log: > CXF-4326 CXF-4327 add blueprint support on the cxf clustering > > Added: > > cxf/trunk/rt/features/clustering/src/main/java/org/apache/cxf/clustering/ > blueprint/ > cxf/trunk/rt/features/clustering/src/main/java/org/apache/cxf/clustering/ > blueprint/ClusteringBPNamespaceHandler.java > cxf/trunk/rt/features/clustering/src/main/resources/META-INF/spring.schem > as cxf/trunk/rt/features/clustering/src/main/resources/OSGI-INF/ > cxf/trunk/rt/features/clustering/src/main/resources/OSGI-INF/blueprint/ > cxf/trunk/rt/features/clustering/src/main/resources/OSGI-INF/blueprint/cx > f-clustering.xml > cxf/trunk/rt/features/clustering/src/main/resources/schemas/ > cxf/trunk/rt/features/clustering/src/main/resources/schemas/blueprint/ > cxf/trunk/rt/features/clustering/src/main/resources/schemas/blueprint/clu > stering.xsd > cxf/trunk/rt/features/clustering/src/main/resources/schemas/clustering.xs > d Modified: > cxf/trunk/rt/features/clustering/pom.xml > > Modified: cxf/trunk/rt/features/clustering/pom.xml > URL: > http://svn.apache.org/viewvc/cxf/trunk/rt/features/clustering/pom.xml?rev > =1340905&r1=1340904&r2=1340905&view=diff > ========================================================================= > ===== --- cxf/trunk/rt/features/clustering/pom.xml (original) > +++ cxf/trunk/rt/features/clustering/pom.xml Mon May 21 06:59:59 2012 > @@ -55,6 +55,12 @@ > ${project.version} > > > + org.apache.aries.blueprint > + org.apache.aries.blueprint.core > + provided > + true > + > + > org.springframework > spring-core > provided > > Added: > cxf/trunk/rt/features/clustering/src/main/java/org/apache/cxf/clustering/ > blueprint/ClusteringBPNamespaceHandler.java URL: > http://svn.apache.org/viewvc/cxf/trunk/rt/features/clustering/src/main/ja > va/org/apache/cxf/clustering/blueprint/ClusteringBPNamespaceHandler.java?r > ev=1340905&view=auto > ========================================================================= > ===== --- > cxf/trunk/rt/features/clustering/src/main/java/org/apache/cxf/clustering/ > blueprint/ClusteringBPNamespaceHandler.java (added) +++ > cxf/trunk/rt/features/clustering/src/main/java/org/apache/cxf/clustering/ > blueprint/ClusteringBPNamespaceHandler.java Mon May 21 06:59:59 2012 @@ > -0,0 +1,59 @@ > +/** > + * Licensed to the Apache Software Foundation (ASF) under one > + * or more contributor license agreements. See the NOTICE file > + * distributed with this work for additional information > + * regarding copyright ownership. The ASF licenses this file > + * to you under the Apache License, Version 2.0 (the > + * "License"); you may not use this file except in compliance > + * with the License. You may obtain a copy of the License at > + * > + * http://www.apache.org/licenses/LICENSE-2.0 > + * > + * Unless required by applicable law or agreed to in writing, > + * software distributed under the License is distributed on an > + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY > + * KIND, either express or implied. See the License for the > + * specific language governing permissions and limitations > + * under the License. > + */ > +package org.apache.cxf.clustering.blueprint; > + > +import java.net.URL; > +import java.util.Set; > + > +import org.w3c.dom.Element; > +import org.w3c.dom.Node; > + > +import org.apache.aries.blueprint.NamespaceHandler; > +import org.apache.aries.blueprint.ParserContext; > +import org.apache.cxf.clustering.FailoverFeature; > +import org.apache.cxf.clustering.LoadDistributorTargetSelector; > +import > org.apache.cxf.configuration.blueprint.SimpleBPBeanDefinitionParser; > +import org.osgi.service.blueprint.reflect.ComponentMetadata; > +import org.osgi.service.blueprint.reflect.Metadata; > + > +public class ClusteringBPNamespaceHandler implements NamespaceHandler { > + public ComponentMetadata decorate(Node node, ComponentMetadata > component, ParserContext context) { + return null; > + } > + > + public Metadata parse(Element element, ParserContext context) { > + String s = element.getLocalName(); > + if ("failover".equals(s)) { > + return new > SimpleBPBeanDefinitionParser(FailoverFeature.class).parse(element, > context); + } else if ("loadDistributor".equals(s)) { > + return new > SimpleBPBeanDefinitionParser(LoadDistributorTargetSelector.class).parse(e > lement, context); + } > + return null; > + } > + > + public Set getManagedClasses() { > + //probably should have the various stuff in cxf-api in here? > + return null; > + } > + > + public URL getSchemaLocation(String namespace) { > + return > getClass().getClassLoader().getResource("/schemas/blueprint/clustering.xs > d"); + } > + > +} > > Added: > cxf/trunk/rt/features/clustering/src/main/resources/META-INF/spring.schem > as URL: > http://svn.apache.org/viewvc/cxf/trunk/rt/features/clustering/src/main/re > sources/META-INF/spring.schemas?rev=1340905&view=auto > ========================================================================= > ===== --- > cxf/trunk/rt/features/clustering/src/main/resources/META-INF/spring.schem > as (added) +++ > cxf/trunk/rt/features/clustering/src/main/resources/META-INF/spring.schem > as Mon May 21 06:59:59 2012 @@ -0,0 +1,21 @@ > +# > +# > +# Licensed to the Apache Software Foundation (ASF) under one > +# or more contributor license agreements. See the NOTICE file > +# distributed with this work for additional information > +# regarding copyright ownership. The ASF licenses this file > +# to you under the Apache License, Version 2.0 (the > +# "License"); you may not use this file except in compliance > +# with the License. You may obtain a copy of the License at > +# > +# http://www.apache.org/licenses/LICENSE-2.0 > +# > +# Unless required by applicable law or agreed to in writing, > +# software distributed under the License is distributed on an > +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY > +# KIND, either express or implied. See the License for the > +# specific language governing permissions and limitations > +# under the License. > +# > +# > +http\://cxf.apache.org/schemas/clustering.xsd=schemas/clustering.xsd > \ No newline at end of file > > Added: > cxf/trunk/rt/features/clustering/src/main/resources/OSGI-INF/blueprint/cx > f-clustering.xml URL: > http://svn.apache.org/viewvc/cxf/trunk/rt/features/clustering/src/main/re > sources/OSGI-INF/blueprint/cxf-clustering.xml?rev=1340905&view=auto > ========================================================================= > ===== --- > cxf/trunk/rt/features/clustering/src/main/resources/OSGI-INF/blueprint/cx > f-clustering.xml (added) +++ > cxf/trunk/rt/features/clustering/src/main/resources/OSGI-INF/blueprint/cx > f-clustering.xml Mon May 21 06:59:59 2012 @@ -0,0 +1,31 @@ > + > + > + + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > + > xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0" + > xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 > http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd"> + > + > + > + value="http://cxf.apache.org/blueprint/clustering"/> + > > + class="org.apache.cxf.clustering.blueprint.ClusteringBPNamespaceHandler"/ > > + > + > \ No newline at end of file > > Added: > cxf/trunk/rt/features/clustering/src/main/resources/schemas/blueprint/clu > stering.xsd URL: > http://svn.apache.org/viewvc/cxf/trunk/rt/features/clustering/src/main/re > sources/schemas/blueprint/clustering.xsd?rev=1340905&view=auto > ========================================================================= > ===== --- > cxf/trunk/rt/features/clustering/src/main/resources/schemas/blueprint/clu > stering.xsd (added) +++ > cxf/trunk/rt/features/clustering/src/main/resources/schemas/blueprint/clu > stering.xsd Mon May 21 06:59:59 2012 @@ -0,0 +1,57 @@ > + + xmlns:xsd="http://www.w3.org/2001/XMLSchema" > + xmlns:beans="http://www.osgi.org/xmlns/blueprint/v1.0.0" > + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > + targetNamespace="http://cxf.apache.org/blueprint/clustering" > + elementFormDefault="qualified" > + attributeFormDefault="unqualified" > > + > + schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd" > /> + > + > + > + Configures the failover feature. This element is > associated with the org.apache.cxf.clustering.FailoverFeature > object. + > + > + > + > + > + minOccurs="0"> + > + Configures the strategy that the > failover feature will be used. The Strategy object instance need to be > implemented the > org.apache.cxf.clustering.FailoverStrategy. + > > + > + minOccurs="0"> + > + Configures the the targetSelector > which will be used in the failover feature. + > > + > + > + > + > + > + > + > + Configures the loadDistributor feature. This > element is associated with the org.apache.cxf.clustering.FailoverFeature > object. + > + > + > + > + > + minOccurs="0"> + > + Configures the strategy that the > loadDistributor feature will be used. The Strategy object instance need > to be implemented the > org.apache.cxf.clustering.FailoverStrategy. + > > + > + minOccurs="0"> + > + Configures the the targetSelector > which will be used in the loadDistributor feature. + > > + > + > + > + > + > + > + > + > \ No newline at end of file > > Added: > cxf/trunk/rt/features/clustering/src/main/resources/schemas/clustering.xs > d URL: > http://svn.apache.org/viewvc/cxf/trunk/rt/features/clustering/src/main/re > sources/schemas/clustering.xsd?rev=1340905&view=auto > ========================================================================= > ===== --- > cxf/trunk/rt/features/clustering/src/main/resources/schemas/clustering.xs > d (added) +++ > cxf/trunk/rt/features/clustering/src/main/resources/schemas/clustering.xs > d Mon May 21 06:59:59 2012 @@ -0,0 +1,77 @@ > + > + > + + xmlns:xsd="http://www.w3.org/2001/XMLSchema" > + xmlns:beans="http://www.springframework.org/schema/beans" > + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > + targetNamespace="http://cxf.apache.org/clustering" > + elementFormDefault="qualified" > + attributeFormDefault="unqualified" > > + > + schemaLocation="http://www.springframework.org/schema/beans/spring-beans. > xsd"/> + > + > + > + Configures the failover feature. This element is > associated with the org.apache.cxf.clustering.FailoverFeature > object. + > + > + > + > + > + minOccurs="0"> + > + Configures the strategy that the > failover feature will be used. The Strategy object instance need to be > implemented the > org.apache.cxf.clustering.FailoverStrategy. + > > + > + minOccurs="0"> + > + Configures the targetSelector which > will be used in the failover feature. + > > + > + > + > + > + > + > + > + > + Configures the loadDistributor feature. This > element is associated with the org.apache.cxf.clustering.FailoverFeature > object. + > + > + > + > + > + minOccurs="0"> + > + Configures the strategy that the > loadDistributor feature will be used. The Strategy object instance need > to be implemented the > org.apache.cxf.clustering.FailoverStrategy. + > > + > + minOccurs="0"> + > + Configures the the targetSelector > which will be used in the loadDistributor feature. + > > + > + > + > + > + > + > + > + > \ No newline at end of file -- Daniel Kulp dkulp@apache.org - http://dankulp.com/blog Talend Community Coder - http://coders.talend.com