From jbossws-commits at lists.jboss.org Thu Dec 2 06:08:30 2010 Content-Type: multipart/mixed; boundary="===============1263435136663599398==" MIME-Version: 1.0 From: jbossws-commits at lists.jboss.org To: jbossws-commits at lists.jboss.org Subject: [jbossws-commits] JBossWS SVN: r13378 - in stack/cxf/trunk/modules/server/src/main: resources and 1 other directory. Date: Thu, 02 Dec 2010 06:08:30 -0500 Message-ID: <201012021108.oB2B8UVo000946@svn01.web.mwc.hst.phx2.redhat.com> --===============1263435136663599398== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: alessio.soldano(a)jboss.com Date: 2010-12-02 06:08:29 -0500 (Thu, 02 Dec 2010) New Revision: 13378 Added: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/dep= loyment/jms/JMSDescriptorParserImpl.java Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/dep= loyment/jms/JMSDescriptorProcessorImpl.java stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/dep= loyment/jms/JMSEndpointsFactory.java stack/cxf/trunk/modules/server/src/main/resources/jbossws-cxf-config-as6= .xml Log: [JBWS-3169] Adding stax based jms descriptor parser, updating JMSEndpointFa= ctory accordingly, temporarly adding the DescriptorParser declarations to s= tack-specific beans xml to avoid creating a AS IL project just for this (gi= ven AS7 will be the only supported target container of JBWS 4) Added: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf= /deployment/jms/JMSDescriptorParserImpl.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/de= ployment/jms/JMSDescriptorParserImpl.java (rev 0) +++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/de= ployment/jms/JMSDescriptorParserImpl.java 2010-12-02 11:08:29 UTC (rev 1337= 8) @@ -0,0 +1,58 @@ +/* + * JBoss, Home of Professional Open Source. + * Copyright 2010, Red Hat Middleware LLC, and individual contributors + * as indicated by the @author tags. See the copyright.txt file in the + * distribution for a full listing of individual contributors. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ +package org.jboss.wsf.stack.cxf.deployment.jms; + +import java.net.URL; + +import org.jboss.wsf.spi.metadata.jms.JMSDescriptorParser; +import org.jboss.wsf.spi.metadata.jms.JMSEndpointsMetaData; + +/** + * JMS descriptor processor implementation. + * = + * @author Richard Opalka + */ +public final class JMSDescriptorParserImpl implements JMSDescriptorParser +{ + private String descriptorName; + = + @Override + public String getDescriptorName() + { + return this.descriptorName; + } + + /** + * Invoked via MC. + * @param descriptorName + */ + public void setDescriptorName(final String descriptorName) + { + this.descriptorName =3D descriptorName; + } + + @Override + public JMSEndpointsMetaData parse(URL url) + { + return JMSEndpointsFactory.load(url); + } +} Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/= cxf/deployment/jms/JMSDescriptorProcessorImpl.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/de= ployment/jms/JMSDescriptorProcessorImpl.java 2010-12-02 10:46:43 UTC (rev 1= 3377) +++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/de= ployment/jms/JMSDescriptorProcessorImpl.java 2010-12-02 11:08:29 UTC (rev 1= 3378) @@ -31,6 +31,7 @@ * = * @author Richard Opalka */ +(a)Deprecated public final class JMSDescriptorProcessorImpl implements JMSDescriptorProc= essor { private String descriptorName; @@ -57,7 +58,6 @@ /* (non-Javadoc) * @see org.jboss.wsf.spi.metadata.DescriptorProcessor#getFactory(java.= net.URL) */ - @Override public ObjectModelFactory getFactory(final URL url) { if (url =3D=3D null) Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/= cxf/deployment/jms/JMSEndpointsFactory.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/de= ployment/jms/JMSEndpointsFactory.java 2010-12-02 10:46:43 UTC (rev 13377) +++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/de= ployment/jms/JMSEndpointsFactory.java 2010-12-02 11:08:29 UTC (rev 13378) @@ -21,11 +21,16 @@ */ package org.jboss.wsf.stack.cxf.deployment.jms; = +import java.io.InputStream; import java.net.URL; = +import javax.xml.ws.WebServiceException; + import org.jboss.wsf.spi.metadata.jms.JMSEndpointMetaData; import org.jboss.wsf.spi.metadata.jms.JMSEndpointsMetaData; import org.jboss.xb.binding.ObjectModelFactory; +import org.jboss.xb.binding.Unmarshaller; +import org.jboss.xb.binding.UnmarshallerFactory; import org.jboss.xb.binding.UnmarshallingContext; import org.xml.sax.Attributes; = @@ -42,6 +47,35 @@ { this.descriptorURL =3D descriptorURL; } + = + public static JMSEndpointsMetaData load(URL url) + { + InputStream is =3D null; + try + { + is =3D url.openStream(); + Unmarshaller unmarshaller =3D UnmarshallerFactory.newInstance().n= ewUnmarshaller(); + ObjectModelFactory factory =3D new JMSEndpointsFactory(url); + return (JMSEndpointsMetaData) unmarshaller.unmarshal(is, factory,= null); + } + catch (Exception e) + { + throw new WebServiceException(e); + } + finally + { + if (is !=3D null) + { + try + { + is.close(); + } + catch (Exception e) + { + } //ignore + } + } + } = /** * This method is called on the factory by the object model builder whe= n the parsing starts. Modified: stack/cxf/trunk/modules/server/src/main/resources/jbossws-cxf-con= fig-as6.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- stack/cxf/trunk/modules/server/src/main/resources/jbossws-cxf-config-as= 6.xml 2010-12-02 10:46:43 UTC (rev 13377) +++ stack/cxf/trunk/modules/server/src/main/resources/jbossws-cxf-config-as= 6.xml 2010-12-02 11:08:29 UTC (rev 13378) @@ -19,11 +19,15 @@ = - - false + + + webservices.xml + + = + jbossws-cxf.xml - + = false --===============1263435136663599398==--