JBossWS SVN: r10537 - in container/jboss50/branches/ropalka-jboss510: src/main/java/org/jboss/webservices/integration/deployers and 4 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2009-08-14 05:10:07 -0400 (Fri, 14 Aug 2009)
New Revision: 10537
Added:
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/deployment/
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/deployment/AbstractDeploymentModelBuilder.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilder.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/deployment/JaxrpcEjbDeploymentModelBuilder.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/deployment/JaxrpcJseDeploymentModelBuilder.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/deployment/JaxwsEjbDeploymentModelBuilder.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/deployment/JaxwsJseDeploymentModelBuilder.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/deployment/WSDeploymentBuilder.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/deployment/WSVirtualFileFilter.java
Removed:
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentBuilder.java
Modified:
container/jboss50/branches/ropalka-jboss510/.checkstyle
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentDeployer.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerEJB3.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/AbstractMetaDataBuilderEJB.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/ContainerMetaDataDeploymentAspect.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB21.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB3.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderJSE.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/util/ASHelper.java
Log:
[JBWS-2320] final refactoring
Modified: container/jboss50/branches/ropalka-jboss510/.checkstyle
===================================================================
--- container/jboss50/branches/ropalka-jboss510/.checkstyle 2009-08-14 07:48:47 UTC (rev 10536)
+++ container/jboss50/branches/ropalka-jboss510/.checkstyle 2009-08-14 09:10:07 UTC (rev 10537)
@@ -1,10 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
-
<fileset-config file-format-version="1.2.0" simple-config="true">
- <local-check-config name="JBossWS" location="eclipse/JBossWSCheckStyle.xml" type="project" description="">
- <additional-data name="protect-config-file" value="false"/>
- </local-check-config>
- <fileset name="all" enabled="true" check-config-name="JBossWS" local="true">
- <file-match-pattern match-pattern="." include-pattern="true"/>
- </fileset>
+ <local-check-config name="JBossWS" location="eclipse/JBossWSCheckStyle.xml" type="project" description="">
+ <additional-data name="protect-config-file" value="false"/>
+ </local-check-config>
+ <fileset name="all" enabled="true" check-config-name="JBossWS" local="true">
+ <file-match-pattern match-pattern="." include-pattern="true"/>
+ </fileset>
</fileset-config>
Deleted: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentBuilder.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentBuilder.java 2009-08-14 07:48:47 UTC (rev 10536)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentBuilder.java 2009-08-14 09:10:07 UTC (rev 10537)
@@ -1,530 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2009, 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.webservices.integration.deployers;
-
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
-import org.jboss.metadata.ejb.jboss.JBossEnterpriseBeanMetaData;
-import org.jboss.metadata.ejb.jboss.JBossMetaData;
-import org.jboss.metadata.serviceref.VirtualFileAdaptor;
-import org.jboss.metadata.web.jboss.JBossWebMetaData;
-import org.jboss.metadata.web.spec.ServletMetaData;
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.VirtualFileFilterWithAttributes;
-import org.jboss.virtual.VisitorAttributes;
-import org.jboss.webservices.integration.util.ASHelper;
-import org.jboss.wsf.common.integration.WSConstants;
-import org.jboss.wsf.spi.SPIProvider;
-import org.jboss.wsf.spi.SPIProviderResolver;
-import org.jboss.wsf.spi.deployment.ArchiveDeployment;
-import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
-import org.jboss.wsf.spi.deployment.DeploymentModelFactory;
-import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
-import org.jboss.wsf.spi.deployment.WSFDeploymentException;
-import org.jboss.wsf.spi.deployment.integration.WebServiceDeclaration;
-import org.jboss.wsf.spi.deployment.integration.WebServiceDeployment;
-import org.jboss.wsf.spi.metadata.webservices.PortComponentMetaData;
-import org.jboss.wsf.spi.metadata.webservices.WebserviceDescriptionMetaData;
-import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData;
-
-/**
- * JBossWS deployment model builder.
- *
- * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
- */
-final class WSDeploymentBuilder
-{
-
- /** Builder instance. */
- private static final WSDeploymentBuilder SINGLETON = new WSDeploymentBuilder();
-
- /** WSDL, XSD and XML files filter. */
- private static final WSVirtualFileFilter WS_FILE_FILTER = new WSVirtualFileFilter();
-
- /** Builders registry. */
- private static Map<DeploymentType, DeploymentModelBuilder> builders;
-
- static
- {
- WSDeploymentBuilder.builders = new HashMap<DeploymentType, DeploymentModelBuilder>();
- WSDeploymentBuilder.builders.put(DeploymentType.JAXWS_JSE, new JaxwsJseDeploymentModelBuilder());
- WSDeploymentBuilder.builders.put(DeploymentType.JAXRPC_JSE, new JaxrpcJseDeploymentModelBuilder());
- WSDeploymentBuilder.builders.put(DeploymentType.JAXWS_EJB3, new JaxwsEjbDeploymentModelBuilder());
- WSDeploymentBuilder.builders.put(DeploymentType.JAXRPC_EJB21, new JaxrpcEjbDeploymentModelBuilder());
- }
-
- /**
- * Constructor.
- */
- private WSDeploymentBuilder()
- {
- super();
- }
-
- /**
- * Factory method for obtaining builder instance.
- *
- * @return builder instance
- */
- static WSDeploymentBuilder getInstance()
- {
- return WSDeploymentBuilder.SINGLETON;
- }
-
- /**
- * Builds JBossWS deployment model if web service deployment is detected.
- *
- * @param unit deployment unit
- */
- void build(final DeploymentUnit unit)
- {
- final DeploymentType deploymentType = ASHelper.getOptionalAttachment(unit, DeploymentType.class);
-
- if (deploymentType != null)
- {
- WSDeploymentBuilder.builders.get(deploymentType).newDeploymentModel(unit);
- }
- }
-
- /**
- * Deployment builder interface.
- *
- * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
- */
- private static interface DeploymentModelBuilder
- {
-
- /**
- * Creates Web Service deployment model and associates it with deployment.
- *
- * @param unit deployment unit
- */
- void newDeploymentModel(DeploymentUnit unit);
-
- }
-
- /**
- * Base class for all deployment model builders.
- *
- * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
- */
- private abstract static class AbstractDeploymentModelBuilder implements WSDeploymentBuilder.DeploymentModelBuilder
- {
-
- /** Deployment model factory. */
- private final DeploymentModelFactory deploymentModelFactory;
-
- /**
- * Constructor.
- */
- protected AbstractDeploymentModelBuilder()
- {
- super();
-
- // deployment factory
- final SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- this.deploymentModelFactory = spiProvider.getSPI(DeploymentModelFactory.class);
- }
-
- /**
- * @see org.jboss.webservices.integration.deployers.WSDeploymentBuilder.DeploymentModelBuilder#newDeploymentModel(DeploymentUnit)
- *
- * @param unit deployment unit
- */
- public final void newDeploymentModel(final DeploymentUnit unit)
- {
- final ArchiveDeployment dep = this.newDeployment(unit);
-
- this.build(dep, unit);
-
- dep.addAttachment(DeploymentUnit.class, unit);
- unit.addAttachment(Deployment.class, dep);
- }
-
- /**
- * Template method for subclasses to implement.
- *
- * @param dep webservice deployment
- * @param unit deployment unit
- */
- protected abstract void build(Deployment dep, DeploymentUnit unit);
-
- /**
- * Creates new Web Service endpoint.
- *
- * @param endpointClass endpoint class name
- * @param endpointName endpoint name
- * @param dep deployment
- * @return WS endpoint
- */
- protected final Endpoint newEndpoint(final String endpointClass, final String endpointName, final Deployment dep)
- {
- if (endpointName == null)
- {
- throw new NullPointerException("Null endpoint name");
- }
-
- if (endpointClass == null)
- {
- throw new NullPointerException("Null endpoint class");
- }
-
- final Endpoint endpoint = this.deploymentModelFactory.newEndpoint(endpointClass);
- endpoint.setShortName(endpointName);
- dep.getService().addEndpoint(endpoint);
-
- return endpoint;
- }
-
- /**
- * Creates new Web Service deployment.
- *
- * @param unit deployment unit
- * @return archive deployment
- */
- private ArchiveDeployment newDeployment(final DeploymentUnit unit)
- {
- final ArchiveDeployment dep = this.newDeployment(unit.getSimpleName(), unit.getClassLoader());
-
- if (unit instanceof VFSDeploymentUnit)
- {
- final VFSDeploymentUnit vfsUnit = (VFSDeploymentUnit) unit;
- final List<VirtualFile> virtualFiles = vfsUnit.getMetaDataFiles(WSDeploymentBuilder.WS_FILE_FILTER);
- final Set<UnifiedVirtualFile> uVirtualFiles = new HashSet<UnifiedVirtualFile>();
- for (VirtualFile vf : virtualFiles)
- {
- // Adding the roots of the virtual files.
- try
- {
- uVirtualFiles.add(new VirtualFileAdaptor(vf.getVFS().getRoot()));
- }
- catch (IOException ioe)
- {
- throw new WSFDeploymentException(ioe);
- }
- }
- dep.setMetadataFiles(new LinkedList<UnifiedVirtualFile>(uVirtualFiles));
- }
-
- if (unit.getParent() != null)
- {
- final String parentDeploymentName = unit.getParent().getSimpleName();
- final ClassLoader parentClassLoader = unit.getParent().getClassLoader();
-
- final ArchiveDeployment parentDep = this.newDeployment(parentDeploymentName, parentClassLoader);
- dep.setParent(parentDep);
- }
-
- dep.setRootFile(new VirtualFileAdaptor(((VFSDeploymentUnit) unit).getRoot()));
- dep.setRuntimeClassLoader(unit.getClassLoader());
- final DeploymentType deploymentType = ASHelper.getRequiredAttachment(unit, DeploymentType.class);
- dep.setType(deploymentType);
-
- return dep;
- }
-
- /**
- * Creates new archive deployment.
- *
- * @param name deployment name
- * @param loader deployment loader
- * @return new archive deployment
- */
- private ArchiveDeployment newDeployment(final String name, final ClassLoader loader)
- {
- return (ArchiveDeployment) this.deploymentModelFactory.newDeployment(name, loader);
- }
-
- /**
- * Gets specified attachment from deployment unit.
- * Checks it's not null and then propagates it to <b>dep</b>
- * attachments. Finally it returns attachment value.
- *
- * @param <A> class type
- * @param attachment attachment
- * @param unit deployment unit
- * @param dep deployment
- * @return attachment value if found in unit
- */
- protected final <A> A getAndPropagateAttachment(final Class<A> attachment, final DeploymentUnit unit,
- final Deployment dep)
- {
- final A attachmentValue = ASHelper.getOptionalAttachment(unit, attachment);
-
- if (attachmentValue != null)
- {
- dep.addAttachment(attachment, attachmentValue);
- return attachmentValue;
- }
-
- throw new IllegalStateException("Deployment unit does not contain " + attachment);
- }
-
- }
-
- /**
- * Creates new JAXWS JSE deployment.
- *
- * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
- */
- private static final class JaxwsJseDeploymentModelBuilder extends WSDeploymentBuilder.AbstractDeploymentModelBuilder
- {
-
- /**
- * Constructor.
- */
- private JaxwsJseDeploymentModelBuilder()
- {
- super();
- }
-
- /**
- * Creates new JAXWS JSE deployment and registers it with deployment unit.
- *
- * @param dep webservice deployment
- * @param unit deployment unit
- */
- @Override
- public void build(final Deployment dep, final DeploymentUnit unit)
- {
- this.getAndPropagateAttachment(JBossWebMetaData.class, unit, dep);
-
- final List<ServletMetaData> servlets = ASHelper.getJaxwsServlets(unit);
- for (ServletMetaData servlet : servlets)
- {
- final String servletName = servlet.getName();
- final String servletClass = ASHelper.getEndpointName(servlet);
-
- this.newEndpoint(servletClass, servletName, dep);
- }
- }
-
- }
-
- /**
- * Creates new JAXRPC JSE deployment.
- *
- * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
- */
- private static final class JaxrpcJseDeploymentModelBuilder
- extends
- WSDeploymentBuilder.AbstractDeploymentModelBuilder
- {
-
- /**
- * Constructor.
- */
- private JaxrpcJseDeploymentModelBuilder()
- {
- super();
- }
-
- /**
- * Creates new JAXRPC JSE deployment and registers it with deployment unit.
- *
- * @param dep webservice deployment
- * @param unit deployment unit
- */
- @Override
- public void build(final Deployment dep, final DeploymentUnit unit)
- {
- final JBossWebMetaData webMetaData = this.getAndPropagateAttachment(JBossWebMetaData.class, unit, dep);
- final WebservicesMetaData wsMetaData = this.getAndPropagateAttachment(WebservicesMetaData.class, unit, dep);
-
- for (WebserviceDescriptionMetaData wsd : wsMetaData.getWebserviceDescriptions())
- {
- for (PortComponentMetaData pcmd : wsd.getPortComponents())
- {
- final String servletName = pcmd.getServletLink();
- final ServletMetaData servletMD = ASHelper.getServletForName(webMetaData, servletName);
- final String servletClass = ASHelper.getEndpointName(servletMD);
-
- this.newEndpoint(servletClass, servletName, dep);
- }
- }
- }
-
- }
-
- /**
- * Creates new JAXWS EJB3 deployment.
- *
- * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
- */
- private static final class JaxwsEjbDeploymentModelBuilder extends WSDeploymentBuilder.AbstractDeploymentModelBuilder
- {
-
- /**
- * Constructor.
- */
- private JaxwsEjbDeploymentModelBuilder()
- {
- super();
- }
-
- /**
- * Creates new JAXWS EJB3 deployment and registers it with deployment unit.
- *
- * @param dep webservice deployment
- * @param unit deployment unit
- */
- @Override
- public void build(final Deployment dep, final DeploymentUnit unit)
- {
- this.getAndPropagateAttachment(WebServiceDeployment.class, unit, dep);
- this.getAndPropagateAttachment(JBossMetaData.class, unit, dep);
-
- final Iterator<WebServiceDeclaration> ejbIterator = ASHelper.getJaxwsEjbs(unit).iterator();
- while (ejbIterator.hasNext())
- {
- final WebServiceDeclaration container = ejbIterator.next();
- final String ejbName = container.getComponentName();
- final String ejbClass = container.getComponentClassName();
-
- final Endpoint ep = this.newEndpoint(ejbClass, ejbName, dep);
- ep.setProperty(WSConstants.CONTAINER_NAME, container.getContainerName());
- }
- }
-
- }
-
- /**
- * Creates new JAXRPC EJB21 deployment.
- *
- * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
- */
- private static final class JaxrpcEjbDeploymentModelBuilder
- extends
- WSDeploymentBuilder.AbstractDeploymentModelBuilder
- {
-
- /**
- * Constructor.
- */
- private JaxrpcEjbDeploymentModelBuilder()
- {
- super();
- }
-
- /**
- * Creates new JAXRPC EJB21 deployment and registers it with deployment unit.
- *
- * @param dep webservice deployment
- * @param unit deployment unit
- */
- @Override
- public void build(final Deployment dep, final DeploymentUnit unit)
- {
- final JBossMetaData jbmd = this.getAndPropagateAttachment(JBossMetaData.class, unit, dep);
- final WebservicesMetaData wsMetaData = this.getAndPropagateAttachment(WebservicesMetaData.class, unit, dep);
- this.getAndPropagateAttachment(WebServiceDeployment.class, unit, dep);
-
- for (WebserviceDescriptionMetaData wsd : wsMetaData.getWebserviceDescriptions())
- {
- for (PortComponentMetaData pcmd : wsd.getPortComponents())
- {
- final String ejbName = pcmd.getEjbLink();
- final JBossEnterpriseBeanMetaData beanMetaData = jbmd.getEnterpriseBean(ejbName);
- final String ejbClass = beanMetaData.getEjbClass();
-
- this.newEndpoint(ejbClass, ejbName, dep);
- }
- }
- }
-
- }
-
- /**
- * WS file filter for files with the '.wsdl', or '.xsd' or '.xml' suffix.
- *
- * @author <a href="mailto:dbevenius@jboss.com">Daniel Bevenius</a>
- * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
- */
- private static final class WSVirtualFileFilter implements VirtualFileFilterWithAttributes
- {
-
- /** The tree walking attributes. */
- private VisitorAttributes attributes;
-
- /**
- * Constructor.
- */
- public WSVirtualFileFilter()
- {
- this(VisitorAttributes.RECURSE_LEAVES_ONLY);
- }
-
- /**
- * Constructor.
- *
- * @param attributes visit attributes
- */
- public WSVirtualFileFilter(final VisitorAttributes attributes)
- {
- this.attributes = attributes;
- }
-
- /**
- * Gets VisitorAttributes for this instance.
- *
- * @return visitor attributes
- */
- public VisitorAttributes getAttributes()
- {
- return this.attributes;
- }
-
- /**
- * Accepts files that end with '.wsdl' or '.xsd' or '.xml'.
- *
- * @param file to analyze
- * @return true if expected file extension, false otherwise
- */
- public boolean accepts(final VirtualFile file)
- {
- if (file == null)
- {
- return false;
- }
-
- final String fileName = file.getName().toLowerCase();
- final boolean hasWsdlSuffix = fileName.endsWith(".wsdl");
- final boolean hasXsdSuffix = fileName.endsWith(".xsd");
- final boolean hasXmlSuffix = fileName.endsWith(".xml");
-
- return hasWsdlSuffix || hasXsdSuffix || hasXmlSuffix;
- }
-
- }
-
-}
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentDeployer.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentDeployer.java 2009-08-14 07:48:47 UTC (rev 10536)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentDeployer.java 2009-08-14 09:10:07 UTC (rev 10537)
@@ -25,6 +25,7 @@
import org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer;
import org.jboss.deployers.structure.spi.DeploymentUnit;
import org.jboss.metadata.web.jboss.JBossWebMetaData;
+import org.jboss.webservices.integration.deployers.deployment.WSDeploymentBuilder;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
Added: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/deployment/AbstractDeploymentModelBuilder.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/deployment/AbstractDeploymentModelBuilder.java (rev 0)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/deployment/AbstractDeploymentModelBuilder.java 2009-08-14 09:10:07 UTC (rev 10537)
@@ -0,0 +1,184 @@
+package org.jboss.webservices.integration.deployers.deployment;
+
+import java.io.IOException;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Set;
+
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
+import org.jboss.metadata.serviceref.VirtualFileAdaptor;
+import org.jboss.virtual.VirtualFile;
+import org.jboss.webservices.integration.util.ASHelper;
+import org.jboss.wsf.spi.SPIProvider;
+import org.jboss.wsf.spi.SPIProviderResolver;
+import org.jboss.wsf.spi.deployment.ArchiveDeployment;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
+import org.jboss.wsf.spi.deployment.DeploymentModelFactory;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
+import org.jboss.wsf.spi.deployment.WSFDeploymentException;
+
+/**
+ * Base class for all deployment model builders.
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+abstract class AbstractDeploymentModelBuilder implements DeploymentModelBuilder
+{
+
+ /** WSDL, XSD and XML files filter. */
+ private static final WSVirtualFileFilter WS_FILE_FILTER = new WSVirtualFileFilter();
+
+ /** Deployment model factory. */
+ private final DeploymentModelFactory deploymentModelFactory;
+
+ /**
+ * Constructor.
+ */
+ protected AbstractDeploymentModelBuilder()
+ {
+ super();
+
+ // deployment factory
+ final SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
+ this.deploymentModelFactory = spiProvider.getSPI(DeploymentModelFactory.class);
+ }
+
+ /**
+ * @see org.jboss.webservices.integration.deployers.deployment.DeploymentModelBuilder#newDeploymentModel(DeploymentUnit)
+ *
+ * @param unit deployment unit
+ */
+ public final void newDeploymentModel(final DeploymentUnit unit)
+ {
+ final ArchiveDeployment dep = this.newDeployment(unit);
+
+ this.build(dep, unit);
+
+ dep.addAttachment(DeploymentUnit.class, unit);
+ unit.addAttachment(Deployment.class, dep);
+ }
+
+ /**
+ * Template method for subclasses to implement.
+ *
+ * @param dep webservice deployment
+ * @param unit deployment unit
+ */
+ protected abstract void build(Deployment dep, DeploymentUnit unit);
+
+ /**
+ * Creates new Web Service endpoint.
+ *
+ * @param endpointClass endpoint class name
+ * @param endpointName endpoint name
+ * @param dep deployment
+ * @return WS endpoint
+ */
+ protected final Endpoint newEndpoint(final String endpointClass, final String endpointName, final Deployment dep)
+ {
+ if (endpointName == null)
+ {
+ throw new NullPointerException("Null endpoint name");
+ }
+
+ if (endpointClass == null)
+ {
+ throw new NullPointerException("Null endpoint class");
+ }
+
+ final Endpoint endpoint = this.deploymentModelFactory.newEndpoint(endpointClass);
+ endpoint.setShortName(endpointName);
+ dep.getService().addEndpoint(endpoint);
+
+ return endpoint;
+ }
+
+ /**
+ * Creates new Web Service deployment.
+ *
+ * @param unit deployment unit
+ * @return archive deployment
+ */
+ private ArchiveDeployment newDeployment(final DeploymentUnit unit)
+ {
+ final ArchiveDeployment dep = this.newDeployment(unit.getSimpleName(), unit.getClassLoader());
+
+ if (unit instanceof VFSDeploymentUnit)
+ {
+ final VFSDeploymentUnit vfsUnit = (VFSDeploymentUnit) unit;
+ final List<VirtualFile> virtualFiles = vfsUnit.getMetaDataFiles(AbstractDeploymentModelBuilder.WS_FILE_FILTER);
+ final Set<UnifiedVirtualFile> uVirtualFiles = new HashSet<UnifiedVirtualFile>();
+ for (VirtualFile vf : virtualFiles)
+ {
+ // Adding the roots of the virtual files.
+ try
+ {
+ uVirtualFiles.add(new VirtualFileAdaptor(vf.getVFS().getRoot()));
+ }
+ catch (IOException ioe)
+ {
+ throw new WSFDeploymentException(ioe);
+ }
+ }
+ dep.setMetadataFiles(new LinkedList<UnifiedVirtualFile>(uVirtualFiles));
+ }
+
+ if (unit.getParent() != null)
+ {
+ final String parentDeploymentName = unit.getParent().getSimpleName();
+ final ClassLoader parentClassLoader = unit.getParent().getClassLoader();
+
+ final ArchiveDeployment parentDep = this.newDeployment(parentDeploymentName, parentClassLoader);
+ dep.setParent(parentDep);
+ }
+
+ dep.setRootFile(new VirtualFileAdaptor(((VFSDeploymentUnit) unit).getRoot()));
+ dep.setRuntimeClassLoader(unit.getClassLoader());
+ final DeploymentType deploymentType = ASHelper.getRequiredAttachment(unit, DeploymentType.class);
+ dep.setType(deploymentType);
+
+ return dep;
+ }
+
+ /**
+ * Creates new archive deployment.
+ *
+ * @param name deployment name
+ * @param loader deployment loader
+ * @return new archive deployment
+ */
+ private ArchiveDeployment newDeployment(final String name, final ClassLoader loader)
+ {
+ return (ArchiveDeployment) this.deploymentModelFactory.newDeployment(name, loader);
+ }
+
+ /**
+ * Gets specified attachment from deployment unit.
+ * Checks it's not null and then propagates it to <b>dep</b>
+ * attachments. Finally it returns attachment value.
+ *
+ * @param <A> class type
+ * @param attachment attachment
+ * @param unit deployment unit
+ * @param dep deployment
+ * @return attachment value if found in unit
+ */
+ protected final <A> A getAndPropagateAttachment(final Class<A> attachment, final DeploymentUnit unit,
+ final Deployment dep)
+ {
+ final A attachmentValue = ASHelper.getOptionalAttachment(unit, attachment);
+
+ if (attachmentValue != null)
+ {
+ dep.addAttachment(attachment, attachmentValue);
+ return attachmentValue;
+ }
+
+ throw new IllegalStateException("Deployment unit does not contain " + attachment);
+ }
+
+}
Added: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilder.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilder.java (rev 0)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilder.java 2009-08-14 09:10:07 UTC (rev 10537)
@@ -0,0 +1,20 @@
+package org.jboss.webservices.integration.deployers.deployment;
+
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+
+/**
+ * Deployment builder interface.
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+interface DeploymentModelBuilder
+{
+
+ /**
+ * Creates Web Service deployment model and associates it with deployment.
+ *
+ * @param unit deployment unit
+ */
+ void newDeploymentModel(DeploymentUnit unit);
+
+}
Added: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/deployment/JaxrpcEjbDeploymentModelBuilder.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/deployment/JaxrpcEjbDeploymentModelBuilder.java (rev 0)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/deployment/JaxrpcEjbDeploymentModelBuilder.java 2009-08-14 09:10:07 UTC (rev 10537)
@@ -0,0 +1,54 @@
+package org.jboss.webservices.integration.deployers.deployment;
+
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.metadata.ejb.jboss.JBossEnterpriseBeanMetaData;
+import org.jboss.metadata.ejb.jboss.JBossMetaData;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.integration.WebServiceDeployment;
+import org.jboss.wsf.spi.metadata.webservices.PortComponentMetaData;
+import org.jboss.wsf.spi.metadata.webservices.WebserviceDescriptionMetaData;
+import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData;
+
+/**
+ * Creates new JAXRPC EJB21 deployment.
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+final class JaxrpcEjbDeploymentModelBuilder extends AbstractDeploymentModelBuilder
+{
+
+ /**
+ * Constructor.
+ */
+ JaxrpcEjbDeploymentModelBuilder()
+ {
+ super();
+ }
+
+ /**
+ * Creates new JAXRPC EJB21 deployment and registers it with deployment unit.
+ *
+ * @param dep webservice deployment
+ * @param unit deployment unit
+ */
+ @Override
+ protected void build(final Deployment dep, final DeploymentUnit unit)
+ {
+ final JBossMetaData jbmd = this.getAndPropagateAttachment(JBossMetaData.class, unit, dep);
+ final WebservicesMetaData wsMetaData = this.getAndPropagateAttachment(WebservicesMetaData.class, unit, dep);
+ this.getAndPropagateAttachment(WebServiceDeployment.class, unit, dep);
+
+ for (WebserviceDescriptionMetaData wsd : wsMetaData.getWebserviceDescriptions())
+ {
+ for (PortComponentMetaData pcmd : wsd.getPortComponents())
+ {
+ final String ejbName = pcmd.getEjbLink();
+ final JBossEnterpriseBeanMetaData beanMetaData = jbmd.getEnterpriseBean(ejbName);
+ final String ejbClass = beanMetaData.getEjbClass();
+
+ this.newEndpoint(ejbClass, ejbName, dep);
+ }
+ }
+ }
+
+}
Added: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/deployment/JaxrpcJseDeploymentModelBuilder.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/deployment/JaxrpcJseDeploymentModelBuilder.java (rev 0)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/deployment/JaxrpcJseDeploymentModelBuilder.java 2009-08-14 09:10:07 UTC (rev 10537)
@@ -0,0 +1,53 @@
+package org.jboss.webservices.integration.deployers.deployment;
+
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.metadata.web.jboss.JBossWebMetaData;
+import org.jboss.metadata.web.spec.ServletMetaData;
+import org.jboss.webservices.integration.util.ASHelper;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.metadata.webservices.PortComponentMetaData;
+import org.jboss.wsf.spi.metadata.webservices.WebserviceDescriptionMetaData;
+import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData;
+
+/**
+ * Creates new JAXRPC JSE deployment.
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+final class JaxrpcJseDeploymentModelBuilder extends AbstractDeploymentModelBuilder
+{
+
+ /**
+ * Constructor.
+ */
+ JaxrpcJseDeploymentModelBuilder()
+ {
+ super();
+ }
+
+ /**
+ * Creates new JAXRPC JSE deployment and registers it with deployment unit.
+ *
+ * @param dep webservice deployment
+ * @param unit deployment unit
+ */
+ @Override
+ protected void build(final Deployment dep, final DeploymentUnit unit)
+ {
+ final JBossWebMetaData webMetaData = this.getAndPropagateAttachment(JBossWebMetaData.class, unit, dep);
+ final WebservicesMetaData wsMetaData = this.getAndPropagateAttachment(WebservicesMetaData.class, unit, dep);
+
+ for (WebserviceDescriptionMetaData wsd : wsMetaData.getWebserviceDescriptions())
+ {
+ for (PortComponentMetaData pcmd : wsd.getPortComponents())
+ {
+ final String servletName = pcmd.getServletLink();
+ final ServletMetaData servletMD = ASHelper.getServletForName(webMetaData, servletName);
+ final String servletClass = ASHelper.getEndpointName(servletMD);
+
+ this.newEndpoint(servletClass, servletName, dep);
+ }
+ }
+ }
+
+}
Added: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/deployment/JaxwsEjbDeploymentModelBuilder.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/deployment/JaxwsEjbDeploymentModelBuilder.java (rev 0)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/deployment/JaxwsEjbDeploymentModelBuilder.java 2009-08-14 09:10:07 UTC (rev 10537)
@@ -0,0 +1,53 @@
+package org.jboss.webservices.integration.deployers.deployment;
+
+import java.util.Iterator;
+
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.metadata.ejb.jboss.JBossMetaData;
+import org.jboss.webservices.integration.util.ASHelper;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.deployment.integration.WebServiceDeclaration;
+import org.jboss.wsf.spi.deployment.integration.WebServiceDeployment;
+
+/**
+ * Creates new JAXWS EJB3 deployment.
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+final class JaxwsEjbDeploymentModelBuilder extends AbstractDeploymentModelBuilder
+{
+
+ /**
+ * Constructor.
+ */
+ JaxwsEjbDeploymentModelBuilder()
+ {
+ super();
+ }
+
+ /**
+ * Creates new JAXWS EJB3 deployment and registers it with deployment unit.
+ *
+ * @param dep webservice deployment
+ * @param unit deployment unit
+ */
+ @Override
+ protected void build(final Deployment dep, final DeploymentUnit unit)
+ {
+ this.getAndPropagateAttachment(WebServiceDeployment.class, unit, dep);
+ this.getAndPropagateAttachment(JBossMetaData.class, unit, dep);
+
+ final Iterator<WebServiceDeclaration> ejbIterator = ASHelper.getJaxwsEjbs(unit).iterator();
+ while (ejbIterator.hasNext())
+ {
+ final WebServiceDeclaration container = ejbIterator.next();
+ final String ejbName = container.getComponentName();
+ final String ejbClass = container.getComponentClassName();
+
+ final Endpoint ep = this.newEndpoint(ejbClass, ejbName, dep);
+ ep.setProperty(ASHelper.CONTAINER_NAME, container.getContainerName());
+ }
+ }
+
+}
Added: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/deployment/JaxwsJseDeploymentModelBuilder.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/deployment/JaxwsJseDeploymentModelBuilder.java (rev 0)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/deployment/JaxwsJseDeploymentModelBuilder.java 2009-08-14 09:10:07 UTC (rev 10537)
@@ -0,0 +1,48 @@
+package org.jboss.webservices.integration.deployers.deployment;
+
+import java.util.List;
+
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.metadata.web.jboss.JBossWebMetaData;
+import org.jboss.metadata.web.spec.ServletMetaData;
+import org.jboss.webservices.integration.util.ASHelper;
+import org.jboss.wsf.spi.deployment.Deployment;
+
+/**
+ * Creates new JAXWS JSE deployment.
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+final class JaxwsJseDeploymentModelBuilder extends AbstractDeploymentModelBuilder
+{
+
+ /**
+ * Constructor.
+ */
+ JaxwsJseDeploymentModelBuilder()
+ {
+ super();
+ }
+
+ /**
+ * Creates new JAXWS JSE deployment and registers it with deployment unit.
+ *
+ * @param dep webservice deployment
+ * @param unit deployment unit
+ */
+ @Override
+ protected void build(final Deployment dep, final DeploymentUnit unit)
+ {
+ this.getAndPropagateAttachment(JBossWebMetaData.class, unit, dep);
+
+ final List<ServletMetaData> servlets = ASHelper.getJaxwsServlets(unit);
+ for (ServletMetaData servlet : servlets)
+ {
+ final String servletName = servlet.getName();
+ final String servletClass = ASHelper.getEndpointName(servlet);
+
+ this.newEndpoint(servletClass, servletName, dep);
+ }
+ }
+
+}
Added: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/deployment/WSDeploymentBuilder.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/deployment/WSDeploymentBuilder.java (rev 0)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/deployment/WSDeploymentBuilder.java 2009-08-14 09:10:07 UTC (rev 10537)
@@ -0,0 +1,86 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, 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.webservices.integration.deployers.deployment;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.webservices.integration.util.ASHelper;
+import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
+
+/**
+ * JBossWS deployment model builder.
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+public final class WSDeploymentBuilder
+{
+
+ /** Builder instance. */
+ private static final WSDeploymentBuilder SINGLETON = new WSDeploymentBuilder();
+
+ /** Builders registry. */
+ private static final Map<DeploymentType, DeploymentModelBuilder> builders = new HashMap<DeploymentType, DeploymentModelBuilder>();;
+
+ static
+ {
+ WSDeploymentBuilder.builders.put(DeploymentType.JAXWS_JSE, new JaxwsJseDeploymentModelBuilder());
+ WSDeploymentBuilder.builders.put(DeploymentType.JAXRPC_JSE, new JaxrpcJseDeploymentModelBuilder());
+ WSDeploymentBuilder.builders.put(DeploymentType.JAXWS_EJB3, new JaxwsEjbDeploymentModelBuilder());
+ WSDeploymentBuilder.builders.put(DeploymentType.JAXRPC_EJB21, new JaxrpcEjbDeploymentModelBuilder());
+ }
+
+ /**
+ * Constructor.
+ */
+ private WSDeploymentBuilder()
+ {
+ super();
+ }
+
+ /**
+ * Factory method for obtaining builder instance.
+ *
+ * @return builder instance
+ */
+ public static WSDeploymentBuilder getInstance()
+ {
+ return WSDeploymentBuilder.SINGLETON;
+ }
+
+ /**
+ * Builds JBossWS deployment model if web service deployment is detected.
+ *
+ * @param unit deployment unit
+ */
+ public void build(final DeploymentUnit unit)
+ {
+ final DeploymentType deploymentType = ASHelper.getOptionalAttachment(unit, DeploymentType.class);
+
+ if (deploymentType != null)
+ {
+ WSDeploymentBuilder.builders.get(deploymentType).newDeploymentModel(unit);
+ }
+ }
+
+}
Added: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/deployment/WSVirtualFileFilter.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/deployment/WSVirtualFileFilter.java (rev 0)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/deployment/WSVirtualFileFilter.java 2009-08-14 09:10:07 UTC (rev 10537)
@@ -0,0 +1,68 @@
+package org.jboss.webservices.integration.deployers.deployment;
+
+import org.jboss.virtual.VirtualFile;
+import org.jboss.virtual.VirtualFileFilterWithAttributes;
+import org.jboss.virtual.VisitorAttributes;
+
+/**
+ * WS file filter for files with the '.wsdl', or '.xsd' or '.xml' suffix.
+ *
+ * @author <a href="mailto:dbevenius@jboss.com">Daniel Bevenius</a>
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+final class WSVirtualFileFilter implements VirtualFileFilterWithAttributes
+{
+
+ /** The tree walking attributes. */
+ private VisitorAttributes attributes;
+
+ /**
+ * Constructor.
+ */
+ WSVirtualFileFilter()
+ {
+ this(VisitorAttributes.RECURSE_LEAVES_ONLY);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param attributes visit attributes
+ */
+ WSVirtualFileFilter(final VisitorAttributes attributes)
+ {
+ this.attributes = attributes;
+ }
+
+ /**
+ * Gets VisitorAttributes for this instance.
+ *
+ * @return visitor attributes
+ */
+ public VisitorAttributes getAttributes()
+ {
+ return this.attributes;
+ }
+
+ /**
+ * Accepts files that end with '.wsdl' or '.xsd' or '.xml'.
+ *
+ * @param file to analyze
+ * @return true if expected file extension, false otherwise
+ */
+ public boolean accepts(final VirtualFile file)
+ {
+ if (file == null)
+ {
+ return false;
+ }
+
+ final String fileName = file.getName().toLowerCase();
+ final boolean hasWsdlSuffix = fileName.endsWith(".wsdl");
+ final boolean hasXsdSuffix = fileName.endsWith(".xsd");
+ final boolean hasXmlSuffix = fileName.endsWith(".xml");
+
+ return hasWsdlSuffix || hasXsdSuffix || hasXmlSuffix;
+ }
+
+}
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerEJB3.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerEJB3.java 2009-08-14 07:48:47 UTC (rev 10536)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerEJB3.java 2009-08-14 09:10:07 UTC (rev 10537)
@@ -27,7 +27,7 @@
import org.jboss.dependency.spi.ControllerContext;
import org.jboss.kernel.spi.dependency.KernelController;
-import org.jboss.wsf.common.integration.WSConstants;
+import org.jboss.webservices.integration.util.ASHelper;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.invocation.Invocation;
import org.jboss.wsf.spi.invocation.integration.InvocationContextCallback;
@@ -69,7 +69,7 @@
*/
public void init(final Endpoint endpoint)
{
- this.containerName = (String) endpoint.getProperty(WSConstants.CONTAINER_NAME);
+ this.containerName = (String) endpoint.getProperty(ASHelper.CONTAINER_NAME);
if (this.containerName == null)
{
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/AbstractMetaDataBuilderEJB.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/AbstractMetaDataBuilderEJB.java 2009-08-14 07:48:47 UTC (rev 10536)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/AbstractMetaDataBuilderEJB.java 2009-08-14 09:10:07 UTC (rev 10537)
@@ -21,12 +21,12 @@
*/
package org.jboss.webservices.integration.metadata;
-import org.jboss.deployers.structure.spi.DeploymentUnit;
import org.jboss.logging.Logger;
import org.jboss.metadata.common.jboss.WebserviceDescriptionMetaData;
import org.jboss.metadata.common.jboss.WebserviceDescriptionsMetaData;
import org.jboss.metadata.ejb.jboss.JBossMetaData;
import org.jboss.metadata.ejb.jboss.WebservicesMetaData;
+import org.jboss.webservices.integration.util.ASHelper;
import org.jboss.wsf.common.integration.WSHelper;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
@@ -48,10 +48,9 @@
* Builds universal EJB meta data model that is AS agnostic.
*
* @param dep webservice deployment
- * @param unit deployment unit
* @return universal EJB meta data model
*/
- final EJBArchiveMetaData create(final Deployment dep, final DeploymentUnit unit)
+ final EJBArchiveMetaData create(final Deployment dep)
{
final EJBArchiveMetaData ejbArchiveMD = new EJBArchiveMetaData();
@@ -103,7 +102,8 @@
final PublishLocationAdapter resolver = new PublishLocationAdapterImpl(wsDescriptionsMD);
ejbArchiveMD.setPublishLocationAdapter(resolver);
- final WebserviceDescriptionMetaData wsDescriptionMD = this.getWebserviceDescriptionMetaData(wsDescriptionsMD);
+ final WebserviceDescriptionMetaData wsDescriptionMD = ASHelper
+ .getWebserviceDescriptionMetaData(wsDescriptionsMD);
if (wsDescriptionMD != null)
{
// set config name and config file
@@ -113,29 +113,4 @@
}
}
- /**
- * Returns first webservice description meta data or null if not found.
- *
- * @param wsDescriptionsMD webservice descriptions
- * @return webservice description
- */
- private WebserviceDescriptionMetaData getWebserviceDescriptionMetaData(
- final WebserviceDescriptionsMetaData wsDescriptionsMD)
- {
- if (wsDescriptionsMD != null)
- {
- if (wsDescriptionsMD.size() > 1)
- {
- AbstractMetaDataBuilderEJB.LOGGER.warn("Multiple <webservice-description> elements not supported");
- }
-
- if (wsDescriptionsMD.size() > 0)
- {
- return wsDescriptionsMD.iterator().next();
- }
- }
-
- return null;
- }
-
}
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/ContainerMetaDataDeploymentAspect.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/ContainerMetaDataDeploymentAspect.java 2009-08-14 07:48:47 UTC (rev 10536)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/ContainerMetaDataDeploymentAspect.java 2009-08-14 09:10:07 UTC (rev 10537)
@@ -21,8 +21,6 @@
*/
package org.jboss.webservices.integration.metadata;
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.webservices.integration.util.ASHelper;
import org.jboss.wsf.common.integration.WSHelper;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.DeploymentAspect;
@@ -63,21 +61,19 @@
@Override
public void start(final Deployment dep)
{
- final DeploymentUnit unit = WSHelper.getRequiredAttachment(dep, DeploymentUnit.class);
-
- if (ASHelper.isJseDeployment(unit))
+ if (WSHelper.isJseDeployment(dep))
{
- final JSEArchiveMetaData jseMetaData = this.metaDataBuilderJSE.create(dep, unit);
+ final JSEArchiveMetaData jseMetaData = this.metaDataBuilderJSE.create(dep);
dep.addAttachment(JSEArchiveMetaData.class, jseMetaData);
}
- else if (ASHelper.isJaxwsEjbDeployment(unit))
+ else if (WSHelper.isJaxwsEjbDeployment(dep))
{
- final EJBArchiveMetaData ejbMetaData = this.metaDataBuilderEJB3.create(dep, unit);
+ final EJBArchiveMetaData ejbMetaData = this.metaDataBuilderEJB3.create(dep);
dep.addAttachment(EJBArchiveMetaData.class, ejbMetaData);
}
- else if (ASHelper.isJaxrpcEjbDeployment(unit))
+ else if (WSHelper.isJaxrpcEjbDeployment(dep))
{
- final EJBArchiveMetaData ejbMetaData = this.metaDataBuilderEJB21.create(dep, unit);
+ final EJBArchiveMetaData ejbMetaData = this.metaDataBuilderEJB21.create(dep);
dep.addAttachment(EJBArchiveMetaData.class, ejbMetaData);
}
}
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB21.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB21.java 2009-08-14 07:48:47 UTC (rev 10536)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB21.java 2009-08-14 09:10:07 UTC (rev 10537)
@@ -21,7 +21,7 @@
*/
package org.jboss.webservices.integration.metadata;
-import java.util.ArrayList;
+import java.util.LinkedList;
import java.util.List;
import org.jboss.metadata.ejb.jboss.JBossEnterpriseBeanMetaData;
@@ -64,7 +64,7 @@
protected void buildEnterpriseBeansMetaData(final Deployment dep, final EJBArchiveMetaData ejbArchiveMD)
{
final JBossMetaData jbossMetaData = WSHelper.getRequiredAttachment(dep, JBossMetaData.class);
- final List<EJBMetaData> wsEjbsMD = new ArrayList<EJBMetaData>();
+ final List<EJBMetaData> wsEjbsMD = new LinkedList<EJBMetaData>();
for (final JBossEnterpriseBeanMetaData jbossEjbMD : jbossMetaData.getEnterpriseBeans())
{
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB3.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB3.java 2009-08-14 07:48:47 UTC (rev 10536)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB3.java 2009-08-14 09:10:07 UTC (rev 10537)
@@ -21,7 +21,7 @@
*/
package org.jboss.webservices.integration.metadata;
-import java.util.ArrayList;
+import java.util.LinkedList;
import java.util.List;
import javax.ejb.ActivationConfigProperty;
@@ -65,7 +65,7 @@
protected void buildEnterpriseBeansMetaData(final Deployment dep, final EJBArchiveMetaData ejbArchiveMD)
{
final WebServiceDeployment ejb3Deployment = WSHelper.getRequiredAttachment(dep, WebServiceDeployment.class);
- final List<EJBMetaData> wsEjbsMD = new ArrayList<EJBMetaData>();
+ final List<EJBMetaData> wsEjbsMD = new LinkedList<EJBMetaData>();
for (final WebServiceDeclaration jbossEjbMD : ejb3Deployment.getServiceEndpoints())
{
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderJSE.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderJSE.java 2009-08-14 07:48:47 UTC (rev 10536)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderJSE.java 2009-08-14 09:10:07 UTC (rev 10537)
@@ -21,13 +21,12 @@
*/
package org.jboss.webservices.integration.metadata;
-import java.util.ArrayList;
import java.util.HashMap;
+import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.logging.Logger;
import org.jboss.metadata.common.jboss.WebserviceDescriptionMetaData;
import org.jboss.metadata.common.jboss.WebserviceDescriptionsMetaData;
import org.jboss.metadata.ear.jboss.JBossAppMetaData;
@@ -42,10 +41,13 @@
import org.jboss.metadata.web.spec.WebResourceCollectionMetaData;
import org.jboss.metadata.web.spec.WebResourceCollectionsMetaData;
import org.jboss.webservices.integration.util.ASHelper;
+import org.jboss.wsf.common.integration.WSConstants;
+import org.jboss.wsf.common.integration.WSHelper;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.metadata.j2ee.JSEArchiveMetaData;
import org.jboss.wsf.spi.metadata.j2ee.JSESecurityMetaData;
import org.jboss.wsf.spi.metadata.j2ee.JSESecurityMetaData.JSEResourceCollection;
+import org.jboss.wsf.spi.metadata.j2ee.PublishLocationAdapter;
/**
* Builds container independent meta data from WEB container meta data.
@@ -56,133 +58,226 @@
final class MetaDataBuilderJSE
{
- private static Logger log = Logger.getLogger(MetaDataBuilderJSE.class);
+ /**
+ * Constructor.
+ */
+ MetaDataBuilderJSE()
+ {
+ super();
+ }
- JSEArchiveMetaData create(Deployment dep, DeploymentUnit unit)
+ /**
+ * Builds universal JSE meta data model that is AS agnostic.
+ *
+ * @param dep webservice deployment
+ * @return universal JSE meta data model
+ */
+ JSEArchiveMetaData create(final Deployment dep)
{
- String contextRoot = null;
+ final JBossWebMetaData jbossWebMD = WSHelper.getRequiredAttachment(dep, JBossWebMetaData.class);
+ final JSEArchiveMetaData jseArchiveMD = new JSEArchiveMetaData();
- JBossWebMetaData jbossWebMetaData = ASHelper.getRequiredAttachment(unit, JBossWebMetaData.class);
+ // set context root
+ final String contextRoot = this.getContextRoot(dep, jbossWebMD);
+ jseArchiveMD.setContextRoot(contextRoot);
- if (unit.getParent() != null)
- {
- JBossAppMetaData appmd = ASHelper.getOptionalAttachment(unit.getParent(), JBossAppMetaData.class);
- if (appmd != null)
- {
- ModuleMetaData module = appmd.getModule(dep.getSimpleName());
- if (module != null)
- {
- WebModuleMetaData web = (WebModuleMetaData) module.getValue();
- contextRoot = web.getContextRoot();
- }
- }
- }
+ // set servlet url patterns mappings
+ final Map<String, String> servletMappings = this.getServletUrlPatternsMappings(jbossWebMD);
+ jseArchiveMD.setServletMappings(servletMappings);
- if (contextRoot == null)
- contextRoot = jbossWebMetaData.getContextRoot();
+ // set servlet class names mappings
+ final Map<String, String> servletClassNamesMappings = this.getServletClassMappings(jbossWebMD);
+ jseArchiveMD.setServletClassNames(servletClassNamesMappings);
- JSEArchiveMetaData umd = new JSEArchiveMetaData();
- umd.setContextRoot(contextRoot);
- umd.setServletMappings(getServletMappings(jbossWebMetaData));
- umd.setServletClassNames(getServletClassMap(jbossWebMetaData));
- umd.setSecurityDomain(jbossWebMetaData.getSecurityDomain());
- umd.setPublishLocationAdapter(new PublishLocationAdapterImpl(jbossWebMetaData.getWebserviceDescriptions()));
- umd.setSecurityMetaData(getSecurityMetaData(jbossWebMetaData.getSecurityContraints()));
+ // set security domain
+ final String securityDomain = jbossWebMD.getSecurityDomain();
+ jseArchiveMD.setSecurityDomain(securityDomain);
- setConfigNameAndFile(umd, jbossWebMetaData);
+ // set wsdl location resolver
+ final PublishLocationAdapter resolver = new PublishLocationAdapterImpl(jbossWebMD.getWebserviceDescriptions());
+ jseArchiveMD.setPublishLocationAdapter(resolver);
- return umd;
+ // set security meta data
+ final List<JSESecurityMetaData> jseSecurityMDs = this.getSecurityMetaData(jbossWebMD.getSecurityContraints());
+ jseArchiveMD.setSecurityMetaData(jseSecurityMDs);
+
+ // set config name and file
+ this.setConfigNameAndFile(jseArchiveMD, jbossWebMD);
+
+ return jseArchiveMD;
}
- private void setConfigNameAndFile(JSEArchiveMetaData umd, JBossWebMetaData jbossWebMetaData)
+ /**
+ * Sets config name and config file.
+ *
+ * @param jseArchiveMD universal JSE meta data model
+ * @param jbossWebMD jboss web meta data
+ */
+ private void setConfigNameAndFile(final JSEArchiveMetaData jseArchiveMD, final JBossWebMetaData jbossWebMD)
{
- String configName = null;
- String configFile = null;
-
- WebserviceDescriptionsMetaData wsDescriptions = jbossWebMetaData.getWebserviceDescriptions();
- if (wsDescriptions != null && wsDescriptions.size() > 1)
- log.warn("Multiple <webservice-description> elements not supported");
-
- if (wsDescriptions != null && wsDescriptions.size() > 0)
+ final WebserviceDescriptionsMetaData wsDescriptionsMD = jbossWebMD.getWebserviceDescriptions();
+ final WebserviceDescriptionMetaData wsDescriptionMD = ASHelper.getWebserviceDescriptionMetaData(wsDescriptionsMD);
+ if (wsDescriptionMD != null)
{
- WebserviceDescriptionMetaData wsd = wsDescriptions.iterator().next();
- configName = wsd.getConfigName();
- configFile = wsd.getConfigFile();
+ if (wsDescriptionMD.getConfigName() != null)
+ {
+ jseArchiveMD.setConfigName(wsDescriptionMD.getConfigName());
+ jseArchiveMD.setConfigFile(wsDescriptionMD.getConfigFile());
+
+ // ensure higher priority against web.xml context parameters
+ return;
+ }
}
- List<ParamValueMetaData> contextParams = jbossWebMetaData.getContextParams();
+ final List<ParamValueMetaData> contextParams = jbossWebMD.getContextParams();
if (contextParams != null)
{
- for (ParamValueMetaData ctxParam : contextParams)
+ for (final ParamValueMetaData contextParam : contextParams)
{
- if (ctxParam.getParamName().equals("jbossws-config-name"))
- configName = ctxParam.getParamValue();
- if (ctxParam.getParamName().equals("jbossws-config-file"))
- configFile = ctxParam.getParamValue();
+ if (WSConstants.JBOSSWS_CONFIG_NAME.equals(contextParam.getParamName()))
+ {
+ jseArchiveMD.setConfigName(contextParam.getParamValue());
+ }
+ if (WSConstants.JBOSSWS_CONFIG_FILE.equals(contextParam.getParamName()))
+ {
+ jseArchiveMD.setConfigFile(contextParam.getParamValue());
+ }
}
}
-
- umd.setConfigName(configName);
- umd.setConfigFile(configFile);
}
- private List<JSESecurityMetaData> getSecurityMetaData(final List<SecurityConstraintMetaData> securityConstraints)
+ /**
+ * Builds security meta data.
+ *
+ * @param securityConstraintsMD security constraints meta data
+ * @return universal JSE security meta data model
+ */
+ private List<JSESecurityMetaData> getSecurityMetaData(final List<SecurityConstraintMetaData> securityConstraintsMD)
{
- ArrayList<JSESecurityMetaData> unifiedsecurityMetaData = new ArrayList<JSESecurityMetaData>();
- if (securityConstraints != null)
+ final List<JSESecurityMetaData> jseSecurityMDs = new LinkedList<JSESecurityMetaData>();
+
+ if (securityConstraintsMD != null)
{
- for (SecurityConstraintMetaData securityMetaData : securityConstraints)
+ for (final SecurityConstraintMetaData securityConstraintMD : securityConstraintsMD)
{
- JSESecurityMetaData current = new JSESecurityMetaData();
- unifiedsecurityMetaData.add(current);
+ final JSESecurityMetaData jseSecurityMD = new JSESecurityMetaData();
- current.setTransportGuarantee(securityMetaData.getTransportGuarantee().name());
+ // transport guarantee
+ jseSecurityMD.setTransportGuarantee(securityConstraintMD.getTransportGuarantee().name());
- WebResourceCollectionsMetaData resources = securityMetaData.getResourceCollections();
- for (WebResourceCollectionMetaData webResource : resources)
- {
- JSEResourceCollection currentResource = current.addWebResource(webResource.getName());
- for (String currentPattern : webResource.getUrlPatterns())
- {
- currentResource.addPattern(currentPattern);
- }
- }
+ // web resources
+ this.setWebResources(jseSecurityMD, securityConstraintMD);
+
+ jseSecurityMDs.add(jseSecurityMD);
}
}
- return unifiedsecurityMetaData;
+
+ return jseSecurityMDs;
}
- private Map<String, String> getServletMappings(JBossWebMetaData wmd)
+ /**
+ * Sets web resources in universal meta data model.
+ *
+ * @param jseSecurityMD universal JSE security meta data model
+ * @param securityConstraintMD security constraint meta data
+ */
+ private void setWebResources(final JSESecurityMetaData jseSecurityMD,
+ final SecurityConstraintMetaData securityConstraintMD)
{
- Map<String, String> mappings = new HashMap<String, String>();
- List<ServletMappingMetaData> smappings = wmd.getServletMappings();
- if (smappings != null)
+ final WebResourceCollectionsMetaData webResources = securityConstraintMD.getResourceCollections();
+
+ for (final WebResourceCollectionMetaData webResourceMD : webResources)
{
- for (ServletMappingMetaData mapping : smappings)
+ final JSEResourceCollection jseResource = jseSecurityMD.addWebResource(webResourceMD.getName());
+
+ for (final String webResourceUrlPatterns : webResourceMD.getUrlPatterns())
{
- // FIXME - Add support for multiple mappings
+ jseResource.addPattern(webResourceUrlPatterns);
+ }
+ }
+ }
+
+ /**
+ * Returns servlet name to url pattern mappings.
+ *
+ * @param jbossWebMD jboss web meta data
+ * @return servlet name to url pattern mappings
+ */
+ private Map<String, String> getServletUrlPatternsMappings(final JBossWebMetaData jbossWebMD)
+ {
+ final Map<String, String> mappings = new HashMap<String, String>();
+ final List<ServletMappingMetaData> servletMappings = jbossWebMD.getServletMappings();
+
+ if (servletMappings != null)
+ {
+ for (final ServletMappingMetaData mapping : servletMappings)
+ {
mappings.put(mapping.getServletName(), mapping.getUrlPatterns().get(0));
}
}
+
return mappings;
}
- private Map<String, String> getServletClassMap(JBossWebMetaData wmd)
+ /**
+ * Returns servlet name to servlet class mappings.
+ *
+ * @param jbossWebMD jboss web meta data
+ * @return servlet name to servlet mappings
+ */
+ private Map<String, String> getServletClassMappings(final JBossWebMetaData jbossWebMD)
{
- Map<String, String> mappings = new HashMap<String, String>();
- JBossServletsMetaData servlets = wmd.getServlets();
+ final Map<String, String> mappings = new HashMap<String, String>();
+ final JBossServletsMetaData servlets = jbossWebMD.getServlets();
+
if (servlets != null)
{
- for (ServletMetaData servlet : servlets)
+ for (final ServletMetaData servlet : servlets)
{
- // Skip JSPs
- if (servlet.getServletClass() == null || servlet.getServletClass().length() == 0)
+ if (servlet.getServletClass() == null || servlet.getServletClass().trim().length() == 0)
+ {
+ // Skip JSPs
continue;
+ }
mappings.put(servlet.getName(), servlet.getServletClass());
}
}
+
return mappings;
}
+ /**
+ * Returns context root associated with webservice deployment.
+ *
+ * If there's application.xml descriptor provided defining nested web module,
+ * then context root defined there will be returned.
+ * Otherwise context root defined in jboss-web.xml will be returned.
+ *
+ * @param dep webservice deployment
+ * @param jbossWebMD jboss web meta data
+ * @return context root
+ */
+ private String getContextRoot(final Deployment dep, final JBossWebMetaData jbossWebMD)
+ {
+ final DeploymentUnit unit = WSHelper.getRequiredAttachment(dep, DeploymentUnit.class);
+ final JBossAppMetaData jbossAppMD = unit.getParent() == null ? null : ASHelper.getOptionalAttachment(unit
+ .getParent(), JBossAppMetaData.class);
+
+ String contextRoot = null;
+
+ if (jbossAppMD != null)
+ {
+ final ModuleMetaData moduleMD = jbossAppMD.getModule(dep.getSimpleName());
+ if (moduleMD != null)
+ {
+ final WebModuleMetaData webModuleMD = (WebModuleMetaData) moduleMD.getValue();
+ contextRoot = webModuleMD.getContextRoot();
+ }
+ }
+
+ // prefer context root defined in application.xml over one defined in jboss-web.xml
+ return contextRoot != null ? contextRoot : jbossWebMD.getContextRoot();
+ }
+
}
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/util/ASHelper.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/util/ASHelper.java 2009-08-14 07:48:47 UTC (rev 10536)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/util/ASHelper.java 2009-08-14 09:10:07 UTC (rev 10537)
@@ -31,6 +31,8 @@
import org.jboss.deployers.structure.spi.DeploymentUnit;
import org.jboss.logging.Logger;
+import org.jboss.metadata.common.jboss.WebserviceDescriptionMetaData;
+import org.jboss.metadata.common.jboss.WebserviceDescriptionsMetaData;
import org.jboss.metadata.web.jboss.JBossServletMetaData;
import org.jboss.metadata.web.jboss.JBossWebMetaData;
import org.jboss.metadata.web.spec.ServletMetaData;
@@ -46,8 +48,13 @@
public final class ASHelper
{
+ /**
+ * EJB invocation property.
+ */
+ public static final String CONTAINER_NAME = "org.jboss.wsf.spi.invocation.ContainerName";
+
/** Logger. */
- private static final Logger LOG = Logger.getLogger(ASHelper.class);
+ private static final Logger LOGGER = Logger.getLogger(ASHelper.class);
/**
* Forbidden constructor.
@@ -295,7 +302,7 @@
}
catch (ClassNotFoundException cnfe)
{
- ASHelper.LOG.warn("Cannot load servlet class: " + endpointClassName, cnfe);
+ ASHelper.LOGGER.warn("Cannot load servlet class: " + endpointClassName, cnfe);
}
}
@@ -316,7 +323,7 @@
final A value = unit.getAttachment(key);
if (value == null)
{
- ASHelper.LOG.error("Cannot find attachment in deployment unit: " + key);
+ ASHelper.LOGGER.error("Cannot find attachment in deployment unit: " + key);
throw new IllegalStateException();
}
@@ -349,6 +356,31 @@
}
/**
+ * Returns first webservice description meta data or null if not found.
+ *
+ * @param wsDescriptionsMD webservice descriptions
+ * @return webservice description
+ */
+ public static WebserviceDescriptionMetaData getWebserviceDescriptionMetaData(
+ final WebserviceDescriptionsMetaData wsDescriptionsMD)
+ {
+ if (wsDescriptionsMD != null)
+ {
+ if (wsDescriptionsMD.size() > 1)
+ {
+ ASHelper.LOGGER.warn("Multiple <webservice-description> elements not supported");
+ }
+
+ if (wsDescriptionsMD.size() > 0)
+ {
+ return wsDescriptionsMD.iterator().next();
+ }
+ }
+
+ return null;
+ }
+
+ /**
* Gets list of JAXRPC or JAXWS servlets meta data.
*
* @param unit deployment unit
14 years, 10 months
JBossWS SVN: r10536 - common/branches/ropalka/src/main/java/org/jboss/wsf/common/integration.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2009-08-14 03:48:47 -0400 (Fri, 14 Aug 2009)
New Revision: 10536
Modified:
common/branches/ropalka/src/main/java/org/jboss/wsf/common/integration/WSConstants.java
Log:
[JBWS-2320] refactoring (WIP)
Modified: common/branches/ropalka/src/main/java/org/jboss/wsf/common/integration/WSConstants.java
===================================================================
--- common/branches/ropalka/src/main/java/org/jboss/wsf/common/integration/WSConstants.java 2009-08-14 05:53:55 UTC (rev 10535)
+++ common/branches/ropalka/src/main/java/org/jboss/wsf/common/integration/WSConstants.java 2009-08-14 07:48:47 UTC (rev 10536)
@@ -39,10 +39,15 @@
*/
public static final String STACK_TRANSPORT_CLASS = "stack.transport.class";
- /**
- * EJB invocation property.
+ /**
+ * JBoss WS config name property.
*/
- public static final String CONTAINER_NAME = "org.jboss.wsf.spi.invocation.ContainerName";
+ public static final String JBOSSWS_CONFIG_NAME = "jbossws-config-name";
+
+ /**
+ * JBoss WS config file property.
+ */
+ public static final String JBOSSWS_CONFIG_FILE = "jbossws-config-file";
/**
* Forbidden constructor.
14 years, 10 months
JBossWS SVN: r10535 - in container/jboss50/branches/ropalka-jboss510: src/main/java/org/jboss/webservices/integration/config and 6 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2009-08-14 01:53:55 -0400 (Fri, 14 Aug 2009)
New Revision: 10535
Added:
container/jboss50/branches/ropalka-jboss510/eclipse/jboss-format.xml
container/jboss50/branches/ropalka-jboss510/eclipse/jboss-style.xml
Removed:
container/jboss50/branches/ropalka-jboss510/eclipse/JBossWSCheckStyle.xml
Modified:
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/config/ServerConfigImpl.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentBuilder.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSEJBAdapterDeployer.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/injection/EJBBeanReferenceResolver.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/injection/InjectionMetaDataDeploymentAspect.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerEJB21.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerEJB3.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerFactoryImpl.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerJAXRPC.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/ServiceEndpointInterceptorEJB21.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/AbstractMetaDataBuilderEJB.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB21.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB3.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderJSE.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/security/JACCPermissionsDeploymentAspect.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/security/SecurityAdapterImpl.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB3.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataCreator.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataHelper.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifier.java
Log:
updating to JBoss code style
Deleted: container/jboss50/branches/ropalka-jboss510/eclipse/JBossWSCheckStyle.xml
===================================================================
--- container/jboss50/branches/ropalka-jboss510/eclipse/JBossWSCheckStyle.xml 2009-08-13 14:10:42 UTC (rev 10534)
+++ container/jboss50/branches/ropalka-jboss510/eclipse/JBossWSCheckStyle.xml 2009-08-14 05:53:55 UTC (rev 10535)
@@ -1,148 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- This configuration file was written by the eclipse-cs plugin configuration editor
--->
-<!--
- Checkstyle-Configuration: JBossWS
- Description: none
--->
-<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.2//EN" "http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
-<module name="Checker">
- <property name="severity" value="warning"/>
- <module name="TreeWalker">
- <module name="ModifierOrder"/>
- <module name="RedundantModifier"/>
- <module name="AnonInnerLength"/>
- <module name="ExecutableStatementCount">
- <property name="max" value="60"/>
- <property name="tokens" value="INSTANCE_INIT,STATIC_INIT,METHOD_DEF,CTOR_DEF"/>
- </module>
- <module name="LineLength">
- <property name="max" value="168"/>
- <property name="tabWidth" value="3"/>
- </module>
- <module name="MethodLength"/>
- <module name="ParameterNumber"/>
- <module name="AvoidStarImport"/>
- <module name="IllegalImport"/>
- <module name="ImportOrder"/>
- <module name="RedundantImport"/>
- <module name="UnusedImports"/>
- <module name="AbstractClassName"/>
- <module name="ConstantName"/>
- <module name="LocalFinalVariableName"/>
- <module name="LocalVariableName"/>
- <module name="MemberName"/>
- <module name="MethodName"/>
- <module name="PackageName"/>
- <module name="ParameterName"/>
- <module name="StaticVariableName"/>
- <module name="TypeName"/>
- <module name="CovariantEquals"/>
- <module name="DefaultComesLast"/>
- <module name="DeclarationOrder"/>
- <module name="DoubleCheckedLocking"/>
- <module name="EqualsHashCode"/>
- <module name="ExplicitInitialization"/>
- <module name="FallThrough"/>
- <module name="FinalLocalVariable"/>
- <module name="IllegalInstantiation"/>
- <module name="IllegalType">
- <property name="tokens" value="METHOD_DEF,PARAMETER_DEF"/>
- </module>
- <module name="InnerAssignment"/>
- <module name="MagicNumber">
- <property name="ignoreNumbers" value="-1, 0, 1"/>
- </module>
- <module name="MissingCtor"/>
- <module name="MissingSwitchDefault"/>
- <module name="ModifiedControlVariable"/>
- <module name="MultipleStringLiterals"/>
- <module name="MultipleVariableDeclarations"/>
- <module name="NestedIfDepth"/>
- <module name="NestedTryDepth"/>
- <module name="PackageDeclaration"/>
- <module name="ParameterAssignment"/>
- <module name="RedundantThrows">
- <property name="logLoadErrors" value="true"/>
- <property name="suppressLoadErrors" value="true"/>
- </module>
- <module name="RequireThis"/>
- <module name="ReturnCount">
- <property name="max" value="5"/>
- </module>
- <module name="SimplifyBooleanExpression"/>
- <module name="SimplifyBooleanReturn"/>
- <module name="StringLiteralEquality"/>
- <module name="SuperClone"/>
- <module name="SuperFinalize"/>
- <module name="ArrayTrailingComma"/>
- <module name="UnnecessaryParentheses"/>
- <module name="DesignForExtension"/>
- <module name="FinalClass"/>
- <module name="HideUtilityClassConstructor"/>
- <module name="InterfaceIsType"/>
- <module name="ThrowsCount"/>
- <module name="VisibilityModifier"/>
- <module name="MutableException"/>
- <module name="EmptyBlock"/>
- <module name="LeftCurly">
- <property name="option" value="nl"/>
- <property name="maxLineLength" value="120"/>
- </module>
- <module name="RightCurly">
- <property name="option" value="alone"/>
- </module>
- <module name="EmptyForInitializerPad">
- <property name="option" value="space"/>
- </module>
- <module name="EmptyForIteratorPad">
- <property name="option" value="space"/>
- </module>
- <module name="NoWhitespaceAfter"/>
- <module name="NoWhitespaceBefore"/>
- <module name="OperatorWrap">
- <property name="option" value="eol"/>
- <property name="tokens" value="ASSIGN,BAND,BAND_ASSIGN,BOR,BOR_ASSIGN,BSR,BSR_ASSIGN,BXOR,BXOR_ASSIGN,DIV,DIV_ASSIGN,EQUAL,GE,GT,LAND,LE,LITERAL_INSTANCEOF,LOR,LT,MINUS,MINUS_ASSIGN,MOD,MOD_ASSIGN,NOT_EQUAL,PLUS,PLUS_ASSIGN,SL,SL_ASSIGN,SR,SR_ASSIGN,STAR,STAR_ASSIGN"/>
- </module>
- <module name="MethodParamPad">
- <property name="allowLineBreaks" value="true"/>
- </module>
- <module name="TabCharacter"/>
- <module name="TypecastParenPad">
- <property name="tokens" value="RPAREN,TYPECAST"/>
- </module>
- <module name="WhitespaceAround">
- <property name="tokens" value="ASSIGN,BAND,BAND_ASSIGN,BOR,BOR_ASSIGN,BSR,BSR_ASSIGN,BXOR,BXOR_ASSIGN,DIV,DIV_ASSIGN,EQUAL,GE,GT,LAND,LE,LITERAL_ASSERT,LITERAL_CATCH,LITERAL_DO,LITERAL_ELSE,LITERAL_FINALLY,LITERAL_FOR,LITERAL_IF,LITERAL_RETURN,LITERAL_SYNCHRONIZED,LITERAL_TRY,LITERAL_WHILE,LOR,LT,MINUS,MINUS_ASSIGN,MOD,MOD_ASSIGN,NOT_EQUAL,PLUS,PLUS_ASSIGN,SL,SLIST,SL_ASSIGN,SR,SR_ASSIGN,STAR,STAR_ASSIGN,LITERAL_ASSERT,TYPE_EXTENSION_AND"/>
- </module>
- <module name="NeedBraces"/>
- <module name="WhitespaceAfter">
- <property name="tokens" value="COMMA,SEMI"/>
- </module>
- <module name="BooleanExpressionComplexity"/>
- <module name="ClassDataAbstractionCoupling"/>
- <module name="ClassFanOutComplexity"/>
- <module name="CyclomaticComplexity"/>
- <module name="JavaNCSS"/>
- <module name="NPathComplexity"/>
- <module name="UncommentedMain"/>
- <module name="TodoComment"/>
- <module name="TrailingComment"/>
- <module name="Indentation">
- <property name="basicOffset" value="3"/>
- <property name="caseIndent" value="3"/>
- </module>
- <module name="FinalParameters"/>
- <module name="ArrayTypeStyle"/>
- <module name="JavadocMethod">
- <property name="allowUndeclaredRTE" value="true"/>
- <property name="logLoadErrors" value="true"/>
- </module>
- <module name="JavadocStyle"/>
- <module name="JavadocType"/>
- <module name="JavadocVariable"/>
- <module name="WriteTag"/>
- <module name="SuperFinalize"/>
- </module>
- <module name="NewlineAtEndOfFile"/>
-</module>
Added: container/jboss50/branches/ropalka-jboss510/eclipse/jboss-format.xml
===================================================================
--- container/jboss50/branches/ropalka-jboss510/eclipse/jboss-format.xml (rev 0)
+++ container/jboss50/branches/ropalka-jboss510/eclipse/jboss-format.xml 2009-08-14 05:53:55 UTC (rev 10535)
@@ -0,0 +1,187 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Downloaded JBoss Eclipse Format from http://docs.jboss.org/process-guide/en/html/coding.html -->
+<profiles version="6">
+<profile name="JBoss" version="6">
+<setting id="comment_clear_blank_lines" value="false"/>
+<setting id="comment_format_comments" value="false"/>
+<setting id="comment_format_header" value="false"/>
+<setting id="comment_format_html" value="true"/>
+<setting id="comment_format_source_code" value="true"/>
+<setting id="comment_indent_parameter_description" value="true"/>
+<setting id="comment_indent_root_tags" value="true"/>
+<setting id="comment_line_length" value="80"/>
+<setting id="comment_new_line_for_parameter" value="true"/>
+<setting id="comment_separate_root_tags" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.align_type_members_on_columns" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_binary_expression" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_compact_if" value="52"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression" value="48"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_multiple_fields" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration" value="64"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration" value="64"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_imports" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_package" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_field" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_imports" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_member_type" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_method" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_package" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value="next_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_array_initializer" value="next_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block" value="next_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block_in_case" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration" value="next_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_method_declaration" value="next_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_switch" value="next_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_type_declaration" value="next_line"/>
+<setting id="org.eclipse.jdt.core.formatter.compact_else_if" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.continuation_indentation" value="2"/>
+<setting id="org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer" value="2"/>
+<setting id="org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_block" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_body" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_binary_operator" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_unary_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_binary_operator" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_unary_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.lineSplit" value="120"/>
+<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.tabulation.char" value="space"/>
+<setting id="org.eclipse.jdt.core.formatter.tabulation.size" value="3"/>
+</profile>
+</profiles>
Added: container/jboss50/branches/ropalka-jboss510/eclipse/jboss-style.xml
===================================================================
--- container/jboss50/branches/ropalka-jboss510/eclipse/jboss-style.xml (rev 0)
+++ container/jboss50/branches/ropalka-jboss510/eclipse/jboss-style.xml 2009-08-14 05:53:55 UTC (rev 10535)
@@ -0,0 +1,148 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ This configuration file was written by the eclipse-cs plugin configuration editor
+-->
+<!--
+ Checkstyle-Configuration: jboss-checkstyle
+ Description: none
+-->
+<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.2//EN" "http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
+<module name="Checker">
+ <property name="severity" value="warning"/>
+ <module name="TreeWalker">
+ <module name="ModifierOrder"/>
+ <module name="RedundantModifier"/>
+ <module name="AnonInnerLength"/>
+ <module name="ExecutableStatementCount">
+ <property name="max" value="60"/>
+ <property name="tokens" value="INSTANCE_INIT,STATIC_INIT,METHOD_DEF,CTOR_DEF"/>
+ </module>
+ <module name="LineLength">
+ <property name="max" value="168"/>
+ <property name="tabWidth" value="3"/>
+ </module>
+ <module name="MethodLength"/>
+ <module name="ParameterNumber"/>
+ <module name="AvoidStarImport"/>
+ <module name="IllegalImport"/>
+ <module name="ImportOrder"/>
+ <module name="RedundantImport"/>
+ <module name="UnusedImports"/>
+ <module name="AbstractClassName"/>
+ <module name="ConstantName"/>
+ <module name="LocalFinalVariableName"/>
+ <module name="LocalVariableName"/>
+ <module name="MemberName"/>
+ <module name="MethodName"/>
+ <module name="PackageName"/>
+ <module name="ParameterName"/>
+ <module name="StaticVariableName"/>
+ <module name="TypeName"/>
+ <module name="CovariantEquals"/>
+ <module name="DefaultComesLast"/>
+ <module name="DeclarationOrder"/>
+ <module name="DoubleCheckedLocking"/>
+ <module name="EqualsHashCode"/>
+ <module name="ExplicitInitialization"/>
+ <module name="FallThrough"/>
+ <module name="FinalLocalVariable"/>
+ <module name="IllegalInstantiation"/>
+ <module name="IllegalType">
+ <property name="tokens" value="METHOD_DEF,PARAMETER_DEF"/>
+ </module>
+ <module name="InnerAssignment"/>
+ <module name="MagicNumber">
+ <property name="ignoreNumbers" value="-1, 0, 1"/>
+ </module>
+ <module name="MissingCtor"/>
+ <module name="MissingSwitchDefault"/>
+ <module name="ModifiedControlVariable"/>
+ <module name="MultipleStringLiterals"/>
+ <module name="MultipleVariableDeclarations"/>
+ <module name="NestedIfDepth"/>
+ <module name="NestedTryDepth"/>
+ <module name="PackageDeclaration"/>
+ <module name="ParameterAssignment"/>
+ <module name="RedundantThrows">
+ <property name="logLoadErrors" value="true"/>
+ <property name="suppressLoadErrors" value="true"/>
+ </module>
+ <module name="RequireThis"/>
+ <module name="ReturnCount">
+ <property name="max" value="5"/>
+ </module>
+ <module name="SimplifyBooleanExpression"/>
+ <module name="SimplifyBooleanReturn"/>
+ <module name="StringLiteralEquality"/>
+ <module name="SuperClone"/>
+ <module name="SuperFinalize"/>
+ <module name="ArrayTrailingComma"/>
+ <module name="UnnecessaryParentheses"/>
+ <module name="DesignForExtension"/>
+ <module name="FinalClass"/>
+ <module name="HideUtilityClassConstructor"/>
+ <module name="InterfaceIsType"/>
+ <module name="ThrowsCount"/>
+ <module name="VisibilityModifier"/>
+ <module name="MutableException"/>
+ <module name="EmptyBlock"/>
+ <module name="LeftCurly">
+ <property name="option" value="nl"/>
+ <property name="maxLineLength" value="120"/>
+ </module>
+ <module name="RightCurly">
+ <property name="option" value="alone"/>
+ </module>
+ <module name="EmptyForInitializerPad">
+ <property name="option" value="space"/>
+ </module>
+ <module name="EmptyForIteratorPad">
+ <property name="option" value="space"/>
+ </module>
+ <module name="NoWhitespaceAfter"/>
+ <module name="NoWhitespaceBefore"/>
+ <module name="OperatorWrap">
+ <property name="option" value="eol"/>
+ <property name="tokens" value="ASSIGN,BAND,BAND_ASSIGN,BOR,BOR_ASSIGN,BSR,BSR_ASSIGN,BXOR,BXOR_ASSIGN,DIV,DIV_ASSIGN,EQUAL,GE,GT,LAND,LE,LITERAL_INSTANCEOF,LOR,LT,MINUS,MINUS_ASSIGN,MOD,MOD_ASSIGN,NOT_EQUAL,PLUS,PLUS_ASSIGN,SL,SL_ASSIGN,SR,SR_ASSIGN,STAR,STAR_ASSIGN"/>
+ </module>
+ <module name="MethodParamPad">
+ <property name="allowLineBreaks" value="true"/>
+ </module>
+ <module name="TabCharacter"/>
+ <module name="TypecastParenPad">
+ <property name="tokens" value="RPAREN,TYPECAST"/>
+ </module>
+ <module name="WhitespaceAround">
+ <property name="tokens" value="ASSIGN,BAND,BAND_ASSIGN,BOR,BOR_ASSIGN,BSR,BSR_ASSIGN,BXOR,BXOR_ASSIGN,DIV,DIV_ASSIGN,EQUAL,GE,GT,LAND,LE,LITERAL_ASSERT,LITERAL_CATCH,LITERAL_DO,LITERAL_ELSE,LITERAL_FINALLY,LITERAL_FOR,LITERAL_IF,LITERAL_RETURN,LITERAL_SYNCHRONIZED,LITERAL_TRY,LITERAL_WHILE,LOR,LT,MINUS,MINUS_ASSIGN,MOD,MOD_ASSIGN,NOT_EQUAL,PLUS,PLUS_ASSIGN,SL,SLIST,SL_ASSIGN,SR,SR_ASSIGN,STAR,STAR_ASSIGN,LITERAL_ASSERT,TYPE_EXTENSION_AND"/>
+ </module>
+ <module name="NeedBraces"/>
+ <module name="WhitespaceAfter">
+ <property name="tokens" value="COMMA,SEMI"/>
+ </module>
+ <module name="BooleanExpressionComplexity"/>
+ <module name="ClassDataAbstractionCoupling"/>
+ <module name="ClassFanOutComplexity"/>
+ <module name="CyclomaticComplexity"/>
+ <module name="JavaNCSS"/>
+ <module name="NPathComplexity"/>
+ <module name="UncommentedMain"/>
+ <module name="TodoComment"/>
+ <module name="TrailingComment"/>
+ <module name="Indentation">
+ <property name="basicOffset" value="3"/>
+ <property name="caseIndent" value="3"/>
+ </module>
+ <module name="FinalParameters"/>
+ <module name="ArrayTypeStyle"/>
+ <module name="JavadocMethod">
+ <property name="allowUndeclaredRTE" value="true"/>
+ <property name="logLoadErrors" value="true"/>
+ </module>
+ <module name="JavadocStyle"/>
+ <module name="JavadocType"/>
+ <module name="JavadocVariable"/>
+ <module name="WriteTag"/>
+ <module name="SuperFinalize"/>
+ </module>
+ <module name="NewlineAtEndOfFile"/>
+</module>
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/config/ServerConfigImpl.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/config/ServerConfigImpl.java 2009-08-13 14:10:42 UTC (rev 10534)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/config/ServerConfigImpl.java 2009-08-14 05:53:55 UTC (rev 10535)
@@ -92,7 +92,7 @@
File location = null;
try
{
- location = (File)this.getMbeanServer().getAttribute(on, attributeName);
+ location = (File) this.getMbeanServer().getAttribute(on, attributeName);
}
catch (final JMException e)
{
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentBuilder.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentBuilder.java 2009-08-13 14:10:42 UTC (rev 10534)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentBuilder.java 2009-08-14 05:53:55 UTC (rev 10535)
@@ -218,7 +218,7 @@
if (unit instanceof VFSDeploymentUnit)
{
- final VFSDeploymentUnit vfsUnit = (VFSDeploymentUnit)unit;
+ final VFSDeploymentUnit vfsUnit = (VFSDeploymentUnit) unit;
final List<VirtualFile> virtualFiles = vfsUnit.getMetaDataFiles(WSDeploymentBuilder.WS_FILE_FILTER);
final Set<UnifiedVirtualFile> uVirtualFiles = new HashSet<UnifiedVirtualFile>();
for (VirtualFile vf : virtualFiles)
@@ -245,7 +245,7 @@
dep.setParent(parentDep);
}
- dep.setRootFile(new VirtualFileAdaptor(((VFSDeploymentUnit)unit).getRoot()));
+ dep.setRootFile(new VirtualFileAdaptor(((VFSDeploymentUnit) unit).getRoot()));
dep.setRuntimeClassLoader(unit.getClassLoader());
final DeploymentType deploymentType = ASHelper.getRequiredAttachment(unit, DeploymentType.class);
dep.setType(deploymentType);
@@ -262,7 +262,7 @@
*/
private ArchiveDeployment newDeployment(final String name, final ClassLoader loader)
{
- return (ArchiveDeployment)this.deploymentModelFactory.newDeployment(name, loader);
+ return (ArchiveDeployment) this.deploymentModelFactory.newDeployment(name, loader);
}
/**
@@ -276,7 +276,8 @@
* @param dep deployment
* @return attachment value if found in unit
*/
- protected final <A> A getAndPropagateAttachment(final Class<A> attachment, final DeploymentUnit unit, final Deployment dep)
+ protected final <A> A getAndPropagateAttachment(final Class<A> attachment, final DeploymentUnit unit,
+ final Deployment dep)
{
final A attachmentValue = ASHelper.getOptionalAttachment(unit, attachment);
@@ -335,7 +336,9 @@
*
* @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
*/
- private static final class JaxrpcJseDeploymentModelBuilder extends WSDeploymentBuilder.AbstractDeploymentModelBuilder
+ private static final class JaxrpcJseDeploymentModelBuilder
+ extends
+ WSDeploymentBuilder.AbstractDeploymentModelBuilder
{
/**
@@ -420,7 +423,9 @@
*
* @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
*/
- private static final class JaxrpcEjbDeploymentModelBuilder extends WSDeploymentBuilder.AbstractDeploymentModelBuilder
+ private static final class JaxrpcEjbDeploymentModelBuilder
+ extends
+ WSDeploymentBuilder.AbstractDeploymentModelBuilder
{
/**
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSEJBAdapterDeployer.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSEJBAdapterDeployer.java 2009-08-13 14:10:42 UTC (rev 10534)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSEJBAdapterDeployer.java 2009-08-14 05:53:55 UTC (rev 10535)
@@ -78,7 +78,8 @@
@Override
protected void internalDeploy(final DeploymentUnit unit) throws DeploymentException
{
- final JBossMetaData mergedMD = (JBossMetaData)unit.getAttachment(MergedJBossMetaDataDeployer.EJB_MERGED_ATTACHMENT_NAME);
+ final JBossMetaData mergedMD = (JBossMetaData) unit
+ .getAttachment(MergedJBossMetaDataDeployer.EJB_MERGED_ATTACHMENT_NAME);
final Ejb3Deployment ejb3Deployment = ASHelper.getOptionalAttachment(unit, Ejb3Deployment.class);
if (mergedMD != null)
@@ -114,14 +115,15 @@
* @return EJB container or null if not EJB3 stateless bean
* @throws DeploymentException if some error occurs
*/
- private EJBContainer getContainer(final Ejb3Deployment ejb3Deployment, final JBossEnterpriseBeanMetaData ejbMD) throws DeploymentException
+ private EJBContainer getContainer(final Ejb3Deployment ejb3Deployment, final JBossEnterpriseBeanMetaData ejbMD)
+ throws DeploymentException
{
if ((ejb3Deployment != null) && (!ejbMD.isEntity()))
{
try
{
final ObjectName objName = new ObjectName(ejbMD.determineContainerName());
- return (EJBContainer)ejb3Deployment.getContainer(objName);
+ return (EJBContainer) ejb3Deployment.getContainer(objName);
}
catch (MalformedObjectNameException e)
{
@@ -141,8 +143,10 @@
/** EJB meta data. */
private final JBossEnterpriseBeanMetaData ejbMetaData;
+
/** EJB container. */
private final EJBContainer ejbContainer;
+
/** Class loader. */
private final ClassLoader loader;
@@ -153,7 +157,8 @@
* @param ejbContainer EJB container
* @param loader class loader
*/
- private WebServiceDeclarationAdapter(final JBossEnterpriseBeanMetaData ejbMetaData, final EJBContainer ejbContainer, final ClassLoader loader)
+ private WebServiceDeclarationAdapter(final JBossEnterpriseBeanMetaData ejbMetaData,
+ final EJBContainer ejbContainer, final ClassLoader loader)
{
super();
@@ -220,7 +225,7 @@
else
{
final Class<?> bean = this.getComponentClass();
- return (T)bean.getAnnotation(annotationType);
+ return (T) bean.getAnnotation(annotationType);
}
}
@@ -237,7 +242,8 @@
}
catch (ClassNotFoundException cnfe)
{
- throw new RuntimeException("Failed to load component class: " + this.getComponentClassName() + " from loader: " + this.loader);
+ throw new RuntimeException("Failed to load component class: " + this.getComponentClassName()
+ + " from loader: " + this.loader);
}
}
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/injection/EJBBeanReferenceResolver.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/injection/EJBBeanReferenceResolver.java 2009-08-13 14:10:42 UTC (rev 10534)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/injection/EJBBeanReferenceResolver.java 2009-08-14 05:53:55 UTC (rev 10535)
@@ -43,6 +43,7 @@
* Deployment unit used for resolving process.
*/
private final DeploymentUnit unit;
+
/**
* Delegate used to resolve JNDI names.
*/
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/injection/InjectionMetaDataDeploymentAspect.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/injection/InjectionMetaDataDeploymentAspect.java 2009-08-13 14:10:42 UTC (rev 10534)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/injection/InjectionMetaDataDeploymentAspect.java 2009-08-14 05:53:55 UTC (rev 10535)
@@ -132,7 +132,8 @@
}
else if (WSHelper.isJaxwsEjbDeployment(dep))
{
- final WebServiceDeployment webServiceDeployment = ASHelper.getRequiredAttachment(unit, WebServiceDeployment.class);
+ final WebServiceDeployment webServiceDeployment = ASHelper.getRequiredAttachment(unit,
+ WebServiceDeployment.class);
// iterate through all EJB3 endpoints
for (final WebServiceDeclaration container : webServiceDeployment.getServiceEndpoints())
@@ -144,7 +145,8 @@
// build EJB 3 injections meta data
final EnvironmentEntriesMetaData ejbEnvEntries = this.getEnvironmentEntries(ejbName, unit);
final Context jndiContext = this.getJndiContext(container);
- final InjectionsMetaData injectionsMD = this.buildInjectionsMetaData(ejbEnvEntries, resolvers, jndiContext);
+ final InjectionsMetaData injectionsMD = this.buildInjectionsMetaData(ejbEnvEntries, resolvers,
+ jndiContext);
// associate injections meta data with EJB 3 endpoint
final Endpoint endpoint = dep.getService().getEndpointByName(ejbName);
@@ -179,7 +181,7 @@
{
try
{
- return (Context)container.getContext().lookup(InjectionMetaDataDeploymentAspect.EJB3_JNDI_PREFIX);
+ return (Context) container.getContext().lookup(InjectionMetaDataDeploymentAspect.EJB3_JNDI_PREFIX);
}
catch (NamingException ne)
{
@@ -264,7 +266,8 @@
targetName = resourceInjectionTargetMD.getInjectionTargetName();
// build injection meta data for injection target
- retVal.add(new InjectionMetaData(targetClass, targetName, envEntryValueClass, envEntryName, envEntryValue != null));
+ retVal.add(new InjectionMetaData(targetClass, targetName, envEntryValueClass, envEntryName,
+ envEntryValue != null));
}
}
}
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerEJB21.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerEJB21.java 2009-08-13 14:10:42 UTC (rev 10534)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerEJB21.java 2009-08-14 05:53:55 UTC (rev 10535)
@@ -92,7 +92,7 @@
final String ejbName = endpoint.getShortName();
final Deployment dep = endpoint.getService().getDeployment();
final EJBArchiveMetaData ejbArchiveMD = WSHelper.getRequiredAttachment(dep, EJBArchiveMetaData.class);
- final EJBMetaData ejbMD = (EJBMetaData)ejbArchiveMD.getBeanByEjbName(ejbName);
+ final EJBMetaData ejbMD = (EJBMetaData) ejbArchiveMD.getBeanByEjbName(ejbName);
if (ejbMD == null)
{
@@ -149,8 +149,10 @@
{
// prepare for invocation
final org.jboss.invocation.Invocation jbossInvocation = this.getMBeanInvocation(wsInvocation);
- final String[] signature = { org.jboss.invocation.Invocation.class.getName() };
- final Object[] args = new Object[] { jbossInvocation };
+ final String[] signature =
+ {org.jboss.invocation.Invocation.class.getName()};
+ final Object[] args = new Object[]
+ {jbossInvocation};
// invoke method
final Object retObj = this.server.invoke(ejb21Name, "invoke", args, signature);
@@ -192,11 +194,12 @@
// prepare invocation data
final Method method = wsInvocation.getJavaMethod();
final Object[] args = wsInvocation.getArgs();
- final org.jboss.invocation.Invocation jbossInvocation = new org.jboss.invocation.Invocation(null, method, args, null, principal, credential);
+ final org.jboss.invocation.Invocation jbossInvocation = new org.jboss.invocation.Invocation(null, method, args,
+ null, principal, credential);
// propagate values to JBoss invocation
jbossInvocation.setValue(InvocationKey.SOAP_MESSAGE_CONTEXT, msgContext);
- jbossInvocation.setValue(InvocationKey.SOAP_MESSAGE, ((SOAPMessageContext)msgContext).getMessage());
+ jbossInvocation.setValue(InvocationKey.SOAP_MESSAGE, ((SOAPMessageContext) msgContext).getMessage());
jbossInvocation.setType(InvocationType.SERVICE_ENDPOINT);
jbossInvocation.setValue(HandlerCallback.class.getName(), callback, PayloadKey.TRANSIENT);
jbossInvocation.setValue(Invocation.class.getName(), wsInvocation, PayloadKey.TRANSIENT);
@@ -215,8 +218,8 @@
{
try
{
- final EjbModule ejbModule = (EjbModule)this.server.getAttribute(objectName, "EjbModule");
- final StatelessSessionContainer container = (StatelessSessionContainer)ejbModule.getContainer(ejbName);
+ final EjbModule ejbModule = (EjbModule) this.server.getAttribute(objectName, "EjbModule");
+ final StatelessSessionContainer container = (StatelessSessionContainer) ejbModule.getContainer(ejbName);
Interceptor currentInterceptor = container.getInterceptor();
while (currentInterceptor != null && currentInterceptor.getNext() != null)
@@ -228,7 +231,8 @@
final ServiceEndpointInterceptorEJB21 sepInterceptor = new ServiceEndpointInterceptorEJB21();
currentInterceptor.setNext(sepInterceptor);
sepInterceptor.setNext(nextInterceptor);
- InvocationHandlerEJB21.LOG.debug("Injecting EJB 21 service endpoint interceptor after: " + currentInterceptor.getClass().getName());
+ InvocationHandlerEJB21.LOG.debug("Injecting EJB 21 service endpoint interceptor after: "
+ + currentInterceptor.getClass().getName());
return;
}
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerEJB3.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerEJB3.java 2009-08-13 14:10:42 UTC (rev 10534)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerEJB3.java 2009-08-14 05:53:55 UTC (rev 10535)
@@ -69,7 +69,7 @@
*/
public void init(final Endpoint endpoint)
{
- this.containerName = (String)endpoint.getProperty(WSConstants.CONTAINER_NAME);
+ this.containerName = (String) endpoint.getProperty(WSConstants.CONTAINER_NAME);
if (this.containerName == null)
{
@@ -94,7 +94,7 @@
throw new WebServiceException("Cannot find service endpoint target: " + this.containerName);
}
- this.serviceEndpointContainer = (ServiceEndpointContainer)context.getTarget();
+ this.serviceEndpointContainer = (ServiceEndpointContainer) context.getTarget();
}
return this.serviceEndpointContainer;
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerFactoryImpl.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerFactoryImpl.java 2009-08-13 14:10:42 UTC (rev 10534)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerFactoryImpl.java 2009-08-14 05:53:55 UTC (rev 10535)
@@ -54,25 +54,25 @@
switch (type)
{
- case JAXRPC_JSE:
+ case JAXRPC_JSE :
handler = new InvocationHandlerJAXRPC();
break;
- case JAXRPC_EJB21:
+ case JAXRPC_EJB21 :
handler = new InvocationHandlerEJB21();
break;
- case JAXRPC_MDB21:
+ case JAXRPC_MDB21 :
handler = new InvocationHandlerMDB21();
break;
- case JAXWS_JSE:
+ case JAXWS_JSE :
handler = new InvocationHandlerJAXWS();
break;
- case JAXWS_EJB3:
+ case JAXWS_EJB3 :
handler = new InvocationHandlerEJB3();
break;
- case JAXWS_MDB3:
+ case JAXWS_MDB3 :
handler = new InvocationHandlerMDB3();
break;
- default:
+ default :
throw new IllegalArgumentException("Unable to resolve spi.invocation.InvocationHandler for type " + type);
}
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerJAXRPC.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerJAXRPC.java 2009-08-13 14:10:42 UTC (rev 10534)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerJAXRPC.java 2009-08-14 05:53:55 UTC (rev 10535)
@@ -62,7 +62,7 @@
if (isJaxrpcLifecycleBean)
{
final ServletEndpointContext sepContext = invocationContext.getAttachment(ServletEndpointContext.class);
- ((ServiceLifecycle)targetBean).init(sepContext);
+ ((ServiceLifecycle) targetBean).init(sepContext);
}
}
@@ -83,7 +83,7 @@
if (isJaxrpcLifecycleBean)
{
- ((ServiceLifecycle)targetBean).destroy();
+ ((ServiceLifecycle) targetBean).destroy();
}
}
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/ServiceEndpointInterceptorEJB21.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/ServiceEndpointInterceptorEJB21.java 2009-08-13 14:10:42 UTC (rev 10534)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/ServiceEndpointInterceptorEJB21.java 2009-08-14 05:53:55 UTC (rev 10535)
@@ -59,15 +59,16 @@
@Override
public Object invoke(final org.jboss.invocation.Invocation jbossInvocation) throws Exception
{
- final SOAPMessageContext msgContext = (SOAPMessageContext)jbossInvocation.getPayloadValue(InvocationKey.SOAP_MESSAGE_CONTEXT);
+ final SOAPMessageContext msgContext = (SOAPMessageContext) jbossInvocation
+ .getPayloadValue(InvocationKey.SOAP_MESSAGE_CONTEXT);
if (msgContext == null)
{
// not for us
return this.getNext().invoke(jbossInvocation);
}
- final Invocation wsInvocation = (Invocation)jbossInvocation.getValue(Invocation.class.getName());
- final HandlerCallback callback = (HandlerCallback)jbossInvocation.getValue(HandlerCallback.class.getName());
+ final Invocation wsInvocation = (Invocation) jbossInvocation.getValue(Invocation.class.getName());
+ final HandlerCallback callback = (HandlerCallback) jbossInvocation.getValue(HandlerCallback.class.getName());
if (callback == null || wsInvocation == null)
{
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/AbstractMetaDataBuilderEJB.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/AbstractMetaDataBuilderEJB.java 2009-08-13 14:10:42 UTC (rev 10534)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/AbstractMetaDataBuilderEJB.java 2009-08-14 05:53:55 UTC (rev 10535)
@@ -100,7 +100,7 @@
if (wsDescriptionsMD != null)
{
// set wsdl location resolver
- final PublishLocationAdapter resolver = new PublishLocationAdapterImpl(wsDescriptionsMD);
+ final PublishLocationAdapter resolver = new PublishLocationAdapterImpl(wsDescriptionsMD);
ejbArchiveMD.setPublishLocationAdapter(resolver);
final WebserviceDescriptionMetaData wsDescriptionMD = this.getWebserviceDescriptionMetaData(wsDescriptionsMD);
@@ -112,14 +112,15 @@
}
}
}
-
+
/**
* Returns first webservice description meta data or null if not found.
*
* @param wsDescriptionsMD webservice descriptions
* @return webservice description
*/
- private WebserviceDescriptionMetaData getWebserviceDescriptionMetaData(final WebserviceDescriptionsMetaData wsDescriptionsMD)
+ private WebserviceDescriptionMetaData getWebserviceDescriptionMetaData(
+ final WebserviceDescriptionsMetaData wsDescriptionsMD)
{
if (wsDescriptionsMD != null)
{
@@ -133,7 +134,7 @@
return wsDescriptionsMD.iterator().next();
}
}
-
+
return null;
}
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB21.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB21.java 2009-08-13 14:10:42 UTC (rev 10534)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB21.java 2009-08-14 05:53:55 UTC (rev 10535)
@@ -53,7 +53,7 @@
{
super();
}
-
+
/**
* @see AbstractMetaDataBuilderEJB#buildEnterpriseBeansMetaData(Deployment, EJBArchiveMetaData)
*
@@ -70,7 +70,7 @@
{
this.buildEnterpriseBeanMetaData(wsEjbsMD, jbossEjbMD);
}
-
+
ejbArchiveMD.setEnterpriseBeans(wsEjbsMD);
ejbArchiveMD.setSecurityDomain(jbossMetaData.getSecurityDomain());
}
@@ -81,7 +81,8 @@
* @param wsEjbsMD jboss agnostic EJBs meta data
* @param jbossEjbMD jboss specific EJB meta data
*/
- private void buildEnterpriseBeanMetaData(final List<EJBMetaData> wsEjbsMD, final JBossEnterpriseBeanMetaData jbossEjbMD)
+ private void buildEnterpriseBeanMetaData(final List<EJBMetaData> wsEjbsMD,
+ final JBossEnterpriseBeanMetaData jbossEjbMD)
{
final EJBMetaData wsEjbMD = this.newEjbMetaData(jbossEjbMD);
@@ -90,16 +91,16 @@
// set EJB name and class
wsEjbMD.setEjbName(jbossEjbMD.getEjbName());
wsEjbMD.setEjbClass(jbossEjbMD.getEjbClass());
-
+
if (jbossEjbMD.isSession())
{
- final JBossSessionBeanMetaData sessionEjbMD = (JBossSessionBeanMetaData)jbossEjbMD;
+ final JBossSessionBeanMetaData sessionEjbMD = (JBossSessionBeanMetaData) jbossEjbMD;
// set home interfaces
wsEjbMD.setServiceEndpointInterface(sessionEjbMD.getServiceEndpoint());
wsEjbMD.setHome(sessionEjbMD.getHome());
wsEjbMD.setLocalHome(sessionEjbMD.getLocalHome());
-
+
// set JNDI names
wsEjbMD.setJndiName(sessionEjbMD.determineJndiName());
wsEjbMD.setLocalJndiName(jbossEjbMD.determineLocalJndiName());
@@ -110,7 +111,7 @@
// set port component meta data
wsEjbMD.setPortComponentName(portComponentMD.getPortComponentName());
wsEjbMD.setPortComponentURI(portComponentMD.getPortComponentURI());
-
+
// set security meta data
final EJBSecurityMetaData smd = new EJBSecurityMetaData();
smd.setAuthMethod(portComponentMD.getAuthMethod());
@@ -140,12 +141,12 @@
{
final MDBMetaData mdbMD = new MDBMetaData();
- final JBossMessageDrivenBeanMetaData jbossMessageBean = (JBossMessageDrivenBeanMetaData)jbossEjbMD;
- ((MDBMetaData)mdbMD).setDestinationJndiName(jbossMessageBean.getDestinationJndiName());
-
+ final JBossMessageDrivenBeanMetaData jbossMessageBean = (JBossMessageDrivenBeanMetaData) jbossEjbMD;
+ ((MDBMetaData) mdbMD).setDestinationJndiName(jbossMessageBean.getDestinationJndiName());
+
return mdbMD;
}
-
+
return null;
}
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB3.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB3.java 2009-08-13 14:10:42 UTC (rev 10534)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB3.java 2009-08-14 05:53:55 UTC (rev 10535)
@@ -66,7 +66,7 @@
{
final WebServiceDeployment ejb3Deployment = WSHelper.getRequiredAttachment(dep, WebServiceDeployment.class);
final List<EJBMetaData> wsEjbsMD = new ArrayList<EJBMetaData>();
-
+
for (final WebServiceDeclaration jbossEjbMD : ejb3Deployment.getServiceEndpoints())
{
this.buildEnterpriseBeanMetaData(wsEjbsMD, jbossEjbMD);
@@ -74,7 +74,7 @@
ejbArchiveMD.setEnterpriseBeans(wsEjbsMD);
}
-
+
/**
* Builds JBoss agnostic EJB meta data.
*
@@ -110,7 +110,7 @@
}
}
-
+
/**
* Creates new JBoss agnostic EJB bean meta data model.
*
@@ -131,7 +131,7 @@
final String destinationName = this.getActivationProperty("destination", mdbAnnotation.activationConfig());
mdbMD.setDestinationJndiName(destinationName);
-
+
return mdbMD;
}
}
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderJSE.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderJSE.java 2009-08-13 14:10:42 UTC (rev 10534)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderJSE.java 2009-08-14 05:53:55 UTC (rev 10535)
@@ -72,7 +72,7 @@
ModuleMetaData module = appmd.getModule(dep.getSimpleName());
if (module != null)
{
- WebModuleMetaData web = (WebModuleMetaData)module.getValue();
+ WebModuleMetaData web = (WebModuleMetaData) module.getValue();
contextRoot = web.getContextRoot();
}
}
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/security/JACCPermissionsDeploymentAspect.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/security/JACCPermissionsDeploymentAspect.java 2009-08-13 14:10:42 UTC (rev 10534)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/security/JACCPermissionsDeploymentAspect.java 2009-08-14 05:53:55 UTC (rev 10535)
@@ -65,8 +65,10 @@
try
{
- final PolicyConfigurationFactory policyConfigurationFactory = PolicyConfigurationFactory.getPolicyConfigurationFactory();
- final PolicyConfiguration policyConfiguration = policyConfigurationFactory.getPolicyConfiguration(dep.getSimpleName(), false);
+ final PolicyConfigurationFactory policyConfigurationFactory = PolicyConfigurationFactory
+ .getPolicyConfigurationFactory();
+ final PolicyConfiguration policyConfiguration = policyConfigurationFactory.getPolicyConfiguration(dep
+ .getSimpleName(), false);
WebPermissionMapping.createPermissions(jbossWebMD, policyConfiguration);
policyConfiguration.commit();
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/security/SecurityAdapterImpl.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/security/SecurityAdapterImpl.java 2009-08-13 14:10:42 UTC (rev 10534)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/security/SecurityAdapterImpl.java 2009-08-14 05:53:55 UTC (rev 10535)
@@ -98,7 +98,8 @@
*/
public void pushSubjectContext(final Subject subject, final Principal principal, final Object credential)
{
- AccessController.doPrivileged(new PrivilegedAction<Void>() {
+ AccessController.doPrivileged(new PrivilegedAction<Void>()
+ {
public Void run()
{
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB3.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB3.java 2009-08-13 14:10:42 UTC (rev 10534)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB3.java 2009-08-14 05:53:55 UTC (rev 10535)
@@ -156,10 +156,11 @@
* @param endpoint EJB webservice endpoint
* @return web context associated with EJB or null
*/
- @SuppressWarnings( { "unchecked" })
+ @SuppressWarnings(
+ {"unchecked"})
private WebContext getWebContextAnnotation(final Endpoint endpoint)
{
- return (WebContext)endpoint.getTargetBeanClass().getAnnotation(WebContext.class);
+ return (WebContext) endpoint.getTargetBeanClass().getAnnotation(WebContext.class);
}
/**
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataCreator.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataCreator.java 2009-08-13 14:10:42 UTC (rev 10534)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataCreator.java 2009-08-14 05:53:55 UTC (rev 10535)
@@ -220,16 +220,20 @@
if (hasAuthMethod || hasTransportGuarantee)
{
- final List<SecurityConstraintMetaData> securityConstraints = WebMetaDataHelper.getSecurityConstraints(jbossWebMD);
+ final List<SecurityConstraintMetaData> securityConstraints = WebMetaDataHelper
+ .getSecurityConstraints(jbossWebMD);
// security-constraint
- final SecurityConstraintMetaData securityConstraint = WebMetaDataHelper.newSecurityConstraint(securityConstraints);
+ final SecurityConstraintMetaData securityConstraint = WebMetaDataHelper
+ .newSecurityConstraint(securityConstraints);
// web-resource-collection
- final WebResourceCollectionsMetaData webResourceCollections = WebMetaDataHelper.getWebResourceCollections(securityConstraint);
+ final WebResourceCollectionsMetaData webResourceCollections = WebMetaDataHelper
+ .getWebResourceCollections(securityConstraint);
final String endpointName = ejbEndpoint.getShortName();
final String urlPattern = ejbEndpoint.getURLPattern();
- WebMetaDataHelper.newWebResourceCollection(endpointName, urlPattern, secureWsdlAccess, webResourceCollections);
+ WebMetaDataHelper.newWebResourceCollection(endpointName, urlPattern, secureWsdlAccess,
+ webResourceCollections);
// auth-constraint
if (hasAuthMethod)
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataHelper.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataHelper.java 2009-08-13 14:10:42 UTC (rev 10534)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataHelper.java 2009-08-14 05:53:55 UTC (rev 10535)
@@ -50,14 +50,19 @@
/** Star utility string. */
private static final String STAR_STRING = "*";
+
/** GET http method utility string. */
private static final String GET_STRING = "GET";
+
/** POST http method utility string. */
private static final String POST_STRING = "POST";
+
/** GET and POST methods utility list. */
private static List<String> getAndPostMethods;
+
/** POST method utility list. */
private static List<String> onlyPostMethod;
+
/** All roles utility list. */
private static List<String> allRoles;
@@ -292,8 +297,8 @@
* @param webResourceCollectionsMD web resource collections meta data
* @return new web resource collection meta data
*/
- static WebResourceCollectionMetaData newWebResourceCollection(final String servletName, final String urlPattern, final boolean securedWsdl,
- final WebResourceCollectionsMetaData webResourceCollectionsMD)
+ static WebResourceCollectionMetaData newWebResourceCollection(final String servletName, final String urlPattern,
+ final boolean securedWsdl, final WebResourceCollectionsMetaData webResourceCollectionsMD)
{
final WebResourceCollectionMetaData webResourceCollectionMD = new WebResourceCollectionMetaData();
@@ -313,7 +318,8 @@
* @param servletsMD servlets meta data
* @return new servlet meta data
*/
- static JBossServletMetaData newServlet(final String servletName, final String servletClass, final JBossServletsMetaData servletsMD)
+ static JBossServletMetaData newServlet(final String servletName, final String servletClass,
+ final JBossServletsMetaData servletsMD)
{
final JBossServletMetaData servletMD = new JBossServletMetaData();
@@ -332,7 +338,8 @@
* @param servletMappingsMD servlet mapping meta data
* @return new servlet mapping meta data
*/
- static ServletMappingMetaData newServletMapping(final String servletName, final List<String> urlPatterns, final List<ServletMappingMetaData> servletMappingsMD)
+ static ServletMappingMetaData newServletMapping(final String servletName, final List<String> urlPatterns,
+ final List<ServletMappingMetaData> servletMappingsMD)
{
final ServletMappingMetaData servletMappingMD = new ServletMappingMetaData();
@@ -350,7 +357,8 @@
* @param securityConstraintMD security constraint meta data
* @return new authentication constraint meta data
*/
- static AuthConstraintMetaData newAuthConstraint(final List<String> roleNames, final SecurityConstraintMetaData securityConstraintMD)
+ static AuthConstraintMetaData newAuthConstraint(final List<String> roleNames,
+ final SecurityConstraintMetaData securityConstraintMD)
{
final AuthConstraintMetaData authConstraintMD = new AuthConstraintMetaData();
@@ -367,7 +375,8 @@
* @param securityConstraintMD security constraint meta data
* @return new user data constraint meta data
*/
- static UserDataConstraintMetaData newUserDataConstraint(final String transportGuarantee, final SecurityConstraintMetaData securityConstraintMD)
+ static UserDataConstraintMetaData newUserDataConstraint(final String transportGuarantee,
+ final SecurityConstraintMetaData securityConstraintMD)
{
final UserDataConstraintMetaData userDataConstraintMD = new UserDataConstraintMetaData();
final TransportGuaranteeType transportGuaranteeValue = TransportGuaranteeType.valueOf(transportGuarantee);
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifier.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifier.java 2009-08-13 14:10:42 UTC (rev 10534)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifier.java 2009-08-14 05:53:55 UTC (rev 10535)
@@ -76,7 +76,8 @@
@SuppressWarnings("unchecked")
private void propagateContextProps(final Deployment dep, final JBossWebMetaData jbossWebMD)
{
- final Map<String, String> stackContextParams = (Map<String, String>)dep.getProperty(WSConstants.STACK_CONTEXT_PARAMS);
+ final Map<String, String> stackContextParams = (Map<String, String>) dep
+ .getProperty(WSConstants.STACK_CONTEXT_PARAMS);
if (stackContextParams != null)
{
@@ -128,7 +129,7 @@
*/
private String getTransportClassName(final Deployment dep)
{
- final String transportClassName = (String)dep.getProperty(WSConstants.STACK_TRANSPORT_CLASS);
+ final String transportClassName = (String) dep.getProperty(WSConstants.STACK_TRANSPORT_CLASS);
if (transportClassName == null)
{
14 years, 10 months
JBossWS SVN: r10534 - container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2009-08-13 10:10:42 -0400 (Thu, 13 Aug 2009)
New Revision: 10534
Modified:
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/AbstractMetaDataBuilderEJB.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB21.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB3.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/PublishLocationAdapterImpl.java
Log:
[JBWS-2320] refactoring (WIP)
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/AbstractMetaDataBuilderEJB.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/AbstractMetaDataBuilderEJB.java 2009-08-13 11:26:04 UTC (rev 10533)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/AbstractMetaDataBuilderEJB.java 2009-08-13 14:10:42 UTC (rev 10534)
@@ -30,61 +30,111 @@
import org.jboss.wsf.common.integration.WSHelper;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.PublishLocationAdapter;
/**
* Common class for EJB meta data builders.
*
* @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ * @author <a href="mailto:tdiesler@redhat.com">Thomas Diesler</a>
*/
abstract class AbstractMetaDataBuilderEJB
{
- protected final Logger log = Logger.getLogger(getClass());
+ /** Logger. */
+ private static final Logger LOGGER = Logger.getLogger(AbstractMetaDataBuilderEJB.class);
- final EJBArchiveMetaData create(Deployment dep, DeploymentUnit unit)
+ /**
+ * Builds universal EJB meta data model that is AS agnostic.
+ *
+ * @param dep webservice deployment
+ * @param unit deployment unit
+ * @return universal EJB meta data model
+ */
+ final EJBArchiveMetaData create(final Deployment dep, final DeploymentUnit unit)
{
- final EJBArchiveMetaData umd = new EJBArchiveMetaData();
+ final EJBArchiveMetaData ejbArchiveMD = new EJBArchiveMetaData();
- this.buildEnterpriseBeansMetaData(dep, umd);
- this.buildWebservicesMetaData(dep, umd);
+ this.buildEnterpriseBeansMetaData(dep, ejbArchiveMD);
+ this.buildWebservicesMetaData(dep, ejbArchiveMD);
- return umd;
+ return ejbArchiveMD;
}
/**
* Template method for build enterprise beans meta data.
*
+ * @param dep webservice deployment
* @param ejbMetaData universal EJB meta data model
- * @param dep webservice deployment
*/
protected abstract void buildEnterpriseBeansMetaData(Deployment dep, EJBArchiveMetaData ejbMetaData);
- private void buildWebservicesMetaData(Deployment dep, EJBArchiveMetaData ejbMetaData)
+ /**
+ * Builds webservices meta data. This methods sets:
+ * <ul>
+ * <li>context root</li>
+ * <li>wsdl location resolver</li>
+ * <li>config name</li>
+ * <li>config file</li>
+ * </ul>
+ *
+ * @param dep webservice deployment
+ * @param ejbArchiveMD universal EJB meta data model
+ */
+ private void buildWebservicesMetaData(final Deployment dep, final EJBArchiveMetaData ejbArchiveMD)
{
- JBossMetaData jbMetaData = WSHelper.getRequiredAttachment(dep, JBossMetaData.class);
+ final JBossMetaData jbossMD = WSHelper.getRequiredAttachment(dep, JBossMetaData.class);
+ final WebservicesMetaData webservicesMD = jbossMD.getWebservices();
- WebservicesMetaData webservicesMD = jbMetaData.getWebservices();
- if (webservicesMD != null)
+ if (webservicesMD == null)
{
- String contextRoot = webservicesMD.getContextRoot();
- ejbMetaData.setWebServiceContextRoot(contextRoot);
+ return;
+ }
- ejbMetaData.setPublishLocationAdapter(new PublishLocationAdapterImpl(webservicesMD.getWebserviceDescriptions()));
+ // set context root
+ final String contextRoot = webservicesMD.getContextRoot();
+ ejbArchiveMD.setWebServiceContextRoot(contextRoot);
- WebserviceDescriptionsMetaData wsDescriptions = webservicesMD.getWebserviceDescriptions();
- if (wsDescriptions != null)
+ final WebserviceDescriptionsMetaData wsDescriptionsMD = webservicesMD.getWebserviceDescriptions();
+
+ if (wsDescriptionsMD != null)
+ {
+ // set wsdl location resolver
+ final PublishLocationAdapter resolver = new PublishLocationAdapterImpl(wsDescriptionsMD);
+ ejbArchiveMD.setPublishLocationAdapter(resolver);
+
+ final WebserviceDescriptionMetaData wsDescriptionMD = this.getWebserviceDescriptionMetaData(wsDescriptionsMD);
+ if (wsDescriptionMD != null)
{
- if (wsDescriptions.size() > 1)
- log.warn("Multiple <webservice-description> elements not supported");
+ // set config name and config file
+ ejbArchiveMD.setConfigName(wsDescriptionMD.getConfigName());
+ ejbArchiveMD.setConfigFile(wsDescriptionMD.getConfigFile());
+ }
+ }
+ }
+
+ /**
+ * Returns first webservice description meta data or null if not found.
+ *
+ * @param wsDescriptionsMD webservice descriptions
+ * @return webservice description
+ */
+ private WebserviceDescriptionMetaData getWebserviceDescriptionMetaData(final WebserviceDescriptionsMetaData wsDescriptionsMD)
+ {
+ if (wsDescriptionsMD != null)
+ {
+ if (wsDescriptionsMD.size() > 1)
+ {
+ AbstractMetaDataBuilderEJB.LOGGER.warn("Multiple <webservice-description> elements not supported");
+ }
- if (wsDescriptions.size() > 0)
- {
- WebserviceDescriptionMetaData wsd = wsDescriptions.iterator().next();
- ejbMetaData.setConfigName(wsd.getConfigName());
- ejbMetaData.setConfigFile(wsd.getConfigFile());
- }
+ if (wsDescriptionsMD.size() > 0)
+ {
+ return wsDescriptionsMD.iterator().next();
}
}
+
+ return null;
}
}
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB21.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB21.java 2009-08-13 11:26:04 UTC (rev 10533)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB21.java 2009-08-13 14:10:42 UTC (rev 10534)
@@ -22,11 +22,9 @@
package org.jboss.webservices.integration.metadata;
import java.util.ArrayList;
-import java.util.Iterator;
import java.util.List;
import org.jboss.metadata.ejb.jboss.JBossEnterpriseBeanMetaData;
-import org.jboss.metadata.ejb.jboss.JBossEnterpriseBeansMetaData;
import org.jboss.metadata.ejb.jboss.JBossMessageDrivenBeanMetaData;
import org.jboss.metadata.ejb.jboss.JBossMetaData;
import org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData;
@@ -48,65 +46,107 @@
final class MetaDataBuilderEJB21 extends AbstractMetaDataBuilderEJB
{
+ /**
+ * Constructor.
+ */
+ MetaDataBuilderEJB21()
+ {
+ super();
+ }
+
+ /**
+ * @see AbstractMetaDataBuilderEJB#buildEnterpriseBeansMetaData(Deployment, EJBArchiveMetaData)
+ *
+ * @param dep webservice deployment
+ * @param ejbArchiveMD EJB archive meta data
+ */
@Override
- protected void buildEnterpriseBeansMetaData(Deployment dep, EJBArchiveMetaData jarMetaData)
+ protected void buildEnterpriseBeansMetaData(final Deployment dep, final EJBArchiveMetaData ejbArchiveMD)
{
- JBossMetaData jbossMetaData = WSHelper.getRequiredAttachment(dep, JBossMetaData.class);
- List<EJBMetaData> targetBeans = new ArrayList<EJBMetaData>();
- JBossEnterpriseBeansMetaData sourceBeans = jbossMetaData.getEnterpriseBeans();
- Iterator<JBossEnterpriseBeanMetaData> it = sourceBeans.iterator();
- while (it.hasNext())
+ final JBossMetaData jbossMetaData = WSHelper.getRequiredAttachment(dep, JBossMetaData.class);
+ final List<EJBMetaData> wsEjbsMD = new ArrayList<EJBMetaData>();
+
+ for (final JBossEnterpriseBeanMetaData jbossEjbMD : jbossMetaData.getEnterpriseBeans())
{
- JBossEnterpriseBeanMetaData bmd = it.next();
- buildBeanMetaData(targetBeans, bmd);
+ this.buildEnterpriseBeanMetaData(wsEjbsMD, jbossEjbMD);
}
- jarMetaData.setEnterpriseBeans(targetBeans);
- jarMetaData.setSecurityDomain(jbossMetaData.getSecurityDomain());
+
+ ejbArchiveMD.setEnterpriseBeans(wsEjbsMD);
+ ejbArchiveMD.setSecurityDomain(jbossMetaData.getSecurityDomain());
}
- private EJBMetaData buildBeanMetaData(List<EJBMetaData> ejbBeans, JBossEnterpriseBeanMetaData jbossBeansMetaData)
+ /**
+ * Builds JBoss agnostic EJB meta data.
+ *
+ * @param wsEjbsMD jboss agnostic EJBs meta data
+ * @param jbossEjbMD jboss specific EJB meta data
+ */
+ private void buildEnterpriseBeanMetaData(final List<EJBMetaData> wsEjbsMD, final JBossEnterpriseBeanMetaData jbossEjbMD)
{
- EJBMetaData targetBean = null;
- if (jbossBeansMetaData.isSession())
+ final EJBMetaData wsEjbMD = this.newEjbMetaData(jbossEjbMD);
+
+ if (wsEjbMD != null)
{
- targetBean = new SLSBMetaData();
- JBossSessionBeanMetaData jbossSessionBean = (JBossSessionBeanMetaData)jbossBeansMetaData;
+ // set EJB name and class
+ wsEjbMD.setEjbName(jbossEjbMD.getEjbName());
+ wsEjbMD.setEjbClass(jbossEjbMD.getEjbClass());
+
+ if (jbossEjbMD.isSession())
+ {
+ final JBossSessionBeanMetaData sessionEjbMD = (JBossSessionBeanMetaData)jbossEjbMD;
- targetBean.setEjbName(jbossSessionBean.getEjbName());
- targetBean.setEjbClass(jbossSessionBean.getEjbClass());
- targetBean.setServiceEndpointInterface(jbossSessionBean.getServiceEndpoint());
- targetBean.setHome(jbossSessionBean.getHome());
- targetBean.setLocalHome(jbossSessionBean.getLocalHome());
- targetBean.setJndiName(jbossSessionBean.determineJndiName());
- targetBean.setLocalJndiName(jbossBeansMetaData.determineLocalJndiName());
+ // set home interfaces
+ wsEjbMD.setServiceEndpointInterface(sessionEjbMD.getServiceEndpoint());
+ wsEjbMD.setHome(sessionEjbMD.getHome());
+ wsEjbMD.setLocalHome(sessionEjbMD.getLocalHome());
+
+ // set JNDI names
+ wsEjbMD.setJndiName(sessionEjbMD.determineJndiName());
+ wsEjbMD.setLocalJndiName(jbossEjbMD.determineLocalJndiName());
- PortComponent pcmd = jbossSessionBean.getPortComponent();
- if (pcmd != null)
- {
- targetBean.setPortComponentName(pcmd.getPortComponentName());
- targetBean.setPortComponentURI(pcmd.getPortComponentURI());
- EJBSecurityMetaData smd = new EJBSecurityMetaData();
- smd.setAuthMethod(pcmd.getAuthMethod());
- smd.setTransportGuarantee(pcmd.getTransportGuarantee());
- smd.setSecureWSDLAccess(pcmd.getSecureWSDLAccess());
- targetBean.setSecurityMetaData(smd);
+ final PortComponent portComponentMD = sessionEjbMD.getPortComponent();
+ if (portComponentMD != null)
+ {
+ // set port component meta data
+ wsEjbMD.setPortComponentName(portComponentMD.getPortComponentName());
+ wsEjbMD.setPortComponentURI(portComponentMD.getPortComponentURI());
+
+ // set security meta data
+ final EJBSecurityMetaData smd = new EJBSecurityMetaData();
+ smd.setAuthMethod(portComponentMD.getAuthMethod());
+ smd.setTransportGuarantee(portComponentMD.getTransportGuarantee());
+ smd.setSecureWSDLAccess(portComponentMD.getSecureWSDLAccess());
+ wsEjbMD.setSecurityMetaData(smd);
+ }
}
+
+ wsEjbsMD.add(wsEjbMD);
}
- else if (jbossBeansMetaData.isMessageDriven())
+ }
+
+ /**
+ * Creates new JBoss agnostic EJB bean meta data model.
+ *
+ * @param jbossEjbMD jboss EJB meta data
+ * @return webservices EJB meta data
+ */
+ private EJBMetaData newEjbMetaData(final JBossEnterpriseBeanMetaData jbossEjbMD)
+ {
+ if (jbossEjbMD.isSession())
{
- targetBean = new MDBMetaData();
- JBossMessageDrivenBeanMetaData jbossMessageBean = (JBossMessageDrivenBeanMetaData)jbossBeansMetaData;
+ return new SLSBMetaData();
+ }
+ else if (jbossEjbMD.isMessageDriven())
+ {
+ final MDBMetaData mdbMD = new MDBMetaData();
- targetBean.setEjbName(jbossMessageBean.getEjbName());
- targetBean.setEjbClass(jbossMessageBean.getEjbClass());
- targetBean.setLocalJndiName(jbossBeansMetaData.getLocalJndiName());
- ((MDBMetaData)targetBean).setDestinationJndiName(jbossMessageBean.getDestinationJndiName());
+ final JBossMessageDrivenBeanMetaData jbossMessageBean = (JBossMessageDrivenBeanMetaData)jbossEjbMD;
+ ((MDBMetaData)mdbMD).setDestinationJndiName(jbossMessageBean.getDestinationJndiName());
+
+ return mdbMD;
}
-
- if (targetBean != null)
- ejbBeans.add(targetBean);
-
- return targetBean;
+
+ return null;
}
}
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB3.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB3.java 2009-08-13 11:26:04 UTC (rev 10533)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB3.java 2009-08-13 14:10:42 UTC (rev 10534)
@@ -21,23 +21,23 @@
*/
package org.jboss.webservices.integration.metadata;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.ejb.ActivationConfigProperty;
+import javax.ejb.MessageDriven;
+
import org.jboss.wsf.common.integration.WSHelper;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.integration.WebServiceDeclaration;
import org.jboss.wsf.spi.deployment.integration.WebServiceDeployment;
-import org.jboss.wsf.spi.metadata.j2ee.PortComponentSpec;
+import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
import org.jboss.wsf.spi.metadata.j2ee.EJBMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.EJBSecurityMetaData;
import org.jboss.wsf.spi.metadata.j2ee.MDBMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.PortComponentSpec;
import org.jboss.wsf.spi.metadata.j2ee.SLSBMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.EJBSecurityMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
-import javax.ejb.ActivationConfigProperty;
-import javax.ejb.MessageDriven;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
/**
* Builds container independent meta data from EJB3 container meta data.
*
@@ -47,70 +47,112 @@
final class MetaDataBuilderEJB3 extends AbstractMetaDataBuilderEJB
{
+ /**
+ * Constructor.
+ */
+ MetaDataBuilderEJB3()
+ {
+ super();
+ }
+
+ /**
+ * @see AbstractMetaDataBuilderEJB#buildEnterpriseBeansMetaData(Deployment, EJBArchiveMetaData)
+ *
+ * @param dep webservice deployment
+ * @param ejbArchiveMD EJB archive meta data
+ */
@Override
- protected void buildEnterpriseBeansMetaData(Deployment dep, EJBArchiveMetaData jarMetaData)
+ protected void buildEnterpriseBeansMetaData(final Deployment dep, final EJBArchiveMetaData ejbArchiveMD)
{
- WebServiceDeployment ejb3Deployment = WSHelper.getRequiredAttachment(dep, WebServiceDeployment.class);
- List<EJBMetaData> ejbMetaDataList = new ArrayList<EJBMetaData>();
- Iterator<WebServiceDeclaration> it = ejb3Deployment.getServiceEndpoints().iterator();
- while (it.hasNext())
+ final WebServiceDeployment ejb3Deployment = WSHelper.getRequiredAttachment(dep, WebServiceDeployment.class);
+ final List<EJBMetaData> wsEjbsMD = new ArrayList<EJBMetaData>();
+
+ for (final WebServiceDeclaration jbossEjbMD : ejb3Deployment.getServiceEndpoints())
{
- WebServiceDeclaration container = it.next();
+ this.buildEnterpriseBeanMetaData(wsEjbsMD, jbossEjbMD);
+ }
- PortComponentSpec pcMetaData = container.getAnnotation(PortComponentSpec.class);
- MessageDriven mdbMetaData = container.getAnnotation(MessageDriven.class);
+ ejbArchiveMD.setEnterpriseBeans(wsEjbsMD);
+ }
+
+ /**
+ * Builds JBoss agnostic EJB meta data.
+ *
+ * @param wsEjbsMD jboss agnostic EJBs meta data
+ * @param jbossEjbMD jboss specific EJB meta data
+ */
+ private void buildEnterpriseBeanMetaData(final List<EJBMetaData> wsEjbsMD, final WebServiceDeclaration jbossEjbMD)
+ {
+ final EJBMetaData wsEjbMD = this.newEjbMetaData(jbossEjbMD);
- EJBMetaData ejbMetaData = null;
+ if (wsEjbMD != null)
+ {
+ // set EJB name and class
+ wsEjbMD.setEjbName(jbossEjbMD.getComponentName());
+ wsEjbMD.setEjbClass(jbossEjbMD.getComponentClassName());
- if (mdbMetaData != null)
+ final PortComponentSpec portComponentAnnotation = jbossEjbMD.getAnnotation(PortComponentSpec.class);
+ if (portComponentAnnotation != null)
{
- ejbMetaData = new MDBMetaData();
+ // set port component meta data
+ wsEjbMD.setPortComponentName(portComponentAnnotation.portComponentName());
+ wsEjbMD.setPortComponentURI(portComponentAnnotation.portComponentURI());
- ActivationConfigProperty[] props = mdbMetaData.activationConfig();
- if (props != null)
- {
- String destination = getActivationProperty("destination", props);
- if (destination != null)
- {
- ((MDBMetaData)ejbMetaData).setDestinationJndiName(destination);
- }
- }
+ // set security meta data
+ final EJBSecurityMetaData wsEjbSecurityMD = new EJBSecurityMetaData();
+ wsEjbSecurityMD.setAuthMethod(portComponentAnnotation.authMethod());
+ wsEjbSecurityMD.setTransportGuarantee(portComponentAnnotation.transportGuarantee());
+ wsEjbSecurityMD.setSecureWSDLAccess(portComponentAnnotation.secureWSDLAccess());
+ wsEjbMD.setSecurityMetaData(wsEjbSecurityMD);
}
- else
- {
- ejbMetaData = new SLSBMetaData();
- }
- if (ejbMetaData != null)
- {
- ejbMetaData.setEjbName(container.getComponentName());
- ejbMetaData.setEjbClass(container.getComponentClassName());
+ wsEjbsMD.add(wsEjbMD);
+ }
- if (pcMetaData != null)
- {
- ejbMetaData.setPortComponentName(pcMetaData.portComponentName());
- ejbMetaData.setPortComponentURI(pcMetaData.portComponentURI());
- EJBSecurityMetaData smd = new EJBSecurityMetaData();
- smd.setAuthMethod(pcMetaData.authMethod());
- smd.setTransportGuarantee(pcMetaData.transportGuarantee());
- smd.setSecureWSDLAccess(pcMetaData.secureWSDLAccess());
- ejbMetaData.setSecurityMetaData(smd);
- }
+ }
+
+ /**
+ * Creates new JBoss agnostic EJB bean meta data model.
+ *
+ * @param jbossEjbMD jboss EJB meta data
+ * @return webservices EJB meta data
+ */
+ private EJBMetaData newEjbMetaData(final WebServiceDeclaration jbossEjbMD)
+ {
+ final MessageDriven mdbAnnotation = jbossEjbMD.getAnnotation(MessageDriven.class);
- ejbMetaDataList.add(ejbMetaData);
- }
+ if (mdbAnnotation == null)
+ {
+ return new SLSBMetaData();
}
+ else
+ {
+ final MDBMetaData mdbMD = new MDBMetaData();
- jarMetaData.setEnterpriseBeans(ejbMetaDataList);
+ final String destinationName = this.getActivationProperty("destination", mdbAnnotation.activationConfig());
+ mdbMD.setDestinationJndiName(destinationName);
+
+ return mdbMD;
+ }
}
- private String getActivationProperty(String name, ActivationConfigProperty[] props)
+ /**
+ * Returns activation config property value or null if not found.
+ *
+ * @param name activation property name
+ * @param activationConfigProperties activation config properties
+ * @return activation config property value
+ */
+ private String getActivationProperty(final String name, final ActivationConfigProperty[] activationConfigProperties)
{
- for (ActivationConfigProperty p : props)
+ if (activationConfigProperties != null)
{
- if (p.propertyName().equals(name))
+ for (final ActivationConfigProperty activationConfigProperty : activationConfigProperties)
{
- return p.propertyValue();
+ if (activationConfigProperty.propertyName().equals(name))
+ {
+ return activationConfigProperty.propertyValue();
+ }
}
}
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/PublishLocationAdapterImpl.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/PublishLocationAdapterImpl.java 2009-08-13 11:26:04 UTC (rev 10533)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/PublishLocationAdapterImpl.java 2009-08-13 14:10:42 UTC (rev 10534)
@@ -29,6 +29,7 @@
* Publish location adapter implementation.
*
* @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ * @author <a href="mailto:tdiesler@redhat.com">Thomas Diesler</a>
*/
final class PublishLocationAdapterImpl implements PublishLocationAdapter
{
@@ -48,11 +49,17 @@
this.wsDescriptionsMD = wsDescriptionsMD;
}
+ /**
+ * @see org.jboss.wsf.spi.metadata.j2ee.PublishLocationAdapter#getWsdlPublishLocationByName(String)
+ *
+ * @param endpointName endpoint name
+ * @return publish location
+ */
public String getWsdlPublishLocationByName(final String endpointName)
{
if (this.wsDescriptionsMD != null)
{
- final WebserviceDescriptionMetaData endpointMD = wsDescriptionsMD.get(endpointName);
+ final WebserviceDescriptionMetaData endpointMD = this.wsDescriptionsMD.get(endpointName);
if (endpointMD != null)
{
14 years, 10 months
JBossWS SVN: r10533 - in container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration: deployers and 3 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2009-08-13 07:26:04 -0400 (Thu, 13 Aug 2009)
New Revision: 10533
Added:
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/AbstractMetaDataBuilderEJB.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/PublishLocationAdapterImpl.java
Modified:
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/config/ServerConfigImpl.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentBuilder.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/injection/InjectionMetaDataDeploymentAspect.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/AbstractInvocationHandler.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/ContainerMetaDataDeploymentAspect.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB21.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB3.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderJSE.java
Log:
[JBWS-2320] refactoring
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/config/ServerConfigImpl.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/config/ServerConfigImpl.java 2009-08-13 10:46:11 UTC (rev 10532)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/config/ServerConfigImpl.java 2009-08-13 11:26:04 UTC (rev 10533)
@@ -46,7 +46,7 @@
{
super();
}
-
+
/**
* Gets server temp directory.
*
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentBuilder.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentBuilder.java 2009-08-13 10:46:11 UTC (rev 10532)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentBuilder.java 2009-08-13 11:26:04 UTC (rev 10533)
@@ -399,6 +399,7 @@
public void build(final Deployment dep, final DeploymentUnit unit)
{
this.getAndPropagateAttachment(WebServiceDeployment.class, unit, dep);
+ this.getAndPropagateAttachment(JBossMetaData.class, unit, dep);
final Iterator<WebServiceDeclaration> ejbIterator = ASHelper.getJaxwsEjbs(unit).iterator();
while (ejbIterator.hasNext())
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/injection/InjectionMetaDataDeploymentAspect.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/injection/InjectionMetaDataDeploymentAspect.java 2009-08-13 10:46:11 UTC (rev 10532)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/injection/InjectionMetaDataDeploymentAspect.java 2009-08-13 11:26:04 UTC (rev 10533)
@@ -153,7 +153,7 @@
}
}
}
-
+
/**
* Returns environment entries meta data associated with specified EJB 3 bean.
*
@@ -165,7 +165,7 @@
{
final JBossMetaData jbossMD = ASHelper.getRequiredAttachment(unit, JBossMetaData.class);
final JBossEnterpriseBeansMetaData enterpriseBeansMDs = jbossMD.getEnterpriseBeans();
-
+
return enterpriseBeansMDs.get(ejbName).getEnvironmentEntries();
}
@@ -196,7 +196,7 @@
private Map<Class<? extends Annotation>, ReferenceResolver> getResolvers(final DeploymentUnit unit)
{
final Map<Class<? extends Annotation>, ReferenceResolver> resolvers = new HashMap<Class<? extends Annotation>, ReferenceResolver>();
-
+
resolvers.put(Resource.class, InjectionMetaDataDeploymentAspect.RESOURCE_RESOLVER);
resolvers.put(EJB.class, new EJBBeanReferenceResolver(unit, this.getEjbReferenceResolver()));
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/AbstractInvocationHandler.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/AbstractInvocationHandler.java 2009-08-13 10:46:11 UTC (rev 10532)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/AbstractInvocationHandler.java 2009-08-13 11:26:04 UTC (rev 10533)
@@ -43,7 +43,7 @@
{
super();
}
-
+
/**
* Creates invocation.
*
Added: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/AbstractMetaDataBuilderEJB.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/AbstractMetaDataBuilderEJB.java (rev 0)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/AbstractMetaDataBuilderEJB.java 2009-08-13 11:26:04 UTC (rev 10533)
@@ -0,0 +1,90 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, 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.webservices.integration.metadata;
+
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.logging.Logger;
+import org.jboss.metadata.common.jboss.WebserviceDescriptionMetaData;
+import org.jboss.metadata.common.jboss.WebserviceDescriptionsMetaData;
+import org.jboss.metadata.ejb.jboss.JBossMetaData;
+import org.jboss.metadata.ejb.jboss.WebservicesMetaData;
+import org.jboss.wsf.common.integration.WSHelper;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
+
+/**
+ * Common class for EJB meta data builders.
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+abstract class AbstractMetaDataBuilderEJB
+{
+
+ protected final Logger log = Logger.getLogger(getClass());
+
+ final EJBArchiveMetaData create(Deployment dep, DeploymentUnit unit)
+ {
+ final EJBArchiveMetaData umd = new EJBArchiveMetaData();
+
+ this.buildEnterpriseBeansMetaData(dep, umd);
+ this.buildWebservicesMetaData(dep, umd);
+
+ return umd;
+ }
+
+ /**
+ * Template method for build enterprise beans meta data.
+ *
+ * @param ejbMetaData universal EJB meta data model
+ * @param dep webservice deployment
+ */
+ protected abstract void buildEnterpriseBeansMetaData(Deployment dep, EJBArchiveMetaData ejbMetaData);
+
+ private void buildWebservicesMetaData(Deployment dep, EJBArchiveMetaData ejbMetaData)
+ {
+ JBossMetaData jbMetaData = WSHelper.getRequiredAttachment(dep, JBossMetaData.class);
+
+ WebservicesMetaData webservicesMD = jbMetaData.getWebservices();
+ if (webservicesMD != null)
+ {
+ String contextRoot = webservicesMD.getContextRoot();
+ ejbMetaData.setWebServiceContextRoot(contextRoot);
+
+ ejbMetaData.setPublishLocationAdapter(new PublishLocationAdapterImpl(webservicesMD.getWebserviceDescriptions()));
+
+ WebserviceDescriptionsMetaData wsDescriptions = webservicesMD.getWebserviceDescriptions();
+ if (wsDescriptions != null)
+ {
+ if (wsDescriptions.size() > 1)
+ log.warn("Multiple <webservice-description> elements not supported");
+
+ if (wsDescriptions.size() > 0)
+ {
+ WebserviceDescriptionMetaData wsd = wsDescriptions.iterator().next();
+ ejbMetaData.setConfigName(wsd.getConfigName());
+ ejbMetaData.setConfigFile(wsd.getConfigFile());
+ }
+ }
+ }
+ }
+
+}
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/ContainerMetaDataDeploymentAspect.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/ContainerMetaDataDeploymentAspect.java 2009-08-13 10:46:11 UTC (rev 10532)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/ContainerMetaDataDeploymentAspect.java 2009-08-13 11:26:04 UTC (rev 10533)
@@ -39,13 +39,13 @@
{
/** JSE meta data builder. */
- private MetaDataBuilderJSE metaDataBuilderJSE = new MetaDataBuilderJSE();
+ private final MetaDataBuilderJSE metaDataBuilderJSE = new MetaDataBuilderJSE();
/** EJB3 meta data builder. */
- private MetaDataBuilderEJB3 metaDataBuilderEJB3 = new MetaDataBuilderEJB3();
+ private final MetaDataBuilderEJB3 metaDataBuilderEJB3 = new MetaDataBuilderEJB3();
/** EJB21 meta data builder. */
- private MetaDataBuilderEJB21 metaDataBuilderEJB21 = new MetaDataBuilderEJB21();
+ private final MetaDataBuilderEJB21 metaDataBuilderEJB21 = new MetaDataBuilderEJB21();
/**
* Constructor.
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB21.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB21.java 2009-08-13 10:46:11 UTC (rev 10532)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB21.java 2009-08-13 11:26:04 UTC (rev 10533)
@@ -25,25 +25,19 @@
import java.util.Iterator;
import java.util.List;
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.logging.Logger;
-import org.jboss.metadata.common.jboss.WebserviceDescriptionMetaData;
-import org.jboss.metadata.common.jboss.WebserviceDescriptionsMetaData;
import org.jboss.metadata.ejb.jboss.JBossEnterpriseBeanMetaData;
import org.jboss.metadata.ejb.jboss.JBossEnterpriseBeansMetaData;
import org.jboss.metadata.ejb.jboss.JBossMessageDrivenBeanMetaData;
import org.jboss.metadata.ejb.jboss.JBossMetaData;
import org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData;
-import org.jboss.metadata.ejb.jboss.WebservicesMetaData;
import org.jboss.metadata.javaee.spec.PortComponent;
-import org.jboss.webservices.integration.util.ASHelper;
+import org.jboss.wsf.common.integration.WSHelper;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
import org.jboss.wsf.spi.metadata.j2ee.EJBMetaData;
import org.jboss.wsf.spi.metadata.j2ee.EJBSecurityMetaData;
import org.jboss.wsf.spi.metadata.j2ee.MDBMetaData;
import org.jboss.wsf.spi.metadata.j2ee.SLSBMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData.PublishLocationAdapter;
/**
* Builds container independent meta data from EJB21 container meta data.
@@ -51,26 +45,13 @@
* @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
* @author <a href="mailto:tdiesler@redhat.com">Thomas Diesler</a>
*/
-final class MetaDataBuilderEJB21
+final class MetaDataBuilderEJB21 extends AbstractMetaDataBuilderEJB
{
- private static Logger log = Logger.getLogger(MetaDataBuilderEJB21.class);
-
- EJBArchiveMetaData create(Deployment dep, DeploymentUnit unit)
+ @Override
+ protected void buildEnterpriseBeansMetaData(Deployment dep, EJBArchiveMetaData jarMetaData)
{
- JBossMetaData jbossMetaData = ASHelper.getRequiredAttachment(unit, JBossMetaData.class);
- dep.addAttachment(JBossMetaData.class, jbossMetaData);
-
- EJBArchiveMetaData ejbMetaData = new EJBArchiveMetaData();
- buildEnterpriseBeansMetaData(ejbMetaData, jbossMetaData);
- buildWebservicesMetaData(ejbMetaData, jbossMetaData);
- ejbMetaData.setSecurityDomain(jbossMetaData.getSecurityDomain());
-
- return ejbMetaData;
- }
-
- private void buildEnterpriseBeansMetaData(EJBArchiveMetaData ejbMetaData, JBossMetaData jbossMetaData)
- {
+ JBossMetaData jbossMetaData = WSHelper.getRequiredAttachment(dep, JBossMetaData.class);
List<EJBMetaData> targetBeans = new ArrayList<EJBMetaData>();
JBossEnterpriseBeansMetaData sourceBeans = jbossMetaData.getEnterpriseBeans();
Iterator<JBossEnterpriseBeanMetaData> it = sourceBeans.iterator();
@@ -79,52 +60,10 @@
JBossEnterpriseBeanMetaData bmd = it.next();
buildBeanMetaData(targetBeans, bmd);
}
- ejbMetaData.setEnterpriseBeans(targetBeans);
+ jarMetaData.setEnterpriseBeans(targetBeans);
+ jarMetaData.setSecurityDomain(jbossMetaData.getSecurityDomain());
}
- private void buildWebservicesMetaData(EJBArchiveMetaData ejbMetaData, JBossMetaData jbossMetaData)
- {
- WebservicesMetaData webservices = jbossMetaData.getWebservices();
- if (webservices != null)
- {
- String contextRoot = webservices.getContextRoot();
- ejbMetaData.setWebServiceContextRoot(contextRoot);
-
- ejbMetaData.setPublishLocationAdapter(getPublishLocationAdpater(webservices));
-
- WebserviceDescriptionsMetaData wsDescriptions = webservices.getWebserviceDescriptions();
- if (wsDescriptions != null)
- {
- if (wsDescriptions.size() > 1)
- log.warn("Multiple <webservice-description> elements not supported");
-
- if (wsDescriptions.size() > 0)
- {
- WebserviceDescriptionMetaData wsd = wsDescriptions.iterator().next();
- ejbMetaData.setConfigName(wsd.getConfigName());
- ejbMetaData.setConfigFile(wsd.getConfigFile());
- }
- }
- }
- }
-
- private PublishLocationAdapter getPublishLocationAdpater(final WebservicesMetaData wsMetaData)
- {
- return new PublishLocationAdapter() {
- public String getWsdlPublishLocationByName(String name)
- {
- String wsdlPublishLocation = null;
- WebserviceDescriptionsMetaData wsDescriptions = wsMetaData.getWebserviceDescriptions();
- if (wsDescriptions != null && wsDescriptions.get(name) != null)
- {
- WebserviceDescriptionMetaData wsdMetaData = wsDescriptions.get(name);
- wsdlPublishLocation = wsdMetaData.getWsdlPublishLocation();
- }
- return wsdlPublishLocation;
- }
- };
- }
-
private EJBMetaData buildBeanMetaData(List<EJBMetaData> ejbBeans, JBossEnterpriseBeanMetaData jbossBeansMetaData)
{
EJBMetaData targetBean = null;
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB3.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB3.java 2009-08-13 10:46:11 UTC (rev 10532)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB3.java 2009-08-13 11:26:04 UTC (rev 10533)
@@ -21,19 +21,16 @@
*/
package org.jboss.webservices.integration.metadata;
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.logging.Logger;
-import org.jboss.metadata.common.jboss.WebserviceDescriptionMetaData;
-import org.jboss.metadata.common.jboss.WebserviceDescriptionsMetaData;
-import org.jboss.metadata.ejb.jboss.JBossMetaData;
-import org.jboss.metadata.ejb.jboss.WebservicesMetaData;
-import org.jboss.webservices.integration.util.ASHelper;
import org.jboss.wsf.common.integration.WSHelper;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.integration.WebServiceDeclaration;
import org.jboss.wsf.spi.deployment.integration.WebServiceDeployment;
-import org.jboss.wsf.spi.metadata.j2ee.*;
-import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData.PublishLocationAdapter;
+import org.jboss.wsf.spi.metadata.j2ee.PortComponentSpec;
+import org.jboss.wsf.spi.metadata.j2ee.EJBMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.MDBMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.SLSBMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.EJBSecurityMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
import javax.ejb.ActivationConfigProperty;
import javax.ejb.MessageDriven;
@@ -47,52 +44,13 @@
* @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
* @author <a href="mailto:tdiesler@redhat.com">Thomas Diesler</a>
*/
-final class MetaDataBuilderEJB3
+final class MetaDataBuilderEJB3 extends AbstractMetaDataBuilderEJB
{
- private static Logger log = Logger.getLogger(MetaDataBuilderEJB3.class);
-
- EJBArchiveMetaData create(Deployment dep, DeploymentUnit unit)
+ @Override
+ protected void buildEnterpriseBeansMetaData(Deployment dep, EJBArchiveMetaData jarMetaData)
{
- EJBArchiveMetaData umd = new EJBArchiveMetaData();
-
- WebServiceDeployment webServiceDeployment = WSHelper.getRequiredAttachment(dep, WebServiceDeployment.class);
- buildEnterpriseBeansMetaData(umd, webServiceDeployment);
-
- JBossMetaData jbMetaData = ASHelper.getRequiredAttachment(unit, JBossMetaData.class);
- buildWebservicesMetaData(umd, jbMetaData);
-
- return umd;
- }
-
- private void buildWebservicesMetaData(EJBArchiveMetaData ejbMetaData, JBossMetaData jbMetaData)
- {
- WebservicesMetaData wsMetaData = jbMetaData.getWebservices();
- if (wsMetaData != null)
- {
- String contextRoot = wsMetaData.getContextRoot();
- ejbMetaData.setWebServiceContextRoot(contextRoot);
-
- ejbMetaData.setPublishLocationAdapter(getPublishLocationAdpater(wsMetaData));
-
- WebserviceDescriptionsMetaData wsDescriptions = wsMetaData.getWebserviceDescriptions();
- if (wsDescriptions != null)
- {
- if (wsDescriptions.size() > 1)
- log.warn("Multiple <webservice-description> elements not supported");
-
- if (wsDescriptions.size() > 0)
- {
- WebserviceDescriptionMetaData wsd = wsDescriptions.iterator().next();
- ejbMetaData.setConfigName(wsd.getConfigName());
- ejbMetaData.setConfigFile(wsd.getConfigFile());
- }
- }
- }
- }
-
- private void buildEnterpriseBeansMetaData(EJBArchiveMetaData jarMetaData, WebServiceDeployment ejb3Deployment)
- {
+ WebServiceDeployment ejb3Deployment = WSHelper.getRequiredAttachment(dep, WebServiceDeployment.class);
List<EJBMetaData> ejbMetaDataList = new ArrayList<EJBMetaData>();
Iterator<WebServiceDeclaration> it = ejb3Deployment.getServiceEndpoints().iterator();
while (it.hasNext())
@@ -148,34 +106,15 @@
private String getActivationProperty(String name, ActivationConfigProperty[] props)
{
- String result = null;
for (ActivationConfigProperty p : props)
{
if (p.propertyName().equals(name))
{
- result = p.propertyValue();
- break;
+ return p.propertyValue();
}
}
- return result;
+ return null;
}
- private PublishLocationAdapter getPublishLocationAdpater(final WebservicesMetaData wsMetaData)
- {
- return new PublishLocationAdapter() {
- public String getWsdlPublishLocationByName(String name)
- {
- String wsdlPublishLocation = null;
- WebserviceDescriptionsMetaData wsDescriptions = wsMetaData.getWebserviceDescriptions();
- if (wsDescriptions != null && wsDescriptions.get(name) != null)
- {
- WebserviceDescriptionMetaData wsdMetaData = wsDescriptions.get(name);
- wsdlPublishLocation = wsdMetaData.getWsdlPublishLocation();
- }
- return wsdlPublishLocation;
- }
- };
- }
-
}
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderJSE.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderJSE.java 2009-08-13 10:46:11 UTC (rev 10532)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderJSE.java 2009-08-13 11:26:04 UTC (rev 10533)
@@ -45,7 +45,6 @@
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.metadata.j2ee.JSEArchiveMetaData;
import org.jboss.wsf.spi.metadata.j2ee.JSESecurityMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.JSEArchiveMetaData.PublishLocationAdapter;
import org.jboss.wsf.spi.metadata.j2ee.JSESecurityMetaData.JSEResourceCollection;
/**
@@ -87,7 +86,7 @@
umd.setServletMappings(getServletMappings(jbossWebMetaData));
umd.setServletClassNames(getServletClassMap(jbossWebMetaData));
umd.setSecurityDomain(jbossWebMetaData.getSecurityDomain());
- umd.setPublishLocationAdapter(getPublishLocationAdpater(jbossWebMetaData));
+ umd.setPublishLocationAdapter(new PublishLocationAdapterImpl(jbossWebMetaData.getWebserviceDescriptions()));
umd.setSecurityMetaData(getSecurityMetaData(jbossWebMetaData.getSecurityContraints()));
setConfigNameAndFile(umd, jbossWebMetaData);
@@ -127,21 +126,6 @@
umd.setConfigFile(configFile);
}
- private PublishLocationAdapter getPublishLocationAdpater(final JBossWebMetaData wmd)
- {
- return new PublishLocationAdapter() {
- public String getWsdlPublishLocationByName(String name)
- {
- WebserviceDescriptionsMetaData wsdmd = wmd.getWebserviceDescriptions();
- WebserviceDescriptionMetaData wsmd = wsdmd.get(name);
- String location = null;
- if (wsmd != null)
- location = wsmd.getWsdlPublishLocation();
- return location;
- }
- };
- }
-
private List<JSESecurityMetaData> getSecurityMetaData(final List<SecurityConstraintMetaData> securityConstraints)
{
ArrayList<JSESecurityMetaData> unifiedsecurityMetaData = new ArrayList<JSESecurityMetaData>();
Added: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/PublishLocationAdapterImpl.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/PublishLocationAdapterImpl.java (rev 0)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/PublishLocationAdapterImpl.java 2009-08-13 11:26:04 UTC (rev 10533)
@@ -0,0 +1,66 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, 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.webservices.integration.metadata;
+
+import org.jboss.metadata.common.jboss.WebserviceDescriptionMetaData;
+import org.jboss.metadata.common.jboss.WebserviceDescriptionsMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.PublishLocationAdapter;
+
+/**
+ * Publish location adapter implementation.
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+final class PublishLocationAdapterImpl implements PublishLocationAdapter
+{
+
+ /** Webservice descriptions meta data. */
+ private final WebserviceDescriptionsMetaData wsDescriptionsMD;
+
+ /**
+ * Constructor.
+ *
+ * @param wsDescriptionsMD webservice descriptions meta data
+ */
+ PublishLocationAdapterImpl(final WebserviceDescriptionsMetaData wsDescriptionsMD)
+ {
+ super();
+
+ this.wsDescriptionsMD = wsDescriptionsMD;
+ }
+
+ public String getWsdlPublishLocationByName(final String endpointName)
+ {
+ if (this.wsDescriptionsMD != null)
+ {
+ final WebserviceDescriptionMetaData endpointMD = wsDescriptionsMD.get(endpointName);
+
+ if (endpointMD != null)
+ {
+ return endpointMD.getWsdlPublishLocation();
+ }
+ }
+
+ return null;
+ }
+
+}
14 years, 10 months
JBossWS SVN: r10532 - spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/metadata/j2ee.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2009-08-13 06:46:11 -0400 (Thu, 13 Aug 2009)
New Revision: 10532
Added:
spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/metadata/j2ee/PublishLocationAdapter.java
Modified:
spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/metadata/j2ee/EJBArchiveMetaData.java
spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/metadata/j2ee/JSEArchiveMetaData.java
Log:
[JBWS-2320] refactoring
Modified: spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/metadata/j2ee/EJBArchiveMetaData.java
===================================================================
--- spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/metadata/j2ee/EJBArchiveMetaData.java 2009-08-13 08:49:10 UTC (rev 10531)
+++ spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/metadata/j2ee/EJBArchiveMetaData.java 2009-08-13 10:46:11 UTC (rev 10532)
@@ -115,13 +115,12 @@
public String getWsdlPublishLocationByName(String name)
{
- String publishLocation = (publishLocationAdapter != null ? publishLocationAdapter.getWsdlPublishLocationByName(name) : null);
- return publishLocation;
-
+ if (this.publishLocationAdapter != null)
+ {
+ return this.publishLocationAdapter.getWsdlPublishLocationByName(name);
+ }
+
+ return null;
}
- public interface PublishLocationAdapter
- {
- String getWsdlPublishLocationByName(String name);
- }
}
Modified: spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/metadata/j2ee/JSEArchiveMetaData.java
===================================================================
--- spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/metadata/j2ee/JSEArchiveMetaData.java 2009-08-13 08:49:10 UTC (rev 10531)
+++ spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/metadata/j2ee/JSEArchiveMetaData.java 2009-08-13 10:46:11 UTC (rev 10532)
@@ -127,15 +127,12 @@
public String getWsdlPublishLocationByName(String name)
{
- String publishLocation = null;
- if (publishLocationAdapter != null)
- publishLocation = publishLocationAdapter.getWsdlPublishLocationByName(name);
- return publishLocation;
-
+ if (this.publishLocationAdapter != null)
+ {
+ return this.publishLocationAdapter.getWsdlPublishLocationByName(name);
+ }
+
+ return null;
}
- public interface PublishLocationAdapter
- {
- String getWsdlPublishLocationByName(String name);
- }
}
Added: spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/metadata/j2ee/PublishLocationAdapter.java
===================================================================
--- spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/metadata/j2ee/PublishLocationAdapter.java (rev 0)
+++ spi/branches/ropalka/src/main/java/org/jboss/wsf/spi/metadata/j2ee/PublishLocationAdapter.java 2009-08-13 10:46:11 UTC (rev 10532)
@@ -0,0 +1,19 @@
+package org.jboss.wsf.spi.metadata.j2ee;
+
+/**
+ * WSDL publish location adapter.
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+public interface PublishLocationAdapter
+{
+
+ /**
+ * Gets WSDL publish location for specified endpoint name.
+ *
+ * @param endpointName endpoint name
+ * @return WSDL publish location
+ */
+ public String getWsdlPublishLocationByName(String endpointName);
+
+}
\ No newline at end of file
14 years, 10 months
JBossWS SVN: r10531 - in stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/wsrm: jaxws and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2009-08-13 04:49:10 -0400 (Thu, 13 Aug 2009)
New Revision: 10531
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/wsrm/RMClientSequence.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/wsrm/RMSequence.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/wsrm/jaxws/RMHandlerHelper.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/wsrm/server/RMInvocationHandler.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/wsrm/server/RMServerSequence.java
Log:
[JBWS-2723][JBWS-2724] applying user patches
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/wsrm/RMClientSequence.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/wsrm/RMClientSequence.java 2009-08-13 07:38:12 UTC (rev 10530)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/wsrm/RMClientSequence.java 2009-08-13 08:49:10 UTC (rev 10531)
@@ -210,6 +210,10 @@
return (this.addressableClient) ? this.backPort.toString() : ANONYMOUS_URI;
}
+ public final void setAcksTo(URI uri) {
+ this.backPort = uri;
+ }
+
public final long newMessageNumber()
{
// no need for synchronization
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/wsrm/RMSequence.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/wsrm/RMSequence.java 2009-08-13 07:38:12 UTC (rev 10530)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/wsrm/RMSequence.java 2009-08-13 08:49:10 UTC (rev 10531)
@@ -21,6 +21,7 @@
*/
package org.jboss.ws.extensions.wsrm;
+import java.net.URI;
import java.util.Set;
/**
@@ -38,5 +39,6 @@
long getLastMessageNumber();
long getDuration();
String getAcksTo();
+ void setAcksTo(URI uri);
Set<Long> getReceivedInboundMessages();
}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/wsrm/jaxws/RMHandlerHelper.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/wsrm/jaxws/RMHandlerHelper.java 2009-08-13 07:38:12 UTC (rev 10530)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/wsrm/jaxws/RMHandlerHelper.java 2009-08-13 08:49:10 UTC (rev 10531)
@@ -180,6 +180,12 @@
RMCreateSequenceResponse createSequenceResponse = rmFactory.newCreateSequenceResponse();
createSequenceResponse.setIdentifier(seq.getInboundId());
createSequenceResponse.setExpires(RMHelper.longToDuration(seq.getDuration()));
+ if (seq.getAcksTo() != null)
+ {
+ RMCreateSequenceResponse.RMAccept a = createSequenceResponse.newAccept();
+ a.setAcksTo(seq.getAcksTo().toString());
+ createSequenceResponse.setAccept(a);
+ }
return createSequenceResponse;
}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/wsrm/server/RMInvocationHandler.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/wsrm/server/RMInvocationHandler.java 2009-08-13 07:38:12 UTC (rev 10530)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/wsrm/server/RMInvocationHandler.java 2009-08-13 08:49:10 UTC (rev 10531)
@@ -33,6 +33,7 @@
import javax.xml.ws.addressing.AddressingProperties;
import javax.xml.ws.addressing.JAXWSAConstants;
import javax.xml.ws.addressing.Relationship;
+import javax.xml.ws.addressing.soap.SOAPAddressingProperties;
import org.jboss.logging.Logger;
import org.jboss.ws.core.CommonMessageContext;
@@ -45,6 +46,7 @@
import org.jboss.ws.extensions.wsrm.common.RMHelper;
import org.jboss.ws.extensions.wsrm.protocol.RMConstants;
import org.jboss.ws.extensions.wsrm.protocol.RMProvider;
+import org.jboss.ws.extensions.wsrm.protocol.spi.RMCreateSequence;
import org.jboss.ws.extensions.wsrm.protocol.spi.RMCloseSequence;
import org.jboss.ws.extensions.wsrm.protocol.spi.RMSequence;
import org.jboss.ws.extensions.wsrm.protocol.spi.RMSequenceAcknowledgement;
@@ -149,7 +151,25 @@
if (RMHelper.isCreateSequence(rmReqProps))
{
- sequence = new RMServerSequence();
+ Map<QName, RMSerializable> data = (Map<QName, RMSerializable>)rmReqProps.get(RMConstant.PROTOCOL_MESSAGES_MAPPING);
+ RMCreateSequence rmCreateSequence = (RMCreateSequence)data.get((rmConstants.getCreateSequenceQName()));
+ if (rmCreateSequence.getOffer() != null)
+ {
+ sequence = new RMServerSequence(rmCreateSequence.getOffer().getIdentifier());
+ }
+ else
+ {
+ sequence = new RMServerSequence();
+ }
+
+
+ // TODO: Find out how to get AcksTo address - here I reuse the incomming Addressing 'TO'
+ SOAPAddressingProperties clientInboundAddrProps = (SOAPAddressingProperties)msgContext.get(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_INBOUND);
+ if (clientInboundAddrProps != null && clientInboundAddrProps.getTo() != null)
+ {
+ sequence.setAcksTo(clientInboundAddrProps.getTo().getURI());
+ }
+
RMStore.serialize(dataDir, sequence);
protocolMessages.add(rmConstants.getCreateSequenceResponseQName());
rmResponseContext.put(RMConstant.SEQUENCE_REFERENCE, sequence);
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/wsrm/server/RMServerSequence.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/wsrm/server/RMServerSequence.java 2009-08-13 07:38:12 UTC (rev 10530)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/wsrm/server/RMServerSequence.java 2009-08-13 08:49:10 UTC (rev 10531)
@@ -27,6 +27,7 @@
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
+import java.net.URI;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
@@ -55,6 +56,7 @@
private String inboundId;
private String outboundId;
private long creationTime;
+ private URI backPort;
private long duration;
private Set<Long> acknowledgedOutboundMessages = new TreeSet<Long>();
private Set<Long> receivedInboundMessages = new TreeSet<Long>();
@@ -96,9 +98,21 @@
public RMServerSequence()
{
+ this(AddressingClientUtil.generateMessageID().toString());
+ }
+
+ public RMServerSequence(String offeredOutboundId)
+ {
this.sequenceId = "seq-" + System.currentTimeMillis() + "-" + System.identityHashCode(this);
this.inboundId = AddressingClientUtil.generateMessageID().toString();
- this.outboundId = AddressingClientUtil.generateMessageID().toString();
+ if (offeredOutboundId != null)
+ {
+ this.outboundId = offeredOutboundId;
+ }
+ else
+ {
+ this.outboundId = AddressingClientUtil.generateMessageID().toString();
+ }
this.creationTime = System.currentTimeMillis();
this.duration = 10 * 60 * 1000L; // 10 minutes duration
}
@@ -120,9 +134,21 @@
public String getAcksTo()
{
- return null;
+ if (this.backPort != null)
+ {
+ return this.backPort.toString();
+ }
+ else
+ {
+ return null;
+ }
}
+ public final void setAcksTo(URI uri)
+ {
+ this.backPort = uri;
+ }
+
public String getOutboundId()
{
return this.outboundId;
14 years, 10 months
JBossWS SVN: r10530 - in container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration: deployers and 4 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2009-08-13 03:38:12 -0400 (Thu, 13 Aug 2009)
New Revision: 10530
Modified:
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/config/ServerConfigImpl.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentAspectDeployer.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentBuilder.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/injection/EJBBeanReferenceResolver.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/AbstractInvocationHandler.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/AbstractInvocationHandlerJSE.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerJAXRPC.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerJAXWS.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/ServiceEndpointInterceptorEJB21.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/security/JACCPermissionsDeploymentAspect.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/AbstractSecurityMetaDataAccessorEJB.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB21.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB3.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataCreatingDeploymentAspect.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifyingDeploymentAspect.java
Log:
[JBWS-2320] reviewed accessors and annotations
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/config/ServerConfigImpl.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/config/ServerConfigImpl.java 2009-08-13 07:00:39 UTC (rev 10529)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/config/ServerConfigImpl.java 2009-08-13 07:38:12 UTC (rev 10530)
@@ -30,38 +30,60 @@
import org.jboss.wsf.common.management.AbstractServerConfigMBean;
/**
- * A ServerConfig for AS <= 5.1.0
+ * AS specific ServerConfig.
*
* @author <a href="mailto:asoldano@redhat.com">Alessio Soldano</a>
* @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
* @author <a href="mailto:tdiesler@redhat.com">Thomas Diesler</a>
*/
-public class ServerConfigImpl extends AbstractServerConfig implements AbstractServerConfigMBean
+public final class ServerConfigImpl extends AbstractServerConfig implements AbstractServerConfigMBean
{
+ /**
+ * Constructor.
+ */
+ public ServerConfigImpl()
+ {
+ super();
+ }
+
+ /**
+ * Gets server temp directory.
+ *
+ * @return temp directory
+ */
public File getServerTempDir()
{
return this.getDirFromServerConfig("ServerTempDir");
}
+ /**
+ * Gets server home directory.
+ *
+ * @return home directory
+ */
public File getHomeDir()
{
return this.getDirFromServerConfig("HomeDir");
}
+ /**
+ * Gets server data directory.
+ *
+ * @return data directory
+ */
public File getServerDataDir()
{
return this.getDirFromServerConfig("ServerDataDir");
}
/**
- * Obtains the specified attribute from the server configuration,
- * represented as a {@link File}.
+ * Obtains the requested directory from the server configuration.
*
- * @param attributeName
- * @return
+ * @param attributeName directory attribute name
+ * @return requested directory
*/
- protected File getDirFromServerConfig(final String attributeName)
+ private File getDirFromServerConfig(final String attributeName)
{
// Define the ON to invoke upon
final ObjectName on = OBJECT_NAME_SERVER_CONFIG;
@@ -70,7 +92,7 @@
File location = null;
try
{
- location = (File)getMbeanServer().getAttribute(on, attributeName);
+ location = (File)this.getMbeanServer().getAttribute(on, attributeName);
}
catch (final JMException e)
{
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentAspectDeployer.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentAspectDeployer.java 2009-08-13 07:00:39 UTC (rev 10529)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentAspectDeployer.java 2009-08-13 07:38:12 UTC (rev 10530)
@@ -36,7 +36,7 @@
*
* @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
*/
-public final class WSDeploymentAspectDeployer extends AbstractRealDeployer
+final class WSDeploymentAspectDeployer extends AbstractRealDeployer
{
/** JBossWS specific inputs/outputs prefix. */
@@ -44,6 +44,7 @@
/** JBossWS specific metadata. */
private static final String JBOSSWS_METADATA = WSDeploymentAspectDeployer.JBOSSWS_ATTACHMENT_PREFIX + "metadata";
+
/** Delegee. */
private final DeploymentAspect aspect;
@@ -52,7 +53,7 @@
*
* @param aspect deployment aspect
*/
- public WSDeploymentAspectDeployer(final DeploymentAspect aspect)
+ WSDeploymentAspectDeployer(final DeploymentAspect aspect)
{
super();
@@ -97,7 +98,7 @@
* @throws DeploymentException on deployment failure
*/
@Override
- public void internalDeploy(final DeploymentUnit unit) throws DeploymentException
+ protected void internalDeploy(final DeploymentUnit unit) throws DeploymentException
{
if (ASHelper.isWebServiceDeployment(unit))
{
@@ -114,7 +115,7 @@
* @param unit deployment unit
*/
@Override
- public void internalUndeploy(final DeploymentUnit unit)
+ protected void internalUndeploy(final DeploymentUnit unit)
{
if (ASHelper.isWebServiceDeployment(unit))
{
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentBuilder.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentBuilder.java 2009-08-13 07:00:39 UTC (rev 10529)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentBuilder.java 2009-08-13 07:38:12 UTC (rev 10530)
@@ -147,7 +147,7 @@
/**
* Constructor.
*/
- AbstractDeploymentModelBuilder()
+ protected AbstractDeploymentModelBuilder()
{
super();
@@ -352,6 +352,7 @@
* @param dep webservice deployment
* @param unit deployment unit
*/
+ @Override
public void build(final Deployment dep, final DeploymentUnit unit)
{
final JBossWebMetaData webMetaData = this.getAndPropagateAttachment(JBossWebMetaData.class, unit, dep);
@@ -394,6 +395,7 @@
* @param dep webservice deployment
* @param unit deployment unit
*/
+ @Override
public void build(final Deployment dep, final DeploymentUnit unit)
{
this.getAndPropagateAttachment(WebServiceDeployment.class, unit, dep);
@@ -434,6 +436,7 @@
* @param dep webservice deployment
* @param unit deployment unit
*/
+ @Override
public void build(final Deployment dep, final DeploymentUnit unit)
{
final JBossMetaData jbmd = this.getAndPropagateAttachment(JBossMetaData.class, unit, dep);
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/injection/EJBBeanReferenceResolver.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/injection/EJBBeanReferenceResolver.java 2009-08-13 07:00:39 UTC (rev 10529)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/injection/EJBBeanReferenceResolver.java 2009-08-13 07:38:12 UTC (rev 10530)
@@ -54,7 +54,7 @@
* @param unit deployment unit
* @param delegate EJB reference resolver
*/
- public EJBBeanReferenceResolver(final DeploymentUnit unit, final EjbReferenceResolver delegate)
+ EJBBeanReferenceResolver(final DeploymentUnit unit, final EjbReferenceResolver delegate)
{
super(EJB.class);
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/AbstractInvocationHandler.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/AbstractInvocationHandler.java 2009-08-13 07:00:39 UTC (rev 10529)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/AbstractInvocationHandler.java 2009-08-13 07:38:12 UTC (rev 10530)
@@ -37,6 +37,14 @@
{
/**
+ * Constructor.
+ */
+ protected AbstractInvocationHandler()
+ {
+ super();
+ }
+
+ /**
* Creates invocation.
*
* @return invocation instance
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/AbstractInvocationHandlerJSE.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/AbstractInvocationHandlerJSE.java 2009-08-13 07:00:39 UTC (rev 10529)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/AbstractInvocationHandlerJSE.java 2009-08-13 07:38:12 UTC (rev 10530)
@@ -39,7 +39,7 @@
/**
* Constructor.
*/
- AbstractInvocationHandlerJSE()
+ protected AbstractInvocationHandlerJSE()
{
super();
}
@@ -63,7 +63,7 @@
* @return endpoint implementation
* @throws Exception if any error occurs
*/
- protected Object getTargetBean(final Endpoint endpoint, final Invocation invocation) throws Exception
+ protected final Object getTargetBean(final Endpoint endpoint, final Invocation invocation) throws Exception
{
final InvocationContext invocationContext = invocation.getInvocationContext();
Object targetBean = invocationContext.getTargetBean();
@@ -111,7 +111,7 @@
* @param invocation current invocation
* @throws Exception if any error occurs
*/
- public void invoke(final Endpoint endpoint, final Invocation invocation) throws Exception
+ public final void invoke(final Endpoint endpoint, final Invocation invocation) throws Exception
{
try
{
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerJAXRPC.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerJAXRPC.java 2009-08-13 07:00:39 UTC (rev 10529)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerJAXRPC.java 2009-08-13 07:38:12 UTC (rev 10530)
@@ -52,6 +52,7 @@
* @param invocation current invocation
* @throws Exception if any error occurs
*/
+ @Override
protected void onBeforeInvocation(final Invocation invocation) throws Exception
{
final InvocationContext invocationContext = invocation.getInvocationContext();
@@ -73,6 +74,7 @@
* @param invocation current invocation
* @throws Exception if any error occurs
*/
+ @Override
protected void onAfterInvocation(final Invocation invocation) throws Exception
{
final InvocationContext invocationContext = invocation.getInvocationContext();
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerJAXWS.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerJAXWS.java 2009-08-13 07:00:39 UTC (rev 10529)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerJAXWS.java 2009-08-13 07:38:12 UTC (rev 10530)
@@ -65,6 +65,7 @@
* @param endpoint used for predestroy phase registration process
* @param invocation current invocation
*/
+ @Override
protected void onEndpointInstantiated(final Endpoint endpoint, final Invocation invocation)
{
final InjectionsMetaData injectionsMD = endpoint.getAttachment(InjectionsMetaData.class);
@@ -81,6 +82,7 @@
*
* @param invocation current invocation
*/
+ @Override
protected void onBeforeInvocation(final Invocation invocation)
{
final WebServiceContext wsContext = this.getWebServiceContext(invocation);
@@ -98,6 +100,7 @@
*
* @param invocation current invocation
*/
+ @Override
protected void onAfterInvocation(final Invocation invocation)
{
final WebServiceContext wsContext = this.getWebServiceContext(invocation);
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/ServiceEndpointInterceptorEJB21.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/ServiceEndpointInterceptorEJB21.java 2009-08-13 07:00:39 UTC (rev 10529)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/ServiceEndpointInterceptorEJB21.java 2009-08-13 07:38:12 UTC (rev 10530)
@@ -56,6 +56,7 @@
* @return ws invocation return value
* @throws Exception if any error occurs
*/
+ @Override
public Object invoke(final org.jboss.invocation.Invocation jbossInvocation) throws Exception
{
final SOAPMessageContext msgContext = (SOAPMessageContext)jbossInvocation.getPayloadValue(InvocationKey.SOAP_MESSAGE_CONTEXT);
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/security/JACCPermissionsDeploymentAspect.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/security/JACCPermissionsDeploymentAspect.java 2009-08-13 07:00:39 UTC (rev 10529)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/security/JACCPermissionsDeploymentAspect.java 2009-08-13 07:38:12 UTC (rev 10530)
@@ -58,6 +58,7 @@
*
* @param dep webservice deployment
*/
+ @Override
public void start(final Deployment dep)
{
final JBossWebMetaData jbossWebMD = WSHelper.getRequiredAttachment(dep, JBossWebMetaData.class);
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/AbstractSecurityMetaDataAccessorEJB.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/AbstractSecurityMetaDataAccessorEJB.java 2009-08-13 07:00:39 UTC (rev 10529)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/AbstractSecurityMetaDataAccessorEJB.java 2009-08-13 07:38:12 UTC (rev 10530)
@@ -54,7 +54,7 @@
* @param securityDomain security domain to be prefixed
* @return security domain prefixed with jaas JNDI prefix
*/
- protected String appendJaasPrefix(final String securityDomain)
+ protected final String appendJaasPrefix(final String securityDomain)
{
if (securityDomain != null)
{
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB21.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB21.java 2009-08-13 07:00:39 UTC (rev 10529)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB21.java 2009-08-13 07:38:12 UTC (rev 10530)
@@ -40,7 +40,7 @@
/**
* Constructor.
*/
- public SecurityMetaDataAccessorEJB21()
+ SecurityMetaDataAccessorEJB21()
{
super();
}
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB3.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB3.java 2009-08-13 07:00:39 UTC (rev 10529)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB3.java 2009-08-13 07:38:12 UTC (rev 10530)
@@ -47,7 +47,7 @@
/**
* Constructor.
*/
- public SecurityMetaDataAccessorEJB3()
+ SecurityMetaDataAccessorEJB3()
{
super();
}
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataCreatingDeploymentAspect.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataCreatingDeploymentAspect.java 2009-08-13 07:00:39 UTC (rev 10529)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataCreatingDeploymentAspect.java 2009-08-13 07:38:12 UTC (rev 10530)
@@ -50,6 +50,7 @@
*
* @param dep webservice deployment
*/
+ @Override
public void start(final Deployment dep)
{
final boolean isEjbDeployment = WSHelper.isEjbDeployment(dep);
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifyingDeploymentAspect.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifyingDeploymentAspect.java 2009-08-13 07:00:39 UTC (rev 10529)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifyingDeploymentAspect.java 2009-08-13 07:38:12 UTC (rev 10530)
@@ -49,6 +49,7 @@
*
* @param dep webservice deployment
*/
+ @Override
public void start(final Deployment dep)
{
this.webMetaDataModifier.modify(dep);
14 years, 10 months
JBossWS SVN: r10529 - stack/cxf/trunk.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2009-08-13 03:00:39 -0400 (Thu, 13 Aug 2009)
New Revision: 10529
Modified:
stack/cxf/trunk/pom.xml
Log:
[JBWS-2402] fixing issue
Modified: stack/cxf/trunk/pom.xml
===================================================================
--- stack/cxf/trunk/pom.xml 2009-08-13 06:59:27 UTC (rev 10528)
+++ stack/cxf/trunk/pom.xml 2009-08-13 07:00:39 UTC (rev 10529)
@@ -66,9 +66,9 @@
<jaxb.impl.version>2.1.12</jaxb.impl.version>
<jaxrpc.api.version>1.1</jaxrpc.api.version>
<jaxws.api.version>2.1-1</jaxws.api.version>
- <juddi.version>0.9RC4</juddi.version>
- <jboss.jaxr.version>2.0.0</jboss.jaxr.version>
- <apache.scout.version>1.1</apache.scout.version>
+ <jboss.jaxr.version>2.0.1</jboss.jaxr.version>
+ <apache.scout.version>1.1.1</apache.scout.version>
+ <juddi.version>2.0.1</juddi.version>
<commons-collections.version>3.1</commons-collections.version>
<commons-lang.version>2.4</commons-lang.version>
<commons.logging.version>1.1.1</commons.logging.version>
14 years, 10 months