[jboss-cvs] JBossAS SVN: r108504 - in branches/weld-snapshot-integration: ejb3/src/main/java/org/jboss/ejb3/deployers and 37 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Sun Oct 10 22:01:06 EDT 2010
Author: marius.bogoevici
Date: 2010-10-10 22:01:02 -0400 (Sun, 10 Oct 2010)
New Revision: 108504
Added:
branches/weld-snapshot-integration/testsuite/imports/sections/scripts.xml
branches/weld-snapshot-integration/testsuite/src/main/org/jboss/test/scripts/support/Echo.java
branches/weld-snapshot-integration/testsuite/src/main/org/jboss/test/scripts/support/EchoClient.java
branches/weld-snapshot-integration/testsuite/src/main/org/jboss/test/scripts/support/EchoJavaBean.java
branches/weld-snapshot-integration/testsuite/src/main/org/jboss/test/scripts/support/Hello.java
branches/weld-snapshot-integration/testsuite/src/main/org/jboss/test/scripts/support/HelloJavaBean.java
branches/weld-snapshot-integration/testsuite/src/main/org/jboss/test/scripts/test/WsclientTestCase.java
branches/weld-snapshot-integration/testsuite/src/main/org/jboss/test/scripts/test/WsconsumeTestCase.java
branches/weld-snapshot-integration/testsuite/src/main/org/jboss/test/scripts/test/WsprovideTestCase.java
branches/weld-snapshot-integration/testsuite/src/main/org/jboss/test/scripts/test/WstoolsTestCase.java
branches/weld-snapshot-integration/testsuite/src/main/org/jboss/test/security/test/authorization/secured/HttpRequestJBossWSAuthenticationUnitTestCase.java
branches/weld-snapshot-integration/testsuite/src/resources/scripts/
branches/weld-snapshot-integration/testsuite/src/resources/scripts/BenchmarkWebService.wsdl
branches/weld-snapshot-integration/testsuite/src/resources/scripts/web.xml
branches/weld-snapshot-integration/testsuite/src/resources/scripts/wstools-config.xml
branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/AbstractDescriptorDeployer.java
branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/JMSDescriptorDeployer.java
branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXWS_JMS.java
branches/weld-snapshot-integration/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/JBossProxyServices.java
branches/weld-snapshot-integration/weld-int/deployer/src/main/java/org/jboss/weld/integration/provider/
branches/weld-snapshot-integration/weld-int/deployer/src/main/java/org/jboss/weld/integration/provider/JBossSingletonProvider.java
Removed:
branches/weld-snapshot-integration/testsuite/src/main/org/jboss/test/security/test/authorization/secured/HttpRequestStatusServletAuthenticationUnitTestCase.java
branches/weld-snapshot-integration/testsuite/src/resources/scripts/BenchmarkWebService.wsdl
branches/weld-snapshot-integration/testsuite/src/resources/scripts/web.xml
branches/weld-snapshot-integration/testsuite/src/resources/scripts/wstools-config.xml
branches/weld-snapshot-integration/weld-int/deployer/src/main/java/org/jboss/weld/integration/provider/JBossSingletonProvider.java
Modified:
branches/weld-snapshot-integration/component-matrix/pom.xml
branches/weld-snapshot-integration/ejb3/src/main/java/org/jboss/ejb3/deployers/JBossClientParsingDeployer.java
branches/weld-snapshot-integration/server/pom.xml
branches/weld-snapshot-integration/server/src/etc/deployers/metadata-deployer-jboss-beans.xml
branches/weld-snapshot-integration/server/src/main/java/org/jboss/web/deployers/AbstractWarDeployer.java
branches/weld-snapshot-integration/testsuite/build.xml
branches/weld-snapshot-integration/testsuite/imports/test-jars.xml
branches/weld-snapshot-integration/testsuite/src/main/org/jboss/test/scripts/README.txt
branches/weld-snapshot-integration/testsuite/src/main/org/jboss/test/scripts/test/ScriptsTestBase.java
branches/weld-snapshot-integration/testsuite/src/main/org/jboss/test/scripts/test/ShutdownTestCase.java
branches/weld-snapshot-integration/testsuite/src/main/org/jboss/test/scripts/test/TwiddleTestCase.java
branches/weld-snapshot-integration/testsuite/src/main/org/jboss/test/web/servlets/StandaloneENCAnnotationsServlet.java
branches/weld-snapshot-integration/testsuite/src/resources/security/authorization/xacml-ejb/META-INF/jboss-xacml-policy.xml
branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/config/ServerConfigFactoryImpl.java
branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/config/ServerConfigImpl.java
branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/JAXRPCAppClientClassPathDeployer.java
branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/JAXRPCClientClassPathDeployer.java
branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/JAXRPCEjbClientClassPathDeployer.java
branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/JAXRPCIntegrationClassPathDeployer.java
branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/JAXRPCServerClassPathDeployer.java
branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/JAXRPCServletClientClassPathDeployer.java
branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/SecurityActions.java
branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/WSAspectizedDeployersFactory.java
branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentAspectDeployer.java
branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentDeployer.java
branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/WSDescriptorDeployer.java
branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/WSEJBAdapterDeployer.java
branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/WSTypeDeployer.java
branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/deployment/AbstractDeploymentModelBuilder.java
branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilder.java
branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXRPC_EJB21.java
branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXRPC_JSE.java
branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXWS_EJB3.java
branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXWS_JSE.java
branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/deployment/WSDeploymentBuilder.java
branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/deployment/WSVirtualFileFilter.java
branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/endpoint/HornetQJMSResolver.java
branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/injection/EJBBeanReferenceResolver.java
branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/injection/InjectionMetaDataDeploymentAspect.java
branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerEJB21.java
branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerEJB3.java
branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerFactoryImpl.java
branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerMDB21.java
branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerMDB3.java
branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/invocation/ServiceEndpointInterceptorEJB21.java
branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/ioc/IoCContainerProxyFactoryImpl.java
branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/ioc/IoCContainerProxyImpl.java
branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/metadata/AbstractMetaDataBuilderEJB.java
branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/metadata/ContainerMetaDataDeploymentAspect.java
branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB21.java
branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB3.java
branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderJSE.java
branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/metadata/PublishLocationAdapterImpl.java
branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/security/JACCPermissionsDeploymentAspect.java
branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/security/SecurityAdapterFactoryImpl.java
branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/security/SecurityAdapterImpl.java
branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/tomcat/AbstractSecurityMetaDataAccessorEJB.java
branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB.java
branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB21.java
branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB3.java
branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataCreatingDeploymentAspect.java
branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataCreator.java
branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifier.java
branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifyingDeploymentAspect.java
branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/util/ASHelper.java
branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/util/WebMetaDataHelper.java
branches/weld-snapshot-integration/webservices/src/resources/jbossws-jboss.deployer/META-INF/stack-agnostic-jboss-beans.xml
branches/weld-snapshot-integration/weld-int/assembly/pom.xml
branches/weld-snapshot-integration/weld-int/assembly/src/main/assembly/assembly.xml
branches/weld-snapshot-integration/weld-int/assembly/src/main/assembly/resources/META-INF/weld-deployers-jboss-beans.xml
branches/weld-snapshot-integration/weld-int/deployer/pom.xml
branches/weld-snapshot-integration/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/cl/WeldCoreIntegrationDeployer.java
branches/weld-snapshot-integration/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/WeldBootstrapDeployer.java
branches/weld-snapshot-integration/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/bda/DUTopLevelClassLoaderGetter.java
branches/weld-snapshot-integration/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/helpers/BootstrapBean.java
Log:
Merged up to rev 108502 of trunk (includes sharing of Weld)
Modified: branches/weld-snapshot-integration/component-matrix/pom.xml
===================================================================
--- branches/weld-snapshot-integration/component-matrix/pom.xml 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/component-matrix/pom.xml 2010-10-11 02:01:02 UTC (rev 108504)
@@ -94,7 +94,7 @@
<version.org.jboss.interceptor>1.0.0-CR11</version.org.jboss.interceptor>
<version.org.jboss.integration>6.0.0.CR1</version.org.jboss.integration>
<version.org.jboss.javaee.specs.bom>1.0.0.Beta6</version.org.jboss.javaee.specs.bom>
- <version.org.jboss.jbossxb>2.0.2.Beta7</version.org.jboss.jbossxb>
+ <version.org.jboss.jbossxb>2.0.2.Beta9</version.org.jboss.jbossxb>
<version.org.jboss.jopr>1.4.0.CR2</version.org.jboss.jopr>
<version.org.jboss.jpa.deployers>1.0.2-alpha-1</version.org.jboss.jpa.deployers>
<version.org.jboss.jpa.vfs3>1.0.2-alpha-2</version.org.jboss.jpa.vfs3>
@@ -112,7 +112,7 @@
<version.org.jboss.metadata.client>2.0.0.Alpha2</version.org.jboss.metadata.client>
<version.org.jboss.metadata.common>2.0.0.Alpha17</version.org.jboss.metadata.common>
<version.org.jboss.metadata.ear>2.0.0.Alpha4</version.org.jboss.metadata.ear>
- <version.org.jboss.metadata.ejb>2.0.0-alpha-18</version.org.jboss.metadata.ejb>
+ <version.org.jboss.metadata.ejb>2.0.0-alpha-19</version.org.jboss.metadata.ejb>
<version.org.jboss.metadata.rar>2.0.0.Alpha</version.org.jboss.metadata.rar>
<version.org.jboss.metadata.war>2.0.0.Alpha14</version.org.jboss.metadata.war>
<version.org.jboss.mod_cluster>1.1.0.CR3</version.org.jboss.mod_cluster>
@@ -128,7 +128,7 @@
<version.org.jboss.scanning>1.0.0.Alpha6</version.org.jboss.scanning>
<version.org.picketbox>3.0.0.CR2</version.org.picketbox>
<version.org.jboss.security.negotiation>2.0.3.SP1</version.org.jboss.security.negotiation>
- <version.org.jboss.service.binding>1.1.1.Final</version.org.jboss.service.binding>
+ <version.org.jboss.service.binding>1.2.0.Final</version.org.jboss.service.binding>
<version.org.jboss.shrinkwrap>1.0.0-alpha-11</version.org.jboss.shrinkwrap>
<version.org.jboss.slf4j>1.0.2.GA</version.org.jboss.slf4j>
<version.org.jboss.stdio>1.0.0.CR3</version.org.jboss.stdio>
Modified: branches/weld-snapshot-integration/ejb3/src/main/java/org/jboss/ejb3/deployers/JBossClientParsingDeployer.java
===================================================================
--- branches/weld-snapshot-integration/ejb3/src/main/java/org/jboss/ejb3/deployers/JBossClientParsingDeployer.java 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/ejb3/src/main/java/org/jboss/ejb3/deployers/JBossClientParsingDeployer.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -21,8 +21,6 @@
*/
package org.jboss.ejb3.deployers;
-import org.jboss.deployers.spi.DeploymentException;
-import org.jboss.deployers.structure.spi.DeploymentUnit;
import org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer;
import org.jboss.metadata.client.jboss.JBossClientMetaData;
import org.jboss.metadata.client.spec.ApplicationClientMetaData;
@@ -30,11 +28,7 @@
/**
* The jboss-client.xml javaee client parsing deployer
*
- * This deployer generates a merged JBossClientMetaData.
- * For application-client.xml ApplicationClientMetaData is retrieved from
- * the attachments. If there is a jboss-client.xml it will be parsed
- * by the SchemaResolverDeployer.
- * If either one is available a merged view will be created.
+ *
*
* @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
* @author adrian at jboss.org
@@ -51,31 +45,4 @@
setName("jboss-client.xml");
}
- /**
- * Override to create the merged JBossClientMetaData view
- */
- @Override
- protected void createMetaData(DeploymentUnit unit, String name, String suffix) throws DeploymentException
- {
- super.createMetaData(unit, name, suffix);
- JBossClientMetaData jbossMetaData = getMetaData(unit, JBossClientMetaData.class.getName());
- ApplicationClientMetaData acmd = unit.getAttachment(ApplicationClientMetaData.class);
- // If either one is available generate a merged view
- if(jbossMetaData == null && acmd == null)
- return;
-
- // If there no JBossClientMetaData was created from a jboss-client.xml, create one
- if (jbossMetaData == null)
- {
- jbossMetaData = new JBossClientMetaData();
- }
- // Create a merged view
- JBossClientMetaData metaData = new JBossClientMetaData();
- metaData.merge(jbossMetaData, acmd, true);
- // Register the merged view as the output
- unit.getTransientManagedObjects().addAttachment(JBossClientMetaData.class.getName(), metaData, getOutput());
- // Keep the raw parsed as well
- // TODO: Wolf: Why? (ProfileService?)
- unit.getTransientManagedObjects().addAttachment("Raw"+JBossClientMetaData.class.getName(), jbossMetaData, getOutput());
- }
}
Modified: branches/weld-snapshot-integration/server/pom.xml
===================================================================
--- branches/weld-snapshot-integration/server/pom.xml 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/server/pom.xml 2010-10-11 02:01:02 UTC (rev 108504)
@@ -257,6 +257,11 @@
</dependency>
<dependency>
+ <groupId>org.jboss.ejb3.ejbref.resolver</groupId>
+ <artifactId>ejbref-resolver-spi</artifactId>
+ </dependency>
+
+ <dependency>
<groupId>org.jboss.integration</groupId>
<artifactId>jboss-deployment-spi</artifactId>
</dependency>
Modified: branches/weld-snapshot-integration/server/src/etc/deployers/metadata-deployer-jboss-beans.xml
===================================================================
--- branches/weld-snapshot-integration/server/src/etc/deployers/metadata-deployer-jboss-beans.xml 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/server/src/etc/deployers/metadata-deployer-jboss-beans.xml 2010-10-11 02:01:02 UTC (rev 108504)
@@ -274,6 +274,25 @@
</entry>
</map>
</property>
+
+ <!-- schema classes by QName's -->
+ <property name="bindingClassesByElementNames">
+ <map keyClass="javax.xml.namespace.QName" valueClass="java.lang.String">
+ <entry>
+ <key>
+ <bean class="javax.xml.namespace.QName">
+ <constructor>
+ <!-- namespace -->
+ <parameter>http://java.sun.com/xml/ns/javaee</parameter>
+ <!-- root element name -->
+ <parameter>ejb-jar</parameter>
+ </constructor>
+ </bean>
+ </key>
+ <value>org.jboss.metadata.ejb.spec.EjbJar31MetaData</value>
+ </entry>
+ </map>
+ </property>
</bean>
</deployment>
Modified: branches/weld-snapshot-integration/server/src/main/java/org/jboss/web/deployers/AbstractWarDeployer.java
===================================================================
--- branches/weld-snapshot-integration/server/src/main/java/org/jboss/web/deployers/AbstractWarDeployer.java 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/server/src/main/java/org/jboss/web/deployers/AbstractWarDeployer.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -35,9 +35,12 @@
import java.util.Set;
import javax.management.MBeanServer;
+import javax.management.MalformedObjectNameException;
import javax.management.ObjectName;
import org.jboss.beans.metadata.api.annotations.Inject;
+import org.jboss.dependency.plugins.AbstractDependencyItem;
+import org.jboss.dependency.spi.ControllerState;
import org.jboss.deployers.spi.DeploymentException;
import org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer;
import org.jboss.deployers.spi.deployer.helpers.AttachmentLocator;
@@ -45,6 +48,8 @@
import org.jboss.deployers.structure.spi.DeploymentUnit;
import org.jboss.deployers.structure.spi.main.MainDeployerInternals;
import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
+import org.jboss.ejb3.ejbref.resolver.spi.EjbReference;
+import org.jboss.ejb3.ejbref.resolver.spi.EjbReferenceResolver;
import org.jboss.jpa.resolvers.PersistenceUnitDependencyResolver;
import org.jboss.kernel.plugins.bootstrap.basic.KernelConstants;
import org.jboss.managed.api.ManagedObject;
@@ -58,6 +63,8 @@
import org.jboss.metadata.ear.jboss.JBossAppMetaData;
import org.jboss.metadata.ear.spec.ModuleMetaData;
import org.jboss.metadata.ear.spec.WebModuleMetaData;
+import org.jboss.metadata.javaee.spec.AnnotatedEJBReferenceMetaData;
+import org.jboss.metadata.javaee.spec.AnnotatedEJBReferencesMetaData;
import org.jboss.metadata.javaee.spec.PersistenceContextReferenceMetaData;
import org.jboss.metadata.javaee.spec.PersistenceContextReferencesMetaData;
import org.jboss.metadata.javaee.spec.PersistenceUnitReferenceMetaData;
@@ -72,6 +79,8 @@
import org.jboss.system.metadata.ServiceDependencyMetaData;
import org.jboss.system.metadata.ServiceInjectionValueMetaData;
import org.jboss.system.metadata.ServiceMetaData;
+import org.jboss.system.metadata.ServiceMetaDataVisitor;
+import org.jboss.system.microcontainer.ServiceControllerContext;
import org.jboss.vfs.VFS;
import org.jboss.vfs.VFSUtils;
import org.jboss.vfs.VirtualFile;
@@ -110,6 +119,8 @@
public static final String WEB_APP = "org.jboss.web.AbstractWebContainer.webApp";
public static final String WEB_MODULE = "org.jboss.web.AbstractWebContainer.webModule";
public static final String ERROR = "org.jboss.web.AbstractWebContainer.error";
+
+ private static final String JNDI_DEPENDENCY_PREFIX = "jndi:";
/** A mapping of deployed warUrl strings to the WebApplication object */
protected HashMap deploymentMap = new HashMap();
@@ -133,6 +144,9 @@
private MainDeployerInternals mainDeployer;
private PersistenceUnitDependencyResolver persistenceUnitDependencyResolver;
+
+ /** EJB reference resolver */
+ private EjbReferenceResolver ejbRefResolver;
/**
* Create a new AbstractWarDeployer.
@@ -261,7 +275,14 @@
{
this.persistenceUnitDependencyResolver = resolver;
}
+
+ @Inject
+ public void setEjbReferenceResolver(EjbReferenceResolver resolver)
+ {
+ this.ejbRefResolver = resolver;
+ }
+
/** Get the session attribute number under which the caller Subject is stored
* @jmx:managed-attribute
*/
@@ -738,6 +759,32 @@
dependencies.add(sdmd);
}
}
+
+ // JBAS-8406 Add dependency on @EJB(s). This is a bit of duplicacy, since the TomcatInjectionContainer
+ // through various handler would also do the same. But since the TomcatInjectionContainer comes too late
+ // in the picture and since we already have similar duplicacy for @PersistenceContext and @PersistenceUnit (see few lines
+ // above) and more importantly, since this works, let's just have it here.
+ if (metaData.getJndiEnvironmentRefsGroup() != null)
+ {
+ AnnotatedEJBReferencesMetaData annotatedEjbRefs = metaData.getJndiEnvironmentRefsGroup().getAnnotatedEjbReferences();
+ if (annotatedEjbRefs != null && !annotatedEjbRefs.isEmpty())
+ {
+ for (AnnotatedEJBReferenceMetaData annotatedEjbRef : annotatedEjbRefs)
+ {
+ // Note: @EJB(beanName="") is set as "link" in AnnotatedEJBReferenceMetadata.
+ // Hence, we use the getLink() method to get hold of the beanName during resolution.
+ String beanName = annotatedEjbRef.getLink();
+ EjbReference ejbReference = new EjbReference(beanName, annotatedEjbRef.getBeanInterface().getName(), annotatedEjbRef.getMappedName());
+ String jndiName = this.ejbRefResolver.resolveEjb(unit, ejbReference);
+ if (jndiName != null)
+ {
+ ServiceDependencyMetaData sdmd = this.createJNDIDependency(jndiName);
+ dependencies.add(sdmd);
+ }
+ }
+ }
+ }
+
webModule.setDependencies(dependencies);
@@ -751,7 +798,7 @@
}
catch (Exception e)
{
- throw DeploymentException.rethrowAsDeploymentException("Error creating rar deployment " + unit.getName(), e);
+ throw DeploymentException.rethrowAsDeploymentException("Error creating web module " + unit.getName(), e);
}
}
@@ -810,4 +857,52 @@
}
return virtualFile.toURL();
}
+
+ /**
+ * Creates and returns a {@link ServiceDependencyMetaData} corresponding to the
+ * passed jndi name
+ *
+ * @param jndiName The jndi name
+ * @return
+ */
+ private ServiceDependencyMetaData createJNDIDependency(String jndiName)
+ {
+ String dependency = JNDI_DEPENDENCY_PREFIX + jndiName;
+ ServiceDependencyMetaData sdmd = new InstalledServiceDependencyMetaData();
+ sdmd.setIDependOn(dependency);
+ return sdmd;
+ }
+
+ /**
+ *
+ * Similar to {@link ServiceDependencyMetaData} except that this expects the
+ * dependency to be in {@link ControllerState#INSTALLED}, unlike {@link ServiceDependencyMetaData}
+ * which expects it to be either in {@link ControllerState#START} or {@link ControllerState#CREATE}
+ *
+ */
+ private class InstalledServiceDependencyMetaData extends ServiceDependencyMetaData
+ {
+ /**
+ * @see ServiceDependencyMetaData#visit(ServiceMetaDataVisitor)
+ *
+ */
+ @Override
+ public void visit(ServiceMetaDataVisitor visitor)
+ {
+ ServiceControllerContext context = visitor.getControllerContext();
+ Object name = context.getName();
+ Object dependency = this.getIDependOn();
+ try
+ {
+ dependency = getIDependOnObjectName().getCanonicalName();
+ }
+ catch (MalformedObjectNameException ignored)
+ {
+ }
+ // add a dependency on INSTALLED state of the dependency item
+ visitor.addDependency(new AbstractDependencyItem(name, dependency, ControllerState.CREATE, ControllerState.INSTALLED));
+ visitor.addDependency(new AbstractDependencyItem(name, dependency, ControllerState.START, ControllerState.INSTALLED));
+ visitor.visit(this);
+ }
+ }
}
Modified: branches/weld-snapshot-integration/testsuite/build.xml
===================================================================
--- branches/weld-snapshot-integration/testsuite/build.xml 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/testsuite/build.xml 2010-10-11 02:01:02 UTC (rev 108504)
@@ -3226,7 +3226,7 @@
</target>
<!-- script tests -->
- <target name="tests-scripts">
+ <target name="tests-scripts" depends="init">
<mkdir dir="${build.reports}"/>
<mkdir dir="${build.testlog}"/>
@@ -3277,13 +3277,14 @@
<fileset dir="${build.classes}">
<include name="**/test/scripts/test/TwiddleTestCase.class"/>
<include name="**/test/scripts/test/ProbeTestCase.class"/>
+ <include name="**/test/scripts/test/WsclientTestCase.class"/>
</fileset>
</batchtest>
</junit>
<server:stop name="scripts"/>
</target>
- <target name="tests-scripts-noserver">
+ <target name="tests-scripts-noserver" depends="init">
<mkdir dir="${build.reports}"/>
<mkdir dir="${build.testlog}"/>
@@ -3331,6 +3332,9 @@
<fileset dir="${build.classes}">
<include name="**/test/scripts/test/RunTestCase.class"/>
<include name="**/test/scripts/test/ShutdownTestCase.class"/>
+ <include name="**/test/scripts/test/WsconsumeTestCase.class"/>
+ <include name="**/test/scripts/test/WsprovideTestCase.class"/>
+ <include name="**/test/scripts/test/WstoolsTestCase.class"/>
</fileset>
</batchtest>
</junit>
Copied: branches/weld-snapshot-integration/testsuite/imports/sections/scripts.xml (from rev 108502, trunk/testsuite/imports/sections/scripts.xml)
===================================================================
--- branches/weld-snapshot-integration/testsuite/imports/sections/scripts.xml (rev 0)
+++ branches/weld-snapshot-integration/testsuite/imports/sections/scripts.xml 2010-10-11 02:01:02 UTC (rev 108504)
@@ -0,0 +1,15 @@
+<project name="tests-scripts-jars">
+ <!-- webservice tests -->
+ <target name="_jars-scripts">
+ <mkdir dir="${build.lib}"/>
+
+ <echo message="Using target node: ${node0}"/>
+
+ <!-- jaxws-endpoint-servlet -->
+ <war warfile="${build.lib}/wsrunclient-test.war" webxml="${build.resources}/scripts/web.xml">
+ <classes dir="${build.classes}">
+ <include name="org/jboss/test/scripts/support/EchoJavaBean.class"/>
+ </classes>
+ </war>
+ </target>
+</project>
\ No newline at end of file
Modified: branches/weld-snapshot-integration/testsuite/imports/test-jars.xml
===================================================================
--- branches/weld-snapshot-integration/testsuite/imports/test-jars.xml 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/testsuite/imports/test-jars.xml 2010-10-11 02:01:02 UTC (rev 108504)
@@ -62,8 +62,9 @@
<import file="sections/readahead.xml"/>
<import file="sections/refs.xml"/>
<import file="sections/retry.xml"/>
- <import file="sections/scoped.xml"/>
- <import file="sections/seam.xml"/>
+ <import file="sections/scoped.xml"/>
+ <import file="sections/scripts.xml"/>
+ <import file="sections/seam.xml"/>
<import file="sections/security.xml"/>
<import file="sections/securitymgr.xml"/>
<import file="sections/securityspi.xml"/>
@@ -128,7 +129,7 @@
_jars-invokers,
_jars-isolation,
_jars-jbossmessaging,
- _jars-jbossmessaging-cluster,
+ _jars-jbossmessaging-cluster,
_jars-jbossmx,
_jars-jbossts,
_jars-jbpm,
@@ -159,6 +160,7 @@
_jars-refs,
_jars-retry,
_jars-scoped,
+ _jars-scripts,
_jars-seam,
_jars-security,
_jars-securitymgr,
Modified: branches/weld-snapshot-integration/testsuite/src/main/org/jboss/test/scripts/README.txt
===================================================================
--- branches/weld-snapshot-integration/testsuite/src/main/org/jboss/test/scripts/README.txt 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/testsuite/src/main/org/jboss/test/scripts/README.txt 2010-10-11 02:01:02 UTC (rev 108504)
@@ -10,13 +10,14 @@
tests-scripts:
- starts a JBoss instance called 'scripts' which is based on 'all'
-- executes TwiddleTestCase and ProbeTestCase against the instance
+- executes TwiddleTestCase, ProbeTestCase and WsclientTestCase against the instance
- stops the JBoss instance
- the server is started and stopped using JBoss Test
tests-scripts-noserver:
- makes use of a JBoss instance 'scripts-noserver' which is based on 'default'
-- executes RunTestCase and ShutdownTestCase
+- executes RunTestCase, ShutdownTestCase, WsconsumeTestCase, WsprovideTestCase
+and WstoolsTestCase
- run.sh is used to start the servers
- JMX shutdown or shutdown.sh is used to stop the servers, depending on
the test case in question
Copied: branches/weld-snapshot-integration/testsuite/src/main/org/jboss/test/scripts/support/Echo.java (from rev 108502, trunk/testsuite/src/main/org/jboss/test/scripts/support/Echo.java)
===================================================================
--- branches/weld-snapshot-integration/testsuite/src/main/org/jboss/test/scripts/support/Echo.java (rev 0)
+++ branches/weld-snapshot-integration/testsuite/src/main/org/jboss/test/scripts/support/Echo.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -0,0 +1,32 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.test.scripts.support;
+
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+import javax.jws.WebService;
+import javax.jws.WebParam;
+
+ at WebService(targetNamespace = "http://org.jboss.ws/testsuite")
+public interface Echo extends Remote {
+ String echoString(@WebParam(name = "inputString") String inputString) throws RemoteException;
+}
Copied: branches/weld-snapshot-integration/testsuite/src/main/org/jboss/test/scripts/support/EchoClient.java (from rev 108502, trunk/testsuite/src/main/org/jboss/test/scripts/support/EchoClient.java)
===================================================================
--- branches/weld-snapshot-integration/testsuite/src/main/org/jboss/test/scripts/support/EchoClient.java (rev 0)
+++ branches/weld-snapshot-integration/testsuite/src/main/org/jboss/test/scripts/support/EchoClient.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -0,0 +1,56 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.test.scripts.support;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.rmi.RemoteException;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
+
+public class EchoClient
+{
+
+ private Echo getPort(String endpointURI) throws MalformedURLException
+ {
+ QName serviceName = new QName("http://org.jboss.ws/testsuite", "EchoService");
+ URL wsdlURL = new URL("http://localhost:8080/" + endpointURI + "?wsdl");
+
+ Service service = Service.create(wsdlURL, serviceName);
+ return service.getPort(Echo.class);
+ }
+
+ private void sayHello(String endpointURI) throws RemoteException, MalformedURLException
+ {
+ String helloWorld = "Hello world!";
+ Object retObj = getPort(endpointURI).echoString(helloWorld);
+ System.out.println(retObj);
+ }
+
+ public static void main(String[] args) throws Exception {
+
+ new EchoClient().sayHello("wsrunclient-test");
+
+ }
+
+}
Copied: branches/weld-snapshot-integration/testsuite/src/main/org/jboss/test/scripts/support/EchoJavaBean.java (from rev 108502, trunk/testsuite/src/main/org/jboss/test/scripts/support/EchoJavaBean.java)
===================================================================
--- branches/weld-snapshot-integration/testsuite/src/main/org/jboss/test/scripts/support/EchoJavaBean.java (rev 0)
+++ branches/weld-snapshot-integration/testsuite/src/main/org/jboss/test/scripts/support/EchoJavaBean.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.test.scripts.support;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+ at WebService(name = "Echo", serviceName = "EchoService", targetNamespace = "http://org.jboss.ws/testsuite")
+ at SOAPBinding(style = SOAPBinding.Style.RPC)
+public class EchoJavaBean {
+
+ @WebMethod
+ public String echoString(@WebParam(name = "inputString") String in0) {
+ return in0;
+ }
+}
Copied: branches/weld-snapshot-integration/testsuite/src/main/org/jboss/test/scripts/support/Hello.java (from rev 108502, trunk/testsuite/src/main/org/jboss/test/scripts/support/Hello.java)
===================================================================
--- branches/weld-snapshot-integration/testsuite/src/main/org/jboss/test/scripts/support/Hello.java (rev 0)
+++ branches/weld-snapshot-integration/testsuite/src/main/org/jboss/test/scripts/support/Hello.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -0,0 +1,30 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.test.scripts.support;
+
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+
+public interface Hello extends Remote
+{
+ public String echo(String in0) throws RemoteException;
+}
\ No newline at end of file
Copied: branches/weld-snapshot-integration/testsuite/src/main/org/jboss/test/scripts/support/HelloJavaBean.java (from rev 108502, trunk/testsuite/src/main/org/jboss/test/scripts/support/HelloJavaBean.java)
===================================================================
--- branches/weld-snapshot-integration/testsuite/src/main/org/jboss/test/scripts/support/HelloJavaBean.java (rev 0)
+++ branches/weld-snapshot-integration/testsuite/src/main/org/jboss/test/scripts/support/HelloJavaBean.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.test.scripts.support;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+ at WebService(name = "Hello", serviceName = "HelloService", targetNamespace = "http://org.jboss.ws/testsuite")
+ at SOAPBinding(style = SOAPBinding.Style.DOCUMENT)
+public class HelloJavaBean {
+
+ @WebMethod
+ public String echoString(@WebParam(name = "inputString") String in0) {
+ return in0;
+ }
+}
Modified: branches/weld-snapshot-integration/testsuite/src/main/org/jboss/test/scripts/test/ScriptsTestBase.java
===================================================================
--- branches/weld-snapshot-integration/testsuite/src/main/org/jboss/test/scripts/test/ScriptsTestBase.java 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/testsuite/src/main/org/jboss/test/scripts/test/ScriptsTestBase.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -21,19 +21,7 @@
*/
package org.jboss.test.scripts.test;
-import java.lang.InterruptedException ;
-import java.io.OutputStream ;
-import java.io.ByteArrayOutputStream ;
-import java.io.BufferedReader ;
-import java.io.InputStreamReader ;
-import java.io.PrintWriter ;
-import java.io.StringWriter ;
-import java.io.FileReader ;
-import java.io.FileWriter ;
-import java.io.File ;
-import java.io.FileInputStream ;
-import java.io.FileOutputStream ;
-import java.io.FileNotFoundException ;
+import java.io.File;
import java.io.IOException ;
import java.net.URL ;
@@ -57,11 +45,13 @@
public abstract class ScriptsTestBase extends JBossTestCase
{
public static final String SERVER_STARTED_MESSAGE = "Started in" ;
- public static final String SERVER_STOPPED_MESSAGE = "Shutdown complete" ;
+ public static final String SERVER_STOPPED_MESSAGE = "Stopped: JBossAS" ;
public static final String SERVER_HALT_MESSAGE = "Server halt" ;
public static final String SERVER_EXIT_MESSAGE = "Server exit" ;
public static final String SERVER_HALTED_MESSAGE = "halting the JVM now" ;
-
+
+ protected static final String FS = System.getProperty("file.separator"); // '/' on unix, '\' on windows
+
ShellScriptExecutor se = null ;
AsyncShellScriptExecutor ase = null ;
LogFileAssertionChecker errorLogChecker = null ;
@@ -356,6 +346,7 @@
String currentOutput = ase.getOutput() ;
if (currentOutput.indexOf(SERVER_STOPPED_MESSAGE) > -1 || currentOutput.indexOf(SERVER_HALTED_MESSAGE) > -1) {
serverStopped = true ;
+ break;
}
// wait for a sec
@@ -401,5 +392,14 @@
}
catch(InterruptedException e) {
}
- }
+ }
+ /**
+ * Checks if JBossWS CXF stack is installed
+ *
+ * @return true if JBossWS CXF stack is installed
+ */
+ protected boolean isCXFInstalled() {
+ final File cxfClientFile = new File(getDistDir() + FS + "client" + FS + "jbossws-cxf-client.jar");
+ return cxfClientFile.exists();
+ }
}
Modified: branches/weld-snapshot-integration/testsuite/src/main/org/jboss/test/scripts/test/ShutdownTestCase.java
===================================================================
--- branches/weld-snapshot-integration/testsuite/src/main/org/jboss/test/scripts/test/ShutdownTestCase.java 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/testsuite/src/main/org/jboss/test/scripts/test/ShutdownTestCase.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -24,18 +24,9 @@
import java.io.File ;
import java.io.IOException ;
-import java.lang.InterruptedException ;
-import java.net.URL ;
-import java.net.MalformedURLException ;
import javax.management.ObjectName ;
import javax.management.MalformedObjectNameException ;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-import org.jboss.test.JBossTestSetup ;
-
/**
* Unit tests of shutdown.sh and shutdown.bat.
*
@@ -146,7 +137,7 @@
getAsyncShellScriptExecutor().assertOnOutputStream("Started in","Started string not found in command output") ;
// shutdown the server using the shutdown command
- String[] shutdownCommand = getShellCommand("shutdown", "-o " + getServerHost() + "-r 1090", "-S") ;
+ String[] shutdownCommand = getShellCommand("shutdown", "-o " + getServerHost() + " -r 1090", "-S") ;
getShellScriptExecutor().runShellCommand(shutdownCommand, envp, workingDir) ;
System.out.println("shutdown output = " + getShellScriptExecutor().getOutput()) ;
Modified: branches/weld-snapshot-integration/testsuite/src/main/org/jboss/test/scripts/test/TwiddleTestCase.java
===================================================================
--- branches/weld-snapshot-integration/testsuite/src/main/org/jboss/test/scripts/test/TwiddleTestCase.java 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/testsuite/src/main/org/jboss/test/scripts/test/TwiddleTestCase.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -23,10 +23,6 @@
package org.jboss.test.scripts.test;
import java.io.File ;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-import org.jboss.test.JBossTestSetup ;
/**
* Unit tests of twiddle.sh and twiddle.bat.
@@ -261,7 +257,7 @@
// supply the command name prefix, any options as a string, and any args
String command = "twiddle" ;
String options = "-o " + getServerHost() + " -r 1090";
- String args = "query 'jboss.system:*'" ;
+ String args = "query \"jboss.system:*\"" ; // fix for Windows
String[] shellCommand = getShellCommand(command, options, args) ;
// set the environment if necessary
Copied: branches/weld-snapshot-integration/testsuite/src/main/org/jboss/test/scripts/test/WsclientTestCase.java (from rev 108502, trunk/testsuite/src/main/org/jboss/test/scripts/test/WsclientTestCase.java)
===================================================================
--- branches/weld-snapshot-integration/testsuite/src/main/org/jboss/test/scripts/test/WsclientTestCase.java (rev 0)
+++ branches/weld-snapshot-integration/testsuite/src/main/org/jboss/test/scripts/test/WsclientTestCase.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -0,0 +1,122 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009 Red Hat Middleware, Inc. 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.test.scripts.test;
+
+import java.io.File;
+import java.net.URL;
+import junit.framework.Test;
+
+/**
+ * Unit tests of wsrunclient.sh and wsrunclient.bat.
+ *
+ * @author Rostislav Svoboda
+ * @version $Revision: $
+ */
+public class WsclientTestCase extends ScriptsTestBase {
+ private static final URL classesDirUrl = Thread.currentThread().getContextClassLoader().getResource("");
+
+ /**
+ * Create a new WsclientTestCase.
+ *
+ * @param name
+ */
+ public WsclientTestCase(String name) {
+ super(name);
+ }
+
+ // WAR file from org.jboss.test.webservice.endpoint
+ public static Test suite() throws Exception {
+ return getDeploySetup(WsclientTestCase.class, "wsrunclient-test.war");
+ }
+
+ /**
+ * Prints out some basic info about the environment
+ */
+ public void testExecutionEnvironment() {
+ String os = isWindows() ? "Windows" : "non-Windows";
+ // dump out some basic config information
+ System.out.println("Testing run on " + os + " host");
+ System.out.println("Working directory: " + getBinDir());
+ System.out.println("Dist directory: " + getDistDir());
+ System.out.println("Log directory: " + getLogDir());
+ System.out.println("Server config: " + getServerConfig());
+ System.out.println("CXF installed: " + isCXFInstalled());
+ }
+
+ /**
+ * Tests run "help" command (no args)
+ *
+ * @throws Exception
+ */
+ public void testNoArgs() throws Exception {
+ String command = "wsrunclient";
+ String options = null;
+ String args = null;
+ String[] shellCommand = getShellCommand(command, options, args);
+
+ String[] envp = null; // set the environment if necessary
+ File workingDir = new File(getBinDir()); // set the working directory
+ getShellScriptExecutor().runShellCommand(shellCommand, envp, workingDir);
+
+ // check assertions
+ getShellScriptExecutor().assertOnOutputStream("usage: wsrunclient", "usage string not found in command output");
+ }
+
+ /**
+ * Tests to run client
+ *
+ * @throws Exception
+ */
+ public void testRunClient() throws Exception {
+ String command = "wsrunclient";
+ // original package was org.jboss.test.ws.benchmark.jaxws.doclit
+ String options = "-classpath " + classesDirUrl.getFile();
+ String args = "org.jboss.test.scripts.support.EchoClient";
+ String[] shellCommand = getShellCommand(command, options, args);
+
+ String[] envp = null; // set the environment if necessary
+ File workingDir = new File(getBinDir()); // set the working directory
+ getShellScriptExecutor().runShellCommand(shellCommand, envp, workingDir);
+
+ // check assertions
+ getShellScriptExecutor().assertOnOutputStream("Hello world!", "'Hello world!' string not found in command output");
+ }
+ /**
+ * Tests to run non exixting client
+ *
+ * @throws Exception
+ */
+ public void testRunNonExistingClient() throws Exception {
+ String command = "wsrunclient";
+ // original package was org.jboss.test.ws.benchmark.jaxws.doclit
+ String options = "-classpath " + classesDirUrl.getFile();
+ String args = "org.jboss.test.scripts.support.NonExistingClient";
+ String[] shellCommand = getShellCommand(command, options, args);
+
+ String[] envp = null; // set the environment if necessary
+ File workingDir = new File(getBinDir()); // set the working directory
+ getShellScriptExecutor().runShellCommand(shellCommand, envp, workingDir);
+
+ getShellScriptExecutor().assertOnErrorStream("java.lang.ClassNotFoundException",
+ "'java.lang.ClassNotFoundException' string not found in error output");
+ }
+}
Copied: branches/weld-snapshot-integration/testsuite/src/main/org/jboss/test/scripts/test/WsconsumeTestCase.java (from rev 108502, trunk/testsuite/src/main/org/jboss/test/scripts/test/WsconsumeTestCase.java)
===================================================================
--- branches/weld-snapshot-integration/testsuite/src/main/org/jboss/test/scripts/test/WsconsumeTestCase.java (rev 0)
+++ branches/weld-snapshot-integration/testsuite/src/main/org/jboss/test/scripts/test/WsconsumeTestCase.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -0,0 +1,325 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009 Red Hat Middleware, Inc. 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.test.scripts.test;
+
+import java.io.File;
+import java.net.URL;
+
+/**
+ * Unit tests of wsconsume.sh and wsconsume.bat.
+ *
+ * @author Rostislav Svoboda
+ * @version $Revision: $
+ */
+public class WsconsumeTestCase extends ScriptsTestBase {
+
+ private static final URL wsdlFileUrl = Thread.currentThread().getContextClassLoader().getResource("scripts/BenchmarkWebService.wsdl");
+ private static final URL scriptsDirUrl = Thread.currentThread().getContextClassLoader().getResource("scripts");
+
+ /**
+ * Create a new WsconsumeTestCase.
+ *
+ * @param name
+ */
+ public WsconsumeTestCase(String name) {
+ super(name);
+ }
+
+ /**
+ * Prints out some basic info about the environment
+ */
+ public void testExecutionEnvironment() {
+ String os = isWindows() ? "Windows" : "non-Windows";
+ // dump out some basic config information
+ System.out.println("Testing run on " + os + " host");
+ System.out.println("Working directory: " + getBinDir());
+ System.out.println("Dist directory: " + getDistDir());
+ System.out.println("Log directory: " + getLogDir());
+ System.out.println("Server config: " + getServerConfig());
+ System.out.println("CXF installed: " + isCXFInstalled());
+ }
+
+ /**
+ * Tests run "help" command (no args)
+ *
+ * @throws Exception
+ */
+ public void testNoArgs() throws Exception {
+ String command = "wsconsume";
+ String options = null;
+ String args = "-h";
+ String[] shellCommand = getShellCommand(command, options, args);
+
+ String[] envp = null; // set the environment if necessary
+ File workingDir = new File(getBinDir()); // set the working directory
+ getShellScriptExecutor().runShellCommand(shellCommand, envp, workingDir);
+
+ // check assertions
+ getShellScriptExecutor().assertOnOutputStream("usage: org.jboss.wsf.spi.tools.cmd.WSConsume",
+ "usage string not found in command output:\n" + getShellScriptExecutor().getOutput());
+ }
+
+ /**
+ * Tests generate classes command
+ *
+ * @throws Exception
+ */
+ public void testGenerateClasses() throws Exception {
+ File outDir = new File(scriptsDirUrl.getFile() + FS + "wsconsume-classes-out");
+ if (!outDir.exists()) {
+ outDir.mkdir();
+ }
+
+ String command = "wsconsume";
+ // original package was org.jboss.test.ws.benchmark.jaxws.doclit
+ String options = "-p org.jboss.test.script -o " + outDir.getAbsolutePath();
+ String args = wsdlFileUrl.getFile();
+ String[] shellCommand = getShellCommand(command, options, args);
+
+ String[] envp = null; // set the environment if necessary
+ File workingDir = new File(getBinDir()); // set the working directory
+ getShellScriptExecutor().runShellCommand(shellCommand, envp, workingDir);
+
+ // check assertions
+ if (isCXFInstalled()) {
+ getShellScriptExecutor().assertOnOutputStream("wsdl2java -compile", "'wsdl2java -compile' string not found in command output:\n" + getShellScriptExecutor().getOutput());
+ } else {
+ getShellScriptExecutor().assertOnOutputStream("parsing WSDL...", "'parsing WSDL...' string not found in command output:\n" + getShellScriptExecutor().getOutput());
+ getShellScriptExecutor().assertOnOutputStream("generating code...", "'generating code...' string not found in command output:\n" + getShellScriptExecutor().getOutput());
+ getShellScriptExecutor().assertOnOutputStream("compiling code...", "'compiling code...' string not found in command output:\n" + getShellScriptExecutor().getOutput());
+ }
+ //check files
+ File customerClassFile = new File(outDir.getAbsolutePath() + FS
+ + "org" + FS + "jboss" + FS + "test" + FS + "script" + FS + "Customer.class");
+ File getOrderClassFile = new File(outDir.getAbsolutePath() + FS
+ + "org" + FS + "jboss" + FS + "test" + FS + "script" + FS + "GetOrder.class");
+ File customerJavaFile = new File(outDir.getAbsolutePath() + FS
+ + "org" + FS + "jboss" + FS + "test" + FS + "script" + FS + "Customer.java");
+ File getOrderJavaFile = new File(outDir.getAbsolutePath() + FS
+ + "org" + FS + "jboss" + FS + "test" + FS + "script" + FS + "GetOrder.java");
+
+ assertTrue(customerClassFile.getAbsolutePath() + " doesn't exist", customerClassFile.exists());
+ assertTrue(getOrderClassFile.getAbsolutePath() + " doesn't exist", getOrderClassFile.exists());
+ assertFalse(customerJavaFile.getAbsolutePath() + " exists", customerJavaFile.exists());
+ assertFalse(getOrderJavaFile.getAbsolutePath() + " exists", getOrderJavaFile.exists());
+ }
+
+
+ //NATIVE issue (needs to have -k specified (no -n), when -o + -n java files in output directory )
+
+ /**
+ * Tests generate only sources command
+ *
+ * @throws Exception
+ */
+ public void testGenerateSources() throws Exception {
+ File outDir = new File(scriptsDirUrl.getFile() + FS + "wsconsume-sources-out");
+ if (!outDir.exists()) {
+ outDir.mkdir();
+ }
+
+ String command = "wsconsume";
+ String options = "-n -p org.jboss.test.script -s " + outDir.getAbsolutePath();
+ String args = wsdlFileUrl.getFile();
+ String[] shellCommand = getShellCommand(command, options, args);
+
+ String[] envp = null; // set the environment if necessary
+ File workingDir = new File(getBinDir()); // set the working directory
+ getShellScriptExecutor().runShellCommand(shellCommand, envp, workingDir);
+
+ // check assertions
+ if (isCXFInstalled()) {
+ getShellScriptExecutor().assertOnOutputStream("wsdl2java", "'wsdl2java' string not found in command output:\n" + getShellScriptExecutor().getOutput());
+ } else {
+ getShellScriptExecutor().assertOnOutputStream("parsing WSDL...", "'parsing WSDL...' string not found in command output:\n" + getShellScriptExecutor().getOutput());
+ getShellScriptExecutor().assertOnOutputStream("generating code...", "'generating code...' string not found in command output:\n" + getShellScriptExecutor().getOutput());
+ assertTrue("'compiling code...' string found in command output",
+ (getShellScriptExecutor().getOutput().indexOf("compiling code...") == -1));
+ }
+ //check files
+ File customerClassFile = new File(outDir.getAbsolutePath() + FS
+ + "org" + FS + "jboss" + FS + "test" + FS + "script" + FS + "Customer.class");
+ File getOrderClassFile = new File(outDir.getAbsolutePath() + FS
+ + "org" + FS + "jboss" + FS + "test" + FS + "script" + FS + "GetOrder.class");
+ File customerJavaFile = new File(outDir.getAbsolutePath() + FS
+ + "org" + FS + "jboss" + FS + "test" + FS + "script" + FS + "Customer.java");
+ File getOrderJavaFile = new File(outDir.getAbsolutePath() + FS
+ + "org" + FS + "jboss" + FS + "test" + FS + "script" + FS + "GetOrder.java");
+
+ assertFalse(customerClassFile.getAbsolutePath() + " exists", customerClassFile.exists());
+ assertFalse(getOrderClassFile.getAbsolutePath() + " exists", getOrderClassFile.exists());
+ assertTrue(customerJavaFile.getAbsolutePath() + " doesn't exist", customerJavaFile.exists());
+ assertTrue(getOrderJavaFile.getAbsolutePath() + " doesn't exist", getOrderJavaFile.exists());
+ }
+
+ /**
+ * Tests generate only sources command
+ *
+ * @throws Exception
+ */
+ public void testKeepSources() throws Exception {
+ File outDir = new File(scriptsDirUrl.getFile() + FS + "wsconsume-sources-keep-out");
+ if (!outDir.exists()) {
+ outDir.mkdir();
+ }
+
+ String command = "wsconsume";
+ String options = "-k -p org.jboss.test.script -s " + outDir.getAbsolutePath();
+ String args = wsdlFileUrl.getFile();
+ String[] shellCommand = getShellCommand(command, options, args);
+
+ String[] envp = null; // set the environment if necessary
+ File workingDir = new File(getBinDir()); // set the working directory
+ getShellScriptExecutor().runShellCommand(shellCommand, envp, workingDir);
+
+ // check assertions
+ if (isCXFInstalled()) {
+ getShellScriptExecutor().assertOnOutputStream("wsdl2java", "'wsdl2java' string not found in command output:\n" + getShellScriptExecutor().getOutput());
+ } else {
+ getShellScriptExecutor().assertOnOutputStream("parsing WSDL...", "'parsing WSDL...' string not found in command output:\n" + getShellScriptExecutor().getOutput());
+ getShellScriptExecutor().assertOnOutputStream("generating code...", "'generating code...' string not found in command output:\n" + getShellScriptExecutor().getOutput());
+ getShellScriptExecutor().assertOnOutputStream("compiling code...", "'compiling code...' string not found in command output:\n" + getShellScriptExecutor().getOutput());
+ }
+ //check files
+ File customerJavaFile = new File(outDir.getAbsolutePath() + FS
+ + "org" + FS + "jboss" + FS + "test" + FS + "script" + FS + "Customer.java");
+ File getOrderJavaFile = new File(outDir.getAbsolutePath() + FS
+ + "org" + FS + "jboss" + FS + "test" + FS + "script" + FS + "GetOrder.java");
+ assertTrue(customerJavaFile.getAbsolutePath() + " doesn't exist", customerJavaFile.exists());
+ assertTrue(getOrderJavaFile.getAbsolutePath() + " doesn't exist", getOrderJavaFile.exists());
+ }
+
+ /**
+ * Tests generate classes and sources command
+ *
+ * @throws Exception
+ */
+ public void testGenerateBoth() throws Exception {
+ File outDir = new File(scriptsDirUrl.getFile() + FS + "wsconsume-both-out");
+ if (!outDir.exists()) {
+ outDir.mkdir();
+ }
+
+ String command = "wsconsume";
+ String options = "-k -p org.jboss.test.script -o " + outDir.getAbsolutePath();
+ String args = wsdlFileUrl.getFile();
+ String[] shellCommand = getShellCommand(command, options, args);
+
+ String[] envp = null; // set the environment if necessary
+ File workingDir = new File(getBinDir()); // set the working directory
+ getShellScriptExecutor().runShellCommand(shellCommand, envp, workingDir);
+
+ // check assertions
+ if (!isCXFInstalled()) {
+ getShellScriptExecutor().assertOnOutputStream("parsing WSDL...", "'parsing WSDL...' string not found in command output:\n" + getShellScriptExecutor().getOutput());
+ getShellScriptExecutor().assertOnOutputStream("generating code...", "'generating code...' string not found in command output:\n" + getShellScriptExecutor().getOutput());
+ getShellScriptExecutor().assertOnOutputStream("compiling code...", "'compiling code...' string not found in command output:\n" + getShellScriptExecutor().getOutput());
+ }
+ //check files
+ File customerClassFile = new File(outDir.getAbsolutePath() + FS
+ + "org" + FS + "jboss" + FS + "test" + FS + "script" + FS + "Customer.class");
+ File getOrderClassFile = new File(outDir.getAbsolutePath() + FS
+ + "org" + FS + "jboss" + FS + "test" + FS + "script" + FS + "GetOrder.class");
+ File customerJavaFile = new File(outDir.getAbsolutePath() + FS
+ + "org" + FS + "jboss" + FS + "test" + FS + "script" + FS + "Customer.java");
+ File getOrderJavaFile = new File(outDir.getAbsolutePath() + FS
+ + "org" + FS + "jboss" + FS + "test" + FS + "script" + FS + "GetOrder.java");
+
+ assertTrue(customerClassFile.getAbsolutePath() + " doesn't exist", customerClassFile.exists());
+ assertTrue(getOrderClassFile.getAbsolutePath() + " doesn't exist", getOrderClassFile.exists());
+ assertTrue(customerJavaFile.getAbsolutePath() + " doesn't exist", customerJavaFile.exists());
+ assertTrue(getOrderJavaFile.getAbsolutePath() + " doesn't exist", getOrderJavaFile.exists());
+ }
+
+ /**
+ * Tests generate classes and sources command, each in separate directory
+ *
+ * @throws Exception
+ */
+ public void testGenerateBothSeparated() throws Exception {
+ File outClassesDir = new File(scriptsDirUrl.getFile() + FS + "wsconsume-separate-classes-out");
+ File outSourcesDir = new File(scriptsDirUrl.getFile() + FS + "wsconsume-separate-sources-out");
+ if (!outClassesDir.exists()) {
+ outClassesDir.mkdir();
+ }
+ if (!outSourcesDir.exists()) {
+ outSourcesDir.mkdir();
+ }
+
+ String command = "wsconsume";
+ String options = "-k -p org.jboss.test.script -o " + outClassesDir.getAbsolutePath()
+ + " -s " + outSourcesDir.getAbsolutePath();
+ String args = wsdlFileUrl.getFile();
+ String[] shellCommand = getShellCommand(command, options, args);
+
+ String[] envp = null; // set the environment if necessary
+ File workingDir = new File(getBinDir()); // set the working directory
+ getShellScriptExecutor().runShellCommand(shellCommand, envp, workingDir);
+
+ // check assertions
+ if (!isCXFInstalled()) {
+ getShellScriptExecutor().assertOnOutputStream("parsing WSDL...", "'parsing WSDL...' string not found in command output:\n" + getShellScriptExecutor().getOutput());
+ getShellScriptExecutor().assertOnOutputStream("generating code...", "'generating code...' string not found in command output:\n" + getShellScriptExecutor().getOutput());
+ getShellScriptExecutor().assertOnOutputStream("compiling code...", "'compiling code...' string not found in command output:\n" + getShellScriptExecutor().getOutput());
+ }
+ //check files
+ File customerClassFile = new File(outClassesDir.getAbsolutePath() + FS
+ + "org" + FS + "jboss" + FS + "test" + FS + "script" + FS + "Customer.class");
+ File getOrderClassFile = new File(outClassesDir.getAbsolutePath() + FS
+ + "org" + FS + "jboss" + FS + "test" + FS + "script" + FS + "GetOrder.class");
+ File customerJavaFile = new File(outSourcesDir.getAbsolutePath() + FS
+ + "org" + FS + "jboss" + FS + "test" + FS + "script" + FS + "Customer.java");
+ File getOrderJavaFile = new File(outSourcesDir.getAbsolutePath() + FS
+ + "org" + FS + "jboss" + FS + "test" + FS + "script" + FS + "GetOrder.java");
+
+ assertTrue(customerClassFile.getAbsolutePath() + " doesn't exist", customerClassFile.exists());
+ assertTrue(getOrderClassFile.getAbsolutePath() + " doesn't exist", getOrderClassFile.exists());
+ assertTrue(customerJavaFile.getAbsolutePath() + " doesn't exist", customerJavaFile.exists());
+ assertTrue(getOrderJavaFile.getAbsolutePath() + " doesn't exist", getOrderJavaFile.exists());
+ }
+
+ /**
+ * Tests generate classes command when wsdl doesn't exist
+ *
+ * @throws Exception
+ */
+ public void testNonExistingWsdl() throws Exception {
+ String command = "wsconsume";
+ String options = "-v -p org.jboss.test.script ";
+ String args = "NonExistingWsdl.wsdl";
+ String[] shellCommand = getShellCommand(command, options, args);
+
+ String[] envp = null; // set the environment if necessary
+ File workingDir = new File(getBinDir()); // set the working directory
+ getShellScriptExecutor().runShellCommand(shellCommand, envp, workingDir);
+
+ if (isCXFInstalled()) {
+ assertTrue("'Failed to invoke WSDLToJava' string not found in command output:\n" + getShellScriptExecutor().getOutput(),
+ getShellScriptExecutor().getOutput().indexOf("Failed to invoke WSDLToJava") != -1);
+ } else {
+ assertTrue("'Failed to parse the WSDL' string not found in command output",
+ (getShellScriptExecutor().getOutput().indexOf("Failed to parse the WSDL") != -1));
+ assertTrue("'WsImport invocation failed' string not found in error output",
+ (getShellScriptExecutor().getError().indexOf("WsImport invocation failed") != -1));
+ }
+ }
+}
\ No newline at end of file
Copied: branches/weld-snapshot-integration/testsuite/src/main/org/jboss/test/scripts/test/WsprovideTestCase.java (from rev 108502, trunk/testsuite/src/main/org/jboss/test/scripts/test/WsprovideTestCase.java)
===================================================================
--- branches/weld-snapshot-integration/testsuite/src/main/org/jboss/test/scripts/test/WsprovideTestCase.java (rev 0)
+++ branches/weld-snapshot-integration/testsuite/src/main/org/jboss/test/scripts/test/WsprovideTestCase.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -0,0 +1,279 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009 Red Hat Middleware, Inc. 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.test.scripts.test;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+import java.net.URL;
+
+/**
+ * Unit tests of wsprovide.sh and wsprovide.bat.
+ *
+ * @author Rostislav Svoboda
+ * @version $Revision: $
+ */
+public class WsprovideTestCase extends ScriptsTestBase {
+
+ private static final URL classesDirUrl = Thread.currentThread().getContextClassLoader().getResource("");
+ private static final URL scriptsDirUrl = Thread.currentThread().getContextClassLoader().getResource("scripts");
+
+ /**
+ * Create a new WsprovideTestCase.
+ *
+ * @param name
+ */
+ public WsprovideTestCase(String name) {
+ super(name);
+ }
+
+ /**
+ * Prints out some basic info about the environment
+ */
+ public void testExecutionEnvironment() {
+ String os = isWindows() ? "Windows" : "non-Windows";
+ // dump out some basic config information
+ System.out.println("Testing run on " + os + " host");
+ System.out.println("Working directory: " + getBinDir());
+ System.out.println("Dist directory: " + getDistDir());
+ System.out.println("Log directory: " + getLogDir());
+ System.out.println("Server config: " + getServerConfig());
+ System.out.println("CXF installed: " + isCXFInstalled());
+ }
+
+ /**
+ * Tests run "help" command (no args)
+ *
+ * @throws Exception
+ */
+ public void testNoArgs() throws Exception {
+ String command = "wsprovide";
+ String options = null;
+ String args = "-h";
+ String[] shellCommand = getShellCommand(command, options, args);
+
+ String[] envp = null; // set the environment if necessary
+ File workingDir = new File(getBinDir()); // set the working directory
+ getShellScriptExecutor().runShellCommand(shellCommand, envp, workingDir);
+
+ getShellScriptExecutor().assertOnOutputStream("usage: WSProvide", "usage string not found in command output:\n" + getShellScriptExecutor().getOutput());
+ }
+
+ /**
+ * Tests basic command to generate request and response classes
+ *
+ * @throws Exception
+ */
+ public void testGenerateRequestResponseClasses() throws Exception {
+ File outDir = new File(scriptsDirUrl.getFile() + FS + "wsprovide-basic-out");
+ if (!outDir.exists()) {
+ outDir.mkdir();
+ }
+ String command = "wsprovide";
+ String options = "-c " + classesDirUrl.getFile() + " -o " + outDir.getAbsolutePath();
+ String args = "org.jboss.test.scripts.support.HelloJavaBean";
+ String[] shellCommand = getShellCommand(command, options, args);
+
+ String[] envp = null; // set the environment if necessary
+ File workingDir = new File(getBinDir()); // set the working directory
+ getShellScriptExecutor().runShellCommand(shellCommand, envp, workingDir);
+
+ // check assertions
+ if (isCXFInstalled()) {
+ getShellScriptExecutor().assertOnOutputStream(args, "'" + args + "' string not found in command output:\n" + getShellScriptExecutor().getOutput());
+ getShellScriptExecutor().assertOnOutputStream("java2ws", "'java2ws' string not found in command output:\n" + getShellScriptExecutor().getOutput());
+ } else {
+ getShellScriptExecutor().assertOnOutputStream("Output directory:", "'Output directory:' string not found in command output:\n" + getShellScriptExecutor().getOutput());
+ getShellScriptExecutor().assertOnOutputStream("Writing Classes:", "'Writing Classes:' string not found in command output:\n" + getShellScriptExecutor().getOutput());
+ }
+ //check files
+ File echoClassFile = new File(outDir.getAbsolutePath() + FS
+ + "org" + FS + "jboss" + FS + "test" + FS + "scripts" + FS + "support" + FS + "jaxws" + FS + "EchoString.class");
+ assertTrue(echoClassFile.getAbsolutePath() + " doesn't exist", echoClassFile.exists());
+ }
+
+ /**
+ * Tests basic command to generate WSDL file
+ *
+ * @throws Exception
+ */
+ public void testGenerateWSDL() throws Exception {
+ File outDir = new File(scriptsDirUrl.getFile() + FS + "wsprovide-wsdl-out");
+ if (!outDir.exists()) {
+ outDir.mkdir();
+ }
+ String command = "wsprovide";
+ String options = "-w -c " + classesDirUrl.getFile() + " -o " + outDir.getAbsolutePath();
+ String args = "org.jboss.test.scripts.support.HelloJavaBean";
+ String[] shellCommand = getShellCommand(command, options, args);
+
+ String[] envp = null; // set the environment if necessary
+ File workingDir = new File(getBinDir()); // set the working directory
+ getShellScriptExecutor().runShellCommand(shellCommand, envp, workingDir);
+
+ // check assertions
+ if (!isCXFInstalled()) {
+ getShellScriptExecutor().assertOnOutputStream("Output directory:", "'Output directory:' string not found in command output:\n" + getShellScriptExecutor().getOutput());
+ getShellScriptExecutor().assertOnOutputStream("Generating WSDL:", "'Generating WSDL:' string not found in command output:\n" + getShellScriptExecutor().getOutput());
+ }
+ //check files
+ File wsdlFile = new File(outDir.getAbsolutePath() + FS + "HelloService.wsdl");
+ assertTrue(wsdlFile.getAbsolutePath() + " doesn't exist", wsdlFile.exists());
+ }
+
+ /**
+ * Tests basic command to generate WSDL file with SOAP 1.2 binding extension
+ *
+ * @throws Exception
+ */
+ public void testGenerateWSDLWithExtension() throws Exception {
+ File outDir = new File(scriptsDirUrl.getFile() + FS + "wsprovide-wsdl-ext-out");
+ if (!outDir.exists()) {
+ outDir.mkdir();
+ }
+ String command = "wsprovide";
+ String options = "-w -e -c " + classesDirUrl.getFile() + " -o " + outDir.getAbsolutePath();
+ String args = "org.jboss.test.scripts.support.HelloJavaBean";
+ String[] shellCommand = getShellCommand(command, options, args);
+
+ String[] envp = null; // set the environment if necessary
+ File workingDir = new File(getBinDir()); // set the working directory
+ getShellScriptExecutor().runShellCommand(shellCommand, envp, workingDir);
+
+ //check files
+ File wsdlFile = new File(outDir.getAbsolutePath() + FS + "HelloService.wsdl");
+ assertTrue(wsdlFile.getAbsolutePath() + " doesn't exist", wsdlFile.exists());
+
+ final BufferedReader inStream = new BufferedReader(new FileReader(wsdlFile));
+ String line = inStream.readLine();
+ boolean containsExtension = false;
+ while (line != null && !containsExtension) {
+ containsExtension = line.contains("soap12");
+ line = inStream.readLine();
+ }
+ assertTrue(wsdlFile.getAbsolutePath() + " doesn't doesn't contain SOAP 1.2 "
+ + "binding extension", containsExtension);
+ }
+
+ /**
+ * Tests basic command to generate and keep source files
+ *
+ * @throws Exception
+ */
+ public void testKeepSources() throws Exception {
+ File outDir = new File(scriptsDirUrl.getFile() + FS + "wsprovide-keep-sources-out");
+ if (!outDir.exists()) {
+ outDir.mkdir();
+ }
+ String command = "wsprovide";
+ String options = "-k -c " + classesDirUrl.getFile() + " -o " + outDir.getAbsolutePath();
+ String args = "org.jboss.test.scripts.support.HelloJavaBean";
+ String[] shellCommand = getShellCommand(command, options, args);
+
+ String[] envp = null; // set the environment if necessary
+ File workingDir = new File(getBinDir()); // set the working directory
+ getShellScriptExecutor().runShellCommand(shellCommand, envp, workingDir);
+
+ // check assertions
+ if (!isCXFInstalled()) {
+ getShellScriptExecutor().assertOnOutputStream("Output directory:", "'Output directory:' string not found in command output:\n" + getShellScriptExecutor().getOutput());
+ getShellScriptExecutor().assertOnOutputStream("Writing Source:", "'Writing Source:' string not found in command output:\n" + getShellScriptExecutor().getOutput());
+ getShellScriptExecutor().assertOnOutputStream("Writing Classes:", "'Writing Classes:' string not found in command output:\n" + getShellScriptExecutor().getOutput());
+ }
+ //check files
+ File echoClassFile = new File(outDir.getAbsolutePath() + FS
+ + "org" + FS + "jboss" + FS + "test" + FS + "scripts" + FS + "support" + FS + "jaxws" + FS + "EchoString.class");
+ File echoJavaFile = new File(outDir.getAbsolutePath() + FS
+ + "org" + FS + "jboss" + FS + "test" + FS + "scripts" + FS + "support" + FS + "jaxws" + FS + "EchoString.java");
+ assertTrue(echoClassFile.getAbsolutePath() + " doesn't exist", echoClassFile.exists());
+ assertTrue(echoJavaFile.getAbsolutePath() + " doesn't exist", echoJavaFile.exists());
+ }
+
+ /**
+ * Tests command to generate WSDL, support classes and keep source files.
+ * Each in separated directory.
+ *
+ * @throws Exception
+ */
+ public void testGenerateAllSeparated() throws Exception {
+ File outClassesDir = new File(scriptsDirUrl.getFile() + FS + "wsprovide-separate-classes-out");
+ File outSourcesDir = new File(scriptsDirUrl.getFile() + FS + "wsprovide-separate-sources-out");
+ File outResourcesDir = new File(scriptsDirUrl.getFile() + FS + "wsprovide-separate-resources-out");
+ if (!outClassesDir.exists()) {
+ outClassesDir.mkdir();
+ }
+ if (!outSourcesDir.exists()) {
+ outSourcesDir.mkdir();
+ }
+ if (!outResourcesDir.exists()) {
+ outResourcesDir.mkdir();
+ }
+
+ String command = "wsprovide";
+ String options = "-k -w -c " + classesDirUrl.getFile()
+ + " -o " + outClassesDir.getAbsolutePath()
+ + " -r " + outResourcesDir.getAbsolutePath()
+ + " -s " + outSourcesDir.getAbsolutePath();
+ String args = "org.jboss.test.scripts.support.HelloJavaBean";
+ String[] shellCommand = getShellCommand(command, options, args);
+
+ String[] envp = null; // set the environment if necessary
+ File workingDir = new File(getBinDir()); // set the working directory
+ getShellScriptExecutor().runShellCommand(shellCommand, envp, workingDir);
+
+ // check assertions
+ if (!isCXFInstalled()) {
+ getShellScriptExecutor().assertOnOutputStream("Output directory:", "'Output directory:' string not found in command output:\n" + getShellScriptExecutor().getOutput());
+ getShellScriptExecutor().assertOnOutputStream("Writing Source:", "'Writing Source:' string not found in command output:\n" + getShellScriptExecutor().getOutput());
+ getShellScriptExecutor().assertOnOutputStream("Writing Classes:", "'Writing Classes:' string not found in command output:\n" + getShellScriptExecutor().getOutput());
+ getShellScriptExecutor().assertOnOutputStream("Generating WSDL:", "'Generating WSDL:' string not found in command output:\n" + getShellScriptExecutor().getOutput());
+ }
+ //check files
+ File echoClassFile = new File(outClassesDir.getAbsolutePath() + FS
+ + "org" + FS + "jboss" + FS + "test" + FS + "scripts" + FS + "support" + FS + "jaxws" + FS + "EchoString.class");
+ File echoJavaFile = new File(outSourcesDir.getAbsolutePath() + FS
+ + "org" + FS + "jboss" + FS + "test" + FS + "scripts" + FS + "support" + FS + "jaxws" + FS + "EchoString.java");
+ File wsdlFile = new File(outResourcesDir.getAbsolutePath() + FS + "HelloService.wsdl");
+
+ assertTrue(echoClassFile.getAbsolutePath() + " doesn't exist", echoClassFile.exists());
+ assertTrue(echoJavaFile.getAbsolutePath() + " doesn't exist", echoJavaFile.exists());
+ assertTrue(wsdlFile.getAbsolutePath() + " doesn't exist", wsdlFile.exists());
+ }
+
+ /**
+ * Tests basic command to generate support classes from non-existing class
+ *
+ * @throws Exception
+ */
+ public void testNonExistingClass() throws Exception {
+ String command = "wsprovide";
+ String options = "-k -c " + classesDirUrl.getFile();
+ String args = "org.jboss.test.scripts.support.NonExistingBean";
+ String[] shellCommand = getShellCommand(command, options, args);
+
+ String[] envp = null; // set the environment if necessary
+ File workingDir = new File(getBinDir()); // set the working directory
+ getShellScriptExecutor().runShellCommand(shellCommand, envp, workingDir);
+ assertTrue("'Could not load class' string not found in error output",
+ (getShellScriptExecutor().getError().indexOf("Could not load class") != -1));
+ }
+}
Copied: branches/weld-snapshot-integration/testsuite/src/main/org/jboss/test/scripts/test/WstoolsTestCase.java (from rev 108502, trunk/testsuite/src/main/org/jboss/test/scripts/test/WstoolsTestCase.java)
===================================================================
--- branches/weld-snapshot-integration/testsuite/src/main/org/jboss/test/scripts/test/WstoolsTestCase.java (rev 0)
+++ branches/weld-snapshot-integration/testsuite/src/main/org/jboss/test/scripts/test/WstoolsTestCase.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -0,0 +1,128 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009 Red Hat Middleware, Inc. 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.test.scripts.test;
+
+import java.io.File;
+import java.net.URL;
+
+/**
+ * Unit tests of wstools.sh and wstools.bat.
+ *
+ * @author Rostislav Svoboda
+ * @version $Revision: $
+ */
+public class WstoolsTestCase extends ScriptsTestBase {
+
+ private static final URL configFileUrl = Thread.currentThread().getContextClassLoader().getResource("scripts/wstools-config.xml");
+ private static final URL scriptsDirUrl = Thread.currentThread().getContextClassLoader().getResource("scripts");
+ private static final URL classesDirUrl = Thread.currentThread().getContextClassLoader().getResource("");
+
+ /**
+ * Create a new WstoolsTestCase.
+ *
+ * @param name
+ */
+ public WstoolsTestCase(String name) {
+ super(name);
+ }
+
+ /**
+ * Prints out some basic info about the environment
+ */
+ public void testExecutionEnvironment() {
+ String os = isWindows() ? "Windows" : "non-Windows";
+ // dump out some basic config information
+ System.out.println("Testing run on " + os + " host");
+ System.out.println("Working directory: " + getBinDir());
+ System.out.println("Dist directory: " + getDistDir());
+ System.out.println("Log directory: " + getLogDir());
+ System.out.println("Server config: " + getServerConfig());
+ System.out.println("CXF installed: " + isCXFInstalled());
+ System.out.println("WSTools present: " + isWSToolsPresent());
+ }
+
+ private boolean isWSToolsPresent() {
+ final File wstoolsFile = new File(getDistDir() + FS + "bin" + FS + "wstools" + (isWindows() ? ".bat" : ".sh"));
+ return wstoolsFile.exists();
+ }
+
+ /**
+ * Tests run "help" command (no args)
+ *
+ * @throws Exception
+ */
+ public void testNoArgs() throws Exception {
+ if (isCXFInstalled() && !isWSToolsPresent()) {
+ System.out.println("Installed CXF and no WSTools command line script as expected (EAP 5.1.x) ");
+ return;
+ }
+ String command = "wstools";
+ String options = null;
+ String args = "-h";
+ String[] shellCommand = getShellCommand(command, options, args);
+
+ String[] envp = null; // set the environment if necessary
+ File workingDir = new File(getBinDir()); // set the working directory
+ getShellScriptExecutor().runShellCommand(shellCommand, envp, workingDir);
+
+ // check assertions
+ getShellScriptExecutor().assertOnOutputStream("Usage: wstools", "usage string not found in command output");
+ }
+
+ /**
+ * Tests generate classes command
+ *
+ * @throws Exception
+ */
+ public void testGenerateClasses() throws Exception {
+ if (isCXFInstalled() && !isWSToolsPresent()) {
+ System.out.println("Installed CXF and no WSTools command line script as expected (EAP 5.1.x) ");
+ return;
+ }
+ File outDir = new File(scriptsDirUrl.getFile() + FS + "wstools-classes-out");
+ if (!outDir.exists()) {
+ outDir.mkdir();
+ }
+
+ String command = "wstools";
+ // original package was org.jboss.test.ws.benchmark.jaxws.doclit
+ String options = "-classpath " + classesDirUrl.getFile() + " -config " + configFileUrl.getFile() +
+ " -dest " + outDir.getAbsolutePath();
+ String args = null;
+ String[] shellCommand = getShellCommand(command, options, args);
+
+ String[] envp = null; // set the environment if necessary
+ File workingDir = new File(getBinDir()); // set the working directory
+ getShellScriptExecutor().runShellCommand(shellCommand, envp, workingDir);
+
+ // NO console output
+
+ //check files
+ File wsdlFile = new File(outDir.getAbsolutePath() + FS + "wsdl" + FS + "HelloService.wsdl");
+ File webservicesFile = new File(outDir.getAbsolutePath() + FS + "webservices.xml");
+ File mappingFile = new File(outDir.getAbsolutePath() + FS + "jaxrpc-mapping.xml");
+
+ assertTrue(wsdlFile.getAbsolutePath() + " doesn't exist", wsdlFile.exists());
+ assertTrue(webservicesFile.getAbsolutePath() + " doesn't exist", webservicesFile.exists());
+ assertTrue(mappingFile.getAbsolutePath() + " doesn't exist", mappingFile.exists());
+ }
+}
\ No newline at end of file
Copied: branches/weld-snapshot-integration/testsuite/src/main/org/jboss/test/security/test/authorization/secured/HttpRequestJBossWSAuthenticationUnitTestCase.java (from rev 108502, trunk/testsuite/src/main/org/jboss/test/security/test/authorization/secured/HttpRequestJBossWSAuthenticationUnitTestCase.java)
===================================================================
--- branches/weld-snapshot-integration/testsuite/src/main/org/jboss/test/security/test/authorization/secured/HttpRequestJBossWSAuthenticationUnitTestCase.java (rev 0)
+++ branches/weld-snapshot-integration/testsuite/src/main/org/jboss/test/security/test/authorization/secured/HttpRequestJBossWSAuthenticationUnitTestCase.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -0,0 +1,112 @@
+package org.jboss.test.security.test.authorization.secured;
+
+import java.net.HttpURLConnection;
+import java.net.URL;
+import junit.extensions.TestSetup;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.jboss.test.JBossTestCase;
+import org.jboss.test.JBossTestSetup;
+
+/**
+ * Test verifies that there is no /jbossws servlet security baypass in secured profiles.
+ *
+ * @author rsvoboda at redhat.com
+ */
+public class HttpRequestJBossWSAuthenticationUnitTestCase extends JBossTestCase {
+
+ private URL u;
+ private HttpURLConnection con;
+ private static final String GET = "GET";
+ private static final String POST = "POST";
+ private static final String HEAD = "HEAD";
+ private static final String OPTIONS = "OPTIONS";
+ private static final String PUT = "PUT";
+ private static final String DELETE = "DELETE";
+ private static final String TRACE = "TRACE";
+
+ public HttpRequestJBossWSAuthenticationUnitTestCase(String name){
+ super(name);
+ }
+
+ public static Test suite() throws Exception {
+ TestSuite suite = new TestSuite();
+ suite.addTest(new TestSuite(HttpRequestJBossWSAuthenticationUnitTestCase.class));
+ // Create an initializer for the test suite
+ TestSetup wrapper = new JBossTestSetup(suite)
+ {
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ }
+
+ @Override
+ protected void tearDown() throws Exception
+ {
+ super.tearDown();
+ }
+ };
+ return wrapper;
+ }
+
+ public void testGet() throws Exception {
+ con.setRequestMethod(GET);
+ con.connect();
+ assertEquals(HttpURLConnection.HTTP_UNAUTHORIZED, con.getResponseCode());
+ }
+
+ public void testPost() throws Exception {
+ con.setRequestMethod(POST);
+ con.connect();
+ assertEquals(HttpURLConnection.HTTP_UNAUTHORIZED, con.getResponseCode());
+ }
+
+ public void testHead() throws Exception {
+ con.setRequestMethod(HEAD);
+ con.connect();
+ assertEquals(HttpURLConnection.HTTP_UNAUTHORIZED, con.getResponseCode());
+ }
+
+ public void testOptions() throws Exception {
+ con.setRequestMethod(OPTIONS);
+ con.connect();
+ assertEquals(HttpURLConnection.HTTP_UNAUTHORIZED, con.getResponseCode());
+ }
+
+ public void testPut() throws Exception {
+ con.setRequestMethod(PUT);
+ con.connect();
+ assertEquals(HttpURLConnection.HTTP_UNAUTHORIZED, con.getResponseCode());
+ }
+
+ public void testTrace() throws Exception {
+ con.setRequestMethod(TRACE);
+ con.connect();
+ assertEquals(HttpURLConnection.HTTP_BAD_METHOD, con.getResponseCode());
+ }
+
+ public void testDelete() throws Exception {
+ con.setRequestMethod(DELETE);
+ con.connect();
+ assertEquals(HttpURLConnection.HTTP_UNAUTHORIZED, con.getResponseCode());
+ }
+
+ protected void setUp() throws Exception {
+ super.setUp();
+ u = new URL("http://" + getServerHost() + ":8080/jbossws");
+ con = (HttpURLConnection) u.openConnection();
+ try {
+ con.setDoInput(true);
+ con.setRequestProperty("Cookie","MODIFY ME IF NEEDED");
+ } finally {
+ con.disconnect();
+ }
+ }
+
+ protected void tearDown(){
+ if (con != null)
+ con.disconnect();
+ }
+}
Deleted: branches/weld-snapshot-integration/testsuite/src/main/org/jboss/test/security/test/authorization/secured/HttpRequestStatusServletAuthenticationUnitTestCase.java
===================================================================
--- branches/weld-snapshot-integration/testsuite/src/main/org/jboss/test/security/test/authorization/secured/HttpRequestStatusServletAuthenticationUnitTestCase.java 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/testsuite/src/main/org/jboss/test/security/test/authorization/secured/HttpRequestStatusServletAuthenticationUnitTestCase.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -1,112 +0,0 @@
-package org.jboss.test.security.test.authorization.secured;
-
-import java.net.HttpURLConnection;
-import java.net.URL;
-import junit.extensions.TestSetup;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.jboss.test.JBossTestCase;
-import org.jboss.test.JBossTestSetup;
-
-/**
- * Test verifies that there is no /status servlet security baypass in secured profiles.
- *
- * @author rsvoboda at redhat.com
- */
-public class HttpRequestStatusServletAuthenticationUnitTestCase extends JBossTestCase {
-
- private URL u;
- private HttpURLConnection con;
- private static final String GET = "GET";
- private static final String POST = "POST";
- private static final String HEAD = "HEAD";
- private static final String OPTIONS = "OPTIONS";
- private static final String PUT = "PUT";
- private static final String DELETE = "DELETE";
- private static final String TRACE = "TRACE";
-
- public HttpRequestStatusServletAuthenticationUnitTestCase(String name){
- super(name);
- }
-
- public static Test suite() throws Exception {
- TestSuite suite = new TestSuite();
- suite.addTest(new TestSuite(HttpRequestStatusServletAuthenticationUnitTestCase.class));
- // Create an initializer for the test suite
- TestSetup wrapper = new JBossTestSetup(suite)
- {
- @Override
- protected void setUp() throws Exception
- {
- super.setUp();
- }
-
- @Override
- protected void tearDown() throws Exception
- {
- super.tearDown();
- }
- };
- return wrapper;
- }
-
- public void testGet() throws Exception {
- con.setRequestMethod(GET);
- con.connect();
- assertEquals(HttpURLConnection.HTTP_UNAUTHORIZED, con.getResponseCode());
- }
-
- public void testPost() throws Exception {
- con.setRequestMethod(POST);
- con.connect();
- assertEquals(HttpURLConnection.HTTP_UNAUTHORIZED, con.getResponseCode());
- }
-
- public void testHead() throws Exception {
- con.setRequestMethod(HEAD);
- con.connect();
- assertEquals(HttpURLConnection.HTTP_UNAUTHORIZED, con.getResponseCode());
- }
-
- public void testOptions() throws Exception {
- con.setRequestMethod(OPTIONS);
- con.connect();
- assertEquals(HttpURLConnection.HTTP_UNAUTHORIZED, con.getResponseCode());
- }
-
- public void testPut() throws Exception {
- con.setRequestMethod(PUT);
- con.connect();
- assertEquals(HttpURLConnection.HTTP_UNAUTHORIZED, con.getResponseCode());
- }
-
- public void testTrace() throws Exception {
- con.setRequestMethod(TRACE);
- con.connect();
- assertEquals(HttpURLConnection.HTTP_BAD_METHOD, con.getResponseCode());
- }
-
- public void testDelete() throws Exception {
- con.setRequestMethod(DELETE);
- con.connect();
- assertEquals(HttpURLConnection.HTTP_UNAUTHORIZED, con.getResponseCode());
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- u = new URL("http://" + getServerHost() + ":8080/status");
- con = (HttpURLConnection) u.openConnection();
- try {
- con.setDoInput(true);
- con.setRequestProperty("Cookie","MODIFY ME IF NEEDED");
- } finally {
- con.disconnect();
- }
- }
-
- protected void tearDown(){
- if (con != null)
- con.disconnect();
- }
-}
Modified: branches/weld-snapshot-integration/testsuite/src/main/org/jboss/test/web/servlets/StandaloneENCAnnotationsServlet.java
===================================================================
--- branches/weld-snapshot-integration/testsuite/src/main/org/jboss/test/web/servlets/StandaloneENCAnnotationsServlet.java 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/testsuite/src/main/org/jboss/test/web/servlets/StandaloneENCAnnotationsServlet.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -71,7 +71,7 @@
mappedName="jbosstest/ejbs/UnsecuredEJB")
StatelessSessionHome sshome;
@EJB(name="ejb/CtsBmp", beanInterface=EntityHome.class,
- mappedName="jbosstest/ejbs/CtsBmp")
+ mappedName="ejbcts/BMPBean")
EntityHome entityHome;
@EJB(name="ejb/local/bean3", beanInterface=StatelessSessionLocalHome.class,
mappedName="jbosstest/ejbs/local/ENCBean1")
Copied: branches/weld-snapshot-integration/testsuite/src/resources/scripts (from rev 108502, trunk/testsuite/src/resources/scripts)
Deleted: branches/weld-snapshot-integration/testsuite/src/resources/scripts/BenchmarkWebService.wsdl
===================================================================
--- trunk/testsuite/src/resources/scripts/BenchmarkWebService.wsdl 2010-10-10 17:49:00 UTC (rev 108502)
+++ branches/weld-snapshot-integration/testsuite/src/resources/scripts/BenchmarkWebService.wsdl 2010-10-11 02:01:02 UTC (rev 108504)
@@ -1,184 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<definitions name="BenchmarkWebService" targetNamespace="http://org.jboss.ws/benchmark" xmlns:tns="http://org.jboss.ws/benchmark" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:ns2="http://org.jboss.ws/benchmark/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
- <types>
- <schema targetNamespace="http://org.jboss.ws/benchmark/types" xmlns:tns="http://org.jboss.ws/benchmark/types" xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://www.w3.org/2001/XMLSchema">
- <complexType name="echoArrayOfSimpleUserType">
- <sequence>
- <element name="arrayOfSimpleUserType_1" type="tns:SimpleUserType" nillable="true" minOccurs="0" maxOccurs="unbounded"/></sequence></complexType>
- <complexType name="SimpleUserType">
- <sequence>
- <element name="f" type="float"/>
- <element name="i" type="int"/>
- <element name="s" type="string" nillable="true"/></sequence></complexType>
- <complexType name="echoArrayOfSimpleUserTypeResponse">
- <sequence>
- <element name="result" type="tns:SimpleUserType" nillable="true" minOccurs="0" maxOccurs="unbounded"/></sequence></complexType>
- <complexType name="echoSimpleType">
- <sequence>
- <element name="SimpleUserType_1" type="tns:SimpleUserType" nillable="true"/></sequence></complexType>
- <complexType name="echoSimpleTypeResponse">
- <sequence>
- <element name="result" type="tns:SimpleUserType" nillable="true"/></sequence></complexType>
- <complexType name="echoSynthetic">
- <sequence>
- <element name="Synthetic_1" type="tns:Synthetic" nillable="true"/></sequence></complexType>
- <complexType name="Synthetic">
- <sequence>
- <element name="b" type="base64Binary" nillable="true"/>
- <element name="s" type="string" nillable="true"/>
- <element name="sut" type="tns:SimpleUserType" nillable="true"/></sequence></complexType>
- <complexType name="echoSyntheticResponse">
- <sequence>
- <element name="result" type="tns:Synthetic" nillable="true"/></sequence></complexType>
- <complexType name="getOrder">
- <sequence>
- <element name="int_1" type="int"/>
- <element name="int_2" type="int"/>
- </sequence>
- </complexType>
- <complexType name="getOrderResponse">
- <sequence>
- <element name="result" type="tns:Order" nillable="true"/>
- </sequence>
- </complexType>
- <complexType name="Order">
- <sequence>
- <element name="customer" type="tns:Customer" nillable="true"/>
- <element name="lineItems" type="tns:LineItem" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
- <element name="orderDate" type="dateTime" nillable="true"/>
- <element name="orderId" type="int"/>
- <element name="orderStatus" type="int"/>
- <element name="orderTotalAmount" type="float"/>
- </sequence>
- </complexType>
- <complexType name="Customer">
- <sequence>
- <element name="billingAddress" type="tns:Address" nillable="true"/>
- <element name="contactFirstName" type="string" nillable="true"/>
- <element name="contactLastName" type="string" nillable="true"/>
- <element name="contactPhone" type="string" nillable="true"/>
- <element name="creditCardExpirationDate" type="string" nillable="true"/>
- <element name="creditCardNumber" type="string" nillable="true"/>
- <element name="customerId" type="int"/>
- <element name="lastActivityDate" type="dateTime" nillable="true"/>
- <element name="shippingAddress" type="tns:Address" nillable="true"/>
- </sequence>
- </complexType>
- <complexType name="Address">
- <sequence>
- <element name="address1" type="string" nillable="true"/>
- <element name="address2" type="string" nillable="true"/>
- <element name="city" type="string" nillable="true"/>
- <element name="firstName" type="string" nillable="true"/>
- <element name="lastName" type="string" nillable="true"/>
- <element name="state" type="string" nillable="true"/>
- <element name="zip" type="string" nillable="true"/>
- </sequence>
- </complexType>
- <complexType name="LineItem">
- <sequence>
- <element name="itemId" type="int"/>
- <element name="orderId" type="int"/>
- <element name="orderQuantity" type="int"/>
- <element name="productDescription" type="string" nillable="true"/>
- <element name="productId" type="int"/>
- <element name="unitPrice" type="float"/>
- </sequence>
- </complexType>
- <element name="echoArrayOfSimpleUserType" type="tns:echoArrayOfSimpleUserType"/>
- <element name="echoArrayOfSimpleUserTypeResponse" type="tns:echoArrayOfSimpleUserTypeResponse"/>
- <element name="echoSimpleType" type="tns:echoSimpleType"/>
- <element name="echoSimpleTypeResponse" type="tns:echoSimpleTypeResponse"/>
- <element name="echoSynthetic" type="tns:echoSynthetic"/>
- <element name="echoSyntheticResponse" type="tns:echoSyntheticResponse"/>
- <element name="getOrder" type="tns:getOrder"/>
- <element name="getOrderResponse" type="tns:getOrderResponse"/>
- </schema>
- </types>
-
- <message name="BenchmarkService_echoArrayOfSimpleUserType">
- <part name="parameters" element="ns2:echoArrayOfSimpleUserType"/>
- </message>
- <message name="BenchmarkService_echoArrayOfSimpleUserTypeResponse">
- <part name="result" element="ns2:echoArrayOfSimpleUserTypeResponse"/>
- </message>
- <message name="BenchmarkService_echoSimpleType">
- <part name="parameters" element="ns2:echoSimpleType"/>
- </message>
- <message name="BenchmarkService_echoSimpleTypeResponse">
- <part name="result" element="ns2:echoSimpleTypeResponse"/>
- </message>
- <message name="BenchmarkService_echoSynthetic">
- <part name="parameters" element="ns2:echoSynthetic"/>
- </message>
- <message name="BenchmarkService_echoSyntheticResponse">
- <part name="result" element="ns2:echoSyntheticResponse"/>
- </message>
- <message name="BenchmarkService_getOrder">
- <part name="parameters" element="ns2:getOrder"/>
- </message>
- <message name="BenchmarkService_getOrderResponse">
- <part name="result" element="ns2:getOrderResponse"/>
- </message>
-
- <portType name="BenchmarkService">
- <operation name="echoArrayOfSimpleUserType">
- <input message="tns:BenchmarkService_echoArrayOfSimpleUserType"/>
- <output message="tns:BenchmarkService_echoArrayOfSimpleUserTypeResponse"/>
- </operation>
- <operation name="echoSimpleType">
- <input message="tns:BenchmarkService_echoSimpleType"/>
- <output message="tns:BenchmarkService_echoSimpleTypeResponse"/>
- </operation>
- <operation name="echoSynthetic">
- <input message="tns:BenchmarkService_echoSynthetic"/>
- <output message="tns:BenchmarkService_echoSyntheticResponse"/>
- </operation>
- <operation name="getOrder">
- <input message="tns:BenchmarkService_getOrder"/>
- <output message="tns:BenchmarkService_getOrderResponse"/>
- </operation>
- </portType>
-
- <binding name="BenchmarkServiceBinding" type="tns:BenchmarkService">
- <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
- <operation name="echoArrayOfSimpleUserType">
- <soap:operation soapAction=""/>
- <input>
- <soap:body use="literal"/></input>
- <output>
- <soap:body use="literal"/></output>
-
- </operation>
- <operation name="echoSimpleType">
- <soap:operation soapAction=""/>
- <input>
- <soap:body use="literal"/></input>
- <output>
- <soap:body use="literal"/></output>
-
- </operation>
- <operation name="echoSynthetic">
- <soap:operation soapAction=""/>
- <input>
- <soap:body use="literal"/></input>
- <output>
- <soap:body use="literal"/></output>
-
- </operation>
- <operation name="getOrder">
- <soap:operation soapAction=""/>
- <input>
- <soap:body use="literal"/></input>
- <output>
- <soap:body use="literal"/></output>
- </operation>
-
- </binding>
- <service name="BenchmarkWebService">
- <port name="BenchmarkServicePort" binding="tns:BenchmarkServiceBinding">
- <soap:address location="REPLACE_WITH_ACTUAL_URL"/>
- </port>
- </service>
-</definitions>
Copied: branches/weld-snapshot-integration/testsuite/src/resources/scripts/BenchmarkWebService.wsdl (from rev 108502, trunk/testsuite/src/resources/scripts/BenchmarkWebService.wsdl)
===================================================================
--- branches/weld-snapshot-integration/testsuite/src/resources/scripts/BenchmarkWebService.wsdl (rev 0)
+++ branches/weld-snapshot-integration/testsuite/src/resources/scripts/BenchmarkWebService.wsdl 2010-10-11 02:01:02 UTC (rev 108504)
@@ -0,0 +1,184 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<definitions name="BenchmarkWebService" targetNamespace="http://org.jboss.ws/benchmark" xmlns:tns="http://org.jboss.ws/benchmark" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:ns2="http://org.jboss.ws/benchmark/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
+ <types>
+ <schema targetNamespace="http://org.jboss.ws/benchmark/types" xmlns:tns="http://org.jboss.ws/benchmark/types" xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://www.w3.org/2001/XMLSchema">
+ <complexType name="echoArrayOfSimpleUserType">
+ <sequence>
+ <element name="arrayOfSimpleUserType_1" type="tns:SimpleUserType" nillable="true" minOccurs="0" maxOccurs="unbounded"/></sequence></complexType>
+ <complexType name="SimpleUserType">
+ <sequence>
+ <element name="f" type="float"/>
+ <element name="i" type="int"/>
+ <element name="s" type="string" nillable="true"/></sequence></complexType>
+ <complexType name="echoArrayOfSimpleUserTypeResponse">
+ <sequence>
+ <element name="result" type="tns:SimpleUserType" nillable="true" minOccurs="0" maxOccurs="unbounded"/></sequence></complexType>
+ <complexType name="echoSimpleType">
+ <sequence>
+ <element name="SimpleUserType_1" type="tns:SimpleUserType" nillable="true"/></sequence></complexType>
+ <complexType name="echoSimpleTypeResponse">
+ <sequence>
+ <element name="result" type="tns:SimpleUserType" nillable="true"/></sequence></complexType>
+ <complexType name="echoSynthetic">
+ <sequence>
+ <element name="Synthetic_1" type="tns:Synthetic" nillable="true"/></sequence></complexType>
+ <complexType name="Synthetic">
+ <sequence>
+ <element name="b" type="base64Binary" nillable="true"/>
+ <element name="s" type="string" nillable="true"/>
+ <element name="sut" type="tns:SimpleUserType" nillable="true"/></sequence></complexType>
+ <complexType name="echoSyntheticResponse">
+ <sequence>
+ <element name="result" type="tns:Synthetic" nillable="true"/></sequence></complexType>
+ <complexType name="getOrder">
+ <sequence>
+ <element name="int_1" type="int"/>
+ <element name="int_2" type="int"/>
+ </sequence>
+ </complexType>
+ <complexType name="getOrderResponse">
+ <sequence>
+ <element name="result" type="tns:Order" nillable="true"/>
+ </sequence>
+ </complexType>
+ <complexType name="Order">
+ <sequence>
+ <element name="customer" type="tns:Customer" nillable="true"/>
+ <element name="lineItems" type="tns:LineItem" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="orderDate" type="dateTime" nillable="true"/>
+ <element name="orderId" type="int"/>
+ <element name="orderStatus" type="int"/>
+ <element name="orderTotalAmount" type="float"/>
+ </sequence>
+ </complexType>
+ <complexType name="Customer">
+ <sequence>
+ <element name="billingAddress" type="tns:Address" nillable="true"/>
+ <element name="contactFirstName" type="string" nillable="true"/>
+ <element name="contactLastName" type="string" nillable="true"/>
+ <element name="contactPhone" type="string" nillable="true"/>
+ <element name="creditCardExpirationDate" type="string" nillable="true"/>
+ <element name="creditCardNumber" type="string" nillable="true"/>
+ <element name="customerId" type="int"/>
+ <element name="lastActivityDate" type="dateTime" nillable="true"/>
+ <element name="shippingAddress" type="tns:Address" nillable="true"/>
+ </sequence>
+ </complexType>
+ <complexType name="Address">
+ <sequence>
+ <element name="address1" type="string" nillable="true"/>
+ <element name="address2" type="string" nillable="true"/>
+ <element name="city" type="string" nillable="true"/>
+ <element name="firstName" type="string" nillable="true"/>
+ <element name="lastName" type="string" nillable="true"/>
+ <element name="state" type="string" nillable="true"/>
+ <element name="zip" type="string" nillable="true"/>
+ </sequence>
+ </complexType>
+ <complexType name="LineItem">
+ <sequence>
+ <element name="itemId" type="int"/>
+ <element name="orderId" type="int"/>
+ <element name="orderQuantity" type="int"/>
+ <element name="productDescription" type="string" nillable="true"/>
+ <element name="productId" type="int"/>
+ <element name="unitPrice" type="float"/>
+ </sequence>
+ </complexType>
+ <element name="echoArrayOfSimpleUserType" type="tns:echoArrayOfSimpleUserType"/>
+ <element name="echoArrayOfSimpleUserTypeResponse" type="tns:echoArrayOfSimpleUserTypeResponse"/>
+ <element name="echoSimpleType" type="tns:echoSimpleType"/>
+ <element name="echoSimpleTypeResponse" type="tns:echoSimpleTypeResponse"/>
+ <element name="echoSynthetic" type="tns:echoSynthetic"/>
+ <element name="echoSyntheticResponse" type="tns:echoSyntheticResponse"/>
+ <element name="getOrder" type="tns:getOrder"/>
+ <element name="getOrderResponse" type="tns:getOrderResponse"/>
+ </schema>
+ </types>
+
+ <message name="BenchmarkService_echoArrayOfSimpleUserType">
+ <part name="parameters" element="ns2:echoArrayOfSimpleUserType"/>
+ </message>
+ <message name="BenchmarkService_echoArrayOfSimpleUserTypeResponse">
+ <part name="result" element="ns2:echoArrayOfSimpleUserTypeResponse"/>
+ </message>
+ <message name="BenchmarkService_echoSimpleType">
+ <part name="parameters" element="ns2:echoSimpleType"/>
+ </message>
+ <message name="BenchmarkService_echoSimpleTypeResponse">
+ <part name="result" element="ns2:echoSimpleTypeResponse"/>
+ </message>
+ <message name="BenchmarkService_echoSynthetic">
+ <part name="parameters" element="ns2:echoSynthetic"/>
+ </message>
+ <message name="BenchmarkService_echoSyntheticResponse">
+ <part name="result" element="ns2:echoSyntheticResponse"/>
+ </message>
+ <message name="BenchmarkService_getOrder">
+ <part name="parameters" element="ns2:getOrder"/>
+ </message>
+ <message name="BenchmarkService_getOrderResponse">
+ <part name="result" element="ns2:getOrderResponse"/>
+ </message>
+
+ <portType name="BenchmarkService">
+ <operation name="echoArrayOfSimpleUserType">
+ <input message="tns:BenchmarkService_echoArrayOfSimpleUserType"/>
+ <output message="tns:BenchmarkService_echoArrayOfSimpleUserTypeResponse"/>
+ </operation>
+ <operation name="echoSimpleType">
+ <input message="tns:BenchmarkService_echoSimpleType"/>
+ <output message="tns:BenchmarkService_echoSimpleTypeResponse"/>
+ </operation>
+ <operation name="echoSynthetic">
+ <input message="tns:BenchmarkService_echoSynthetic"/>
+ <output message="tns:BenchmarkService_echoSyntheticResponse"/>
+ </operation>
+ <operation name="getOrder">
+ <input message="tns:BenchmarkService_getOrder"/>
+ <output message="tns:BenchmarkService_getOrderResponse"/>
+ </operation>
+ </portType>
+
+ <binding name="BenchmarkServiceBinding" type="tns:BenchmarkService">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+ <operation name="echoArrayOfSimpleUserType">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal"/></input>
+ <output>
+ <soap:body use="literal"/></output>
+
+ </operation>
+ <operation name="echoSimpleType">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal"/></input>
+ <output>
+ <soap:body use="literal"/></output>
+
+ </operation>
+ <operation name="echoSynthetic">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal"/></input>
+ <output>
+ <soap:body use="literal"/></output>
+
+ </operation>
+ <operation name="getOrder">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal"/></input>
+ <output>
+ <soap:body use="literal"/></output>
+ </operation>
+
+ </binding>
+ <service name="BenchmarkWebService">
+ <port name="BenchmarkServicePort" binding="tns:BenchmarkServiceBinding">
+ <soap:address location="REPLACE_WITH_ACTUAL_URL"/>
+ </port>
+ </service>
+</definitions>
Deleted: branches/weld-snapshot-integration/testsuite/src/resources/scripts/web.xml
===================================================================
--- trunk/testsuite/src/resources/scripts/web.xml 2010-10-10 17:49:00 UTC (rev 108502)
+++ branches/weld-snapshot-integration/testsuite/src/resources/scripts/web.xml 2010-10-11 02:01:02 UTC (rev 108504)
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
- version="2.4">
-
- <servlet>
- <servlet-name>TestService</servlet-name>
- <servlet-class>org.jboss.test.scripts.support.EchoJavaBean</servlet-class>
- </servlet>
-
- <servlet-mapping>
- <servlet-name>TestService</servlet-name>
- <url-pattern>/*</url-pattern>
- </servlet-mapping>
-
-</web-app>
Copied: branches/weld-snapshot-integration/testsuite/src/resources/scripts/web.xml (from rev 108502, trunk/testsuite/src/resources/scripts/web.xml)
===================================================================
--- branches/weld-snapshot-integration/testsuite/src/resources/scripts/web.xml (rev 0)
+++ branches/weld-snapshot-integration/testsuite/src/resources/scripts/web.xml 2010-10-11 02:01:02 UTC (rev 108504)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+ version="2.4">
+
+ <servlet>
+ <servlet-name>TestService</servlet-name>
+ <servlet-class>org.jboss.test.scripts.support.EchoJavaBean</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>TestService</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+
+</web-app>
Deleted: branches/weld-snapshot-integration/testsuite/src/resources/scripts/wstools-config.xml
===================================================================
--- trunk/testsuite/src/resources/scripts/wstools-config.xml 2010-10-10 17:49:00 UTC (rev 108502)
+++ branches/weld-snapshot-integration/testsuite/src/resources/scripts/wstools-config.xml 2010-10-11 02:01:02 UTC (rev 108504)
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<configuration xmlns="http://www.jboss.org/jbossws-tools"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.jboss.org/jbossws-tools http://www.jboss.org/jbossws-tools/schema/jbossws-tool_1_0.xsd">
- <java-wsdl>
- <service name="HelloService" style="rpc" endpoint="org.jboss.test.scripts.support.Hello"/>
- <namespaces target-namespace="http://org.jboss.ws/testsuite" type-namespace="http://org.jboss.ws/testsuite/types"/>
- <mapping file="jaxrpc-mapping.xml"/>
- <webservices servlet-link="HelloService"/>
- </java-wsdl>
-</configuration>
\ No newline at end of file
Copied: branches/weld-snapshot-integration/testsuite/src/resources/scripts/wstools-config.xml (from rev 108502, trunk/testsuite/src/resources/scripts/wstools-config.xml)
===================================================================
--- branches/weld-snapshot-integration/testsuite/src/resources/scripts/wstools-config.xml (rev 0)
+++ branches/weld-snapshot-integration/testsuite/src/resources/scripts/wstools-config.xml 2010-10-11 02:01:02 UTC (rev 108504)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<configuration xmlns="http://www.jboss.org/jbossws-tools"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.jboss.org/jbossws-tools http://www.jboss.org/jbossws-tools/schema/jbossws-tool_1_0.xsd">
+ <java-wsdl>
+ <service name="HelloService" style="rpc" endpoint="org.jboss.test.scripts.support.Hello"/>
+ <namespaces target-namespace="http://org.jboss.ws/testsuite" type-namespace="http://org.jboss.ws/testsuite/types"/>
+ <mapping file="jaxrpc-mapping.xml"/>
+ <webservices servlet-link="HelloService"/>
+ </java-wsdl>
+</configuration>
\ No newline at end of file
Modified: branches/weld-snapshot-integration/testsuite/src/resources/security/authorization/xacml-ejb/META-INF/jboss-xacml-policy.xml
===================================================================
--- branches/weld-snapshot-integration/testsuite/src/resources/security/authorization/xacml-ejb/META-INF/jboss-xacml-policy.xml 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/testsuite/src/resources/security/authorization/xacml-ejb/META-INF/jboss-xacml-policy.xml 2010-10-11 02:01:02 UTC (rev 108504)
@@ -70,7 +70,7 @@
<ActionMatch
MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
<AttributeValue
- DataType="http://www.w3.org/2001/XMLSchema#string">echo</AttributeValue>
+ DataType="http://www.w3.org/2001/XMLSchema#string">echo(String)</AttributeValue>
<ActionAttributeDesignator
AttributeId="urn:oasis:names:tc:xacml:1.0:action:action-id"
DataType="http://www.w3.org/2001/XMLSchema#string"/>
Modified: branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/config/ServerConfigFactoryImpl.java
===================================================================
--- branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/config/ServerConfigFactoryImpl.java 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/config/ServerConfigFactoryImpl.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -36,7 +36,6 @@
*/
public final class ServerConfigFactoryImpl extends ServerConfigFactory
{
-
/** The bean name in the kernel registry. */
private static final String BEAN_NAME = "WSServerConfig";
@@ -50,7 +49,7 @@
/**
* Returns config registered in MC kernel.
- *
+ *
* @return config
*/
public ServerConfig getServerConfig()
@@ -58,8 +57,7 @@
final SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
final IoCContainerProxyFactory iocContainerFactory = spiProvider.getSPI(IoCContainerProxyFactory.class);
final IoCContainerProxy iocContainer = iocContainerFactory.getContainer();
-
+
return iocContainer.getBean(ServerConfigFactoryImpl.BEAN_NAME, ServerConfig.class);
}
-
}
Modified: branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/config/ServerConfigImpl.java
===================================================================
--- branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/config/ServerConfigImpl.java 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/config/ServerConfigImpl.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -40,7 +40,6 @@
*/
public final class ServerConfigImpl extends AbstractServerConfig implements AbstractServerConfigMBean
{
-
/**
* Constructor.
*/
@@ -51,17 +50,17 @@
/**
* Gets server temp directory.
- *
+ *
* @return temp directory
*/
public File getServerTempDir()
{
return this.getDirFromServerConfig("ServerTempLocation");
}
-
+
/**
* Gets server home directory.
- *
+ *
* @return home directory
*/
public File getHomeDir()
@@ -71,14 +70,14 @@
/**
* Gets server data directory.
- *
+ *
* @return data directory
*/
public File getServerDataDir()
{
return this.getDirFromServerConfig("ServerDataLocation");
}
-
+
/**
* Obtains the requested directory from the server configuration.
*
@@ -114,5 +113,4 @@
return dir;
}
-
}
Copied: branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/AbstractDescriptorDeployer.java (from rev 108502, trunk/webservices/src/main/java/org/jboss/webservices/integration/deployers/AbstractDescriptorDeployer.java)
===================================================================
--- branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/AbstractDescriptorDeployer.java (rev 0)
+++ branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/AbstractDescriptorDeployer.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -0,0 +1,79 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.webservices.integration.deployers;
+
+import org.jboss.deployers.vfs.spi.deployer.ObjectModelFactoryDeployer;
+import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
+import org.jboss.vfs.VFSInputSource;
+import org.jboss.vfs.VirtualFile;
+import org.jboss.wsf.spi.metadata.DescriptorProcessor;
+import org.jboss.xb.binding.ObjectModelFactory;
+import org.xml.sax.InputSource;
+
+/**
+ * Abstract descriptor deployer which deploys only if particular DD processor is available.
+ *
+ * @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
+ */
+abstract class AbstractDescriptorDeployer<P extends DescriptorProcessor<T>, T> extends ObjectModelFactoryDeployer<T>
+{
+ private P ddProcessor;
+
+ AbstractDescriptorDeployer(Class<T> output)
+ {
+ super(output);
+ this.setName("UNSPECIFIED");
+ this.setUseSchemaValidation(false);
+ }
+
+ @Override
+ protected T parse(final VFSDeploymentUnit unit, final VirtualFile file, final T root) throws Exception
+ {
+ if (this.ddProcessor != null)
+ {
+ InputSource source = new VFSInputSource(file);
+ ObjectModelFactory factory = this.ddProcessor.getFactory(file.toURL());
+ return getHelper().parse(source, root, factory);
+ }
+
+ return null;
+ }
+
+ /**
+ * MC incallback method. It will be invoked each time subclass specific DescriptorProcessor bean will be installed.
+ */
+ protected void setProcessor(final P ddProcessor)
+ {
+ if (this.ddProcessor != null)
+ throw new IllegalStateException("Only one " + this.ddProcessor.getClass() + " instance can be installed in MC");
+
+ this.ddProcessor = ddProcessor;
+ this.setName(this.ddProcessor.getDescriptorName());
+ this.setUseSchemaValidation(this.ddProcessor.isValidating());
+ }
+
+ @Override
+ protected ObjectModelFactory getObjectModelFactory(final T root)
+ {
+ throw new UnsupportedOperationException();
+ }
+}
Modified: branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/JAXRPCAppClientClassPathDeployer.java
===================================================================
--- branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/JAXRPCAppClientClassPathDeployer.java 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/JAXRPCAppClientClassPathDeployer.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -31,10 +31,9 @@
* when a application-client.xml descriptor file is found in the deployment.
* This deployer then actually enables classpath modification when a jaxrpc-mapping
* is specified in the descriptor.
- *
+ *
* @author alessio.soldano at jboss.com
* @since 03-Feb-2010
- *
*/
public class JAXRPCAppClientClassPathDeployer extends JAXRPCClientClassPathDeployer<ApplicationClientMetaData>
{
@@ -42,7 +41,7 @@
{
super(ApplicationClientMetaData.class);
}
-
+
@Override
protected boolean isClassPathChangeRequired(VFSDeploymentUnit unit)
{
Modified: branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/JAXRPCClientClassPathDeployer.java
===================================================================
--- branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/JAXRPCClientClassPathDeployer.java 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/JAXRPCClientClassPathDeployer.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -32,10 +32,9 @@
* when a application-client.xml descriptor file is found in the deployment.
* This deployer then actually enables classpath modification when a jaxrpc-mapping
* is specified in the descriptor.
- *
+ *
* @author alessio.soldano at jboss.com
* @since 03-Feb-2010
- *
*/
public abstract class JAXRPCClientClassPathDeployer<T> extends JAXRPCIntegrationClassPathDeployer<T>
{
@@ -44,7 +43,7 @@
super(input);
setInput(input); //makes the input mandatory instead of optional
}
-
+
protected static boolean hasJaxRpcMappingReference(ServiceReferencesMetaData serviceReferences)
{
if (serviceReferences != null)
@@ -60,5 +59,4 @@
}
return false;
}
-
}
Modified: branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/JAXRPCEjbClientClassPathDeployer.java
===================================================================
--- branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/JAXRPCEjbClientClassPathDeployer.java 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/JAXRPCEjbClientClassPathDeployer.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -35,10 +35,9 @@
* when a ejb-jar.xml descriptor file is found in the deployment.
* This deployer then actually enables classpath modification when a jaxrpc-mapping
* is specified in the descriptor.
- *
+ *
* @author alessio.soldano at jboss.com
* @since 03-Feb-2010
- *
*/
public class JAXRPCEjbClientClassPathDeployer extends JAXRPCClientClassPathDeployer<EjbJarMetaData>
{
@@ -46,7 +45,7 @@
{
super(EjbJarMetaData.class);
}
-
+
@Override
protected boolean isClassPathChangeRequired(VFSDeploymentUnit unit)
{
Modified: branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/JAXRPCIntegrationClassPathDeployer.java
===================================================================
--- branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/JAXRPCIntegrationClassPathDeployer.java 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/JAXRPCIntegrationClassPathDeployer.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -36,25 +36,22 @@
* An abstract deployer that properly set the classpath for JAX-RPC deployments.
* This is performed adding a reference to an integration lib from the jaxrpc
* deployers to the deployment unit's classpath.
- *
+ *
* @author alessio.soldano at jboss.com
* @since 02-Feb-2010
- *
*/
public abstract class JAXRPCIntegrationClassPathDeployer<T> extends UrlIntegrationDeployer<T>
{
private Set<String> libs;
-
private boolean integrationLibsFound = false;
private ServerConfig wsServerConfig;
private boolean stackRequiresIntegration;
-
-
+
public JAXRPCIntegrationClassPathDeployer(Class<T> input)
{
super(input);
}
-
+
protected abstract boolean isClassPathChangeRequired(VFSDeploymentUnit unit);
@Override
@@ -62,13 +59,13 @@
{
return stackRequiresIntegration && integrationLibsFound && isClassPathChangeRequired(unit);
}
-
+
@Override
public void start()
{
//NOOP
}
-
+
protected Set<URL> getJBossWSIntegrationUrls()
{
Set<URL> result = new HashSet<URL>();
@@ -97,12 +94,7 @@
}
return result;
}
-
- /**
- * Get server home.
- *
- * @return the jboss server home location
- */
+
protected String getServerHome()
{
return "${jboss.server.home.url}";
@@ -130,5 +122,4 @@
//the Native stack does not requires the JAXRPC additional integration
stackRequiresIntegration = !wsServerConfig.getImplementationTitle().toLowerCase().contains("native");
}
-
}
Modified: branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/JAXRPCServerClassPathDeployer.java
===================================================================
--- branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/JAXRPCServerClassPathDeployer.java 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/JAXRPCServerClassPathDeployer.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -30,10 +30,9 @@
* A deployer for properly setting the classpath for jaxrpc endpoint deployments;
* it's triggered by the WebservicesMetaData which is attached to the unit
* when a webservice.xml descriptor file is found in the deployment.
- *
+ *
* @author alessio.soldano at jboss.com
* @since 03-Feb-2010
- *
*/
public class JAXRPCServerClassPathDeployer extends JAXRPCIntegrationClassPathDeployer<WebservicesMetaData>
{
@@ -42,7 +41,7 @@
super(WebservicesMetaData.class);
setInput(WebservicesMetaData.class); //makes the input mandatory instead of optional
}
-
+
@Override
protected boolean isClassPathChangeRequired(VFSDeploymentUnit unit)
{
Modified: branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/JAXRPCServletClientClassPathDeployer.java
===================================================================
--- branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/JAXRPCServletClientClassPathDeployer.java 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/JAXRPCServletClientClassPathDeployer.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -31,10 +31,9 @@
* when a web.xml descriptor file is found in the deployment.
* This deployer then actually enables classpath modification when a jaxrpc-mapping
* is specified in the descriptor.
- *
+ *
* @author alessio.soldano at jboss.com
* @since 03-Feb-2010
- *
*/
public class JAXRPCServletClientClassPathDeployer extends JAXRPCClientClassPathDeployer<WebMetaData>
{
@@ -42,7 +41,7 @@
{
super(WebMetaData.class);
}
-
+
@Override
protected boolean isClassPathChangeRequired(VFSDeploymentUnit unit)
{
Copied: branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/JMSDescriptorDeployer.java (from rev 108502, trunk/webservices/src/main/java/org/jboss/webservices/integration/deployers/JMSDescriptorDeployer.java)
===================================================================
--- branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/JMSDescriptorDeployer.java (rev 0)
+++ branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/JMSDescriptorDeployer.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.webservices.integration.deployers;
+
+import org.jboss.wsf.spi.metadata.jms.JMSDescriptorProcessor;
+import org.jboss.wsf.spi.metadata.jms.JMSEndpointsMetaData;
+
+/**
+ * Stack agnostic JMS descriptor deployer.
+ *
+ * @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
+ */
+public final class JMSDescriptorDeployer extends AbstractDescriptorDeployer<JMSDescriptorProcessor, JMSEndpointsMetaData>
+{
+ /**
+ * Constructor.
+ */
+ public JMSDescriptorDeployer()
+ {
+ super(JMSEndpointsMetaData.class);
+ }
+
+ /**
+ * MC incallback method. It will be invoked each time JMSDescriptorProcessor bean will be installed.
+ * @param processor the processor
+ */
+ @Override
+ public void setProcessor(final JMSDescriptorProcessor processor)
+ {
+ super.setProcessor(processor);
+ }
+}
Modified: branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/SecurityActions.java
===================================================================
--- branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/SecurityActions.java 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/SecurityActions.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -25,16 +25,16 @@
import java.security.PrivilegedAction;
/**
- *
+ * Security actions helper.
+ *
* @author alessio.soldano at jboss.com
* @since 17-Feb-2010
- *
*/
class SecurityActions
{
/**
* Get context classloader.
- *
+ *
* @return the current context classloader
*/
static ClassLoader getContextClassLoader()
@@ -54,7 +54,7 @@
});
}
}
-
+
/**
* Set context classloader.
*
@@ -78,5 +78,4 @@
});
}
}
-
}
Modified: branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/WSAspectizedDeployersFactory.java
===================================================================
--- branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/WSAspectizedDeployersFactory.java 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/WSAspectizedDeployersFactory.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -36,7 +36,6 @@
*/
public final class WSAspectizedDeployersFactory
{
-
/** Logger. */
private static final Logger LOGGER = Logger.getLogger(WSAspectizedDeployersFactory.class);
@@ -45,10 +44,10 @@
/** Our deployers regitry. */
private final Map<DeploymentAspect, Deployer> deployersRegistry = new HashMap<DeploymentAspect, Deployer>();
-
+
/**
* Constructor.
- *
+ *
* @param realDeployers real deployers registry
*/
public WSAspectizedDeployersFactory(final DeployersImpl realDeployers)
@@ -58,7 +57,7 @@
/**
* MC incallback method. It will be called each time DeploymentAspect bean will be installed.
- *
+ *
* @param aspect to create real WS aspectized deployer for
*/
public void addDeployer(final DeploymentAspect aspect)
@@ -75,7 +74,7 @@
/**
* MC uncallback method. It will be called each time DeploymentAspect bean will be removed.
- *
+ *
* @param aspect to remove real WS aspectized deployer for
*/
public void removeDeployer(final DeploymentAspect aspect)
@@ -89,5 +88,4 @@
this.deployersRegistry.remove(aspect);
this.delegee.removeDeployer(wsAspectizedDeployer);
}
-
}
Modified: branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentAspectDeployer.java
===================================================================
--- branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentAspectDeployer.java 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentAspectDeployer.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -23,17 +23,19 @@
import java.util.Set;
+import org.jboss.beans.metadata.spi.BeanMetaData;
import org.jboss.deployers.spi.DeploymentException;
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.util.ASHelper;
+import org.jboss.wsf.common.integration.JMSDeploymentAspect;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.DeploymentAspect;
/**
* A deployer that delegates to JBossWS deployment aspect.
- *
+ *
* @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
*/
final class WSDeploymentAspectDeployer extends AbstractRealDeployer
@@ -50,21 +52,35 @@
/**
* Constructor.
- *
+ *
* @param aspect deployment aspect
*/
WSDeploymentAspectDeployer(final DeploymentAspect aspect)
{
super();
-
- // inputs
- this.addInput(JBossWebMetaData.class);
- this.addInput(Deployment.class);
- if (aspect.isLast())
+ if (aspect instanceof JMSDeploymentAspect)
{
- this.addInput(WSDeploymentAspectDeployer.JBOSSWS_METADATA);
+ // inputs
+ this.addInput(org.jboss.system.metadata.ServiceDeployment.class);
+ this.addInput(org.jboss.system.metadata.ServiceMetaData.class);
}
+ else
+ {
+ // inputs
+ this.addInput(JBossWebMetaData.class);
+ this.addInput(Deployment.class);
+ if (aspect.isLast())
+ {
+ this.addInput(WSDeploymentAspectDeployer.JBOSSWS_METADATA);
+ }
+ // outputs
+ this.addOutput(JBossWebMetaData.class);
+ if (!aspect.isLast())
+ {
+ this.addOutput(WSDeploymentAspectDeployer.JBOSSWS_METADATA);
+ }
+ }
// propagate DA requirements and map them to deployer inputs
final Set<String> inputs = aspect.getRequiresAsSet();
for (String input : inputs)
@@ -72,13 +88,6 @@
this.addInput(WSDeploymentAspectDeployer.JBOSSWS_ATTACHMENT_PREFIX + input);
}
- // outputs
- this.addOutput(JBossWebMetaData.class);
- if (!aspect.isLast())
- {
- this.addOutput(WSDeploymentAspectDeployer.JBOSSWS_METADATA);
- }
-
// propagate DA provides and map them to deployer outputs
final Set<String> outputs = aspect.getProvidesAsSet();
for (String output : outputs)
@@ -93,7 +102,7 @@
/**
* If deployed unit is related to web services this method delegates
* to deployment aspect and calls its create() and start() methods.
- *
+ *
* @param unit deployment unit
* @throws DeploymentException on deployment failure
*/
@@ -124,7 +133,7 @@
/**
* If undeployed unit is related to web services this method delegates
* to deployment aspect and calls its stop() and destroy() methods.
- *
+ *
* @param unit deployment unit
*/
@Override
@@ -153,7 +162,7 @@
/**
* Displays also WS deployment aspect being wrapped.
- *
+ *
* @return deployer instance id including wrapped deployment aspect id.
*/
@Override
@@ -163,5 +172,4 @@
sb.append(super.toString()).append('(').append(this.aspect).append(')');
return sb.toString();
}
-
}
Modified: branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentDeployer.java
===================================================================
--- branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentDeployer.java 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentDeployer.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -30,13 +30,12 @@
import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
/**
- * This deployer initializes JBossWS deployment meta data.
+ * This deployer initializes JBossWS deployment meta data.
*
* @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
*/
public final class WSDeploymentDeployer extends AbstractRealDeployer
{
-
/**
* Constructor.
*/
@@ -55,7 +54,7 @@
/**
* Creates new Web Service deployment and registers it with deployment unit.
- *
+ *
* @param unit deployment unit
* @throws DeploymentException if any error occurs
*/
@@ -65,5 +64,4 @@
this.log.trace("Building JBoss agnostic webservices meta data model");
WSDeploymentBuilder.getInstance().build(unit);
}
-
}
Modified: branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/WSDescriptorDeployer.java
===================================================================
--- branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/WSDescriptorDeployer.java 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/WSDescriptorDeployer.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -21,19 +21,16 @@
*/
package org.jboss.webservices.integration.deployers;
-import org.jboss.deployers.vfs.spi.deployer.ObjectModelFactoryDeployer;
-import org.jboss.wsf.spi.metadata.webservices.WebservicesFactory;
+import org.jboss.wsf.spi.metadata.webservices.WebservicesDescriptorProcessor;
import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData;
-import org.jboss.xb.binding.ObjectModelFactory;
/**
* webservices.xml deployer.
*
* @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
*/
-public final class WSDescriptorDeployer extends ObjectModelFactoryDeployer<WebservicesMetaData>
+public final class WSDescriptorDeployer extends AbstractDescriptorDeployer<WebservicesDescriptorProcessor, WebservicesMetaData>
{
-
/**
* Constructor.
*/
@@ -43,16 +40,12 @@
}
/**
- * Model factory generator.
- *
- * @param root object tree root
- * @return object model factory
+ * MC incallback method. It will be invoked each time WebservicesDescriptorProcessor bean will be installed.
+ * @param processor the processor
*/
@Override
- protected ObjectModelFactory getObjectModelFactory(final WebservicesMetaData root)
+ public void setProcessor(final WebservicesDescriptorProcessor processor)
{
- this.log.debug("Returning webservices descriptor factory");
- return new WebservicesFactory(null);
+ super.setProcessor(processor);
}
-
}
Modified: branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/WSEJBAdapterDeployer.java
===================================================================
--- branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/WSEJBAdapterDeployer.java 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/WSEJBAdapterDeployer.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -49,7 +49,6 @@
*/
public final class WSEJBAdapterDeployer extends AbstractRealDeployer
{
-
/**
* Constructor.
*/
@@ -69,7 +68,7 @@
/**
* Deploys WebServiceDeployment meta data.
- *
+ *
* @param unit deployment unit
* @throws DeploymentException exception
*/
@@ -107,7 +106,7 @@
/**
* Returns EJB container if EJB3 deployment is detected and EJB meta data does not represent entity bean.
- *
+ *
* @param ejb3Deployment EJB3 deployment meta data
* @param ejbMD EJB meta data
* @return EJB container or null if not EJB3 stateless bean
@@ -150,7 +149,7 @@
/**
* Constructor.
- *
+ *
* @param ejbMetaData EJB metadata
* @param ejbContainer EJB container
* @param loader class loader
@@ -234,7 +233,6 @@
+ " from loader: " + this.loader);
}
}
-
}
/**
@@ -243,7 +241,6 @@
*/
private static final class WebServiceDeploymentAdapter implements WebServiceDeployment
{
-
/** List of endpoints. */
private final List<WebServiceDeclaration> endpoints = new ArrayList<WebServiceDeclaration>();
@@ -257,14 +254,12 @@
/**
* Returns endpoints list.
- *
+ *
* @return endpoints list
*/
public List<WebServiceDeclaration> getServiceEndpoints()
{
return this.endpoints;
}
-
}
-
}
Modified: branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/WSTypeDeployer.java
===================================================================
--- branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/WSTypeDeployer.java 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/WSTypeDeployer.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -29,6 +29,7 @@
import org.jboss.webservices.integration.util.ASHelper;
import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
import org.jboss.wsf.spi.deployment.integration.WebServiceDeployment;
+import org.jboss.wsf.spi.metadata.jms.JMSEndpointsMetaData;
import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData;
/**
@@ -38,7 +39,6 @@
*/
public final class WSTypeDeployer extends AbstractRealDeployer
{
-
/**
* Constructor.
*/
@@ -58,7 +58,7 @@
/**
* Detects WS deployment type and puts it to the deployment unit attachments.
- *
+ *
* @param unit deployment unit
* @throws DeploymentException on failure
*/
@@ -85,11 +85,16 @@
this.log.debug("Detected JAXRPC EJB21 deployment");
unit.addAttachment(DeploymentType.class, DeploymentType.JAXRPC_EJB21);
}
+ else if (this.isJaxwsJmsDeployment(unit))
+ {
+ this.log.debug("Detected JAXWS JMS deployment");
+ unit.addAttachment(DeploymentType.class, DeploymentType.JAXWS_JMS);
+ }
}
/**
* Returns true if JAXRPC EJB deployment is detected.
- *
+ *
* @param unit deployment unit
* @return true if JAXRPC EJB, false otherwise
*/
@@ -103,7 +108,7 @@
/**
* Returns true if JAXRPC JSE deployment is detected.
- *
+ *
* @param unit deployment unit
* @return true if JAXRPC JSE, false otherwise
*/
@@ -122,7 +127,7 @@
/**
* Returns true if JAXWS EJB deployment is detected.
- *
+ *
* @param unit deployment unit
* @return true if JAXWS EJB, false otherwise
*/
@@ -140,7 +145,7 @@
/**
* Returns true if JAXWS JSE deployment is detected.
- *
+ *
* @param unit deployment unit
* @return true if JAXWS JSE, false otherwise
*/
@@ -156,4 +161,14 @@
return false;
}
+ /**
+ * Returns true if JAXWS JMS deployment is detected.
+ *
+ * @param unit deployment unit
+ * @return true if JAXWS JMS, false otherwise
+ */
+ private boolean isJaxwsJmsDeployment(final DeploymentUnit unit)
+ {
+ return ASHelper.hasAttachment(unit, JMSEndpointsMetaData.class);
+ }
}
Modified: branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/deployment/AbstractDeploymentModelBuilder.java
===================================================================
--- branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/deployment/AbstractDeploymentModelBuilder.java 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/deployment/AbstractDeploymentModelBuilder.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -30,7 +30,6 @@
*/
abstract class AbstractDeploymentModelBuilder implements DeploymentModelBuilder
{
-
/** WSDL, XSD and XML files filter. */
private static final WSVirtualFileFilter WS_FILE_FILTER = new WSVirtualFileFilter();
@@ -76,14 +75,14 @@
protected abstract void build(Deployment dep, DeploymentUnit unit);
/**
- * Creates new Web Service endpoint.
+ * Creates new Http 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)
+ protected final Endpoint newHttpEndpoint(final String endpointClass, final String endpointName, final Deployment dep)
{
if (endpointName == null)
{
@@ -95,7 +94,7 @@
throw new NullPointerException("Null endpoint class");
}
- final Endpoint endpoint = this.deploymentModelFactory.newEndpoint(endpointClass);
+ final Endpoint endpoint = this.deploymentModelFactory.newHttpEndpoint(endpointClass);
endpoint.setShortName(endpointName);
dep.getService().addEndpoint(endpoint);
@@ -103,6 +102,33 @@
}
/**
+ * Creates new JMS Web Service endpoint.
+ *
+ * @param endpointClass endpoint class name
+ * @param endpointName endpoint name
+ * @param dep deployment
+ * @return WS endpoint
+ */
+ protected final Endpoint newJMSEndpoint(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.newJMSEndpoint(endpointClass);
+ endpoint.setShortName(endpointName);
+ dep.getService().addEndpoint(endpoint);
+
+ return endpoint;
+ }
+
+ /**
* Creates new Web Service deployment.
*
* @param unit deployment unit
@@ -187,5 +213,4 @@
throw new IllegalStateException("Deployment unit does not contain " + attachment);
}
-
}
Modified: branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilder.java
===================================================================
--- branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilder.java 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilder.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -4,17 +4,15 @@
/**
* Deployment builder interface.
- *
+ *
* @author <a href="mailto:ropalka at 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);
-
}
Modified: branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXRPC_EJB21.java
===================================================================
--- branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXRPC_EJB21.java 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXRPC_EJB21.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -11,12 +11,11 @@
/**
* Creates new JAXRPC EJB21 deployment.
- *
+ *
* @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
*/
final class DeploymentModelBuilderJAXRPC_EJB21 extends AbstractDeploymentModelBuilder
{
-
/**
* Constructor.
*/
@@ -27,7 +26,7 @@
/**
* Creates new JAXRPC EJB21 deployment and registers it with deployment unit.
- *
+ *
* @param dep webservice deployment
* @param unit deployment unit
*/
@@ -49,9 +48,8 @@
final String ejbClass = beanMetaData.getEjbClass();
this.log.debug("EJB21 class: " + ejbClass);
- this.newEndpoint(ejbClass, ejbName, dep);
+ this.newHttpEndpoint(ejbClass, ejbName, dep);
}
}
}
-
}
Modified: branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXRPC_JSE.java
===================================================================
--- branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXRPC_JSE.java 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXRPC_JSE.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -11,12 +11,11 @@
/**
* Creates new JAXRPC JSE deployment.
- *
+ *
* @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
*/
final class DeploymentModelBuilderJAXRPC_JSE extends AbstractDeploymentModelBuilder
{
-
/**
* Constructor.
*/
@@ -27,7 +26,7 @@
/**
* Creates new JAXRPC JSE deployment and registers it with deployment unit.
- *
+ *
* @param dep webservice deployment
* @param unit deployment unit
*/
@@ -48,9 +47,8 @@
final String servletClass = ASHelper.getEndpointName(servletMD);
this.log.debug("JSE class: " + servletClass);
- this.newEndpoint(servletClass, servletName, dep);
+ this.newHttpEndpoint(servletClass, servletName, dep);
}
}
}
-
}
Modified: branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXWS_EJB3.java
===================================================================
--- branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXWS_EJB3.java 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXWS_EJB3.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -10,12 +10,11 @@
/**
* Creates new JAXWS EJB3 deployment.
- *
+ *
* @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
*/
final class DeploymentModelBuilderJAXWS_EJB3 extends AbstractDeploymentModelBuilder
{
-
/**
* Constructor.
*/
@@ -26,7 +25,7 @@
/**
* Creates new JAXWS EJB3 deployment and registers it with deployment unit.
- *
+ *
* @param dep webservice deployment
* @param unit deployment unit
*/
@@ -44,9 +43,8 @@
final String ejbClass = container.getComponentClassName();
this.log.debug("EJB3 class: " + ejbClass);
- final Endpoint ep = this.newEndpoint(ejbClass, ejbName, dep);
+ final Endpoint ep = this.newHttpEndpoint(ejbClass, ejbName, dep);
ep.setProperty(ASHelper.CONTAINER_NAME, container.getContainerName());
}
}
-
}
Copied: branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXWS_JMS.java (from rev 108502, trunk/webservices/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXWS_JMS.java)
===================================================================
--- branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXWS_JMS.java (rev 0)
+++ branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXWS_JMS.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -0,0 +1,69 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.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;
+import org.jboss.wsf.spi.metadata.jms.JMSEndpointMetaData;
+import org.jboss.wsf.spi.metadata.jms.JMSEndpointsMetaData;
+
+/**
+ * Create JAXWS SPI Deployment for JAXWS_JMS type deployment.
+ *
+ * @author <a herf="ema at redhat.com>Jim Ma</a>
+ */
+public class DeploymentModelBuilderJAXWS_JMS extends AbstractDeploymentModelBuilder
+{
+ /**
+ * Constructor.
+ */
+ DeploymentModelBuilderJAXWS_JMS()
+ {
+ super();
+ }
+
+ /**
+ * Creates new JAXWS JMS 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(JMSEndpointsMetaData.class, unit, dep);
+ JMSEndpointsMetaData jmsEndpointsMD = dep.getAttachment(JMSEndpointsMetaData.class);
+ for (JMSEndpointMetaData endpoint : jmsEndpointsMD.getEndpointsMetaData())
+ {
+ if (endpoint.getName() == null)
+ {
+ endpoint.setName(endpoint.getImplementor());
+ }
+ this.newJMSEndpoint(endpoint.getImplementor(), endpoint.getName(), dep);
+ }
+ }
+}
\ No newline at end of file
Modified: branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXWS_JSE.java
===================================================================
--- branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXWS_JSE.java 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXWS_JSE.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -10,12 +10,11 @@
/**
* Creates new JAXWS JSE deployment.
- *
+ *
* @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
*/
final class DeploymentModelBuilderJAXWS_JSE extends AbstractDeploymentModelBuilder
{
-
/**
* Constructor.
*/
@@ -26,7 +25,7 @@
/**
* Creates new JAXWS JSE deployment and registers it with deployment unit.
- *
+ *
* @param dep webservice deployment
* @param unit deployment unit
*/
@@ -44,8 +43,7 @@
final String servletClass = ASHelper.getEndpointName(servlet);
this.log.debug("JSE class: " + servletClass);
- this.newEndpoint(servletClass, servletName, dep);
+ this.newHttpEndpoint(servletClass, servletName, dep);
}
}
-
}
Modified: branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/deployment/WSDeploymentBuilder.java
===================================================================
--- branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/deployment/WSDeploymentBuilder.java 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/deployment/WSDeploymentBuilder.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -35,7 +35,6 @@
*/
public final class WSDeploymentBuilder
{
-
/** Builder instance. */
private static final WSDeploymentBuilder SINGLETON = new WSDeploymentBuilder();
@@ -48,6 +47,7 @@
WSDeploymentBuilder.builders.put(DeploymentType.JAXRPC_JSE, new DeploymentModelBuilderJAXRPC_JSE());
WSDeploymentBuilder.builders.put(DeploymentType.JAXWS_EJB3, new DeploymentModelBuilderJAXWS_EJB3());
WSDeploymentBuilder.builders.put(DeploymentType.JAXRPC_EJB21, new DeploymentModelBuilderJAXRPC_EJB21());
+ WSDeploymentBuilder.builders.put(DeploymentType.JAXWS_JMS, new DeploymentModelBuilderJAXWS_JMS());
}
/**
@@ -60,7 +60,7 @@
/**
* Factory method for obtaining builder instance.
- *
+ *
* @return builder instance
*/
public static WSDeploymentBuilder getInstance()
@@ -70,7 +70,7 @@
/**
* Builds JBossWS deployment model if web service deployment is detected.
- *
+ *
* @param unit deployment unit
*/
public void build(final DeploymentUnit unit)
@@ -82,5 +82,4 @@
WSDeploymentBuilder.builders.get(deploymentType).newDeploymentModel(unit);
}
}
-
}
Modified: branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/deployment/WSVirtualFileFilter.java
===================================================================
--- branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/deployment/WSVirtualFileFilter.java 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/deployers/deployment/WSVirtualFileFilter.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -1,3 +1,24 @@
+/*
+ * 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 org.jboss.vfs.VirtualFile;
@@ -6,18 +27,17 @@
/**
* WS file filter for files with the '.wsdl', or '.xsd' or '.xml' suffix.
- *
+ *
* @author <a href="mailto:dbevenius at jboss.com">Daniel Bevenius</a>
* @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
*/
final class WSVirtualFileFilter implements VirtualFileFilterWithAttributes
{
-
/** The tree walking attributes. */
private VisitorAttributes attributes;
/**
- * Constructor.
+ * Constructor.
*/
WSVirtualFileFilter()
{
@@ -26,7 +46,7 @@
/**
* Constructor.
- *
+ *
* @param attributes visit attributes
*/
WSVirtualFileFilter(final VisitorAttributes attributes)
@@ -36,7 +56,7 @@
/**
* Gets VisitorAttributes for this instance.
- *
+ *
* @return visitor attributes
*/
public VisitorAttributes getAttributes()
@@ -64,5 +84,4 @@
return hasWsdlSuffix || hasXsdSuffix || hasXmlSuffix;
}
-
}
Modified: branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/endpoint/HornetQJMSResolver.java
===================================================================
--- branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/endpoint/HornetQJMSResolver.java 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/endpoint/HornetQJMSResolver.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -29,9 +29,8 @@
/**
* A JMS endpoint resolver meant for working with HornetQ destination implementation
- *
- * @author alessio.soldano at jboss.com
*
+ * @author alessio.soldano at jboss.com
*/
public class HornetQJMSResolver extends DefaultJMSEndpointResolver
{
@@ -46,5 +45,4 @@
super.setDestination(destination);
}
}
-
}
Modified: branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/injection/EJBBeanReferenceResolver.java
===================================================================
--- branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/injection/EJBBeanReferenceResolver.java 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/injection/EJBBeanReferenceResolver.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -38,7 +38,6 @@
*/
final class EJBBeanReferenceResolver extends AbstractReferenceResolver<EJB>
{
-
/**
* Deployment unit used for resolving process.
*/
@@ -74,7 +73,7 @@
/**
* @see org.jboss.wsf.common.injection.resolvers.AbstractReferenceResolver#resolveField(java.lang.reflect.Field)
- *
+ *
* @param field to be resolved
* @return JNDI name of referenced EJB object
*/
@@ -90,7 +89,7 @@
/**
* @see org.jboss.wsf.common.injection.resolvers.AbstractReferenceResolver#resolveMethod(java.lang.reflect.Method)
- *
+ *
* @param method to be resolved
* @return JNDI name of referenced EJB object
*/
@@ -120,5 +119,4 @@
}
return new EjbReference(ejbAnnotation.beanName(), beanInterface, ejbAnnotation.mappedName());
}
-
}
Modified: branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/injection/InjectionMetaDataDeploymentAspect.java
===================================================================
--- branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/injection/InjectionMetaDataDeploymentAspect.java 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/injection/InjectionMetaDataDeploymentAspect.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -102,7 +102,7 @@
/**
* Builds injection meta data for all endpoints in deployment.
- *
+ *
* @param dep webservice deployment
*/
@Override
@@ -154,7 +154,7 @@
/**
* Returns environment entries meta data associated with specified EJB 3 bean.
- *
+ *
* @param ejbName EJB 3 bean to lookup environment entries for
* @param unit deployment unit
* @return environment entries meta data
@@ -185,7 +185,7 @@
/**
* Builds JBossWS specific injections meta data.
- *
+ *
* @param envEntriesMD environment entries meta data
* @param resolvers known annotation resolvers
* @param jndiContext JNDI context to be propagated
@@ -253,5 +253,4 @@
return retVal;
}
-
}
Modified: branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerEJB21.java
===================================================================
--- branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerEJB21.java 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerEJB21.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -59,7 +59,6 @@
*/
final class InvocationHandlerEJB21 extends AbstractInvocationHandler
{
-
/** EJB21 JNDI name. */
private String jndiName;
@@ -74,14 +73,12 @@
*/
InvocationHandlerEJB21()
{
- super();
-
this.server = MBeanServerLocator.locateJBoss();
}
/**
* Initializes EJB 21 endpoint.
- *
+ *
* @param endpoint web service endpoint
*/
public void init(final Endpoint endpoint)
@@ -107,7 +104,7 @@
/**
* Gets EJB 21 container name lazily.
- *
+ *
* @param endpoint webservice endpoint
* @return EJB21 container name
*/
@@ -133,7 +130,7 @@
/**
* Invokes EJB 21 endpoint.
- *
+ *
* @param endpoint EJB 21 endpoint
* @param wsInvocation web service invocation
* @throws Exception if any error occurs
@@ -164,7 +161,7 @@
/**
* Returns configured EJB 21 JBoss MBean invocation.
- *
+ *
* @param wsInvocation webservice invocation
* @return configured JBoss invocation
*/
@@ -208,7 +205,7 @@
/**
* This method dynamically inserts EJB 21 webservice endpoint interceptor
* to the last but one position in EJB 21 processing chain. See [JBWS-756] for more info.
- *
+ *
* @param objectName EJB 21 object name
* @param ejbName EJB 21 short name
*/
@@ -244,5 +241,4 @@
this.log.warn("Cannot register EJB 21 service endpoint interceptor: ", ex);
}
}
-
}
Modified: branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerEJB3.java
===================================================================
--- branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerEJB3.java 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerEJB3.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -64,8 +64,6 @@
*/
InvocationHandlerEJB3()
{
- super();
-
final SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
final IoCContainerProxyFactory iocContainerFactory = spiProvider.getSPI(IoCContainerProxyFactory.class);
this.iocContainer = iocContainerFactory.getContainer();
@@ -73,7 +71,7 @@
/**
* Initializes EJB3 container name.
- *
+ *
* @param endpoint web service endpoint
*/
public void init(final Endpoint endpoint)
@@ -88,7 +86,7 @@
/**
* Gets EJB 3 container lazily.
- *
+ *
* @return EJB3 container
*/
private synchronized ServiceEndpointContainer getEjb3Container()
@@ -109,7 +107,7 @@
/**
* Invokes EJB 3 endpoint.
- *
+ *
* @param endpoint EJB 3 endpoint
* @param wsInvocation web service invocation
* @throws Exception if any error occurs
@@ -136,7 +134,7 @@
this.handleInvocationException(t);
}
}
-
+
public Context getJNDIContext(final Endpoint ep) throws NamingException
{
final EJBContainer ejb3Container = (EJBContainer)getEjb3Container();
@@ -148,13 +146,12 @@
*/
private static final class EJB3InvocationContextCallback implements InvocationContextCallback
{
-
/** WebService invocation. */
private Invocation wsInvocation;
/**
* Constructor.
- *
+ *
* @param wsInvocation delegee
*/
public EJB3InvocationContextCallback(final Invocation wsInvocation)
@@ -164,7 +161,7 @@
/**
* Retrieves attachment type from Web Service invocation context attachments.
- *
+ *
* @param <T> attachment type
* @param attachmentType attachment class
* @return attachment value
@@ -173,7 +170,5 @@
{
return this.wsInvocation.getInvocationContext().getAttachment(attachmentType);
}
-
}
-
}
Modified: branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerFactoryImpl.java
===================================================================
--- branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerFactoryImpl.java 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerFactoryImpl.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -35,7 +35,6 @@
*/
public final class InvocationHandlerFactoryImpl extends InvocationHandlerFactory
{
-
/**
* Constructor.
*/
@@ -46,7 +45,7 @@
/**
* Returns invocation handler associated with invocation type.
- *
+ *
* @param type invocation type
* @return invocation handler
*/
@@ -80,5 +79,4 @@
return handler;
}
-
}
Modified: branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerMDB21.java
===================================================================
--- branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerMDB21.java 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerMDB21.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -31,7 +31,6 @@
*/
final class InvocationHandlerMDB21 extends AbstractInvocationHandlerJSE
{
-
/**
* Constructor.
*/
@@ -39,5 +38,4 @@
{
super();
}
-
}
Modified: branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerMDB3.java
===================================================================
--- branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerMDB3.java 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerMDB3.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -31,7 +31,6 @@
*/
final class InvocationHandlerMDB3 extends AbstractInvocationHandlerJSE
{
-
/**
* Constructor.
*/
@@ -39,5 +38,4 @@
{
super();
}
-
}
Modified: branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/invocation/ServiceEndpointInterceptorEJB21.java
===================================================================
--- branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/invocation/ServiceEndpointInterceptorEJB21.java 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/invocation/ServiceEndpointInterceptorEJB21.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -31,16 +31,15 @@
/**
* This Interceptor does the ws4ee handler processing on EJB 21 endpoints.
- *
+ *
* According to the ws4ee spec the handler logic must be invoked after the container
- * applied method level security to the invocation.
+ * applied method level security to the invocation.
*
* @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
* @author <a href="mailto:tdiesler at redhat.com">Thomas Diesler</a>
*/
final class ServiceEndpointInterceptorEJB21 extends AbstractInterceptor
{
-
/**
* Constructor.
*/
@@ -51,7 +50,7 @@
/**
* Before and after we call the EJB 21 service endpoint bean, we process the handler chains.
- *
+ *
* @param jbossInvocation jboss invocation
* @return ws invocation return value
* @throws Exception if any error occurs
@@ -120,5 +119,4 @@
throw ex;
}
}
-
}
Modified: branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/ioc/IoCContainerProxyFactoryImpl.java
===================================================================
--- branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/ioc/IoCContainerProxyFactoryImpl.java 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/ioc/IoCContainerProxyFactoryImpl.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -31,7 +31,6 @@
*/
public final class IoCContainerProxyFactoryImpl implements IoCContainerProxyFactory
{
-
/** Container proxy singleton. */
private static final IoCContainerProxy CONTAINER = IoCContainerProxyImpl.getInstance();
@@ -45,12 +44,11 @@
/**
* @see org.jboss.wsf.spi.ioc.IoCContainerProxyFactory#getContainer()
- *
+ *
* @return IoC container proxy
*/
public IoCContainerProxy getContainer()
{
return IoCContainerProxyFactoryImpl.CONTAINER;
}
-
}
Modified: branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/ioc/IoCContainerProxyImpl.java
===================================================================
--- branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/ioc/IoCContainerProxyImpl.java 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/ioc/IoCContainerProxyImpl.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -33,7 +33,6 @@
*/
public final class IoCContainerProxyImpl implements IoCContainerProxy
{
-
/** Singleton. */
private static final IoCContainerProxy SINGLETON = new IoCContainerProxyImpl();
/** JBoss MC kernel. */
@@ -46,7 +45,7 @@
{
super();
}
-
+
/**
* Returns container proxy instance.
*
@@ -56,10 +55,10 @@
{
return IoCContainerProxyImpl.SINGLETON;
}
-
+
/**
* Sets JBoss kernel - invoked via MC injection.
- *
+ *
* @param kernel JBoss kernel
*/
public void setKernel(final Kernel kernel)
@@ -84,5 +83,4 @@
return (T)ctx.getTarget();
}
-
}
Modified: branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/metadata/AbstractMetaDataBuilderEJB.java
===================================================================
--- branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/metadata/AbstractMetaDataBuilderEJB.java 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/metadata/AbstractMetaDataBuilderEJB.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -44,13 +44,12 @@
*/
abstract class AbstractMetaDataBuilderEJB
{
-
/** Logger. */
protected final Logger log = Logger.getLogger(this.getClass());
/**
* Builds universal EJB meta data model that is AS agnostic.
- *
+ *
* @param dep webservice deployment
* @return universal EJB meta data model
*/
@@ -68,7 +67,7 @@
/**
* Template method for build enterprise beans meta data.
- *
+ *
* @param dep webservice deployment
* @param ejbMetaData universal EJB meta data model
*/
@@ -82,7 +81,7 @@
* <li>config name</li>
* <li>config file</li>
* </ul>
- *
+ *
* @param dep webservice deployment
* @param ejbArchiveMD universal EJB meta data model
*/
@@ -151,5 +150,4 @@
return false;
}
-
}
Modified: branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/metadata/ContainerMetaDataDeploymentAspect.java
===================================================================
--- branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/metadata/ContainerMetaDataDeploymentAspect.java 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/metadata/ContainerMetaDataDeploymentAspect.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -35,7 +35,6 @@
*/
public final class ContainerMetaDataDeploymentAspect extends AbstractDeploymentAspect
{
-
/** JSE meta data builder. */
private final MetaDataBuilderJSE metaDataBuilderJSE = new MetaDataBuilderJSE();
@@ -55,7 +54,7 @@
/**
* Build container independent meta data.
- *
+ *
* @param dep webservice deployment
*/
@Override
@@ -80,5 +79,4 @@
dep.addAttachment(EJBArchiveMetaData.class, ejbMetaData);
}
}
-
}
Modified: branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB21.java
===================================================================
--- branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB21.java 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB21.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -45,7 +45,6 @@
*/
final class MetaDataBuilderEJB21 extends AbstractMetaDataBuilderEJB
{
-
/**
* Constructor.
*/
@@ -80,7 +79,7 @@
/**
* Builds JBoss agnostic EJB meta data.
- *
+ *
* @param wsEjbsMD jboss agnostic EJBs meta data
* @param jbossEjbMD jboss specific EJB meta data
*/
@@ -154,5 +153,4 @@
return null;
}
-
}
Modified: branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB3.java
===================================================================
--- branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB3.java 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB3.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -46,7 +46,6 @@
*/
final class MetaDataBuilderEJB3 extends AbstractMetaDataBuilderEJB
{
-
/**
* Constructor.
*/
@@ -57,7 +56,7 @@
/**
* @see AbstractMetaDataBuilderEJB#buildEnterpriseBeansMetaData(Deployment, EJBArchiveMetaData)
- *
+ *
* @param dep webservice deployment
* @param ejbArchiveMD EJB archive meta data
*/
@@ -77,7 +76,7 @@
/**
* Builds JBoss agnostic EJB meta data.
- *
+ *
* @param wsEjbsMD jboss agnostic EJBs meta data
* @param jbossEjbMD jboss specific EJB meta data
*/
@@ -142,7 +141,7 @@
/**
* 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
@@ -162,5 +161,4 @@
return null;
}
-
}
Modified: branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderJSE.java
===================================================================
--- branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderJSE.java 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderJSE.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -51,14 +51,13 @@
import org.jboss.wsf.spi.metadata.j2ee.PublishLocationAdapter;
/**
- * Builds container independent meta data from WEB container meta data.
+ * Builds container independent meta data from WEB container meta data.
*
* @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
* @author <a href="mailto:tdiesler at redhat.com">Thomas Diesler</a>
*/
final class MetaDataBuilderJSE
{
-
/** Logger. */
private final Logger log = Logger.getLogger(MetaDataBuilderJSE.class);
@@ -72,7 +71,7 @@
/**
* Builds universal JSE meta data model that is AS agnostic.
- *
+ *
* @param dep webservice deployment
* @return universal JSE meta data model
*/
@@ -152,7 +151,7 @@
/**
* Builds security meta data.
- *
+ *
* @param securityConstraintsMD security constraints meta data
* @return universal JSE security meta data model
*/
@@ -181,7 +180,7 @@
/**
* Sets web resources in universal meta data model.
- *
+ *
* @param jseSecurityMD universal JSE security meta data model
* @param securityConstraintMD security constraint meta data
*/
@@ -203,7 +202,7 @@
/**
* Returns servlet name to url pattern mappings.
- *
+ *
* @param jbossWebMD jboss web meta data
* @return servlet name to url pattern mappings
*/
@@ -225,7 +224,7 @@
/**
* Returns servlet name to servlet class mappings.
- *
+ *
* @param jbossWebMD jboss web meta data
* @return servlet name to servlet mappings
*/
@@ -258,7 +257,7 @@
* 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
@@ -284,5 +283,4 @@
// prefer context root defined in application.xml over one defined in jboss-web.xml
return contextRoot != null ? contextRoot : jbossWebMD.getContextRoot();
}
-
}
Modified: branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/metadata/PublishLocationAdapterImpl.java
===================================================================
--- branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/metadata/PublishLocationAdapterImpl.java 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/metadata/PublishLocationAdapterImpl.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -33,13 +33,12 @@
*/
final class PublishLocationAdapterImpl implements PublishLocationAdapter
{
-
/** Webservice descriptions meta data. */
private final WebserviceDescriptionsMetaData wsDescriptionsMD;
/**
* Constructor.
- *
+ *
* @param wsDescriptionsMD webservice descriptions meta data
*/
PublishLocationAdapterImpl(final WebserviceDescriptionsMetaData wsDescriptionsMD)
@@ -51,7 +50,7 @@
/**
* @see org.jboss.wsf.spi.metadata.j2ee.PublishLocationAdapter#getWsdlPublishLocationByName(String)
- *
+ *
* @param endpointName endpoint name
* @return publish location
*/
@@ -69,5 +68,4 @@
return null;
}
-
}
Modified: branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/security/JACCPermissionsDeploymentAspect.java
===================================================================
--- branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/security/JACCPermissionsDeploymentAspect.java 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/security/JACCPermissionsDeploymentAspect.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -31,17 +31,16 @@
import org.jboss.wsf.common.integration.AbstractDeploymentAspect;
/**
- * Generates JACC permissions. (This is temporary and really hacky solution).
- *
- * TODO: remove this deployment aspect and update
- * particular JACC deployer to execute after
- * JBossWS has modified web meta data.
+ * Generates JACC permissions. (This is temporary and really hacky solution).
*
+ * TODO: remove this deployment aspect and update
+ * particular JACC deployer to execute after
+ * JBossWS has modified web meta data.
+ *
* @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
*/
public final class JACCPermissionsDeploymentAspect extends AbstractDeploymentAspect
{
-
/**
* Constructor.
*/
@@ -55,7 +54,7 @@
* does not go through the war security deployer. Hence the JACC
* permissions are not created. There is a need to explicitly create
* the war jacc permissions.
- *
+ *
* @param dep webservice deployment
*/
@Override
@@ -78,5 +77,4 @@
throw new RuntimeException("Exception generating JACC perms: ", e);
}
}
-
}
Modified: branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/security/SecurityAdapterFactoryImpl.java
===================================================================
--- branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/security/SecurityAdapterFactoryImpl.java 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/security/SecurityAdapterFactoryImpl.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -26,13 +26,12 @@
/**
* Security adapters factory.
- *
+ *
* @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
* @author <a href="mailto:tdiesler at redhat.com">Thomas Diesler</a>
*/
public final class SecurityAdapterFactoryImpl extends SecurityAdaptorFactory
{
-
/**
* Constructor.
*/
@@ -43,12 +42,11 @@
/**
* Creates new security adapter instance.
- *
+ *
* @return security adapter
*/
public SecurityAdaptor newSecurityAdapter()
{
return new SecurityAdapterImpl();
}
-
}
Modified: branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/security/SecurityAdapterImpl.java
===================================================================
--- branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/security/SecurityAdapterImpl.java 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/security/SecurityAdapterImpl.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -40,7 +40,6 @@
*/
final class SecurityAdapterImpl implements SecurityAdaptor
{
-
/**
* Constructor.
*/
@@ -51,7 +50,7 @@
/**
* @see org.jboss.wsf.spi.invocation.SecurityAdaptor#getPrincipal()
- *
+ *
* @return principal
*/
public Principal getPrincipal()
@@ -61,7 +60,7 @@
/**
* @see org.jboss.wsf.spi.invocation.SecurityAdaptor#setPrincipal(Principal)
- *
+ *
* @param principal principal
*/
public void setPrincipal(final Principal principal)
@@ -71,7 +70,7 @@
/**
* @see org.jboss.wsf.spi.invocation.SecurityAdaptor#getCredential()
- *
+ *
* @return credential
*/
public Object getCredential()
@@ -81,7 +80,7 @@
/**
* @see org.jboss.wsf.spi.invocation.SecurityAdaptor#setCredential(Object)
- *
+ *
* @param credential credential
*/
public void setCredential(final Object credential)
@@ -91,7 +90,7 @@
/**
* @see org.jboss.wsf.spi.invocation.SecurityAdaptor#pushSubjectContext(Subject, Principal, Object)
- *
+ *
* @param subject subject
* @param principal principal
* @param credential credential
@@ -115,5 +114,4 @@
}
});
}
-
}
Modified: branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/tomcat/AbstractSecurityMetaDataAccessorEJB.java
===================================================================
--- branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/tomcat/AbstractSecurityMetaDataAccessorEJB.java 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/tomcat/AbstractSecurityMetaDataAccessorEJB.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -36,7 +36,6 @@
*/
abstract class AbstractSecurityMetaDataAccessorEJB implements SecurityMetaDataAccessorEJB
{
-
/** JAAS JNDI prefix. */
private static final String JAAS_JNDI_PREFIX = "java:/jaas/";
@@ -126,5 +125,4 @@
return ejbMD != null ? ejbMD.getSecurityMetaData() : null;
}
-
}
Modified: branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB.java
===================================================================
--- branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB.java 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -33,7 +33,6 @@
*/
interface SecurityMetaDataAccessorEJB
{
-
/**
* Obtains security domain from EJB deployment.
*
@@ -73,5 +72,4 @@
* @return transport guarantee or null if not specified
*/
String getTransportGuarantee(Endpoint endpoint);
-
}
Modified: branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB21.java
===================================================================
--- branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB21.java 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB21.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -29,14 +29,13 @@
import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
/**
- * Creates web app security meta data for EJB 21 deployment.
+ * Creates web app security meta data for EJB 21 deployment.
*
* @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
* @author <a href="mailto:tdiesler at redhat.com">Thomas Diesler</a>
*/
final class SecurityMetaDataAccessorEJB21 extends AbstractSecurityMetaDataAccessorEJB
{
-
/**
* Constructor.
*/
@@ -71,5 +70,4 @@
return (assemblyDescriptorMD != null) ? assemblyDescriptorMD.getSecurityRoles() : null;
}
-
}
Modified: branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB3.java
===================================================================
--- branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB3.java 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB3.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -43,7 +43,6 @@
*/
final class SecurityMetaDataAccessorEJB3 extends AbstractSecurityMetaDataAccessorEJB
{
-
/**
* Constructor.
*/
@@ -152,8 +151,8 @@
/**
* Gets <b>WebContext</b> if associated with EJB endpoint.
- *
- * @param endpoint EJB webservice endpoint
+ *
+ * @param endpoint EJB webservice endpoint
* @return web context associated with EJB or null
*/
@SuppressWarnings(
@@ -208,5 +207,4 @@
throw new IllegalStateException(errorMessage + firstDomain + secondDomain);
}
}
-
}
Modified: branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataCreatingDeploymentAspect.java
===================================================================
--- branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataCreatingDeploymentAspect.java 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataCreatingDeploymentAspect.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -26,14 +26,13 @@
import org.jboss.wsf.common.integration.AbstractDeploymentAspect;
/**
- * A deployment aspect that generates web app meta data for EJB endpoints.
+ * A deployment aspect that generates web app meta data for EJB endpoints.
*
* @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
* @author <a href="mailto:tdiesler at redhat.com">Thomas Diesler</a>
*/
public final class WebMetaDataCreatingDeploymentAspect extends AbstractDeploymentAspect
{
-
/** Web meta data creator. */
private WebMetaDataCreator webMetaDataCreator = new WebMetaDataCreator();
@@ -61,5 +60,4 @@
this.webMetaDataCreator.create(dep);
}
}
-
}
Modified: branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataCreator.java
===================================================================
--- branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataCreator.java 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataCreator.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -46,7 +46,6 @@
*/
final class WebMetaDataCreator
{
-
/** Our Realm. */
private static final String EJB_WEBSERVICE_REALM = "EJBWebServiceEndpointServlet Realm";
@@ -78,7 +77,7 @@
JBossWebMetaData jbossWebMD = ASHelper.getOptionalAttachment(unit, JBossWebMetaData.class);
if (jbossWebMD == null)
{
- jbossWebMD = new JBossWebMetaData();
+ jbossWebMD = new JBossWebMetaData();
}
this.createWebAppDescriptor(dep, jbossWebMD);
@@ -368,5 +367,4 @@
return isJaxws ? this.ejb3SecurityAccessor : this.ejb21SecurityAccessor;
}
-
}
Modified: branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifier.java
===================================================================
--- branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifier.java 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifier.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -45,7 +45,6 @@
*/
final class WebMetaDataModifier
{
-
/** Logger. */
private final Logger log = Logger.getLogger(WebMetaDataModifier.class);
@@ -123,7 +122,7 @@
private String getTransportClassName(final Deployment dep)
{
String transportClassName = null;
- String transportClassProviderName = (String) dep.getProperty("stack.transport.class.provider"); //TODO replace with WSContants reference once jbossws-common 1.4 is released
+ String transportClassProviderName = (String) dep.getProperty(WSConstants.STACK_TRANSPORT_CLASS_PROVIDER);
if (transportClassProviderName != null)
{
try
@@ -133,10 +132,10 @@
}
catch (Exception e)
{
- log.warn("Cannot get transport class name from stack.transport.class.provider", e);
+ log.warn("Cannot get transport class name from " + WSConstants.STACK_TRANSPORT_CLASS_PROVIDER, e);
}
}
-
+
if (transportClassName == null)
{
transportClassName = (String) dep.getProperty(WSConstants.STACK_TRANSPORT_CLASS);
@@ -149,5 +148,4 @@
return transportClassName;
}
-
}
Modified: branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifyingDeploymentAspect.java
===================================================================
--- branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifyingDeploymentAspect.java 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifyingDeploymentAspect.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -32,7 +32,6 @@
*/
public final class WebMetaDataModifyingDeploymentAspect extends AbstractDeploymentAspect
{
-
/** Web meta data modifier. */
private WebMetaDataModifier webMetaDataModifier = new WebMetaDataModifier();
@@ -55,5 +54,4 @@
this.log.debug("Modifying web meta data for webservice deployment: " + dep.getSimpleName());
this.webMetaDataModifier.modify(dep);
}
-
}
Modified: branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/util/ASHelper.java
===================================================================
--- branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/util/ASHelper.java 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/util/ASHelper.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -47,8 +47,7 @@
*/
public final class ASHelper
{
-
- /**
+ /**
* EJB invocation property.
*/
public static final String CONTAINER_NAME = "org.jboss.wsf.spi.invocation.ContainerName";
@@ -231,7 +230,7 @@
/**
* Returns true if EJB container is webservice endpoint.
- *
+ *
* @param ejbContainerAdapter EJB container adapter
* @return true if EJB container is webservice endpoint, false otherwise
*/
@@ -258,7 +257,7 @@
/**
* Returns servlet meta data for requested servlet name.
- *
+ *
* @param jbossWebMD jboss web meta data
* @param servletName servlet name
* @return servlet meta data
@@ -310,12 +309,12 @@
}
/**
- * Returns required attachment value from deployment unit.
- *
+ * Returns required attachment value from deployment unit.
+ *
* @param <A> expected value
* @param unit deployment unit
* @param key attachment key
- * @return required attachment
+ * @return required attachment
* @throws IllegalStateException if attachment value is null
*/
public static <A> A getRequiredAttachment(final DeploymentUnit unit, final Class<A> key)
@@ -332,11 +331,11 @@
/**
* Returns optional attachment value from deployment unit or null if not bound.
- *
+ *
* @param <A> expected value
* @param unit deployment unit
* @param key attachment key
- * @return optional attachment value or null
+ * @return optional attachment value or null
*/
public static <A> A getOptionalAttachment(final DeploymentUnit unit, final Class<A> key)
{
@@ -345,7 +344,7 @@
/**
* Returns true if deployment unit have attachment value associated with the <b>key</b>.
- *
+ *
* @param unit deployment unit
* @param key attachment key
* @return true if contains attachment, false otherwise
@@ -415,5 +414,4 @@
return endpoints;
}
-
}
Modified: branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/util/WebMetaDataHelper.java
===================================================================
--- branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/util/WebMetaDataHelper.java 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/webservices/src/main/java/org/jboss/webservices/integration/util/WebMetaDataHelper.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -47,7 +47,6 @@
*/
public final class WebMetaDataHelper
{
-
/** Star utility string. */
private static final String STAR_STRING = "*";
@@ -420,5 +419,4 @@
return paramMD;
}
-
}
Modified: branches/weld-snapshot-integration/webservices/src/resources/jbossws-jboss.deployer/META-INF/stack-agnostic-jboss-beans.xml
===================================================================
--- branches/weld-snapshot-integration/webservices/src/resources/jbossws-jboss.deployer/META-INF/stack-agnostic-jboss-beans.xml 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/webservices/src/resources/jbossws-jboss.deployer/META-INF/stack-agnostic-jboss-beans.xml 2010-10-11 02:01:02 UTC (rev 108504)
@@ -41,12 +41,21 @@
-->
</bean>
+ <!-- stack agnostic webservices.xml processor -->
+ <bean name="WSDescriptorProcessor" class="org.jboss.wsf.framework.deployment.jms.WebservicesDescriptorProcessorImpl">
+ <property name="validating">true</property>
+ <property name="descriptorName">webservices.xml</property>
+ </bean>
+
<!-- deployers -->
<bean name="WSDescriptorDeployer" class="org.jboss.webservices.integration.deployers.WSDescriptorDeployer">
- <property name="name">webservices.xml</property>
- <property name="useSchemaValidation">true</property>
+ <incallback method="setProcessor"/>
</bean>
-
+
+ <bean name="JMSDescriptorDeployer" class="org.jboss.webservices.integration.deployers.JMSDescriptorDeployer">
+ <incallback method="setProcessor"/>
+ </bean>
+
<bean name="WSEJBAdapterDeployer" class="org.jboss.webservices.integration.deployers.WSEJBAdapterDeployer"/>
<bean name="WSTypeDeployer" class="org.jboss.webservices.integration.deployers.WSTypeDeployer"/>
Modified: branches/weld-snapshot-integration/weld-int/assembly/pom.xml
===================================================================
--- branches/weld-snapshot-integration/weld-int/assembly/pom.xml 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/weld-int/assembly/pom.xml 2010-10-11 02:01:02 UTC (rev 108504)
@@ -14,6 +14,98 @@
<build>
<plugins>
+ <!--
+ Special treatment for JSF API dependent files
+ Because the API is not shared, we need to attach JSF extensions separately
+ Therefore, weld-core will be split in two: one jar is shared, one jar is
+ attached to the deployment's DU via
+ -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-shade-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>core-no-jsf</id>
+ <phase>package</phase>
+ <goals>
+ <goal>shade</goal>
+ </goals>
+ <configuration>
+ <createSourcesJar>true</createSourcesJar>
+ <finalName>weld-core-no-jsf</finalName>
+ <shadedClassifierName>no-jsf</shadedClassifierName>
+ <artifactSet>
+ <includes>
+ <include>org.jboss.weld:weld-core</include>
+ </includes>
+ </artifactSet>
+ <filters>
+ <filter>
+ <artifact>org.jboss.weld:weld-core</artifact>
+ <includes>
+ <include>org/jboss/weld/**</include>
+ </includes>
+ <excludes>
+ <exclude>org/jboss/weld/jsf/ConversationAwareViewHandler*</exclude>
+ <exclude>org/jboss/weld/jsf/FacesUrlTransformer*</exclude>
+ <exclude>org/jboss/weld/jsf/JsfHelper*</exclude>
+ <exclude>org/jboss/weld/jsf/WeldPhaseListener*</exclude>
+ <exclude>org/jboss/weld/servlet/ConversationPropagationFilter*</exclude>
+ </excludes>
+ </filter>
+ </filters>
+ <transformers>
+ <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+ <manifestEntries>
+ <Specification-Title>Weld Implementation (JSF utilities excluded)</Specification-Title>
+ <Specification-Vendor>Seam Framework</Specification-Vendor>
+ <Specification-Version>${version.org.jboss.weld}</Specification-Version>
+ </manifestEntries>
+ </transformer>
+ </transformers>
+
+ </configuration>
+ </execution>
+ <execution>
+ <id>core-jsf-only</id>
+ <phase>package</phase>
+ <goals>
+ <goal>shade</goal>
+ </goals>
+ <configuration>
+ <createSourcesJar>true</createSourcesJar>
+ <finalName>weld-core-jsf-only</finalName>
+ <shadedClassifierName>jsf-only</shadedClassifierName>
+ <artifactSet>
+ <includes>
+ <include>org.jboss.weld:weld-core</include>
+ </includes>
+ </artifactSet>
+ <filters>
+ <filter>
+ <artifact>org.jboss.weld:weld-core</artifact>
+ <includes>
+ <include>org/jboss/weld/jsf/ConversationAwareViewHandler*</include>
+ <include>org/jboss/weld/jsf/FacesUrlTransformer*</include>
+ <include>org/jboss/weld/jsf/JsfHelper*</include>
+ <include>org/jboss/weld/jsf/WeldPhaseListener*</include>
+ <include>org/jboss/weld/servlet/ConversationPropagationFilter*</include>
+ </includes>
+ </filter>
+ </filters>
+ <transformers>
+ <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+ <manifestEntries>
+ <Specification-Title>Weld Implementation (JSF utilities only)</Specification-Title>
+ <Specification-Vendor>Seam Framework</Specification-Vendor>
+ <Specification-Version>${version.org.jboss.weld}</Specification-Version>
+ </manifestEntries>
+ </transformer>
+ </transformers>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
Modified: branches/weld-snapshot-integration/weld-int/assembly/src/main/assembly/assembly.xml
===================================================================
--- branches/weld-snapshot-integration/weld-int/assembly/src/main/assembly/assembly.xml 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/weld-int/assembly/src/main/assembly/assembly.xml 2010-10-11 02:01:02 UTC (rev 108504)
@@ -16,9 +16,20 @@
<fileSet>
<directory>src/main/assembly/resources</directory>
<outputDirectory></outputDirectory>
- </fileSet>
+ </fileSet>
</fileSets>
-
+
+ <files>
+ <file>
+ <source>target/weld-core-jsf-only.jar</source>
+ <outputDirectory>lib-int</outputDirectory>
+ </file>
+ <file>
+ <source>target/weld-core-no-jsf.jar</source>
+ <outputDirectory></outputDirectory>
+ </file>
+ </files>
+
<dependencySets>
<dependencySet>
<outputFileNameMapping>${artifact.artifactId}.${artifact.extension}</outputFileNameMapping>
@@ -30,7 +41,6 @@
<include>org.jboss.jbossas:weld-int-ejb</include>
<include>org.jboss.jbossas:weld-int-deployer</include>
<include>org.jboss.jbossas:weld-int-deployer-mc-int</include>
-
<include>org.jboss.interceptor:jboss-interceptor</include>
</includes>
</dependencySet>
@@ -39,10 +49,8 @@
<outputFileNameMapping>${artifact.artifactId}.${artifact.extension}</outputFileNameMapping>
<outputDirectory>lib-int</outputDirectory>
<includes>
- <include>org.jboss.weld:weld-core</include>
<include>org.jboss.jbossas:weld-int-webtier</include>
<include>org.jboss.kernel:jboss-weld-int</include>
-
</includes>
</dependencySet>
</dependencySets>
Modified: branches/weld-snapshot-integration/weld-int/assembly/src/main/assembly/resources/META-INF/weld-deployers-jboss-beans.xml
===================================================================
--- branches/weld-snapshot-integration/weld-int/assembly/src/main/assembly/resources/META-INF/weld-deployers-jboss-beans.xml 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/weld-int/assembly/src/main/assembly/resources/META-INF/weld-deployers-jboss-beans.xml 2010-10-11 02:01:02 UTC (rev 108504)
@@ -55,7 +55,11 @@
</bean>
<!-- Responsible for booting Weld -->
- <bean name="WeldBootstrapDeployer" class="org.jboss.weld.integration.deployer.env.WeldBootstrapDeployer"/>
+ <bean name="WeldBootstrapDeployer" class="org.jboss.weld.integration.deployer.env.WeldBootstrapDeployer">
+ <property name="singletonProvider"><inject bean="JBossSingletonProvider"/></property>
+ </bean>
+
+ <bean name="JBossSingletonProvider" class="org.jboss.weld.integration.provider.JBossSingletonProvider"/>
<!-- Responsible for pushing the JSF faces-config.xml onto the application classpath -->
<bean name="WeldFacesIntegrationDeployer" class="org.jboss.weld.integration.deployer.cl.WeldFacesIntegrationDeployer"/>
Modified: branches/weld-snapshot-integration/weld-int/deployer/pom.xml
===================================================================
--- branches/weld-snapshot-integration/weld-int/deployer/pom.xml 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/weld-int/deployer/pom.xml 2010-10-11 02:01:02 UTC (rev 108504)
@@ -51,6 +51,12 @@
</dependency>
<dependency>
+ <groupId>org.jboss.weld</groupId>
+ <artifactId>weld-core</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
<groupId>org.jboss.jbossas</groupId>
<artifactId>weld-int-ejb</artifactId>
</dependency>
Copied: branches/weld-snapshot-integration/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/JBossProxyServices.java (from rev 108502, trunk/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/JBossProxyServices.java)
===================================================================
--- branches/weld-snapshot-integration/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/JBossProxyServices.java (rev 0)
+++ branches/weld-snapshot-integration/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/JBossProxyServices.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -0,0 +1,113 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.weld.integration.deployer;
+
+import org.jboss.classloading.spi.RealClassLoader;
+import org.jboss.weld.bean.proxy.util.SimpleProxyServices;
+import org.jboss.weld.exceptions.WeldException;
+import org.jboss.weld.logging.messages.BeanMessage;
+import org.jboss.weld.serialization.spi.ProxyServices;
+
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
+
+/**
+ * A {@link ProxyServices} implementation for JBoss AS. This needs to be used if Weld is shared.
+ *
+ * @author Marius Bogoevici
+ */
+public class JBossProxyServices extends SimpleProxyServices
+{
+
+ public ClassLoader getClassLoader(final Class<?> proxiedBeanType)
+ {
+ SecurityManager sm = System.getSecurityManager();
+ if (sm != null)
+ {
+ return AccessController.doPrivileged(new PrivilegedAction<ClassLoader>()
+ {
+ public ClassLoader run()
+ {
+ return _getClassLoader(proxiedBeanType);
+ }
+ });
+ }
+ else
+ {
+ return _getClassLoader(proxiedBeanType);
+ }
+ }
+
+ /**
+ * Return the thread context classloader or its first {@link org.jboss.classloading.spi.RealClassLoader}
+ * parent (WARs WebCtxLoader$ENCLoader cannot be used for defining new proxy classes)
+ *
+ * If no {@link org.jboss.classloading.spi.RealClassLoader} is found, we return whatever we found.
+ *
+ * If there is no thread context classloader, then just fall back to the default Weld behaviour.
+ *
+ */
+ private ClassLoader _getClassLoader(Class<?> proxiedBeanType)
+ {
+ ClassLoader threadContextClassLoader = getThreadContextClassLoader();
+ ClassLoader actualClassLoader = threadContextClassLoader;
+ while (actualClassLoader != null && !(actualClassLoader instanceof RealClassLoader))
+ {
+ actualClassLoader = actualClassLoader.getParent();
+ }
+ if (actualClassLoader != null)
+ {
+ return actualClassLoader;
+ }
+ else if (threadContextClassLoader != null)
+ {
+ return threadContextClassLoader;
+ }
+ else
+ {
+ // fall back to the default Weld behaviour
+ return super.getClassLoader(proxiedBeanType);
+ }
+ }
+
+ private static ClassLoader getThreadContextClassLoader()
+ {
+ SecurityManager sm = System.getSecurityManager();
+ if (sm != null)
+ {
+ return AccessController.doPrivileged(new PrivilegedAction<ClassLoader>()
+ {
+ public ClassLoader run()
+ {
+ return Thread.currentThread().getContextClassLoader();
+ }
+ });
+ }
+ else
+ {
+ return Thread.currentThread().getContextClassLoader();
+ }
+ }
+}
\ No newline at end of file
Modified: branches/weld-snapshot-integration/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/cl/WeldCoreIntegrationDeployer.java
===================================================================
--- branches/weld-snapshot-integration/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/cl/WeldCoreIntegrationDeployer.java 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/cl/WeldCoreIntegrationDeployer.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -29,6 +29,6 @@
@Override
protected String getShortLibName()
{
- return "weld-core.jar";
+ return "weld-core-jsf-only.jar";
}
}
\ No newline at end of file
Modified: branches/weld-snapshot-integration/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/WeldBootstrapDeployer.java
===================================================================
--- branches/weld-snapshot-integration/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/WeldBootstrapDeployer.java 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/WeldBootstrapDeployer.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -1,131 +1,200 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, 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.weld.integration.deployer.env;
-
-import org.jboss.beans.metadata.spi.BeanMetaData;
-import org.jboss.beans.metadata.spi.ValueMetaData;
-import org.jboss.beans.metadata.spi.builder.BeanMetaDataBuilder;
-import org.jboss.beans.metadata.spi.builder.ParameterMetaDataBuilder;
-import org.jboss.dependency.spi.ControllerState;
-import org.jboss.deployers.spi.DeploymentException;
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.weld.bootstrap.api.Bootstrap;
-import org.jboss.weld.integration.deployer.DeployersUtils;
-import org.jboss.weld.integration.deployer.env.bda.DeploymentImpl;
-
-/**
- * Deploy Weld boostrap service.
- *
- * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
- */
-public class WeldBootstrapDeployer extends AbstractBootstrapInfoDeployer
-{
- public WeldBootstrapDeployer()
- {
- super(false);
- setDisableOptional(true);
- addOutput(BeanMetaData.class);
- addInput(DeployersUtils.JAVAX_VALIDATION_VALIDATOR_FACTORY);
- }
-
- @Override
- protected void deployInternal(DeploymentUnit unit, BootstrapInfo info) throws DeploymentException
- {
-
- ValueMetaData ejbServicesValue = info.getEjbServices();
- if (ejbServicesValue == null)
- throw new DeploymentException("Missing ejb services: " + unit);
-
- ValueMetaData ejbInjectionServicesValue = info.getEjbInjectionServices();
- if (ejbInjectionServicesValue == null)
- throw new DeploymentException("Missing ejb injection services: " + unit);
-
- ValueMetaData deploymentValue = info.getDeployment();
- if (deploymentValue == null)
- throw new DeploymentException("Missing deployment: " + unit);
-
- String bootstrapName = DeployersUtils.getBootstrapBeanName(unit);
- BeanMetaDataBuilder bootstrap = BeanMetaDataBuilder.createBuilder(bootstrapName, "org.jboss.weld.integration.deployer.env.helpers.BootstrapBean");
-
- bootstrap.addConstructorParameter(Bootstrap.class.getName(), createBootstrap(unit));
- bootstrap.addConstructorParameter(DeploymentImpl.class.getName(), deploymentValue);
- bootstrap.addPropertyMetaData("ejbServices", ejbServicesValue);
- bootstrap.addPropertyMetaData("ejbInjectionServices", ejbInjectionServicesValue);
- bootstrap.addPropertyMetaData("jpaServices", createServiceConnector("JBossJpaServices", "org.jboss.weld.integration.persistence.JBossJpaServices", unit));
- bootstrap.addPropertyMetaData("resourceServices", bootstrap.createInject("JBossResourceServices"));
- bootstrap.addPropertyMetaData("transactionServices", bootstrap.createInject("JBossTransactionServices"));
- bootstrap.addPropertyMetaData("securityServices", bootstrap.createInject("JBossSecurityServices"));
- bootstrap.addPropertyMetaData("validationServices", createValidationServices(unit));
- bootstrap.setCreate("initialize");
- bootstrap.setStart("boot");
- bootstrap.setDestroy("shutdown");
- bootstrap.addDependency("RealTransactionManager"); // so we know TM is present in JBossTransactionServices
-
- //Make the bootstrap depend on this deployment unit so that we know all sub deployments have been processed
- bootstrap.addDependency(unit.getName());
-
-
- // call dynamic dependency creator for EJBs
- ParameterMetaDataBuilder install = bootstrap.addInstallWithParameters("createDepenencies", "DynamicDependencyCreator", null, ControllerState.CONFIGURED);
- install.addParameterMetaData(Object.class.getName(), bootstrapName);
- install.addParameterMetaData(Iterable.class.getName(), bootstrap.createInject(ejbServicesValue.getUnderlyingValue(), "ejbContainerNames"));
- install.addParameterMetaData(String.class.getName(), "Start");
- install.addParameterMetaData(String.class.getName(), "Create");
-
- unit.addAttachment(DeployersUtils.getBootstrapBeanAttachmentName(unit), bootstrap.getBeanMetaData());
- }
-
- /**
- * Create bootstrap bean.
- *
- * @param unit the deployment unit
- * @return new injected bootstrap metadata
- */
- protected ValueMetaData createBootstrap(DeploymentUnit unit)
- {
- String beanName = unit.getName() + "_WeldBootstrap";
- BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder(beanName, "org.jboss.weld.bootstrap.WeldBootstrap");
- unit.addAttachment(beanName + "_" + BeanMetaData.class.getSimpleName(), builder.getBeanMetaData());
- return builder.createInject(beanName);
- }
-
- protected ValueMetaData createValidationServices(DeploymentUnit unit) throws DeploymentException
- {
- Object validatorFactory = unit.getAttachment(DeployersUtils.JAVAX_VALIDATION_VALIDATOR_FACTORY);
-
- if (validatorFactory == null && isValidationFactoryRequired(unit))
- {
- throw new DeploymentException("Missing ValidatorFactory attachment in deployment: " + unit);
- }
- String beanName = unit.getName() + "_JBossValidationServices";
- BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder(beanName, "org.jboss.weld.integration.validation.JBossValidationServices");
- unit.addAttachment(beanName + "_" + BeanMetaData.class.getSimpleName(), builder.getBeanMetaData());
- builder.addConstructorParameter(DeployersUtils.JAVAX_VALIDATION_VALIDATOR_FACTORY, validatorFactory);
- return builder.createInject(beanName);
- }
-
- protected boolean isValidationFactoryRequired(DeploymentUnit deploymentUnit)
- {
- //TODO: define more strict criteria for determining whether the presence of a validation factory is required (e.g. JSF, JPA deployments)
- return false;
- }
-}
\ No newline at end of file
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, 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.weld.integration.deployer.env;
+
+import org.jboss.beans.metadata.api.annotations.Start;
+import org.jboss.beans.metadata.api.annotations.Stop;
+import org.jboss.beans.metadata.spi.BeanMetaData;
+import org.jboss.beans.metadata.spi.ValueMetaData;
+import org.jboss.beans.metadata.spi.builder.BeanMetaDataBuilder;
+import org.jboss.beans.metadata.spi.builder.ParameterMetaDataBuilder;
+import org.jboss.dependency.spi.ControllerState;
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.weld.bootstrap.api.Bootstrap;
+import org.jboss.weld.bootstrap.api.SingletonProvider;
+import org.jboss.weld.integration.deployer.DeployersUtils;
+import org.jboss.weld.integration.deployer.JBossProxyServices;
+import org.jboss.weld.integration.deployer.env.bda.DUTopLevelClassLoaderGetter;
+import org.jboss.weld.integration.deployer.env.bda.DeploymentImpl;
+
+import org.jboss.weld.integration.provider.JBossSingletonProvider;
+
+
+/**
+ * Deploy Weld boostrap service.
+ *
+ * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
+ */
+public class WeldBootstrapDeployer extends AbstractBootstrapInfoDeployer
+{
+ private SingletonProvider singletonProvider;
+
+ public WeldBootstrapDeployer()
+ {
+ super(false);
+ setDisableOptional(true);
+ addOutput(BeanMetaData.class);
+ addInput(DeployersUtils.JAVAX_VALIDATION_VALIDATOR_FACTORY);
+ }
+
+ /**
+ * Setter for allowing the injection of a different type of SingletonProvider
+ *
+ * @param singletonProvider
+ */
+ public void setSingletonProvider(SingletonProvider singletonProvider)
+ {
+ if (singletonProvider == null)
+ {
+ throw new IllegalArgumentException("Cannot set a null SingletonProvider");
+ }
+ this.singletonProvider = singletonProvider;
+ }
+
+ /**
+ * Configures the SingletonProvider to be used by the application server
+ */
+ @Start
+ public void install()
+ {
+ if (singletonProvider != null)
+ {
+ SingletonProvider.initialize(singletonProvider);
+ }
+ else
+ {
+ // set up the default Singleton provider, which in this case is JBossSingletonProvider
+ JBossSingletonProvider provider = new JBossSingletonProvider();
+ provider.setTopLevelClassLoaderGetter(DUTopLevelClassLoaderGetter.INSTANCE);
+ SingletonProvider.initialize(provider);
+ }
+ }
+
+ /**
+ * Removes the SingletonProvider - we assume that no application is running anymore
+ * in this application server when the deployer is uninstalled (shutdown)
+ */
+ @Stop
+ public void uninstall()
+ {
+ SingletonProvider.reset();
+ }
+
+ @Override
+ protected void deployInternal(DeploymentUnit unit, BootstrapInfo info) throws DeploymentException
+ {
+ ValueMetaData ejbServicesValue = info.getEjbServices();
+ if (ejbServicesValue == null)
+ {
+ throw new DeploymentException("Missing ejb services: " + unit);
+ }
+
+ ValueMetaData ejbInjectionServicesValue = info.getEjbInjectionServices();
+ if (ejbInjectionServicesValue == null)
+ {
+ throw new DeploymentException("Missing ejb injection services: " + unit);
+ }
+
+ ValueMetaData deploymentValue = info.getDeployment();
+ if (deploymentValue == null)
+ {
+ throw new DeploymentException("Missing deployment: " + unit);
+ }
+
+ String bootstrapName = DeployersUtils.getBootstrapBeanName(unit);
+ BeanMetaDataBuilder bootstrap = BeanMetaDataBuilder.createBuilder(bootstrapName, "org.jboss.weld.integration.deployer.env.helpers.BootstrapBean");
+
+ bootstrap.addConstructorParameter(Bootstrap.class.getName(), createBootstrap(unit));
+ bootstrap.addConstructorParameter(DeploymentImpl.class.getName(), deploymentValue);
+ bootstrap.addPropertyMetaData("ejbServices", ejbServicesValue);
+ bootstrap.addPropertyMetaData("ejbInjectionServices", ejbInjectionServicesValue);
+ bootstrap.addPropertyMetaData("jpaServices", createServiceConnector("JBossJpaServices", "org.jboss.weld.integration.persistence.JBossJpaServices", unit));
+ bootstrap.addPropertyMetaData("resourceServices", bootstrap.createInject("JBossResourceServices"));
+ bootstrap.addPropertyMetaData("transactionServices", bootstrap.createInject("JBossTransactionServices"));
+ bootstrap.addPropertyMetaData("securityServices", bootstrap.createInject("JBossSecurityServices"));
+ bootstrap.addPropertyMetaData("validationServices", createValidationServices(unit));
+ bootstrap.addPropertyMetaData("proxyServices", createProxyServices());
+ bootstrap.setCreate("initialize");
+ bootstrap.setStart("boot");
+ bootstrap.setDestroy("shutdown");
+ bootstrap.addDependency("RealTransactionManager"); // so we know TM is present in JBossTransactionServices
+
+ //Make the bootstrap depend on this deployment unit so that we know all sub deployments have been processed
+ bootstrap.addDependency(unit.getName());
+
+
+ // call dynamic dependency creator for EJBs
+ ParameterMetaDataBuilder install = bootstrap.addInstallWithParameters("createDepenencies", "DynamicDependencyCreator", null, ControllerState.CONFIGURED);
+ install.addParameterMetaData(Object.class.getName(), bootstrapName);
+ install.addParameterMetaData(Iterable.class.getName(), bootstrap.createInject(ejbServicesValue.getUnderlyingValue(), "ejbContainerNames"));
+ install.addParameterMetaData(String.class.getName(), "Start");
+ install.addParameterMetaData(String.class.getName(), "Create");
+
+ unit.addAttachment(DeployersUtils.getBootstrapBeanAttachmentName(unit), bootstrap.getBeanMetaData());
+ }
+
+ /**
+ * Create proxy services
+ *
+ * @return the {@link org.jboss.weld.serialization.spi.ProxyServices} instance
+ */
+ protected JBossProxyServices createProxyServices()
+ {
+ return new JBossProxyServices();
+ }
+
+ /**
+ * Create bootstrap bean.
+ *
+ * @param unit the deployment unit
+ * @return new injected bootstrap metadata
+ */
+ protected ValueMetaData createBootstrap(DeploymentUnit unit)
+ {
+ String beanName = unit.getName() + "_WeldBootstrap";
+ BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder(beanName, "org.jboss.weld.bootstrap.WeldBootstrap");
+ unit.addAttachment(beanName + "_" + BeanMetaData.class.getSimpleName(), builder.getBeanMetaData());
+ return builder.createInject(beanName);
+ }
+
+ protected ValueMetaData createValidationServices(DeploymentUnit unit) throws DeploymentException
+ {
+ Object validatorFactory = unit.getAttachment(DeployersUtils.JAVAX_VALIDATION_VALIDATOR_FACTORY);
+
+ if (validatorFactory == null && isValidationFactoryRequired(unit))
+ {
+ throw new DeploymentException("Missing ValidatorFactory attachment in deployment: " + unit);
+ }
+ String beanName = unit.getName() + "_JBossValidationServices";
+ BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder(beanName, "org.jboss.weld.integration.validation.JBossValidationServices");
+ unit.addAttachment(beanName + "_" + BeanMetaData.class.getSimpleName(), builder.getBeanMetaData());
+ builder.addConstructorParameter(DeployersUtils.JAVAX_VALIDATION_VALIDATOR_FACTORY, validatorFactory);
+ return builder.createInject(beanName);
+ }
+
+ protected boolean isValidationFactoryRequired(DeploymentUnit deploymentUnit)
+ {
+ //TODO: define more strict criteria for determining whether the presence of a validation factory is required (e.g. JSF, JPA deployments)
+ return false;
+ }
+}
Modified: branches/weld-snapshot-integration/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/bda/DUTopLevelClassLoaderGetter.java
===================================================================
--- branches/weld-snapshot-integration/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/bda/DUTopLevelClassLoaderGetter.java 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/bda/DUTopLevelClassLoaderGetter.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -22,6 +22,8 @@
package org.jboss.weld.integration.deployer.env.bda;
+import org.jboss.classloader.spi.base.BaseClassLoader;
+import org.jboss.classloading.spi.RealClassLoader;
import org.jboss.classloading.spi.dependency.Module;
import org.jboss.deployers.plugins.classloading.AbstractDeploymentClassLoaderPolicyModule;
import org.jboss.deployers.structure.spi.DeploymentUnit;
@@ -51,9 +53,24 @@
if (cl == null)
throw new IllegalArgumentException("Null classloader");
- Module module = SecurityActions.getModuleForClassLoader(cl);
+ // start at the first BaseClassLoader parent,
+ ClassLoader firstBaseClassLoader = cl;
+ while (firstBaseClassLoader != null && !(firstBaseClassLoader instanceof RealClassLoader))
+ {
+ firstBaseClassLoader = firstBaseClassLoader.getParent();
+ }
+
+ if (firstBaseClassLoader == null)
+ {
+ // no BaseClassLoader found, perhaps this is top-level
+ return cl;
+ }
+
+ Module module = SecurityActions.getModuleForClassLoader(firstBaseClassLoader);
if (module == null || (module instanceof AbstractDeploymentClassLoaderPolicyModule == false))
+ {
return cl;
+ }
AbstractDeploymentClassLoaderPolicyModule abclm = (AbstractDeploymentClassLoaderPolicyModule) module;
DeploymentUnit du = abclm.getDeploymentUnit();
Modified: branches/weld-snapshot-integration/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/helpers/BootstrapBean.java
===================================================================
--- branches/weld-snapshot-integration/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/helpers/BootstrapBean.java 2010-10-11 01:09:21 UTC (rev 108503)
+++ branches/weld-snapshot-integration/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/helpers/BootstrapBean.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -10,6 +10,7 @@
import org.jboss.weld.injection.spi.ResourceInjectionServices;
import org.jboss.weld.integration.deployer.env.bda.DeploymentImpl;
import org.jboss.weld.security.spi.SecurityServices;
+import org.jboss.weld.serialization.spi.ProxyServices;
import org.jboss.weld.transaction.spi.TransactionServices;
import org.jboss.weld.validation.spi.ValidationServices;
@@ -71,6 +72,11 @@
addDeploymentService(SecurityServices.class, securityServices);
}
+ public void setProxyServices(ProxyServices proxyServices)
+ {
+ addDeploymentService(ProxyServices.class, proxyServices);
+ }
+
private <S extends Service> void addDeploymentService(Class<S> type, S service)
{
getDeployment().getServices().add(type, service);
Copied: branches/weld-snapshot-integration/weld-int/deployer/src/main/java/org/jboss/weld/integration/provider (from rev 108502, trunk/weld-int/deployer/src/main/java/org/jboss/weld/integration/provider)
Deleted: branches/weld-snapshot-integration/weld-int/deployer/src/main/java/org/jboss/weld/integration/provider/JBossSingletonProvider.java
===================================================================
--- trunk/weld-int/deployer/src/main/java/org/jboss/weld/integration/provider/JBossSingletonProvider.java 2010-10-10 17:49:00 UTC (rev 108502)
+++ branches/weld-snapshot-integration/weld-int/deployer/src/main/java/org/jboss/weld/integration/provider/JBossSingletonProvider.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -1,104 +0,0 @@
-package org.jboss.weld.integration.provider;
-
-import org.jboss.beans.metadata.api.annotations.Start;
-import org.jboss.classloader.spi.base.BaseClassLoader;
-import org.jboss.weld.bootstrap.api.Singleton;
-import org.jboss.weld.bootstrap.api.SingletonProvider;
-import org.jboss.weld.integration.deployer.env.bda.DUTopLevelClassLoaderGetter;
-import org.jboss.weld.integration.deployer.env.bda.TopLevelClassLoaderGetter;
-
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentMap;
-
-/**
- * @author Marius Bogoevici
- */
-public class JBossSingletonProvider extends SingletonProvider
-{
-
- private TopLevelClassLoaderGetter topLevelClassLoaderGetter;
-
- public JBossSingletonProvider()
- {
-
- }
-
- public void setTopLevelClassLoaderGetter(TopLevelClassLoaderGetter topLevelClassLoaderGetter)
- {
- this.topLevelClassLoaderGetter = topLevelClassLoaderGetter;
- }
-
- @Start
- public void install()
- {
- if (topLevelClassLoaderGetter == null)
- {
- topLevelClassLoaderGetter = DUTopLevelClassLoaderGetter.getInstance();
- }
- }
-
- @Override
- public <T> Singleton<T> create(Class<? extends T> expectedType)
- {
- return new EarSingleton<T>();
- }
-
- public class EarSingleton<T> implements Singleton<T>
- {
- private final ConcurrentMap<ClassLoader, T> store = new ConcurrentHashMap<ClassLoader, T>();
-
-
- public T get()
- {
- ClassLoader currentClassLoader = getTopLevelClassLoader();
- T value = store.get(currentClassLoader);
- if (value == null)
- {
- throw new IllegalStateException("Singleton not set for " + currentClassLoader);
- }
- return value;
- }
-
- public boolean isSet()
- {
- return store.containsKey(getTopLevelClassLoader());
- }
-
- public void set(T object)
- {
- store.put(getTopLevelClassLoader(), object);
- }
-
- public void clear()
- {
- store.remove(getTopLevelClassLoader());
- }
-
- private ClassLoader getTopLevelClassLoader()
- {
- return topLevelClassLoaderGetter.getTopLevelClassLoader(getThreadContextClassLoader());
- }
- }
-
- private static ClassLoader getThreadContextClassLoader()
- {
- SecurityManager sm = System.getSecurityManager();
- if (sm != null)
- {
- return AccessController.doPrivileged(new PrivilegedAction<ClassLoader>()
- {
- public ClassLoader run()
- {
- return Thread.currentThread().getContextClassLoader();
- }
- });
- }
- else
- {
- return Thread.currentThread().getContextClassLoader();
- }
- }
-
-}
Copied: branches/weld-snapshot-integration/weld-int/deployer/src/main/java/org/jboss/weld/integration/provider/JBossSingletonProvider.java (from rev 108502, trunk/weld-int/deployer/src/main/java/org/jboss/weld/integration/provider/JBossSingletonProvider.java)
===================================================================
--- branches/weld-snapshot-integration/weld-int/deployer/src/main/java/org/jboss/weld/integration/provider/JBossSingletonProvider.java (rev 0)
+++ branches/weld-snapshot-integration/weld-int/deployer/src/main/java/org/jboss/weld/integration/provider/JBossSingletonProvider.java 2010-10-11 02:01:02 UTC (rev 108504)
@@ -0,0 +1,104 @@
+package org.jboss.weld.integration.provider;
+
+import org.jboss.beans.metadata.api.annotations.Start;
+import org.jboss.classloader.spi.base.BaseClassLoader;
+import org.jboss.weld.bootstrap.api.Singleton;
+import org.jboss.weld.bootstrap.api.SingletonProvider;
+import org.jboss.weld.integration.deployer.env.bda.DUTopLevelClassLoaderGetter;
+import org.jboss.weld.integration.deployer.env.bda.TopLevelClassLoaderGetter;
+
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
+
+/**
+ * @author Marius Bogoevici
+ */
+public class JBossSingletonProvider extends SingletonProvider
+{
+
+ private TopLevelClassLoaderGetter topLevelClassLoaderGetter;
+
+ public JBossSingletonProvider()
+ {
+
+ }
+
+ public void setTopLevelClassLoaderGetter(TopLevelClassLoaderGetter topLevelClassLoaderGetter)
+ {
+ this.topLevelClassLoaderGetter = topLevelClassLoaderGetter;
+ }
+
+ @Start
+ public void install()
+ {
+ if (topLevelClassLoaderGetter == null)
+ {
+ topLevelClassLoaderGetter = DUTopLevelClassLoaderGetter.getInstance();
+ }
+ }
+
+ @Override
+ public <T> Singleton<T> create(Class<? extends T> expectedType)
+ {
+ return new EarSingleton<T>();
+ }
+
+ public class EarSingleton<T> implements Singleton<T>
+ {
+ private final ConcurrentMap<ClassLoader, T> store = new ConcurrentHashMap<ClassLoader, T>();
+
+
+ public T get()
+ {
+ ClassLoader currentClassLoader = getTopLevelClassLoader();
+ T value = store.get(currentClassLoader);
+ if (value == null)
+ {
+ throw new IllegalStateException("Singleton not set for " + currentClassLoader);
+ }
+ return value;
+ }
+
+ public boolean isSet()
+ {
+ return store.containsKey(getTopLevelClassLoader());
+ }
+
+ public void set(T object)
+ {
+ store.put(getTopLevelClassLoader(), object);
+ }
+
+ public void clear()
+ {
+ store.remove(getTopLevelClassLoader());
+ }
+
+ private ClassLoader getTopLevelClassLoader()
+ {
+ return topLevelClassLoaderGetter.getTopLevelClassLoader(getThreadContextClassLoader());
+ }
+ }
+
+ private static ClassLoader getThreadContextClassLoader()
+ {
+ SecurityManager sm = System.getSecurityManager();
+ if (sm != null)
+ {
+ return AccessController.doPrivileged(new PrivilegedAction<ClassLoader>()
+ {
+ public ClassLoader run()
+ {
+ return Thread.currentThread().getContextClassLoader();
+ }
+ });
+ }
+ else
+ {
+ return Thread.currentThread().getContextClassLoader();
+ }
+ }
+
+}
More information about the jboss-cvs-commits
mailing list