[jboss-cvs] JBossAS SVN: r109644 - in trunk: webservices/src/main/java/org/jboss/webservices/integration/deployers and 1 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Dec 2 05:52:51 EST 2010
Author: alessio.soldano at jboss.com
Date: 2010-12-02 05:52:51 -0500 (Thu, 02 Dec 2010)
New Revision: 109644
Modified:
trunk/component-matrix/pom.xml
trunk/webservices/src/main/java/org/jboss/webservices/integration/deployers/AbstractDescriptorDeployer.java
trunk/webservices/src/main/java/org/jboss/webservices/integration/deployers/JMSDescriptorDeployer.java
trunk/webservices/src/main/java/org/jboss/webservices/integration/deployers/WSDescriptorDeployer.java
trunk/webservices/src/resources/jbossws-jboss.deployer/META-INF/stack-agnostic-jboss-beans.xml
Log:
[JBWS-3169] Minor changes to AS IL for supporting new jbossws-spi versions + update to jbossws-spi 1.4.1.CR3
Modified: trunk/component-matrix/pom.xml
===================================================================
--- trunk/component-matrix/pom.xml 2010-12-02 10:33:49 UTC (rev 109643)
+++ trunk/component-matrix/pom.xml 2010-12-02 10:52:51 UTC (rev 109644)
@@ -56,7 +56,7 @@
<version.jboss.jbossws-cxf>3.4.0.CR3</version.jboss.jbossws-cxf>
<version.jboss.jbossws-common>1.4.1.CR2</version.jboss.jbossws-common>
<version.jboss.jbossws-framework>3.4.1.CR1</version.jboss.jbossws-framework>
- <version.jboss.jbossws-spi>1.4.1.CR2</version.jboss.jbossws-spi>
+ <version.jboss.jbossws-spi>1.4.1.CR3</version.jboss.jbossws-spi>
<version.jboss.jms-integration-tests>1.0.1.GA</version.jboss.jms-integration-tests>
<version.jboss.jsf-deployer>1.0.3</version.jboss.jsf-deployer>
<version.jboss.web>3.0.0-beta-7</version.jboss.web>
Modified: trunk/webservices/src/main/java/org/jboss/webservices/integration/deployers/AbstractDescriptorDeployer.java
===================================================================
--- trunk/webservices/src/main/java/org/jboss/webservices/integration/deployers/AbstractDescriptorDeployer.java 2010-12-02 10:33:49 UTC (rev 109643)
+++ trunk/webservices/src/main/java/org/jboss/webservices/integration/deployers/AbstractDescriptorDeployer.java 2010-12-02 10:52:51 UTC (rev 109644)
@@ -21,12 +21,15 @@
*/
package org.jboss.webservices.integration.deployers;
-import org.jboss.deployers.vfs.spi.deployer.ObjectModelFactoryDeployer;
+import org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer;
import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
import org.jboss.vfs.VFSInputSource;
import org.jboss.vfs.VirtualFile;
+import org.jboss.wsf.spi.metadata.DescriptorParser;
import org.jboss.wsf.spi.metadata.DescriptorProcessor;
import org.jboss.xb.binding.ObjectModelFactory;
+import org.jboss.xb.binding.Unmarshaller;
+import org.jboss.xb.binding.UnmarshallerFactory;
import org.xml.sax.InputSource;
/**
@@ -34,25 +37,32 @@
*
* @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
*/
-abstract class AbstractDescriptorDeployer<P extends DescriptorProcessor<T>, T> extends ObjectModelFactoryDeployer<T>
+abstract class AbstractDescriptorDeployer<P extends DescriptorProcessor<T>, Q extends DescriptorParser<T>, T> extends AbstractVFSParsingDeployer<T>
{
private P ddProcessor;
+ private Q ddParser;
AbstractDescriptorDeployer(Class<T> output)
{
super(output);
this.setName("UNSPECIFIED");
- this.setUseSchemaValidation(false);
}
+ @SuppressWarnings({"deprecation", "unchecked"})
@Override
protected T parse(final VFSDeploymentUnit unit, final VirtualFile file, final T root) throws Exception
{
- if (this.ddProcessor != null)
+ if (this.ddParser != null) //default to using new parsers if available
{
+ return this.ddParser.parse(file.toURL());
+ }
+ else if (this.ddProcessor != null)
+ {
InputSource source = new VFSInputSource(file);
+ Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
+ unmarshaller.setValidation(this.ddProcessor.isValidating());
ObjectModelFactory factory = this.ddProcessor.getFactory(file.toURL());
- return getHelper().parse(source, root, factory);
+ return (T)unmarshaller.unmarshal(source, factory, root);
}
return null;
@@ -61,6 +71,7 @@
/**
* MC incallback method. It will be invoked each time subclass specific DescriptorProcessor bean will be installed.
*/
+ @Deprecated
protected void setProcessor(final P ddProcessor)
{
if (this.ddProcessor != null)
@@ -68,12 +79,18 @@
this.ddProcessor = ddProcessor;
this.setName(this.ddProcessor.getDescriptorName());
- this.setUseSchemaValidation(this.ddProcessor.isValidating());
}
+
+ /**
+ * MC incallback method. It will be invoked each time subclass specific DescriptorParser bean will be installed.
+ */
+ protected void setParser(final Q ddParser)
+ {
+ if (this.ddParser != null)
+ throw new IllegalStateException("Only one " + this.ddParser.getClass() + " instance can be installed in MC");
- @Override
- protected ObjectModelFactory getObjectModelFactory(final T root)
- {
- throw new UnsupportedOperationException();
+ this.ddParser = ddParser;
+ this.setName(this.ddParser.getDescriptorName());
}
+
}
Modified: trunk/webservices/src/main/java/org/jboss/webservices/integration/deployers/JMSDescriptorDeployer.java
===================================================================
--- trunk/webservices/src/main/java/org/jboss/webservices/integration/deployers/JMSDescriptorDeployer.java 2010-12-02 10:33:49 UTC (rev 109643)
+++ trunk/webservices/src/main/java/org/jboss/webservices/integration/deployers/JMSDescriptorDeployer.java 2010-12-02 10:52:51 UTC (rev 109644)
@@ -21,6 +21,7 @@
*/
package org.jboss.webservices.integration.deployers;
+import org.jboss.wsf.spi.metadata.jms.JMSDescriptorParser;
import org.jboss.wsf.spi.metadata.jms.JMSDescriptorProcessor;
import org.jboss.wsf.spi.metadata.jms.JMSEndpointsMetaData;
@@ -29,7 +30,7 @@
*
* @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
*/
-public final class JMSDescriptorDeployer extends AbstractDescriptorDeployer<JMSDescriptorProcessor, JMSEndpointsMetaData>
+public final class JMSDescriptorDeployer extends AbstractDescriptorDeployer<JMSDescriptorProcessor, JMSDescriptorParser, JMSEndpointsMetaData>
{
/**
* Constructor.
@@ -44,8 +45,19 @@
* @param processor the processor
*/
@Override
+ @Deprecated
public void setProcessor(final JMSDescriptorProcessor processor)
{
super.setProcessor(processor);
}
+
+ /**
+ * MC incallback method. It will be invoked each time JMSDescriptorParser bean will be installed.
+ * @param parser the parser
+ */
+ @Override
+ public void setParser(final JMSDescriptorParser parser)
+ {
+ super.setParser(parser);
+ }
}
Modified: trunk/webservices/src/main/java/org/jboss/webservices/integration/deployers/WSDescriptorDeployer.java
===================================================================
--- trunk/webservices/src/main/java/org/jboss/webservices/integration/deployers/WSDescriptorDeployer.java 2010-12-02 10:33:49 UTC (rev 109643)
+++ trunk/webservices/src/main/java/org/jboss/webservices/integration/deployers/WSDescriptorDeployer.java 2010-12-02 10:52:51 UTC (rev 109644)
@@ -21,6 +21,7 @@
*/
package org.jboss.webservices.integration.deployers;
+import org.jboss.wsf.spi.metadata.webservices.WebservicesDescriptorParser;
import org.jboss.wsf.spi.metadata.webservices.WebservicesDescriptorProcessor;
import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData;
@@ -29,7 +30,7 @@
*
* @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
*/
-public final class WSDescriptorDeployer extends AbstractDescriptorDeployer<WebservicesDescriptorProcessor, WebservicesMetaData>
+public final class WSDescriptorDeployer extends AbstractDescriptorDeployer<WebservicesDescriptorProcessor, WebservicesDescriptorParser, WebservicesMetaData>
{
/**
* Constructor.
@@ -44,8 +45,19 @@
* @param processor the processor
*/
@Override
+ @Deprecated
public void setProcessor(final WebservicesDescriptorProcessor processor)
{
super.setProcessor(processor);
}
+
+ /**
+ * MC incallback method. It will be invoked each time WebservicesDescriptorParser bean will be installed.
+ * @param parser the parser
+ */
+ @Override
+ public void setParser(final WebservicesDescriptorParser parser)
+ {
+ super.setParser(parser);
+ }
}
Modified: trunk/webservices/src/resources/jbossws-jboss.deployer/META-INF/stack-agnostic-jboss-beans.xml
===================================================================
--- trunk/webservices/src/resources/jbossws-jboss.deployer/META-INF/stack-agnostic-jboss-beans.xml 2010-12-02 10:33:49 UTC (rev 109643)
+++ trunk/webservices/src/resources/jbossws-jboss.deployer/META-INF/stack-agnostic-jboss-beans.xml 2010-12-02 10:52:51 UTC (rev 109644)
@@ -62,10 +62,12 @@
<!-- deployers -->
<bean name="WSDescriptorDeployer" class="org.jboss.webservices.integration.deployers.WSDescriptorDeployer">
<incallback method="setProcessor"/>
+ <incallback method="setParser"/>
</bean>
<bean name="JMSDescriptorDeployer" class="org.jboss.webservices.integration.deployers.JMSDescriptorDeployer">
<incallback method="setProcessor"/>
+ <incallback method="setParser"/>
</bean>
<bean name="WSEJBAdapterDeployer" class="org.jboss.webservices.integration.deployers.WSEJBAdapterDeployer"/>
More information about the jboss-cvs-commits
mailing list