JBossWS SVN: r4023 - in trunk: integration/jboss40/src/main/resources and 33 other directories.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-07-28 03:14:06 -0400 (Sat, 28 Jul 2007)
New Revision: 4023
Added:
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/DeploymentAspectManagerFactoryImpl.java
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/DeploymentAspectManagerFactoryImpl.java
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/JBossHttpServer.java
trunk/integration/native/src/main/java/org/jboss/wsf/…
[View More]stack/jbws/EndpointRegistryFactoryImpl.java
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/DefaultExtensible.java
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/ArchiveDeploymentImpl.java
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/DefaultDeployment.java
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/DefaultDeploymentModelFactory.java
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/DefaultEndpoint.java
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/DefaultLifecycleHandlerFactory.java
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/DefaultService.java
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/DeploymentAspectManagerImpl.java
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/LifecycleHandlerImpl.java
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/http/
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/http/DefaultHttpContext.java
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/http/DefaultHttpContextFactory.java
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/invocation/DefaultResourceInjectorFactory.java
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/management/DefaultServerConfig.java
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/management/DefaultServerConfigMBean.java
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/management/EndpointMetricsImpl.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/Extensible.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/DeploymentAspectManagerFactory.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/http/
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/http/HttpContext.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/http/HttpContextFactory.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/http/HttpServer.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/http/HttpServerFactory.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/management/EndpointRegistryFactory.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/management/ServerConfigFactory.java
trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/EndpointRegistryFactoryImpl.java
trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/EndpointRegistryFactoryImpl.java
Removed:
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/DeploymentAspectManagerFactoryImpl.java
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/DeploymentAspectManagerFactoryImpl.java
trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/EndpointRegistryFactoryImpl.java
trunk/integration/native/src/main/resources/jbossws-native.jar/META-INF/services/org.jboss.wsf.spi.deployment.LifecycleHandlerFactory
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicArchiveDeployment.java
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicDeployment.java
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicDeploymentAspectManager.java
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicEndpoint.java
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicExtendible.java
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicLifecycleHandler.java
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicService.java
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/DeploymentModelFactoryImpl.java
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/LifecycleHandlerFactoryImpl.java
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/invocation/ResourceInjectorFactoryImpl.java
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/management/BasicEndpointMetrics.java
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/management/BasicServerConfig.java
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/management/BasicServerConfigMBean.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/DeploymentAspectManagerFactory.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/Extendible.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/management/EndpointRegistryFactory.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/management/ServerConfigFactory.java
trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/EndpointRegistryFactoryImpl.java
trunk/integration/sunri/src/main/resources/jbossws-sunri.jar/META-INF/services/org.jboss.wsf.spi.deployment.LifecycleHandlerFactory
trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/EndpointRegistryFactoryImpl.java
trunk/integration/xfire/src/main/resources/jbossws-xfire.jar/META-INF/services/org.jboss.wsf.spi.deployment.LifecycleHandlerFactory
trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/HttpContext.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/HttpServer.java
Modified:
trunk/integration/jboss40/src/main/java/org/jboss/wsf/container/jboss40/InvocationHandlerFactoryImpl.java
trunk/integration/jboss40/src/main/java/org/jboss/wsf/container/jboss40/WebServiceContextFactoryImpl.java
trunk/integration/jboss40/src/main/resources/jbossws-jboss40-config.xml
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/AbstractDeployerHook.java
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/InvocationHandlerEJB21.java
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/InvocationHandlerEJB3.java
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/InvocationHandlerFactoryImpl.java
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/SecurityAdapterFactoryImpl.java
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/WebServiceContextFactoryImpl.java
trunk/integration/jboss42/src/main/resources/jbossws-jboss42-config.xml
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/AbstractDeployerHook.java
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerEJB21.java
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerEJB3.java
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerFactoryImpl.java
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/SecurityAdapterFactoryImpl.java
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/WebServiceContextFactoryImpl.java
trunk/integration/jboss50/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-beans.xml
trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/EndpointServlet.java
trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerFactoryImpl.java
trunk/integration/native/src/main/resources/jbossws-native-config.xml
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/DefaultSPIProviderResolver.java
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/ArchiveDeploymentModelFactory.java
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/EndpointHandlerDeploymentAspect.java
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/EndpointRegistryDeploymentAspect.java
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/management/ContextServlet.java
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/transport/jms/JMSTransportSupport.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/Deployment.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/DeploymentModelFactory.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/Endpoint.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/LifecycleHandlerFactory.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/Service.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/DefaultInvocationHandlerJAXWS.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/InvocationHandlerFactory.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/RequestHandlerFactory.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/ResourceInjectorFactory.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/SecurityAdaptorFactory.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/WebServiceContextFactory.java
trunk/integration/spi/src/main/java/org/jboss/wsf/test/TestDeployerJBoss.java
trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/EndpointServlet.java
trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/RequestHandlerFactoryImpl.java
trunk/integration/sunri/src/main/resources/jbossws-sunri-config.xml
trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/CXFServletExt.java
trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/EndpointServlet.java
trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/RequestHandlerFactoryImpl.java
trunk/integration/xfire/src/main/resources/jbossws-xfire-config.xml
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceObjectFactoryJAXRPC.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/spi/EndpointImpl.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/PortComponentLinkServlet.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/security/ReceiveUsernameOperation.java
trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/JBossWSProviderImpl.java
trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/addressrewrite/AddressRewriteTestCase.java
trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/binding/BindingCustomizationTestCase.java
trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/endpoint/EndpointServlet.java
trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/endpoint/EndpointTestCase.java
Log:
Add SPI HTTPServer, HTTPContext
Modified: trunk/integration/jboss40/src/main/java/org/jboss/wsf/container/jboss40/InvocationHandlerFactoryImpl.java
===================================================================
--- trunk/integration/jboss40/src/main/java/org/jboss/wsf/container/jboss40/InvocationHandlerFactoryImpl.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/integration/jboss40/src/main/java/org/jboss/wsf/container/jboss40/InvocationHandlerFactoryImpl.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -29,7 +29,7 @@
*/
public class InvocationHandlerFactoryImpl extends InvocationHandlerFactory
{
- public InvocationHandler createInvocationHandler(InvocationType type)
+ public InvocationHandler newInvocationHandler(InvocationType type)
{
InvocationHandler handler = null;
Modified: trunk/integration/jboss40/src/main/java/org/jboss/wsf/container/jboss40/WebServiceContextFactoryImpl.java
===================================================================
--- trunk/integration/jboss40/src/main/java/org/jboss/wsf/container/jboss40/WebServiceContextFactoryImpl.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/integration/jboss40/src/main/java/org/jboss/wsf/container/jboss40/WebServiceContextFactoryImpl.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -31,7 +31,7 @@
*/
public class WebServiceContextFactoryImpl extends WebServiceContextFactory
{
- public ExtendableWebServiceContext createWebServiceContext(InvocationType type, MessageContext messageContext)
+ public ExtendableWebServiceContext newWebServiceContext(InvocationType type, MessageContext messageContext)
{
ExtendableWebServiceContext context = null;
Modified: trunk/integration/jboss40/src/main/resources/jbossws-jboss40-config.xml
===================================================================
--- trunk/integration/jboss40/src/main/resources/jbossws-jboss40-config.xml 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/integration/jboss40/src/main/resources/jbossws-jboss40-config.xml 2007-07-28 07:14:06 UTC (rev 4023)
@@ -70,10 +70,10 @@
<!--
Each DeploymentAspectManger maintains a list of DeploymentAspects
-->
- <bean name="WSDeploymentAspectManagerJSE" class="org.jboss.wsf.framework.deployment.BasicDeploymentAspectManager">
+ <bean name="WSDeploymentAspectManagerJSE" class="org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl">
<property name="name">WSDeploymentAspectManagerJSE</property>
</bean>
- <bean name="WSDeploymentAspectManagerEJB" class="org.jboss.wsf.framework.deployment.BasicDeploymentAspectManager">
+ <bean name="WSDeploymentAspectManagerEJB" class="org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl">
<property name="name">WSDeploymentAspectManagerEJB</property>
</bean>
@@ -148,7 +148,7 @@
<property name="applicationMetaDataAdapterEJB3"><inject bean="WSApplicationMetaDataAdapterEJB3"/></property>
<property name="webMetaDataAdapter"><inject bean="WSWebMetaDataAdapter"/></property>
</bean>
- <bean name="WSEndpointMetrics" class="org.jboss.wsf.framework.management.BasicEndpointMetrics"/>
+ <bean name="WSEndpointMetrics" class="org.jboss.wsf.framework.management.EndpointMetricsImpl"/>
<bean name="WSSecurityHandlerEJB21" class="org.jboss.wsf.container.jboss42.SecurityHandlerEJB21"/>
<bean name="WSSecurityHandlerEJB3" class="org.jboss.wsf.container.jboss42.SecurityHandlerEJB3"/>
<bean name="WSServiceRefMetaDataAdapter" class="org.jboss.wsf.container.jboss40.ServiceRefMetaDataAdapter"/>
Modified: trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/AbstractDeployerHook.java
===================================================================
--- trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/AbstractDeployerHook.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/AbstractDeployerHook.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -58,7 +58,7 @@
if(null == deploymentAspectManager)
{
SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- deploymentAspectManager = spiProvider.getSPI(DeploymentAspectManagerFactory.class).createDeploymentAspectManager(getDeploymentType());
+ deploymentAspectManager = spiProvider.getSPI(DeploymentAspectManagerFactory.class).getDeploymentAspectManager(getDeploymentType());
}
return deploymentAspectManager;
@@ -80,11 +80,11 @@
try
{
DeploymentModelFactory factory = getDeploymentModelFactory();
- ArchiveDeployment dep = (ArchiveDeployment)factory.createDeployment(di.shortName, di.annotationsCl);
+ ArchiveDeployment dep = (ArchiveDeployment)factory.newDeployment(di.shortName, di.annotationsCl);
if (di.parent != null)
{
DeploymentInfo parentInfo = di.parent;
- ArchiveDeployment parentDep = (ArchiveDeployment)factory.createDeployment(parentInfo.shortName, parentInfo.annotationsCl);
+ ArchiveDeployment parentDep = (ArchiveDeployment)factory.newDeployment(parentInfo.shortName, parentInfo.annotationsCl);
dep.setParent(parentDep);
}
return dep;
@@ -99,7 +99,7 @@
{
try
{
- return getDeploymentModelFactory().createEndpoint();
+ return getDeploymentModelFactory().newEndpoint();
}
catch (Exception ex)
{
Deleted: trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/DeploymentAspectManagerFactoryImpl.java
===================================================================
--- trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/DeploymentAspectManagerFactoryImpl.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/DeploymentAspectManagerFactoryImpl.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -1,53 +0,0 @@
-/*
- * 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.wsf.container.jboss42;
-
-import org.jboss.wsf.spi.deployment.DeploymentAspectManagerFactory;
-import org.jboss.wsf.spi.deployment.DeploymentAspectManager;
-import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.common.KernelAwareSPIFactory;
-import org.jboss.logging.Logger;
-
-/**
- * @author Heiko.Braun(a)jboss.com
- * Created: Jul 23, 2007
- */
-public class DeploymentAspectManagerFactoryImpl extends DeploymentAspectManagerFactory
-{
- private static final Logger log = Logger.getLogger(DeploymentAspectManagerFactoryImpl.class);
-
- public DeploymentAspectManager createDeploymentAspectManager(Deployment.DeploymentType deploymentType)
- {
- String beanName;
-
- if(deploymentType.toString().indexOf("EJB")!=-1)
- beanName = "WSDeploymentAspectManagerEJB";
- else
- beanName = "WSDeploymentAspectManagerJSE";
-
- log.debug("DeploymentAspectManager for " + deploymentType +": " +beanName);
-
- return new KernelAwareSPIFactory().getKernelProvidedSPI(
- beanName, DeploymentAspectManager.class
- );
- }
-}
Added: trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/DeploymentAspectManagerFactoryImpl.java
===================================================================
--- trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/DeploymentAspectManagerFactoryImpl.java (rev 0)
+++ trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/DeploymentAspectManagerFactoryImpl.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -0,0 +1,53 @@
+/*
+ * 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.wsf.container.jboss42;
+
+import org.jboss.wsf.spi.deployment.DeploymentAspectManagerFactory;
+import org.jboss.wsf.spi.deployment.DeploymentAspectManager;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.common.KernelAwareSPIFactory;
+import org.jboss.logging.Logger;
+
+/**
+ * @author Heiko.Braun(a)jboss.com
+ * Created: Jul 23, 2007
+ */
+public class DeploymentAspectManagerFactoryImpl extends DeploymentAspectManagerFactory
+{
+ private static final Logger log = Logger.getLogger(DeploymentAspectManagerFactoryImpl.class);
+
+ public DeploymentAspectManager getDeploymentAspectManager(Deployment.DeploymentType deploymentType)
+ {
+ String beanName;
+
+ if(deploymentType.toString().indexOf("EJB")!=-1)
+ beanName = "WSDeploymentAspectManagerEJB";
+ else
+ beanName = "WSDeploymentAspectManagerJSE";
+
+ log.debug("DeploymentAspectManager for " + deploymentType +": " +beanName);
+
+ return new KernelAwareSPIFactory().getKernelProvidedSPI(
+ beanName, DeploymentAspectManager.class
+ );
+ }
+}
Modified: trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/InvocationHandlerEJB21.java
===================================================================
--- trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/InvocationHandlerEJB21.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/InvocationHandlerEJB21.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -161,7 +161,7 @@
throw new IllegalStateException("Cannot obtain MessageContext");
SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- SecurityAdaptor securityAdaptor = spiProvider.getSPI(SecurityAdaptorFactory.class).createSecurityAdapter();
+ SecurityAdaptor securityAdaptor = spiProvider.getSPI(SecurityAdaptorFactory.class).newSecurityAdapter();
Principal principal = securityAdaptor.getPrincipal();
Object credential = securityAdaptor.getCredential();
Modified: trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/InvocationHandlerEJB3.java
===================================================================
--- trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/InvocationHandlerEJB3.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/InvocationHandlerEJB3.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -132,7 +132,7 @@
{
EJBContext ejbCtx = beanCtx.getEJBContext();
SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- ExtendableWebServiceContext wsContext = spiProvider.getSPI(WebServiceContextFactory.class).createWebServiceContext(InvocationType.JAXWS_EJB3, jaxwsMessageContext);
+ ExtendableWebServiceContext wsContext = spiProvider.getSPI(WebServiceContextFactory.class).newWebServiceContext(InvocationType.JAXWS_EJB3, jaxwsMessageContext);
wsContext.addAttachment(EJBContext.class, ejbCtx);
beanProp.set(beanCtx.getInstance(), wsContext);
}
Modified: trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/InvocationHandlerFactoryImpl.java
===================================================================
--- trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/InvocationHandlerFactoryImpl.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/InvocationHandlerFactoryImpl.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -29,7 +29,7 @@
*/
public class InvocationHandlerFactoryImpl extends InvocationHandlerFactory
{
- public InvocationHandler createInvocationHandler(InvocationType type)
+ public InvocationHandler newInvocationHandler(InvocationType type)
{
InvocationHandler handler = null;
Modified: trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/SecurityAdapterFactoryImpl.java
===================================================================
--- trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/SecurityAdapterFactoryImpl.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/SecurityAdapterFactoryImpl.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -30,7 +30,7 @@
*/
public class SecurityAdapterFactoryImpl extends SecurityAdaptorFactory
{
- public SecurityAdaptor createSecurityAdapter()
+ public SecurityAdaptor newSecurityAdapter()
{
return new SecurityAdaptorImpl();
}
Modified: trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/WebServiceContextFactoryImpl.java
===================================================================
--- trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/WebServiceContextFactoryImpl.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/WebServiceContextFactoryImpl.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -31,7 +31,7 @@
*/
public class WebServiceContextFactoryImpl extends WebServiceContextFactory
{
- public ExtendableWebServiceContext createWebServiceContext(InvocationType type, MessageContext messageContext)
+ public ExtendableWebServiceContext newWebServiceContext(InvocationType type, MessageContext messageContext)
{
ExtendableWebServiceContext context = null;
Modified: trunk/integration/jboss42/src/main/resources/jbossws-jboss42-config.xml
===================================================================
--- trunk/integration/jboss42/src/main/resources/jbossws-jboss42-config.xml 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/integration/jboss42/src/main/resources/jbossws-jboss42-config.xml 2007-07-28 07:14:06 UTC (rev 4023)
@@ -70,10 +70,10 @@
<!--
Each DeploymentAspectManger maintains a list of DeploymentAspects
-->
- <bean name="WSDeploymentAspectManagerJSE" class="org.jboss.wsf.framework.deployment.BasicDeploymentAspectManager">
+ <bean name="WSDeploymentAspectManagerJSE" class="org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl">
<property name="name">WSDeploymentAspectManagerJSE</property>
</bean>
- <bean name="WSDeploymentAspectManagerEJB" class="org.jboss.wsf.framework.deployment.BasicDeploymentAspectManager">
+ <bean name="WSDeploymentAspectManagerEJB" class="org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl">
<property name="name">WSDeploymentAspectManagerEJB</property>
</bean>
@@ -147,7 +147,7 @@
<property name="applicationMetaDataAdapterEJB3"><inject bean="WSApplicationMetaDataAdapterEJB3"/></property>
<property name="webMetaDataAdapter"><inject bean="WSWebMetaDataAdapter"/></property>
</bean>
- <bean name="WSEndpointMetrics" class="org.jboss.wsf.framework.management.BasicEndpointMetrics"/>
+ <bean name="WSEndpointMetrics" class="org.jboss.wsf.framework.management.EndpointMetricsImpl"/>
<bean name="WSSecurityHandlerEJB21" class="org.jboss.wsf.container.jboss42.SecurityHandlerEJB21"/>
<bean name="WSSecurityHandlerEJB3" class="org.jboss.wsf.container.jboss42.SecurityHandlerEJB3"/>
<bean name="WSWebAppDesciptorModifier" class="org.jboss.wsf.container.jboss42.DefaultWebAppDesciptorModifierImpl"/>
Modified: trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/AbstractDeployerHook.java
===================================================================
--- trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/AbstractDeployerHook.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/AbstractDeployerHook.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -51,7 +51,7 @@
if(null == deploymentAspectManager)
{
SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- deploymentAspectManager = spiProvider.getSPI(DeploymentAspectManagerFactory.class).createDeploymentAspectManager(getDeploymentType());
+ deploymentAspectManager = spiProvider.getSPI(DeploymentAspectManagerFactory.class).getDeploymentAspectManager(getDeploymentType());
}
return deploymentAspectManager;
@@ -73,11 +73,11 @@
try
{
DeploymentModelFactory factory = getDeploymentModelFactory();
- ArchiveDeployment dep = (ArchiveDeployment)factory.createDeployment(unit.getSimpleName(), unit.getClassLoader());
+ ArchiveDeployment dep = (ArchiveDeployment)factory.newDeployment(unit.getSimpleName(), unit.getClassLoader());
if (unit.getParent() != null)
{
DeploymentUnit parentUnit = unit.getParent();
- ArchiveDeployment parentDep = (ArchiveDeployment)factory.createDeployment(parentUnit.getSimpleName(), parentUnit.getClassLoader());
+ ArchiveDeployment parentDep = (ArchiveDeployment)factory.newDeployment(parentUnit.getSimpleName(), parentUnit.getClassLoader());
dep.setParent(parentDep);
}
return dep;
@@ -92,7 +92,7 @@
{
try
{
- return getDeploymentModelFactory().createEndpoint();
+ return getDeploymentModelFactory().newEndpoint();
}
catch (Exception ex)
{
Deleted: trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/DeploymentAspectManagerFactoryImpl.java
===================================================================
--- trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/DeploymentAspectManagerFactoryImpl.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/DeploymentAspectManagerFactoryImpl.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -1,58 +0,0 @@
-/*
- * 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.wsf.container.jboss50;
-
-import org.jboss.wsf.spi.deployment.DeploymentAspectManagerFactory;
-import org.jboss.wsf.spi.deployment.DeploymentAspectManager;
-import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.common.KernelAwareSPIFactory;
-import org.jboss.logging.Logger;
-
-/**
- * A DeploymentAspectManagerFactory that retrieves a configured
- * {@link DeploymentAspectManager} from MC kernel.
- *
- * @see org.jboss.wsf.framework.deployment.DeploymentAspectInstaller
- *
- * @author Heiko.Braun(a)jboss.com
- * Created: Jul 20, 2007
- */
-public class DeploymentAspectManagerFactoryImpl extends DeploymentAspectManagerFactory
-{
- private static final Logger log = Logger.getLogger(DeploymentAspectManagerFactoryImpl.class);
-
- public DeploymentAspectManager createDeploymentAspectManager(Deployment.DeploymentType deploymentType)
- {
- String beanName;
-
- if(deploymentType.toString().indexOf("EJB")!=-1)
- beanName = "WSDeploymentAspectManagerEJB";
- else
- beanName = "WSDeploymentAspectManagerJSE";
-
- log.debug("DeploymentAspectManager for " + deploymentType +": " +beanName);
-
- return new KernelAwareSPIFactory().getKernelProvidedSPI(
- beanName, DeploymentAspectManager.class
- );
- }
-}
Added: trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/DeploymentAspectManagerFactoryImpl.java
===================================================================
--- trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/DeploymentAspectManagerFactoryImpl.java (rev 0)
+++ trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/DeploymentAspectManagerFactoryImpl.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -0,0 +1,58 @@
+/*
+ * 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.wsf.container.jboss50;
+
+import org.jboss.wsf.spi.deployment.DeploymentAspectManagerFactory;
+import org.jboss.wsf.spi.deployment.DeploymentAspectManager;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.common.KernelAwareSPIFactory;
+import org.jboss.logging.Logger;
+
+/**
+ * A DeploymentAspectManagerFactory that retrieves a configured
+ * {@link DeploymentAspectManager} from MC kernel.
+ *
+ * @see org.jboss.wsf.framework.deployment.DeploymentAspectInstaller
+ *
+ * @author Heiko.Braun(a)jboss.com
+ * Created: Jul 20, 2007
+ */
+public class DeploymentAspectManagerFactoryImpl extends DeploymentAspectManagerFactory
+{
+ private static final Logger log = Logger.getLogger(DeploymentAspectManagerFactoryImpl.class);
+
+ public DeploymentAspectManager getDeploymentAspectManager(Deployment.DeploymentType deploymentType)
+ {
+ String beanName;
+
+ if(deploymentType.toString().indexOf("EJB")!=-1)
+ beanName = "WSDeploymentAspectManagerEJB";
+ else
+ beanName = "WSDeploymentAspectManagerJSE";
+
+ log.debug("DeploymentAspectManager for " + deploymentType +": " +beanName);
+
+ return new KernelAwareSPIFactory().getKernelProvidedSPI(
+ beanName, DeploymentAspectManager.class
+ );
+ }
+}
Modified: trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerEJB21.java
===================================================================
--- trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerEJB21.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerEJB21.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -158,7 +158,7 @@
throw new IllegalStateException("Cannot obtain MessageContext");
SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- SecurityAdaptor securityAdaptor = spiProvider.getSPI(SecurityAdaptorFactory.class).createSecurityAdapter();
+ SecurityAdaptor securityAdaptor = spiProvider.getSPI(SecurityAdaptorFactory.class).newSecurityAdapter();
SecurityContext sc = SecurityContextAssociation.getSecurityContext();
Principal principal = securityAdaptor.getPrincipal();
Object credential = securityAdaptor.getCredential();
Modified: trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerEJB3.java
===================================================================
--- trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerEJB3.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerEJB3.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -132,7 +132,7 @@
{
EJBContext ejbCtx = beanCtx.getEJBContext();
SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- ExtendableWebServiceContext wsContext = spiProvider.getSPI(WebServiceContextFactory.class).createWebServiceContext(InvocationType.JAXWS_EJB3, jaxwsMessageContext);
+ ExtendableWebServiceContext wsContext = spiProvider.getSPI(WebServiceContextFactory.class).newWebServiceContext(InvocationType.JAXWS_EJB3, jaxwsMessageContext);
wsContext.addAttachment(EJBContext.class, ejbCtx);
beanProp.set(beanCtx.getInstance(), wsContext);
}
Modified: trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerFactoryImpl.java
===================================================================
--- trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerFactoryImpl.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerFactoryImpl.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -31,7 +31,7 @@
*/
public class InvocationHandlerFactoryImpl extends InvocationHandlerFactory
{
- public InvocationHandler createInvocationHandler(InvocationType type)
+ public InvocationHandler newInvocationHandler(InvocationType type)
{
InvocationHandler handler = null;
Added: trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/JBossHttpServer.java
===================================================================
--- trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/JBossHttpServer.java (rev 0)
+++ trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/JBossHttpServer.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -0,0 +1,234 @@
+/*
+ * 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.wsf.container.jboss50;
+
+//$Id: JBossHttpServer.java 1786 2007-01-04 14:30:04Z thomas.diesler(a)jboss.com $
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.net.URL;
+import java.util.Map;
+
+import javax.management.MBeanServerConnection;
+import javax.management.ObjectName;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import javax.xml.ws.Endpoint;
+import javax.xml.ws.WebServiceException;
+
+import org.jboss.wsf.common.DOMUtils;
+import org.jboss.wsf.common.DOMWriter;
+import org.jboss.wsf.framework.DefaultExtensible;
+import org.jboss.wsf.spi.SPIProvider;
+import org.jboss.wsf.spi.SPIProviderResolver;
+import org.jboss.wsf.spi.http.HttpContext;
+import org.jboss.wsf.spi.http.HttpContextFactory;
+import org.jboss.wsf.spi.http.HttpServer;
+import org.jboss.wsf.spi.management.ServerConfig;
+import org.jboss.wsf.spi.management.ServerConfigFactory;
+import org.w3c.dom.Element;
+
+/**
+ * A Tomcat HTTP Server
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 07-Jul-2006
+ */
+public class JBossHttpServer extends DefaultExtensible implements HttpServer
+{
+ private static final String MAIN_DEPLOYER = "jboss.system:service=MainDeployer";
+
+ /** Start an instance of this HTTP server */
+ public void start()
+ {
+ // verify required properties
+ }
+
+ /** Create an HTTP context */
+ public HttpContext createContext(String contextRoot)
+ {
+ SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
+ HttpContext httpContext = spiProvider.getSPI(HttpContextFactory.class).newHttpContext(this, contextRoot);
+ return httpContext;
+ }
+
+ /** Publish an JAXWS endpoint to the HTTP server */
+ public void publish(HttpContext context, Endpoint endpoint)
+ {
+ Class implClass = getImplementorClass(endpoint);
+ String implName = implClass.getName();
+
+ try
+ {
+ Element webDoc = createWebAppDescriptor(context, endpoint);
+ Element jbossDoc = createJBossWebAppDescriptor(context, endpoint);
+
+ File tmpWar = null;
+ try
+ {
+ SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
+ ServerConfig serverConfig = spiProvider.getSPI(ServerConfigFactory.class).getServerConfig();
+ File tmpDir = new File(serverConfig.getServerTempDir().getCanonicalPath() + "/jbossws");
+
+ String deploymentName = implName.substring(implName.lastIndexOf(".") + 1);
+ tmpWar = File.createTempFile(deploymentName, ".war", tmpDir);
+ tmpWar.delete();
+ File webInf = new File(tmpWar, "WEB-INF");
+ webInf.mkdirs();
+
+ File webXml = new File(webInf, "web.xml");
+ FileWriter fw = new FileWriter(webXml);
+ new DOMWriter(fw).setPrettyprint(true).print(webDoc);
+ fw.close();
+
+ File jbossWebXml = new File(webInf, "jboss-web.xml");
+ fw = new FileWriter(jbossWebXml);
+ new DOMWriter(fw).setPrettyprint(true).print(jbossDoc);
+ fw.close();
+ }
+ catch (IOException e)
+ {
+ throw new WebServiceException("Failed to create webservice war", e);
+ }
+
+ Map<String, Object> epProps = endpoint.getProperties();
+ epProps.put("jbossws-endpoint-war-url", tmpWar);
+
+ URL tmpURL = tmpWar.toURL();
+ MBeanServerConnection server = getServer();
+ server.invoke(new ObjectName(MAIN_DEPLOYER), "deploy", new Object[] { tmpURL }, new String[] { "java.net.URL" });
+ }
+ catch (RuntimeException rte)
+ {
+ throw rte;
+ }
+ catch (Exception ex)
+ {
+ throw new WebServiceException(ex);
+ }
+ }
+
+ /** Destroys an JAXWS endpoint on the HTTP server */
+ public void destroy(HttpContext context, Endpoint endpoint)
+ {
+ Map<String, Object> epProps = endpoint.getProperties();
+ File tmpWar = (File)epProps.get("jbossws-endpoint-war-url");
+ if (tmpWar == null)
+ throw new IllegalStateException("Cannot find endpoint war property");
+
+ try
+ {
+ URL tmpURL = tmpWar.toURL();
+ MBeanServerConnection server = getServer();
+ server.invoke(new ObjectName(MAIN_DEPLOYER), "undeploy", new Object[] { tmpURL }, new String[] { "java.net.URL" });
+
+ tmpWar.delete();
+ }
+ catch (RuntimeException rte)
+ {
+ throw rte;
+ }
+ catch (Exception ex)
+ {
+ throw new WebServiceException(ex);
+ }
+ }
+
+ private Class getImplementorClass(Endpoint endpoint)
+ {
+ Object implementor = endpoint.getImplementor();
+ Class implClass = (implementor instanceof Class ? (Class)implementor : implementor.getClass());
+ return implClass;
+ }
+
+ private MBeanServerConnection getServer() throws NamingException
+ {
+ InitialContext iniCtx = new InitialContext();
+ MBeanServerConnection server = (MBeanServerConnection)iniCtx.lookup("jmx/invoker/RMIAdaptor");
+ return server;
+ }
+
+ private Element createWebAppDescriptor(HttpContext context, Endpoint endpoint)
+ {
+ Class implClass = getImplementorClass(endpoint);
+ String implName = implClass.getName();
+
+ Element webApp = DOMUtils.createElement("web-app");
+
+ /*
+ <servlet>
+ <servlet-name>
+ <servlet-class>
+ </servlet>
+ */
+ Element servlet = (Element)webApp.appendChild(DOMUtils.createElement("servlet"));
+ Element servletName = (Element)servlet.appendChild(DOMUtils.createElement("servlet-name"));
+ servletName.appendChild(DOMUtils.createTextNode("JAXWSEndpoint"));
+ Element servletClass = (Element)servlet.appendChild(DOMUtils.createElement("servlet-class"));
+ servletClass.appendChild(DOMUtils.createTextNode(implName));
+
+ /*
+ <servlet-mapping>
+ <servlet-name>
+ <url-pattern>
+ </servlet-mapping>
+ */
+ Element servletMapping = (Element)webApp.appendChild(DOMUtils.createElement("servlet-mapping"));
+ servletName = (Element)servletMapping.appendChild(DOMUtils.createElement("servlet-name"));
+ servletName.appendChild(DOMUtils.createTextNode("JAXWSEndpoint"));
+ Element urlPatternElement = (Element)servletMapping.appendChild(DOMUtils.createElement("url-pattern"));
+
+ String urlPattern = "/*";
+ urlPatternElement.appendChild(DOMUtils.createTextNode(urlPattern));
+
+ // Add security-constraint in generated web.xml for Endpoint API
+ // FIXME: JBWS-1069
+
+ return webApp;
+ }
+
+ private Element createJBossWebAppDescriptor(HttpContext context, Endpoint endpoint)
+ {
+ /* Create a jboss-web
+ <jboss-web>
+ <security-domain>java:/jaas/cts</security-domain>
+ <context-root>/ws/ejbN/</context-root>
+ </jboss-web>
+ */
+ Element jbossWeb = DOMUtils.createElement("jboss-web");
+
+ // Get the context root for this deployment
+ String contextRoot = context.getContextRoot();
+ if (contextRoot == null)
+ throw new WebServiceException("Cannot obtain context root");
+
+ Element root = (Element)jbossWeb.appendChild(DOMUtils.createElement("context-root"));
+ root.appendChild(DOMUtils.createTextNode(contextRoot));
+
+ // Add security-constraint in generated web.xml for Endpoint API
+ // FIXME: JBWS-1069
+
+ return jbossWeb;
+ }
+}
+
Modified: trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/SecurityAdapterFactoryImpl.java
===================================================================
--- trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/SecurityAdapterFactoryImpl.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/SecurityAdapterFactoryImpl.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -30,7 +30,7 @@
*/
public class SecurityAdapterFactoryImpl extends SecurityAdaptorFactory
{
- public SecurityAdaptor createSecurityAdapter()
+ public SecurityAdaptor newSecurityAdapter()
{
return new SecurityAdaptorImpl();
}
Modified: trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/WebServiceContextFactoryImpl.java
===================================================================
--- trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/WebServiceContextFactoryImpl.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/WebServiceContextFactoryImpl.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -31,7 +31,7 @@
*/
public class WebServiceContextFactoryImpl extends WebServiceContextFactory
{
- public ExtendableWebServiceContext createWebServiceContext(InvocationType type, MessageContext messageContext)
+ public ExtendableWebServiceContext newWebServiceContext(InvocationType type, MessageContext messageContext)
{
ExtendableWebServiceContext context = null;
Modified: trunk/integration/jboss50/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-beans.xml
===================================================================
--- trunk/integration/jboss50/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-beans.xml 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/integration/jboss50/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-beans.xml 2007-07-28 07:14:06 UTC (rev 4023)
@@ -124,10 +124,10 @@
<!--
Each DeploymentAspectManger maintains a list of DeploymentAspects
-->
- <bean name="WSDeploymentAspectManagerJSE" class="org.jboss.wsf.framework.deployment.BasicDeploymentAspectManager">
+ <bean name="WSDeploymentAspectManagerJSE" class="org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl">
<property name="name">WSDeploymentAspectManagerJSE</property>
</bean>
- <bean name="WSDeploymentAspectManagerEJB" class="org.jboss.wsf.framework.deployment.BasicDeploymentAspectManager">
+ <bean name="WSDeploymentAspectManagerEJB" class="org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl">
<property name="name">WSDeploymentAspectManagerEJB</property>
</bean>
@@ -193,7 +193,7 @@
</bean>
<!-- Deployment aspect helper beans -->
- <bean name="WSEndpointMetrics" class="org.jboss.wsf.framework.management.BasicEndpointMetrics"/>
+ <bean name="WSEndpointMetrics" class="org.jboss.wsf.framework.management.EndpointMetricsImpl"/>
<bean name="WSSecurityHandlerEJB21" class="org.jboss.wsf.container.jboss50.SecurityHandlerEJB21"/>
<bean name="WSSecurityHandlerEJB3" class="org.jboss.wsf.container.jboss50.SecurityHandlerEJB3"/>
<bean name="WSWebAppDesciptorModifier" class="org.jboss.wsf.container.jboss50.DefaultWebAppDesciptorModifierImpl"/>
Deleted: trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/EndpointRegistryFactoryImpl.java
===================================================================
--- trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/EndpointRegistryFactoryImpl.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/EndpointRegistryFactoryImpl.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -1,45 +0,0 @@
-/*
- * 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.wsf.stack.jbws;
-
-import org.jboss.wsf.spi.management.EndpointRegistryFactory;
-import org.jboss.wsf.spi.management.EndpointRegistry;
-import org.jboss.wsf.common.KernelAwareSPIFactory;
-
-/**
- * An EndpointRegistryFactory implementation that retrieves
- * the registry from MC kernel.
- *
- * @see EndpointRegistry.BEAN_NAME
- *
- * @author Heiko.Braun(a)jboss.com
- * Created: Jul 23, 2007
- */
-public class EndpointRegistryFactoryImpl extends EndpointRegistryFactory
-{
- public EndpointRegistry createEndpointRegistry()
- {
- return new KernelAwareSPIFactory().getKernelProvidedSPI(
- EndpointRegistry.BEAN_NAME, EndpointRegistry.class
- );
- }
-}
Added: trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/EndpointRegistryFactoryImpl.java
===================================================================
--- trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/EndpointRegistryFactoryImpl.java (rev 0)
+++ trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/EndpointRegistryFactoryImpl.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -0,0 +1,45 @@
+/*
+ * 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.wsf.stack.jbws;
+
+import org.jboss.wsf.spi.management.EndpointRegistryFactory;
+import org.jboss.wsf.spi.management.EndpointRegistry;
+import org.jboss.wsf.common.KernelAwareSPIFactory;
+
+/**
+ * An EndpointRegistryFactory implementation that retrieves
+ * the registry from MC kernel.
+ *
+ * @see EndpointRegistry.BEAN_NAME
+ *
+ * @author Heiko.Braun(a)jboss.com
+ * Created: Jul 23, 2007
+ */
+public class EndpointRegistryFactoryImpl extends EndpointRegistryFactory
+{
+ public EndpointRegistry getEndpointRegistry()
+ {
+ return new KernelAwareSPIFactory().getKernelProvidedSPI(
+ EndpointRegistry.BEAN_NAME, EndpointRegistry.class
+ );
+ }
+}
Modified: trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/EndpointServlet.java
===================================================================
--- trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/EndpointServlet.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/EndpointServlet.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -66,7 +66,7 @@
{
super.init(servletConfig);
SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- epRegistry = spiProvider.getSPI(EndpointRegistryFactory.class).createEndpointRegistry();
+ epRegistry = spiProvider.getSPI(EndpointRegistryFactory.class).getEndpointRegistry();
}
public void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
Modified: trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerFactoryImpl.java
===================================================================
--- trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerFactoryImpl.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerFactoryImpl.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -30,7 +30,7 @@
*/
public class RequestHandlerFactoryImpl extends RequestHandlerFactory
{
- public RequestHandler createRequestHandler()
+ public RequestHandler newRequestHandler()
{
return new RequestHandlerImpl();
}
Modified: trunk/integration/native/src/main/resources/jbossws-native-config.xml
===================================================================
--- trunk/integration/native/src/main/resources/jbossws-native-config.xml 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/integration/native/src/main/resources/jbossws-native-config.xml 2007-07-28 07:14:06 UTC (rev 4023)
@@ -1,6 +1,6 @@
<!-- An abstraction of server configuration aspects. -->
- <bean name="WSServerConfig" class="org.jboss.wsf.framework.management.BasicServerConfig">
+ <bean name="WSServerConfig" class="org.jboss.wsf.framework.management.DefaultServerConfig">
<!--
The WSDL, that is a required deployment artifact for an endpoint, has a <soap:address>
element which points to the location of the endpoint. JBoss supports rewriting of that SOAP address.
Deleted: trunk/integration/native/src/main/resources/jbossws-native.jar/META-INF/services/org.jboss.wsf.spi.deployment.LifecycleHandlerFactory
===================================================================
--- trunk/integration/native/src/main/resources/jbossws-native.jar/META-INF/services/org.jboss.wsf.spi.deployment.LifecycleHandlerFactory 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/integration/native/src/main/resources/jbossws-native.jar/META-INF/services/org.jboss.wsf.spi.deployment.LifecycleHandlerFactory 2007-07-28 07:14:06 UTC (rev 4023)
@@ -1 +0,0 @@
-org.jboss.wsf.framework.deployment.LifecycleHandlerFactoryImpl
\ No newline at end of file
Added: trunk/integration/spi/src/main/java/org/jboss/wsf/framework/DefaultExtensible.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/framework/DefaultExtensible.java (rev 0)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/framework/DefaultExtensible.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -0,0 +1,88 @@
+/*
+ * 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.wsf.framework;
+
+//$Id: BasicDeploymentContext.java 3959 2007-07-20 14:44:19Z heiko.braun(a)jboss.com $
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+
+import org.jboss.wsf.spi.Extensible;
+
+/**
+ * A general extendible artifact
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 20-Apr-2007
+ */
+public class DefaultExtensible implements Extensible
+{
+ private Map<Class, Object> attachments = new HashMap<Class, Object>();
+ private Map<String, Object> properties = new HashMap<String, Object>();
+
+ public Collection<Object> getAttachments()
+ {
+ return attachments.values();
+ }
+
+ public <T> T getAttachment(Class<T> clazz)
+ {
+ return (T)attachments.get(clazz);
+ }
+
+ public <T> T addAttachment(Class<T> clazz, Object obj)
+ {
+ return (T)attachments.put(clazz, obj);
+ }
+
+ public <T> T removeAttachment(Class<T> key)
+ {
+ return (T)attachments.remove(key);
+ }
+
+ public Set<String> getProperties()
+ {
+ return properties.keySet();
+ }
+
+ public Object getProperty(String key)
+ {
+ return properties.get(key);
+ }
+
+ public void removeProperty(String key)
+ {
+ properties.remove(key);
+ }
+
+ public void setProperty(String key, Object value)
+ {
+ properties.put(key, value);
+ }
+
+ public void setProperties(Map<String, Object> props)
+ {
+ properties.putAll(props);
+ }
+}
Modified: trunk/integration/spi/src/main/java/org/jboss/wsf/framework/DefaultSPIProviderResolver.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/framework/DefaultSPIProviderResolver.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/framework/DefaultSPIProviderResolver.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -23,12 +23,19 @@
import org.jboss.logging.Logger;
import org.jboss.wsf.common.ServiceLoader;
+import org.jboss.wsf.framework.deployment.DefaultDeploymentModelFactory;
+import org.jboss.wsf.framework.deployment.DefaultLifecycleHandlerFactory;
+import org.jboss.wsf.framework.http.DefaultHttpContext;
+import org.jboss.wsf.framework.http.DefaultHttpContextFactory;
+import org.jboss.wsf.framework.invocation.DefaultResourceInjectorFactory;
import org.jboss.wsf.spi.SPIProvider;
import org.jboss.wsf.spi.SPIProviderResolver;
import org.jboss.wsf.spi.WSFException;
import org.jboss.wsf.spi.deployment.DeploymentAspectManagerFactory;
import org.jboss.wsf.spi.deployment.DeploymentModelFactory;
import org.jboss.wsf.spi.deployment.LifecycleHandlerFactory;
+import org.jboss.wsf.spi.http.HttpContextFactory;
+import org.jboss.wsf.spi.http.HttpServerFactory;
import org.jboss.wsf.spi.invocation.InvocationHandlerFactory;
import org.jboss.wsf.spi.invocation.RequestHandlerFactory;
import org.jboss.wsf.spi.invocation.ResourceInjectorFactory;
@@ -68,36 +75,40 @@
if (DeploymentModelFactory.class.equals(spiType))
{
- returnType = (T)loadService(spiType, "org.jboss.wsf.framework.deployment.DeploymentModelFactoryImpl");
+ returnType = (T)loadService(spiType, DefaultDeploymentModelFactory.class.getName());
}
- else if (ResourceInjectorFactory.class.equals(spiType))
+ else if (HttpContextFactory.class.equals(spiType))
{
- returnType = (T)loadService(spiType, "org.jboss.wsf.framework.invocation.ResourceInjectorFactoryImpl");
+ returnType = (T)loadService(spiType, DefaultHttpContextFactory.class.getName());
}
else if (LifecycleHandlerFactory.class.equals(spiType))
{
- returnType = (T)loadService(spiType, "org.jboss.wsf.framework.deployment.LifecycleHandlerFactoryImpl");
+ returnType = (T)loadService(spiType, DefaultLifecycleHandlerFactory.class.getName());
}
+ else if (ResourceInjectorFactory.class.equals(spiType))
+ {
+ returnType = (T)loadService(spiType, DefaultResourceInjectorFactory.class.getName());
+ }
// SPI provided by either container or stack integration
- else if (InvocationHandlerFactory.class.equals(spiType))
+ else if (DeploymentAspectManagerFactory.class.equals(spiType))
{
returnType = (T)loadService(spiType, null);
}
- else if (DeploymentAspectManagerFactory.class.equals(spiType))
+ else if (EndpointRegistryFactory.class.equals(spiType))
{
returnType = (T)loadService(spiType, null);
}
- else if (RequestHandlerFactory.class.equals(spiType))
+ else if (HttpServerFactory.class.equals(spiType))
{
returnType = (T)loadService(spiType, null);
}
- else if (EndpointRegistryFactory.class.equals(spiType))
+ else if (InvocationHandlerFactory.class.equals(spiType))
{
returnType = (T)loadService(spiType, null);
}
- else if (ServerConfigFactory.class.equals(spiType))
+ else if (RequestHandlerFactory.class.equals(spiType))
{
returnType = (T)loadService(spiType, null);
}
@@ -105,6 +116,10 @@
{
returnType = (T)loadService(spiType, null);
}
+ else if (ServerConfigFactory.class.equals(spiType))
+ {
+ returnType = (T)loadService(spiType, null);
+ }
else if (WebServiceContextFactory.class.equals(spiType))
{
returnType = (T)loadService(spiType, null);
Copied: trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/ArchiveDeploymentImpl.java (from rev 4022, trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicArchiveDeployment.java)
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/ArchiveDeploymentImpl.java (rev 0)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/ArchiveDeploymentImpl.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -0,0 +1,125 @@
+/*
+ * 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.wsf.framework.deployment;
+
+//$Id: BasicDeployment.java 3995 2007-07-26 08:52:45Z thomas.diesler(a)jboss.com $
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.jboss.ws.integration.UnifiedVirtualFile;
+import org.jboss.wsf.spi.deployment.ArchiveDeployment;
+
+
+/**
+ * A general web service deployment that is based on an archive.
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 20-Apr-2007
+ */
+public class ArchiveDeploymentImpl extends DefaultDeployment implements ArchiveDeployment
+{
+ // The optional parent
+ private ArchiveDeployment parent;
+ // The root file for this deployment
+ private UnifiedVirtualFile rootFile;
+
+ ArchiveDeploymentImpl(String simpleName, ClassLoader classLoader)
+ {
+ super(simpleName, classLoader);
+ }
+
+ public ArchiveDeployment getParent()
+ {
+ return parent;
+ }
+
+ public void setParent(ArchiveDeployment parent)
+ {
+ this.parent = parent;
+ }
+
+ public UnifiedVirtualFile getRootFile()
+ {
+ return rootFile;
+ }
+
+ public void setRootFile(UnifiedVirtualFile rootFile)
+ {
+ this.rootFile = rootFile;
+ }
+
+ public String getCanonicalName()
+ {
+ String name = getSimpleName();
+ if (getParent() != null)
+ name = getParent().getCanonicalName() + "/" + name;
+ return name;
+ }
+
+ public URL getMetaDataFileURL(String resourcePath) throws IOException
+ {
+ URL resourceURL = null;
+ if (resourcePath != null && resourcePath.length() > 0)
+ {
+ if (resourcePath.startsWith("/"))
+ resourcePath = resourcePath.substring(1);
+
+ try
+ {
+ // assign an absolute URL
+ resourceURL = new URL(resourcePath);
+ }
+ catch (MalformedURLException ex)
+ {
+ // ignore
+ }
+
+ if (resourceURL == null && getRootFile() != null)
+ {
+ UnifiedVirtualFile vfResource = getRootFile().findChild(resourcePath);
+ resourceURL = vfResource.toURL();
+ }
+
+ /*
+ if (resourceURL == null)
+ {
+ String deploymentPath = getUrl().toExternalForm();
+
+ if (deploymentPath.startsWith("jar:") && deploymentPath.endsWith("!/") == false)
+ deploymentPath += "!/";
+
+ if (deploymentPath.startsWith("war:") && deploymentPath.endsWith("!/") == false)
+ deploymentPath += "!/";
+
+ if (deploymentPath.endsWith("/") == false)
+ deploymentPath += "/";
+
+ // assign a relative URL
+ resourceURL = new URL(deploymentPath + resourcePath);
+ }
+ */
+ }
+ return resourceURL;
+ }
+}
Modified: trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/ArchiveDeploymentModelFactory.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/ArchiveDeploymentModelFactory.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/ArchiveDeploymentModelFactory.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -32,18 +32,18 @@
*/
public class ArchiveDeploymentModelFactory extends DeploymentModelFactory
{
- public Deployment createDeployment(String simpleName, ClassLoader initialLoader)
+ public Deployment newDeployment(String simpleName, ClassLoader initialLoader)
{
- return new BasicArchiveDeployment(simpleName, initialLoader);
+ return new ArchiveDeploymentImpl(simpleName, initialLoader);
}
- public Service createService()
+ public Service newService()
{
- return new BasicService();
+ return new DefaultService();
}
- public Endpoint createEndpoint()
+ public Endpoint newEndpoint()
{
- return new BasicEndpoint();
+ return new DefaultEndpoint();
}
}
Deleted: trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicArchiveDeployment.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicArchiveDeployment.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicArchiveDeployment.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -1,125 +0,0 @@
-/*
- * 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.wsf.framework.deployment;
-
-//$Id: BasicDeployment.java 3995 2007-07-26 08:52:45Z thomas.diesler(a)jboss.com $
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import org.jboss.ws.integration.UnifiedVirtualFile;
-import org.jboss.wsf.spi.deployment.ArchiveDeployment;
-
-
-/**
- * A general web service deployment that is based on an archive.
- *
- * @author Thomas.Diesler(a)jboss.com
- * @since 20-Apr-2007
- */
-public class BasicArchiveDeployment extends BasicDeployment implements ArchiveDeployment
-{
- // The optional parent
- private ArchiveDeployment parent;
- // The root file for this deployment
- private UnifiedVirtualFile rootFile;
-
- BasicArchiveDeployment(String simpleName, ClassLoader classLoader)
- {
- super(simpleName, classLoader);
- }
-
- public ArchiveDeployment getParent()
- {
- return parent;
- }
-
- public void setParent(ArchiveDeployment parent)
- {
- this.parent = parent;
- }
-
- public UnifiedVirtualFile getRootFile()
- {
- return rootFile;
- }
-
- public void setRootFile(UnifiedVirtualFile rootFile)
- {
- this.rootFile = rootFile;
- }
-
- public String getCanonicalName()
- {
- String name = getSimpleName();
- if (getParent() != null)
- name = getParent().getCanonicalName() + "/" + name;
- return name;
- }
-
- public URL getMetaDataFileURL(String resourcePath) throws IOException
- {
- URL resourceURL = null;
- if (resourcePath != null && resourcePath.length() > 0)
- {
- if (resourcePath.startsWith("/"))
- resourcePath = resourcePath.substring(1);
-
- try
- {
- // assign an absolute URL
- resourceURL = new URL(resourcePath);
- }
- catch (MalformedURLException ex)
- {
- // ignore
- }
-
- if (resourceURL == null && getRootFile() != null)
- {
- UnifiedVirtualFile vfResource = getRootFile().findChild(resourcePath);
- resourceURL = vfResource.toURL();
- }
-
- /*
- if (resourceURL == null)
- {
- String deploymentPath = getUrl().toExternalForm();
-
- if (deploymentPath.startsWith("jar:") && deploymentPath.endsWith("!/") == false)
- deploymentPath += "!/";
-
- if (deploymentPath.startsWith("war:") && deploymentPath.endsWith("!/") == false)
- deploymentPath += "!/";
-
- if (deploymentPath.endsWith("/") == false)
- deploymentPath += "/";
-
- // assign a relative URL
- resourceURL = new URL(deploymentPath + resourcePath);
- }
- */
- }
- return resourceURL;
- }
-}
Deleted: trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicDeployment.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicDeployment.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicDeployment.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -1,120 +0,0 @@
-/*
- * 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.wsf.framework.deployment;
-
-import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.deployment.Service;
-
-//$Id$
-
-/**
- * A general web service deployment dep.
- *
- * It has no notion of J2EE deployment packages.
- *
- * @author Thomas.Diesler(a)jboss.com
- * @since 20-Apr-2007
- */
-public class BasicDeployment extends BasicExtendible implements Deployment
-{
- // The name for this deployment
- private String simpleName;
- // A deployment has one service
- private Service service;
- // The type of this deployment
- private DeploymentType type;
- // The state for this deployment
- private DeploymentState state;
- // The deployment class loader
- private ClassLoader initialLoader;
- // The runtime class loader
- private ClassLoader runtimeLoader;
-
- BasicDeployment(String name, ClassLoader classLoader)
- {
- simpleName = name;
- state = DeploymentState.UNDEFINED;
- initialLoader = classLoader;
- setService(new BasicService());
- }
-
- public String getSimpleName()
- {
- return simpleName;
- }
-
- public void setSimpleName(String name)
- {
- this.simpleName = name;
- }
-
- public void setInitialClassLoader(ClassLoader classLoader)
- {
- this.initialLoader = classLoader;
- }
-
- public ClassLoader getInitialClassLoader()
- {
- return initialLoader;
- }
-
- public void setRuntimeClassLoader(ClassLoader classLoader)
- {
- this.runtimeLoader = classLoader;
- }
-
- public ClassLoader getRuntimeClassLoader()
- {
- return runtimeLoader;
- }
-
- public Service getService()
- {
- return service;
- }
-
- public void setService(Service service)
- {
- service.setDeployment(this);
- this.service = service;
- }
-
- public DeploymentState getState()
- {
- return state;
- }
-
- public void setState(DeploymentState deploymentState)
- {
- this.state = deploymentState;
- }
-
- public DeploymentType getType()
- {
- return type;
- }
-
- public void setType(DeploymentType deploymentType)
- {
- this.type = deploymentType;
- }
-}
Deleted: trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicDeploymentAspectManager.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicDeploymentAspectManager.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicDeploymentAspectManager.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -1,258 +0,0 @@
-/*
- * 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.wsf.framework.deployment;
-
-// $Id$
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import org.jboss.logging.Logger;
-import org.jboss.wsf.spi.deployment.Deployment.DeploymentState;
-import org.jboss.wsf.spi.deployment.DeploymentAspectManager;
-import org.jboss.wsf.spi.deployment.DeploymentAspect;
-import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.deployment.WSFDeploymentException;
-
-/**
- * A general service deployment manger.
- *
- * @author Thomas.Diesler(a)jboss.com
- * @since 20-Apr-2007
- */
-public class BasicDeploymentAspectManager implements DeploymentAspectManager
-{
- // provide logging
- private static final Logger log = Logger.getLogger(BasicDeploymentAspectManager.class);
-
- private String name;
- private Set<DeploymentAspect> unsortedAspects = new HashSet<DeploymentAspect>();
- private List<DeploymentAspect> sortedAspects;
-
- public String getName()
- {
- return name;
- }
-
- public void setName(String name)
- {
- this.name = name;
- }
-
- public List<DeploymentAspect> getDeploymentAspects()
- {
- if (sortedAspects == null)
- {
- sortedAspects = new ArrayList<DeploymentAspect>();
- List<DeploymentAspect> allAspects = new ArrayList<DeploymentAspect>(unsortedAspects);
-
- // Add aspects with no requirements first
- Iterator<DeploymentAspect> itAll = allAspects.iterator();
- while (itAll.hasNext())
- {
- DeploymentAspect aspect = itAll.next();
- if (aspect.getRequires() == null)
- {
- sortedAspects.add(aspect);
- itAll.remove();
- }
- }
-
- // Add aspects that have requirements that already added aspects provide
- itAll = allAspects.iterator();
- while (itAll.hasNext())
- {
- DeploymentAspect aspect = itAll.next();
- int index = getAspectIndex(aspect);
- if (index != -1)
- {
- sortedAspects.add(index, aspect);
- itAll.remove();
-
- itAll = allAspects.iterator();
- }
- }
-
- // Add LAST_DEPLOYMENT_ASPECT
- itAll = allAspects.iterator();
- while (itAll.hasNext())
- {
- DeploymentAspect aspect = itAll.next();
- if (LAST_DEPLOYMENT_ASPECT.equals(aspect.getRequires()))
- {
- sortedAspects.add(aspect);
- itAll.remove();
- }
- }
-
- if (allAspects.size() != 0)
- {
- Set<String> providedConditions = new HashSet<String>();
- for (int i = 0; i < sortedAspects.size(); i++)
- {
- DeploymentAspect sortedAspect = sortedAspects.get(i);
- providedConditions.addAll(sortedAspect.getProvidesAsSet());
- }
-
- throw new IllegalStateException("Cannot add: " + allAspects + "\n provided: " + providedConditions);
- }
-
- for (DeploymentAspect aspect : sortedAspects)
- log.debug(name + ": " + aspect);
- }
-
- return sortedAspects;
- }
-
- private int getAspectIndex(DeploymentAspect aspect)
- {
- int index = -1;
- Set<String> providedConditions = new HashSet<String>();
- for (int i = 0; i < sortedAspects.size(); i++)
- {
- DeploymentAspect sortedAspect = sortedAspects.get(i);
- providedConditions.addAll(sortedAspect.getProvidesAsSet());
- if (providedConditions.containsAll(aspect.getRequiresAsSet()))
- {
- index = i + 1;
- break;
- }
- }
- return index;
- }
-
- public void addDeploymentAspect(DeploymentAspect aspect)
- {
- if (sortedAspects != null)
- throw new IllegalStateException("Cannot add deployment aspects to an already sorted list: " + sortedAspects);
-
- unsortedAspects.add(aspect);
- }
-
- /**
- * Iterate over the registered deployers calls create on each.
- * Iterate over the registered deployers again and calls start on each.
- * If start fails it automaticall calls destroy in the reverse order
- * starting with the deployer that failed
- */
- public void deploy(Deployment dep)
- {
- // create the deployment
- Set<String> providedConditions = new HashSet<String>();
- for (int i = 0; i < getDeploymentAspects().size(); i++)
- {
- DeploymentAspect aspect = getDeploymentAspects().get(i);
-
- // Check that all required aspects are met
- Set<String> requiredSet = aspect.getRequiresAsSet();
- requiredSet.remove(LAST_DEPLOYMENT_ASPECT);
- if (providedConditions.containsAll(requiredSet) == false)
- throw new IllegalStateException("Required conditions '" + aspect.getRequires() + "' not satisfied by '" + providedConditions + "' for: " + aspect);
-
- logInvocation(aspect, "Create");
- aspect.create(dep);
-
- providedConditions.addAll(aspect.getProvidesAsSet());
- }
-
- dep.setState(DeploymentState.CREATED);
-
- // start the deployment
- for (int i = 0; i < getDeploymentAspects().size(); i++)
- {
- DeploymentAspect aspect = getDeploymentAspects().get(i);
- try
- {
- logInvocation(aspect, "Start");
- aspect.start(dep);
- }
- catch (RuntimeException rte)
- {
- while (i-- >= 0)
- {
- // destroy the deployment
- failsafeDestroy(aspect, dep);
- }
- throw rte;
- }
- }
-
- dep.setState(DeploymentState.STARTED);
- }
-
- public void undeploy(Deployment dep)
- {
- // stop the deployment
- for (int i = getDeploymentAspects().size(); 0 < i; i--)
- {
- DeploymentAspect aspect = getDeploymentAspects().get(i - 1);
- failsafeStop(aspect, dep);
- }
-
- dep.setState(DeploymentState.STOPPED);
-
- // destroy the deployment
- for (int i = getDeploymentAspects().size(); 0 < i; i--)
- {
- DeploymentAspect aspect = getDeploymentAspects().get(i - 1);
- failsafeDestroy(aspect, dep);
- }
-
- dep.setState(DeploymentState.DESTROYED);
- }
-
- private void failsafeStop(DeploymentAspect aspect, Deployment dep)
- {
- try
- {
- logInvocation(aspect, "Stop");
- aspect.stop(dep);
- }
- catch (RuntimeException rte)
- {
- WSFDeploymentException.rethrow(rte);
- }
- }
-
- private void failsafeDestroy(DeploymentAspect aspect, Deployment dep)
- {
- try
- {
- logInvocation(aspect, "Destroy");
- aspect.destroy(dep);
- }
- catch (RuntimeException rte)
- {
- WSFDeploymentException.rethrow(rte);
- }
- }
-
- private void logInvocation(DeploymentAspect aspect, String method)
- {
- String name = aspect.getClass().getName();
- name = name.substring(name.lastIndexOf(".") + 1);
- log.debug(name + ":" + method);
- }
-}
Deleted: trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicEndpoint.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicEndpoint.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicEndpoint.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -1,242 +0,0 @@
-/*
- * 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.wsf.framework.deployment;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.management.ObjectName;
-
-import org.jboss.wsf.spi.binding.BindingCustomization;
-import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.deployment.LifecycleHandler;
-import org.jboss.wsf.spi.deployment.Service;
-import org.jboss.wsf.spi.deployment.WSFDeploymentException;
-import org.jboss.wsf.spi.invocation.InvocationHandler;
-import org.jboss.wsf.spi.invocation.RequestHandler;
-import org.jboss.wsf.spi.management.EndpointMetrics;
-
-/**
- * A general JAXWS endpoint.
- *
- * @author Thomas.Diesler(a)jboss.com
- * @since 20-Apr-2007
- */
-public class BasicEndpoint extends BasicExtendible implements Endpoint
-{
- private Service service;
- private ObjectName name;
- private String shortName;
- private String urlPattern;
- private String targetBean;
- private EndpointState state;
- private RequestHandler requestHandler;
- private InvocationHandler invocationHandler;
- private LifecycleHandler lifecycleHandler;
- private EndpointMetrics metrics;
- private List<BindingCustomization> bindingCustomizsations = new ArrayList<BindingCustomization>();
- private String address;
-
- BasicEndpoint()
- {
- this.state = EndpointState.UNDEFINED;
- }
-
- public Service getService()
- {
- return service;
- }
-
- public void setService(Service service)
- {
- assertEndpointSetterAccess();
- this.service = service;
- }
-
- public String getTargetBeanName()
- {
- return targetBean;
- }
-
- public void setTargetBeanName(String targetBean)
- {
- assertEndpointSetterAccess();
- this.targetBean = targetBean;
- }
-
- public String getAddress()
- {
- return this.address;
- }
-
- public void setAddress(String address)
- {
- this.address = address;
- }
-
- public Class getTargetBeanClass()
- {
- if (targetBean == null)
- throw new IllegalStateException("Target bean not set");
-
- ClassLoader classLoader = service.getDeployment().getRuntimeClassLoader();
- if (classLoader == null)
- classLoader = service.getDeployment().getInitialClassLoader();
-
- if (classLoader == null)
- throw new IllegalStateException("Deployment classloader not set");
-
- Class beanClass;
- try
- {
- beanClass = classLoader.loadClass(targetBean);
- }
- catch (ClassNotFoundException ex)
- {
- throw new WSFDeploymentException(ex);
- }
- return beanClass;
- }
-
- public ObjectName getName()
- {
- return name;
- }
-
- public void setName(ObjectName name)
- {
- assertEndpointSetterAccess();
- this.name = name;
- }
-
- public String getShortName()
- {
- return shortName;
- }
-
- public void setShortName(String shortName)
- {
- assertEndpointSetterAccess();
- this.shortName = shortName;
- }
-
- public String getURLPattern()
- {
- return urlPattern;
- }
-
- public void setURLPattern(String urlPattern)
- {
- assertEndpointSetterAccess();
- this.urlPattern = urlPattern;
- }
-
- public EndpointState getState()
- {
- return state;
- }
-
- public void setState(EndpointState state)
- {
- this.state = state;
- }
-
- public RequestHandler getRequestHandler()
- {
- return requestHandler;
- }
-
- public void setRequestHandler(RequestHandler handler)
- {
- assertEndpointSetterAccess();
- this.requestHandler = handler;
- }
-
- public LifecycleHandler getLifecycleHandler()
- {
- return lifecycleHandler;
- }
-
- public void setLifecycleHandler(LifecycleHandler handler)
- {
- assertEndpointSetterAccess();
- this.lifecycleHandler = handler;
- }
-
- public InvocationHandler getInvocationHandler()
- {
- return invocationHandler;
- }
-
- public void setInvocationHandler(InvocationHandler handler)
- {
- assertEndpointSetterAccess();
- this.invocationHandler = handler;
- }
-
- public EndpointMetrics getEndpointMetrics()
- {
- return metrics;
- }
-
- public void setEndpointMetrics(EndpointMetrics metrics)
- {
- assertEndpointSetterAccess();
- metrics.setEndpoint(this);
- this.metrics = metrics;
-
- }
-
- @Override
- public <T> T addAttachment(Class<T> clazz, Object obj)
- {
- assertEndpointSetterAccess();
- return super.addAttachment(clazz, obj);
- }
-
- @Override
- public <T> T removeAttachment(Class<T> key)
- {
- assertEndpointSetterAccess();
- return super.removeAttachment(key);
- }
-
- @Override
- public void removeProperty(String key)
- {
- assertEndpointSetterAccess();
- super.removeProperty(key);
- }
-
- @Override
- public void setProperty(String key, Object value)
- {
- assertEndpointSetterAccess();
- super.setProperty(key, value);
- }
-
- private void assertEndpointSetterAccess()
- {
- if (state == EndpointState.STARTED)
- throw new IllegalStateException("Cannot modify endpoint properties in state: " + state);
- }
-}
Deleted: trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicExtendible.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicExtendible.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicExtendible.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -1,83 +0,0 @@
-/*
- * 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.wsf.framework.deployment;
-
-//$Id: BasicDeploymentContext.java 3959 2007-07-20 14:44:19Z heiko.braun(a)jboss.com $
-
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-
-import org.jboss.wsf.spi.deployment.Extendible;
-
-/**
- * A general extendible artifact
- *
- * @author Thomas.Diesler(a)jboss.com
- * @since 20-Apr-2007
- */
-public class BasicExtendible implements Extendible
-{
- private Map<Class, Object> attachments = new HashMap<Class, Object>();
- private Map<String, Object> properties = new HashMap<String, Object>();
-
- public Collection<Object> getAttachments()
- {
- return attachments.values();
- }
-
- public <T> T getAttachment(Class<T> clazz)
- {
- return (T)attachments.get(clazz);
- }
-
- public <T> T addAttachment(Class<T> clazz, Object obj)
- {
- return (T)attachments.put(clazz, obj);
- }
-
- public <T> T removeAttachment(Class<T> key)
- {
- return (T)attachments.remove(key);
- }
-
- public Set<String> getProperties()
- {
- return properties.keySet();
- }
-
- public Object getProperty(String key)
- {
- return properties.get(key);
- }
-
- public void removeProperty(String key)
- {
- properties.remove(key);
- }
-
- public void setProperty(String key, Object value)
- {
- properties.put(key, value);
- }
-}
Deleted: trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicLifecycleHandler.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicLifecycleHandler.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicLifecycleHandler.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -1,90 +0,0 @@
-/*
- * 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.wsf.framework.deployment;
-
-//$Id$
-
-import org.jboss.logging.Logger;
-import org.jboss.wsf.spi.deployment.Endpoint.EndpointState;
-import org.jboss.wsf.spi.deployment.LifecycleHandler;
-import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.invocation.InvocationHandler;
-
-/**
- * A basic lifecycle handler
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 31-Oct-2006
- */
-public class BasicLifecycleHandler implements LifecycleHandler
-{
- // provide logging
- protected final Logger log = Logger.getLogger(getClass());
-
- public void create(Endpoint ep)
- {
- log.debug("Create: " + ep.getName());
-
- InvocationHandler invHandler = ep.getInvocationHandler();
- if (invHandler == null)
- throw new IllegalStateException("Invocation handler not available");
-
- invHandler.init(ep);
-
- ep.setState(EndpointState.CREATED);
- }
-
- public void start(Endpoint ep)
- {
- log.debug("Start: " + ep.getName());
-
- EndpointState state = ep.getState();
- if (state == EndpointState.UNDEFINED || state == EndpointState.DESTROYED)
- throw new IllegalStateException("Cannot start endpoint in state: " + state);
-
- if (ep.getEndpointMetrics() != null)
- ep.getEndpointMetrics().start();
-
- ep.setState(EndpointState.STARTED);
- }
-
- public void stop(Endpoint ep)
- {
- log.debug("Stop: " + ep.getName());
-
- EndpointState state = ep.getState();
- if (state != EndpointState.STARTED)
- throw new IllegalStateException("Cannot stop endpoint in state: " + state);
-
- if (ep.getEndpointMetrics() != null)
- ep.getEndpointMetrics().stop();
-
- ep.setState(EndpointState.STOPPED);
- }
-
- public void destroy(Endpoint ep)
- {
- log.debug("Destroy: " + ep.getName());
-
- ep.setState(EndpointState.DESTROYED);
- }
-}
Deleted: trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicService.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicService.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicService.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -1,95 +0,0 @@
-/*
- * 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.wsf.framework.deployment;
-
-// $Id$
-
-import org.jboss.wsf.spi.deployment.Service;
-import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.deployment.Endpoint;
-
-import java.util.LinkedList;
-import java.util.List;
-
-
-/**
- * A general service.
- *
- * Maintains a named set of Endpoints
- *
- * @author Thomas.Diesler(a)jboss.com
- * @since 20-Apr-2007
- */
-public class BasicService extends BasicExtendible implements Service
-{
- private Deployment dep;
- private List<Endpoint> endpoints = new LinkedList<Endpoint>();
- private String contextRoot;
-
- BasicService()
- {
- }
-
- public Deployment getDeployment()
- {
- return dep;
- }
-
- public void setDeployment(Deployment dep)
- {
- this.dep = dep;
- }
-
- public void addEndpoint(Endpoint endpoint)
- {
- endpoints.add(endpoint);
- }
-
- public List<Endpoint> getEndpoints()
- {
- return endpoints;
- }
-
- public Endpoint getEndpointByName(String shortName)
- {
- Endpoint retEndpoint = null;
- for (Endpoint ep : endpoints)
- {
- if (ep.getShortName().equals(shortName))
- {
- retEndpoint = ep;
- break;
- }
- }
- return retEndpoint;
- }
-
- public String getContextRoot()
- {
- return contextRoot;
- }
-
- public void setContextRoot(String contextRoot)
- {
- this.contextRoot = contextRoot;
- }
-}
Copied: trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/DefaultDeployment.java (from rev 4022, trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicDeployment.java)
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/DefaultDeployment.java (rev 0)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/DefaultDeployment.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -0,0 +1,121 @@
+/*
+ * 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.wsf.framework.deployment;
+
+import org.jboss.wsf.framework.DefaultExtensible;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.Service;
+
+//$Id$
+
+/**
+ * A general web service deployment dep.
+ *
+ * It has no notion of J2EE deployment packages.
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 20-Apr-2007
+ */
+public class DefaultDeployment extends DefaultExtensible implements Deployment
+{
+ // The name for this deployment
+ private String simpleName;
+ // A deployment has one service
+ private Service service;
+ // The type of this deployment
+ private DeploymentType type;
+ // The state for this deployment
+ private DeploymentState state;
+ // The deployment class loader
+ private ClassLoader initialLoader;
+ // The runtime class loader
+ private ClassLoader runtimeLoader;
+
+ DefaultDeployment(String name, ClassLoader classLoader)
+ {
+ simpleName = name;
+ state = DeploymentState.UNDEFINED;
+ initialLoader = classLoader;
+ setService(new DefaultService());
+ }
+
+ public String getSimpleName()
+ {
+ return simpleName;
+ }
+
+ public void setSimpleName(String name)
+ {
+ this.simpleName = name;
+ }
+
+ public void setInitialClassLoader(ClassLoader classLoader)
+ {
+ this.initialLoader = classLoader;
+ }
+
+ public ClassLoader getInitialClassLoader()
+ {
+ return initialLoader;
+ }
+
+ public void setRuntimeClassLoader(ClassLoader classLoader)
+ {
+ this.runtimeLoader = classLoader;
+ }
+
+ public ClassLoader getRuntimeClassLoader()
+ {
+ return runtimeLoader;
+ }
+
+ public Service getService()
+ {
+ return service;
+ }
+
+ public void setService(Service service)
+ {
+ service.setDeployment(this);
+ this.service = service;
+ }
+
+ public DeploymentState getState()
+ {
+ return state;
+ }
+
+ public void setState(DeploymentState deploymentState)
+ {
+ this.state = deploymentState;
+ }
+
+ public DeploymentType getType()
+ {
+ return type;
+ }
+
+ public void setType(DeploymentType deploymentType)
+ {
+ this.type = deploymentType;
+ }
+}
Copied: trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/DefaultDeploymentModelFactory.java (from rev 4022, trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/DeploymentModelFactoryImpl.java)
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/DefaultDeploymentModelFactory.java (rev 0)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/DefaultDeploymentModelFactory.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -0,0 +1,49 @@
+/*
+ * 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.wsf.framework.deployment;
+
+import org.jboss.wsf.spi.deployment.DeploymentModelFactory;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.Service;
+import org.jboss.wsf.spi.deployment.Endpoint;
+
+/**
+ * @author Heiko.Braun(a)jboss.com
+ * Created: Jul 18, 2007
+ */
+public class DefaultDeploymentModelFactory extends DeploymentModelFactory
+{
+ public Deployment newDeployment(String simpleName, ClassLoader initialLoader)
+ {
+ return new DefaultDeployment(simpleName, initialLoader);
+ }
+
+ public Service newService()
+ {
+ return new DefaultService();
+ }
+
+ public Endpoint newEndpoint()
+ {
+ return new DefaultEndpoint();
+ }
+}
Copied: trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/DefaultEndpoint.java (from rev 4022, trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicEndpoint.java)
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/DefaultEndpoint.java (rev 0)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/DefaultEndpoint.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -0,0 +1,243 @@
+/*
+ * 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.wsf.framework.deployment;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.management.ObjectName;
+
+import org.jboss.wsf.framework.DefaultExtensible;
+import org.jboss.wsf.spi.binding.BindingCustomization;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.deployment.LifecycleHandler;
+import org.jboss.wsf.spi.deployment.Service;
+import org.jboss.wsf.spi.deployment.WSFDeploymentException;
+import org.jboss.wsf.spi.invocation.InvocationHandler;
+import org.jboss.wsf.spi.invocation.RequestHandler;
+import org.jboss.wsf.spi.management.EndpointMetrics;
+
+/**
+ * A general JAXWS endpoint.
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 20-Apr-2007
+ */
+public class DefaultEndpoint extends DefaultExtensible implements Endpoint
+{
+ private Service service;
+ private ObjectName name;
+ private String shortName;
+ private String urlPattern;
+ private String targetBean;
+ private EndpointState state;
+ private RequestHandler requestHandler;
+ private InvocationHandler invocationHandler;
+ private LifecycleHandler lifecycleHandler;
+ private EndpointMetrics metrics;
+ private List<BindingCustomization> bindingCustomizsations = new ArrayList<BindingCustomization>();
+ private String address;
+
+ DefaultEndpoint()
+ {
+ this.state = EndpointState.UNDEFINED;
+ }
+
+ public Service getService()
+ {
+ return service;
+ }
+
+ public void setService(Service service)
+ {
+ assertEndpointSetterAccess();
+ this.service = service;
+ }
+
+ public String getTargetBeanName()
+ {
+ return targetBean;
+ }
+
+ public void setTargetBeanName(String targetBean)
+ {
+ assertEndpointSetterAccess();
+ this.targetBean = targetBean;
+ }
+
+ public String getAddress()
+ {
+ return this.address;
+ }
+
+ public void setAddress(String address)
+ {
+ this.address = address;
+ }
+
+ public Class getTargetBeanClass()
+ {
+ if (targetBean == null)
+ throw new IllegalStateException("Target bean not set");
+
+ ClassLoader classLoader = service.getDeployment().getRuntimeClassLoader();
+ if (classLoader == null)
+ classLoader = service.getDeployment().getInitialClassLoader();
+
+ if (classLoader == null)
+ throw new IllegalStateException("Deployment classloader not set");
+
+ Class beanClass;
+ try
+ {
+ beanClass = classLoader.loadClass(targetBean);
+ }
+ catch (ClassNotFoundException ex)
+ {
+ throw new WSFDeploymentException(ex);
+ }
+ return beanClass;
+ }
+
+ public ObjectName getName()
+ {
+ return name;
+ }
+
+ public void setName(ObjectName name)
+ {
+ assertEndpointSetterAccess();
+ this.name = name;
+ }
+
+ public String getShortName()
+ {
+ return shortName;
+ }
+
+ public void setShortName(String shortName)
+ {
+ assertEndpointSetterAccess();
+ this.shortName = shortName;
+ }
+
+ public String getURLPattern()
+ {
+ return urlPattern;
+ }
+
+ public void setURLPattern(String urlPattern)
+ {
+ assertEndpointSetterAccess();
+ this.urlPattern = urlPattern;
+ }
+
+ public EndpointState getState()
+ {
+ return state;
+ }
+
+ public void setState(EndpointState state)
+ {
+ this.state = state;
+ }
+
+ public RequestHandler getRequestHandler()
+ {
+ return requestHandler;
+ }
+
+ public void setRequestHandler(RequestHandler handler)
+ {
+ assertEndpointSetterAccess();
+ this.requestHandler = handler;
+ }
+
+ public LifecycleHandler getLifecycleHandler()
+ {
+ return lifecycleHandler;
+ }
+
+ public void setLifecycleHandler(LifecycleHandler handler)
+ {
+ assertEndpointSetterAccess();
+ this.lifecycleHandler = handler;
+ }
+
+ public InvocationHandler getInvocationHandler()
+ {
+ return invocationHandler;
+ }
+
+ public void setInvocationHandler(InvocationHandler handler)
+ {
+ assertEndpointSetterAccess();
+ this.invocationHandler = handler;
+ }
+
+ public EndpointMetrics getEndpointMetrics()
+ {
+ return metrics;
+ }
+
+ public void setEndpointMetrics(EndpointMetrics metrics)
+ {
+ assertEndpointSetterAccess();
+ metrics.setEndpoint(this);
+ this.metrics = metrics;
+
+ }
+
+ @Override
+ public <T> T addAttachment(Class<T> clazz, Object obj)
+ {
+ assertEndpointSetterAccess();
+ return super.addAttachment(clazz, obj);
+ }
+
+ @Override
+ public <T> T removeAttachment(Class<T> key)
+ {
+ assertEndpointSetterAccess();
+ return super.removeAttachment(key);
+ }
+
+ @Override
+ public void removeProperty(String key)
+ {
+ assertEndpointSetterAccess();
+ super.removeProperty(key);
+ }
+
+ @Override
+ public void setProperty(String key, Object value)
+ {
+ assertEndpointSetterAccess();
+ super.setProperty(key, value);
+ }
+
+ private void assertEndpointSetterAccess()
+ {
+ if (state == EndpointState.STARTED)
+ throw new IllegalStateException("Cannot modify endpoint properties in state: " + state);
+ }
+}
Copied: trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/DefaultLifecycleHandlerFactory.java (from rev 4022, trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/LifecycleHandlerFactoryImpl.java)
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/DefaultLifecycleHandlerFactory.java (rev 0)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/DefaultLifecycleHandlerFactory.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -0,0 +1,37 @@
+/*
+ * 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.wsf.framework.deployment;
+
+import org.jboss.wsf.spi.deployment.LifecycleHandlerFactory;
+import org.jboss.wsf.spi.deployment.LifecycleHandler;
+
+/**
+ * @author Heiko.Braun(a)jboss.com
+ * Created: Jul 23, 2007
+ */
+public class DefaultLifecycleHandlerFactory extends LifecycleHandlerFactory
+{
+ public LifecycleHandler newLifecylceHandler()
+ {
+ return new LifecycleHandlerImpl();
+ }
+}
Copied: trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/DefaultService.java (from rev 4022, trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicService.java)
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/DefaultService.java (rev 0)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/DefaultService.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -0,0 +1,96 @@
+/*
+ * 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.wsf.framework.deployment;
+
+// $Id$
+
+import org.jboss.wsf.framework.DefaultExtensible;
+import org.jboss.wsf.spi.deployment.Service;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.Endpoint;
+
+import java.util.LinkedList;
+import java.util.List;
+
+
+/**
+ * A general service.
+ *
+ * Maintains a named set of Endpoints
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 20-Apr-2007
+ */
+public class DefaultService extends DefaultExtensible implements Service
+{
+ private Deployment dep;
+ private List<Endpoint> endpoints = new LinkedList<Endpoint>();
+ private String contextRoot;
+
+ DefaultService()
+ {
+ }
+
+ public Deployment getDeployment()
+ {
+ return dep;
+ }
+
+ public void setDeployment(Deployment dep)
+ {
+ this.dep = dep;
+ }
+
+ public void addEndpoint(Endpoint endpoint)
+ {
+ endpoints.add(endpoint);
+ }
+
+ public List<Endpoint> getEndpoints()
+ {
+ return endpoints;
+ }
+
+ public Endpoint getEndpointByName(String shortName)
+ {
+ Endpoint retEndpoint = null;
+ for (Endpoint ep : endpoints)
+ {
+ if (ep.getShortName().equals(shortName))
+ {
+ retEndpoint = ep;
+ break;
+ }
+ }
+ return retEndpoint;
+ }
+
+ public String getContextRoot()
+ {
+ return contextRoot;
+ }
+
+ public void setContextRoot(String contextRoot)
+ {
+ this.contextRoot = contextRoot;
+ }
+}
Copied: trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/DeploymentAspectManagerImpl.java (from rev 4022, trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicDeploymentAspectManager.java)
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/DeploymentAspectManagerImpl.java (rev 0)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/DeploymentAspectManagerImpl.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -0,0 +1,258 @@
+/*
+ * 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.wsf.framework.deployment;
+
+// $Id$
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+import org.jboss.logging.Logger;
+import org.jboss.wsf.spi.deployment.Deployment.DeploymentState;
+import org.jboss.wsf.spi.deployment.DeploymentAspectManager;
+import org.jboss.wsf.spi.deployment.DeploymentAspect;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.WSFDeploymentException;
+
+/**
+ * A general service deployment manger.
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 20-Apr-2007
+ */
+public class DeploymentAspectManagerImpl implements DeploymentAspectManager
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(DeploymentAspectManagerImpl.class);
+
+ private String name;
+ private Set<DeploymentAspect> unsortedAspects = new HashSet<DeploymentAspect>();
+ private List<DeploymentAspect> sortedAspects;
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public List<DeploymentAspect> getDeploymentAspects()
+ {
+ if (sortedAspects == null)
+ {
+ sortedAspects = new ArrayList<DeploymentAspect>();
+ List<DeploymentAspect> allAspects = new ArrayList<DeploymentAspect>(unsortedAspects);
+
+ // Add aspects with no requirements first
+ Iterator<DeploymentAspect> itAll = allAspects.iterator();
+ while (itAll.hasNext())
+ {
+ DeploymentAspect aspect = itAll.next();
+ if (aspect.getRequires() == null)
+ {
+ sortedAspects.add(aspect);
+ itAll.remove();
+ }
+ }
+
+ // Add aspects that have requirements that already added aspects provide
+ itAll = allAspects.iterator();
+ while (itAll.hasNext())
+ {
+ DeploymentAspect aspect = itAll.next();
+ int index = getAspectIndex(aspect);
+ if (index != -1)
+ {
+ sortedAspects.add(index, aspect);
+ itAll.remove();
+
+ itAll = allAspects.iterator();
+ }
+ }
+
+ // Add LAST_DEPLOYMENT_ASPECT
+ itAll = allAspects.iterator();
+ while (itAll.hasNext())
+ {
+ DeploymentAspect aspect = itAll.next();
+ if (LAST_DEPLOYMENT_ASPECT.equals(aspect.getRequires()))
+ {
+ sortedAspects.add(aspect);
+ itAll.remove();
+ }
+ }
+
+ if (allAspects.size() != 0)
+ {
+ Set<String> providedConditions = new HashSet<String>();
+ for (int i = 0; i < sortedAspects.size(); i++)
+ {
+ DeploymentAspect sortedAspect = sortedAspects.get(i);
+ providedConditions.addAll(sortedAspect.getProvidesAsSet());
+ }
+
+ throw new IllegalStateException("Cannot add: " + allAspects + "\n provided: " + providedConditions);
+ }
+
+ for (DeploymentAspect aspect : sortedAspects)
+ log.debug(name + ": " + aspect);
+ }
+
+ return sortedAspects;
+ }
+
+ private int getAspectIndex(DeploymentAspect aspect)
+ {
+ int index = -1;
+ Set<String> providedConditions = new HashSet<String>();
+ for (int i = 0; i < sortedAspects.size(); i++)
+ {
+ DeploymentAspect sortedAspect = sortedAspects.get(i);
+ providedConditions.addAll(sortedAspect.getProvidesAsSet());
+ if (providedConditions.containsAll(aspect.getRequiresAsSet()))
+ {
+ index = i + 1;
+ break;
+ }
+ }
+ return index;
+ }
+
+ public void addDeploymentAspect(DeploymentAspect aspect)
+ {
+ if (sortedAspects != null)
+ throw new IllegalStateException("Cannot add deployment aspects to an already sorted list: " + sortedAspects);
+
+ unsortedAspects.add(aspect);
+ }
+
+ /**
+ * Iterate over the registered deployers calls create on each.
+ * Iterate over the registered deployers again and calls start on each.
+ * If start fails it automaticall calls destroy in the reverse order
+ * starting with the deployer that failed
+ */
+ public void deploy(Deployment dep)
+ {
+ // create the deployment
+ Set<String> providedConditions = new HashSet<String>();
+ for (int i = 0; i < getDeploymentAspects().size(); i++)
+ {
+ DeploymentAspect aspect = getDeploymentAspects().get(i);
+
+ // Check that all required aspects are met
+ Set<String> requiredSet = aspect.getRequiresAsSet();
+ requiredSet.remove(LAST_DEPLOYMENT_ASPECT);
+ if (providedConditions.containsAll(requiredSet) == false)
+ throw new IllegalStateException("Required conditions '" + aspect.getRequires() + "' not satisfied by '" + providedConditions + "' for: " + aspect);
+
+ logInvocation(aspect, "Create");
+ aspect.create(dep);
+
+ providedConditions.addAll(aspect.getProvidesAsSet());
+ }
+
+ dep.setState(DeploymentState.CREATED);
+
+ // start the deployment
+ for (int i = 0; i < getDeploymentAspects().size(); i++)
+ {
+ DeploymentAspect aspect = getDeploymentAspects().get(i);
+ try
+ {
+ logInvocation(aspect, "Start");
+ aspect.start(dep);
+ }
+ catch (RuntimeException rte)
+ {
+ while (i-- >= 0)
+ {
+ // destroy the deployment
+ failsafeDestroy(aspect, dep);
+ }
+ throw rte;
+ }
+ }
+
+ dep.setState(DeploymentState.STARTED);
+ }
+
+ public void undeploy(Deployment dep)
+ {
+ // stop the deployment
+ for (int i = getDeploymentAspects().size(); 0 < i; i--)
+ {
+ DeploymentAspect aspect = getDeploymentAspects().get(i - 1);
+ failsafeStop(aspect, dep);
+ }
+
+ dep.setState(DeploymentState.STOPPED);
+
+ // destroy the deployment
+ for (int i = getDeploymentAspects().size(); 0 < i; i--)
+ {
+ DeploymentAspect aspect = getDeploymentAspects().get(i - 1);
+ failsafeDestroy(aspect, dep);
+ }
+
+ dep.setState(DeploymentState.DESTROYED);
+ }
+
+ private void failsafeStop(DeploymentAspect aspect, Deployment dep)
+ {
+ try
+ {
+ logInvocation(aspect, "Stop");
+ aspect.stop(dep);
+ }
+ catch (RuntimeException rte)
+ {
+ WSFDeploymentException.rethrow(rte);
+ }
+ }
+
+ private void failsafeDestroy(DeploymentAspect aspect, Deployment dep)
+ {
+ try
+ {
+ logInvocation(aspect, "Destroy");
+ aspect.destroy(dep);
+ }
+ catch (RuntimeException rte)
+ {
+ WSFDeploymentException.rethrow(rte);
+ }
+ }
+
+ private void logInvocation(DeploymentAspect aspect, String method)
+ {
+ String name = aspect.getClass().getName();
+ name = name.substring(name.lastIndexOf(".") + 1);
+ log.debug(name + ":" + method);
+ }
+}
Deleted: trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/DeploymentModelFactoryImpl.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/DeploymentModelFactoryImpl.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/DeploymentModelFactoryImpl.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -1,49 +0,0 @@
-/*
- * 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.wsf.framework.deployment;
-
-import org.jboss.wsf.spi.deployment.DeploymentModelFactory;
-import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.deployment.Service;
-import org.jboss.wsf.spi.deployment.Endpoint;
-
-/**
- * @author Heiko.Braun(a)jboss.com
- * Created: Jul 18, 2007
- */
-public class DeploymentModelFactoryImpl extends DeploymentModelFactory
-{
- public Deployment createDeployment(String simpleName, ClassLoader initialLoader)
- {
- return new BasicDeployment(simpleName, initialLoader);
- }
-
- public Service createService()
- {
- return new BasicService();
- }
-
- public Endpoint createEndpoint()
- {
- return new BasicEndpoint();
- }
-}
Modified: trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/EndpointHandlerDeploymentAspect.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/EndpointHandlerDeploymentAspect.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/EndpointHandlerDeploymentAspect.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -75,12 +75,12 @@
private RequestHandler getRequestHandler(Deployment dep)
{
- return spiProvider.getSPI(RequestHandlerFactory.class).createRequestHandler();
+ return spiProvider.getSPI(RequestHandlerFactory.class).newRequestHandler();
}
private LifecycleHandler getLifecycleHandler(Deployment dep)
{
- return spiProvider.getSPI(LifecycleHandlerFactory.class).createLifecylceHandler();
+ return spiProvider.getSPI(LifecycleHandlerFactory.class).newLifecylceHandler();
}
private InvocationHandler getInvocationHandler(Endpoint ep)
@@ -100,7 +100,7 @@
}
InvocationType type = InvocationType.valueOf(key);
- InvocationHandler invocationHandler = spiProvider.getSPI(InvocationHandlerFactory.class).createInvocationHandler(type);
+ InvocationHandler invocationHandler = spiProvider.getSPI(InvocationHandlerFactory.class).newInvocationHandler(type);
return invocationHandler;
}
}
\ No newline at end of file
Modified: trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/EndpointRegistryDeploymentAspect.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/EndpointRegistryDeploymentAspect.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/EndpointRegistryDeploymentAspect.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -40,7 +40,7 @@
public void create(Deployment dep)
{
SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- EndpointRegistry registry = spiProvider.getSPI(EndpointRegistryFactory.class).createEndpointRegistry();
+ EndpointRegistry registry = spiProvider.getSPI(EndpointRegistryFactory.class).getEndpointRegistry();
for (Endpoint ep : dep.getService().getEndpoints())
{
registry.register(ep);
@@ -50,7 +50,7 @@
public void destroy(Deployment dep)
{
SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- EndpointRegistry registry = spiProvider.getSPI(EndpointRegistryFactory.class).createEndpointRegistry();
+ EndpointRegistry registry = spiProvider.getSPI(EndpointRegistryFactory.class).getEndpointRegistry();
for (Endpoint ep : dep.getService().getEndpoints())
{
Deleted: trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/LifecycleHandlerFactoryImpl.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/LifecycleHandlerFactoryImpl.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/LifecycleHandlerFactoryImpl.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -1,37 +0,0 @@
-/*
- * 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.wsf.framework.deployment;
-
-import org.jboss.wsf.spi.deployment.LifecycleHandlerFactory;
-import org.jboss.wsf.spi.deployment.LifecycleHandler;
-
-/**
- * @author Heiko.Braun(a)jboss.com
- * Created: Jul 23, 2007
- */
-public class LifecycleHandlerFactoryImpl extends LifecycleHandlerFactory
-{
- public LifecycleHandler createLifecylceHandler()
- {
- return new BasicLifecycleHandler();
- }
-}
Copied: trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/LifecycleHandlerImpl.java (from rev 4022, trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicLifecycleHandler.java)
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/LifecycleHandlerImpl.java (rev 0)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/LifecycleHandlerImpl.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -0,0 +1,90 @@
+/*
+ * 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.wsf.framework.deployment;
+
+//$Id$
+
+import org.jboss.logging.Logger;
+import org.jboss.wsf.spi.deployment.Endpoint.EndpointState;
+import org.jboss.wsf.spi.deployment.LifecycleHandler;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.invocation.InvocationHandler;
+
+/**
+ * A basic lifecycle handler
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 31-Oct-2006
+ */
+public class LifecycleHandlerImpl implements LifecycleHandler
+{
+ // provide logging
+ protected final Logger log = Logger.getLogger(getClass());
+
+ public void create(Endpoint ep)
+ {
+ log.debug("Create: " + ep.getName());
+
+ InvocationHandler invHandler = ep.getInvocationHandler();
+ if (invHandler == null)
+ throw new IllegalStateException("Invocation handler not available");
+
+ invHandler.init(ep);
+
+ ep.setState(EndpointState.CREATED);
+ }
+
+ public void start(Endpoint ep)
+ {
+ log.debug("Start: " + ep.getName());
+
+ EndpointState state = ep.getState();
+ if (state == EndpointState.UNDEFINED || state == EndpointState.DESTROYED)
+ throw new IllegalStateException("Cannot start endpoint in state: " + state);
+
+ if (ep.getEndpointMetrics() != null)
+ ep.getEndpointMetrics().start();
+
+ ep.setState(EndpointState.STARTED);
+ }
+
+ public void stop(Endpoint ep)
+ {
+ log.debug("Stop: " + ep.getName());
+
+ EndpointState state = ep.getState();
+ if (state != EndpointState.STARTED)
+ throw new IllegalStateException("Cannot stop endpoint in state: " + state);
+
+ if (ep.getEndpointMetrics() != null)
+ ep.getEndpointMetrics().stop();
+
+ ep.setState(EndpointState.STOPPED);
+ }
+
+ public void destroy(Endpoint ep)
+ {
+ log.debug("Destroy: " + ep.getName());
+
+ ep.setState(EndpointState.DESTROYED);
+ }
+}
Added: trunk/integration/spi/src/main/java/org/jboss/wsf/framework/http/DefaultHttpContext.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/framework/http/DefaultHttpContext.java (rev 0)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/framework/http/DefaultHttpContext.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -0,0 +1,56 @@
+/*
+ * 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.wsf.framework.http;
+
+//$Id: HttpContext.java 1757 2006-12-22 15:40:24Z thomas.diesler(a)jboss.com $
+
+import org.jboss.wsf.framework.DefaultExtensible;
+import org.jboss.wsf.spi.http.HttpContext;
+import org.jboss.wsf.spi.http.HttpServer;
+
+/**
+ * An abstract HTTP Context
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 07-Jul-2006
+ */
+public class DefaultHttpContext extends DefaultExtensible implements HttpContext
+{
+ private HttpServer server;
+ private String contextRoot;
+
+ DefaultHttpContext(HttpServer server, String contextRoot)
+ {
+ this.server = server;
+ this.contextRoot = contextRoot;
+ }
+
+ public HttpServer getHttpServer()
+ {
+ return server;
+ }
+
+ public String getContextRoot()
+ {
+ return contextRoot;
+ }
+}
Added: trunk/integration/spi/src/main/java/org/jboss/wsf/framework/http/DefaultHttpContextFactory.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/framework/http/DefaultHttpContextFactory.java (rev 0)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/framework/http/DefaultHttpContextFactory.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -0,0 +1,42 @@
+/*
+ * 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.wsf.framework.http;
+
+//$Id: HttpContext.java 1757 2006-12-22 15:40:24Z thomas.diesler(a)jboss.com $
+
+import org.jboss.wsf.spi.SPIView;
+import org.jboss.wsf.spi.http.HttpContext;
+import org.jboss.wsf.spi.http.HttpServer;
+
+/**
+ * A factory for an abstract HTTP Context
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 07-Jul-2006
+ */
+public class DefaultHttpContextFactory implements SPIView
+{
+ public HttpContext newHttpContext(HttpServer server, String contextRoot)
+ {
+ return new DefaultHttpContext(server, contextRoot);
+ }
+}
Copied: trunk/integration/spi/src/main/java/org/jboss/wsf/framework/invocation/DefaultResourceInjectorFactory.java (from rev 4022, trunk/integration/spi/src/main/java/org/jboss/wsf/framework/invocation/ResourceInjectorFactoryImpl.java)
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/framework/invocation/DefaultResourceInjectorFactory.java (rev 0)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/framework/invocation/DefaultResourceInjectorFactory.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -0,0 +1,37 @@
+/*
+ * 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.wsf.framework.invocation;
+
+import org.jboss.wsf.spi.invocation.ResourceInjectorFactory;
+import org.jboss.wsf.spi.invocation.ResourceInjector;
+
+/**
+ * @author Heiko.Braun(a)jboss.com
+ * Created: Jul 19, 2007
+ */
+public class DefaultResourceInjectorFactory extends ResourceInjectorFactory
+{
+ public ResourceInjector newResourceInjector()
+ {
+ return new WebServiceContextInjector();
+ }
+}
Deleted: trunk/integration/spi/src/main/java/org/jboss/wsf/framework/invocation/ResourceInjectorFactoryImpl.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/framework/invocation/ResourceInjectorFactoryImpl.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/framework/invocation/ResourceInjectorFactoryImpl.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -1,37 +0,0 @@
-/*
- * 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.wsf.framework.invocation;
-
-import org.jboss.wsf.spi.invocation.ResourceInjectorFactory;
-import org.jboss.wsf.spi.invocation.ResourceInjector;
-
-/**
- * @author Heiko.Braun(a)jboss.com
- * Created: Jul 19, 2007
- */
-public class ResourceInjectorFactoryImpl extends ResourceInjectorFactory
-{
- public ResourceInjector createResourceInjector()
- {
- return new WebServiceContextInjector();
- }
-}
Deleted: trunk/integration/spi/src/main/java/org/jboss/wsf/framework/management/BasicEndpointMetrics.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/framework/management/BasicEndpointMetrics.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/framework/management/BasicEndpointMetrics.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -1,172 +0,0 @@
-/*
- * 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.wsf.framework.management;
-
-// $Id$
-
-import java.util.Date;
-
-import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.management.EndpointMetrics;
-
-/**
- * Service Endpoint Metrics
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 14-Dec-2005
- */
-public class BasicEndpointMetrics implements EndpointMetrics
-{
- private Endpoint endpoint;
-
- private Date startTime;
- private Date stopTime;
- private long requestCount;
- private long responseCount;
- private long faultCount;
- private long maxProcessingTime;
- private long minProcessingTime;
- private long avgProcessingTime;
- private long totalProcessingTime;
-
- public Endpoint getEndpoint()
- {
- return endpoint;
- }
-
- public void setEndpoint(Endpoint endpoint)
- {
- this.endpoint = endpoint;
- }
-
- public void start()
- {
- startTime = new Date();
- stopTime = null;
- requestCount = 0;
- responseCount = 0;
- faultCount = 0;
- maxProcessingTime = 0;
- minProcessingTime = 0;
- avgProcessingTime = 0;
- totalProcessingTime = 0;
- }
-
- public void stop()
- {
- stopTime = new Date();
- }
-
- public long processRequestMessage()
- {
- requestCount++;
- return System.currentTimeMillis();
- }
-
- public void processResponseMessage(long beginTime)
- {
- responseCount++;
- processAnyMessage(beginTime);
- }
-
- public void processFaultMessage(long beginTime)
- {
- faultCount++;
- processAnyMessage(beginTime);
- }
-
- private void processAnyMessage(long beginTime)
- {
- if (beginTime > 0)
- {
- long procTime = System.currentTimeMillis() - beginTime;
-
- if (minProcessingTime == 0)
- minProcessingTime = procTime;
-
- maxProcessingTime = Math.max(maxProcessingTime, procTime);
- minProcessingTime = Math.min(minProcessingTime, procTime);
- totalProcessingTime = totalProcessingTime + procTime;
- avgProcessingTime = totalProcessingTime / (responseCount + faultCount);
- }
- }
-
- public Date getStartTime()
- {
- return startTime;
- }
-
- public Date getStopTime()
- {
- return stopTime;
- }
-
- public long getMinProcessingTime()
- {
- return minProcessingTime;
- }
-
- public long getMaxProcessingTime()
- {
- return maxProcessingTime;
- }
-
- public long getAverageProcessingTime()
- {
- return avgProcessingTime;
- }
-
- public long getTotalProcessingTime()
- {
- return totalProcessingTime;
- }
-
- public long getRequestCount()
- {
- return requestCount;
- }
-
- public long getFaultCount()
- {
- return faultCount;
- }
-
- public long getResponseCount()
- {
- return responseCount;
- }
-
- public String toString()
- {
- StringBuilder buffer = new StringBuilder("\nEndpoint Metrics: " + endpoint.getName());
- buffer.append("\n startTime=" + startTime);
- buffer.append("\n stopTime=" + stopTime);
- buffer.append("\n requestCount=" + requestCount);
- buffer.append("\n responseCount=" + responseCount);
- buffer.append("\n faultCount=" + faultCount);
- buffer.append("\n maxProcessingTime=" + maxProcessingTime);
- buffer.append("\n minProcessingTime=" + minProcessingTime);
- buffer.append("\n avgProcessingTime=" + avgProcessingTime);
- buffer.append("\n totalProcessingTime=" + totalProcessingTime);
- return buffer.toString();
- }
-}
Deleted: trunk/integration/spi/src/main/java/org/jboss/wsf/framework/management/BasicServerConfig.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/framework/management/BasicServerConfig.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/framework/management/BasicServerConfig.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -1,240 +0,0 @@
-/*
- * 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.wsf.framework.management;
-
-//$Id$
-
-import java.io.File;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.util.Iterator;
-import java.util.Set;
-
-import javax.management.AttributeNotFoundException;
-import javax.management.JMException;
-import javax.management.MBeanServer;
-import javax.management.MBeanServerFactory;
-import javax.management.ObjectName;
-
-import org.jboss.logging.Logger;
-import org.jboss.wsf.common.ObjectNameFactory;
-
-/**
- * Basic implementation of a ServerConfig
- *
- * @author Thomas.Diesler(a)jboss.org
- * @author darran.lofthouse(a)jboss.com
- * @since 08-May-2006
- */
-public class BasicServerConfig implements BasicServerConfigMBean
-{
- private static final Logger log = Logger.getLogger(BasicServerConfig.class);
-
- // The webservice host name that will be used when updating the wsdl
- private String webServiceHost = UNDEFINED_HOSTNAME;
- // The webservice port that will be used when updating the wsdl
- private int webServicePort;
- // The webservice port that will be used when updating the wsdl
- private int webServiceSecurePort;
- // Whether we should always modify the soap address to the deployed endpoing location
- private boolean modifySOAPAddress;
- // The MBeanServer
- private MBeanServer server;
-
- public String getWebServiceHost()
- {
- return webServiceHost;
- }
-
- public void setWebServiceHost(String host) throws UnknownHostException
- {
- if (host == null || host.trim().length() == 0)
- {
- log.debug("Using undefined host: " + UNDEFINED_HOSTNAME);
- host = UNDEFINED_HOSTNAME;
- }
- if ("0.0.0.0".equals(host))
- {
- InetAddress localHost = InetAddress.getLocalHost();
- log.debug("Using local host: " + localHost.getHostName());
- host = localHost.getHostName();
- }
- this.webServiceHost = host;
- }
-
- public void setWebServicePort(int port)
- {
- this.webServicePort = port;
- }
-
- public void setWebServiceSecurePort(int port)
- {
- this.webServiceSecurePort = port;
- }
-
- public boolean isModifySOAPAddress()
- {
- return modifySOAPAddress;
- }
-
- public void setModifySOAPAddress(boolean modify)
- {
- this.modifySOAPAddress = modify;
- }
-
- public File getServerTempDir()
- {
- try
- {
- MBeanServer server = getMBeanServer();
- ObjectName oname = ObjectNameFactory.create("jboss.system:type=ServerConfig");
- File tmpdir = (File)server.getAttribute(oname, "ServerTempDir");
- return tmpdir;
- }
- catch (JMException e)
- {
- return null;
- }
- }
-
- public File getServerDataDir()
- {
- try
- {
- MBeanServer server = getMBeanServer();
- ObjectName oname = ObjectNameFactory.create("jboss.system:type=ServerConfig");
- File tmpdir = (File)server.getAttribute(oname, "ServerDataDir");
- return tmpdir;
- }
- catch (JMException e)
- {
- return null;
- }
- }
-
- public int getWebServicePort()
- {
- if (webServicePort <= 0)
- webServicePort = getConnectorPort("HTTP/1.1", false);
-
- int localPort = webServicePort;
- if (localPort <= 0)
- {
- // Do not initialize webServicePort with the default, the connector port may become available later
- log.warn("Unable to calculate 'WebServicePort', using default '8080'");
- localPort = 8080;
- }
-
- return localPort;
- }
-
- public int getWebServiceSecurePort()
- {
- if (webServiceSecurePort <= 0)
- webServiceSecurePort = getConnectorPort("HTTP/1.1", true);
-
- int localPort = webServiceSecurePort;
- if (localPort <= 0)
- {
- // Do not initialize webServiceSecurePort with the default, the connector port may become available later
- log.warn("Unable to calculate 'WebServiceSecurePort', using default '8443'");
- localPort = 8443;
- }
-
- return localPort;
- }
-
- public void create() throws Exception
- {
- MBeanServer server = getMBeanServer();
- if (server != null)
- {
- server.registerMBean(this, BasicServerConfigMBean.OBJECT_NAME);
- }
- }
-
- public void destroy() throws Exception
- {
- MBeanServer server = getMBeanServer();
- if (server != null)
- {
- server.unregisterMBean(BasicServerConfigMBean.OBJECT_NAME);
- }
- }
-
- private int getConnectorPort(final String protocol, final boolean secure)
- {
- int port = -1;
-
- try
- {
- MBeanServer server = getMBeanServer();
- ObjectName connectors = new ObjectName("jboss.web:type=Connector,*");
-
- Set connectorNames = server.queryNames(connectors, null);
- for (Object current : connectorNames)
- {
- ObjectName currentName = (ObjectName)current;
-
- try
- {
- int connectorPort = (Integer)server.getAttribute(currentName, "port");
- boolean connectorSecure = (Boolean)server.getAttribute(currentName, "secure");
- String connectorProtocol = (String)server.getAttribute(currentName, "protocol");
-
- if (protocol.equals(connectorProtocol) && secure == connectorSecure)
- {
- if (port > -1)
- {
- log.warn("Found multiple connectors for protocol='" + protocol + "' and secure='" + secure + "', using first port found '" + port + "'");
- }
- else
- {
- port = connectorPort;
- }
- }
- }
- catch (AttributeNotFoundException ignored)
- {
- }
- }
-
- return port;
- }
- catch (JMException e)
- {
- return -1;
- }
- }
-
- private MBeanServer getMBeanServer()
- {
- if (server == null)
- {
- for (Iterator i = MBeanServerFactory.findMBeanServer(null).iterator(); i.hasNext();)
- {
- server = (MBeanServer)i.next();
- }
- }
- return server;
- }
-}
Deleted: trunk/integration/spi/src/main/java/org/jboss/wsf/framework/management/BasicServerConfigMBean.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/framework/management/BasicServerConfigMBean.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/framework/management/BasicServerConfigMBean.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -1,33 +0,0 @@
-/*
- * 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.wsf.framework.management;
-
-import javax.management.ObjectName;
-
-import org.jboss.wsf.spi.management.ServerConfig;
-import org.jboss.wsf.common.ObjectNameFactory;
-
-public interface BasicServerConfigMBean extends ServerConfig
-{
- /** The object name in the MBean server */
- ObjectName OBJECT_NAME = ObjectNameFactory.create("jboss.ws:service=ServerConfig");
-}
Modified: trunk/integration/spi/src/main/java/org/jboss/wsf/framework/management/ContextServlet.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/framework/management/ContextServlet.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/framework/management/ContextServlet.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -60,7 +60,7 @@
{
super.init(config);
SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- epRegistry = spiProvider.getSPI(EndpointRegistryFactory.class).createEndpointRegistry();
+ epRegistry = spiProvider.getSPI(EndpointRegistryFactory.class).getEndpointRegistry();
}
/** Process GET requests.
Copied: trunk/integration/spi/src/main/java/org/jboss/wsf/framework/management/DefaultServerConfig.java (from rev 4022, trunk/integration/spi/src/main/java/org/jboss/wsf/framework/management/BasicServerConfig.java)
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/framework/management/DefaultServerConfig.java (rev 0)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/framework/management/DefaultServerConfig.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -0,0 +1,240 @@
+/*
+ * 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.wsf.framework.management;
+
+//$Id$
+
+import java.io.File;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.util.Iterator;
+import java.util.Set;
+
+import javax.management.AttributeNotFoundException;
+import javax.management.JMException;
+import javax.management.MBeanServer;
+import javax.management.MBeanServerFactory;
+import javax.management.ObjectName;
+
+import org.jboss.logging.Logger;
+import org.jboss.wsf.common.ObjectNameFactory;
+
+/**
+ * Basic implementation of a ServerConfig
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @author darran.lofthouse(a)jboss.com
+ * @since 08-May-2006
+ */
+public class DefaultServerConfig implements DefaultServerConfigMBean
+{
+ private static final Logger log = Logger.getLogger(DefaultServerConfig.class);
+
+ // The webservice host name that will be used when updating the wsdl
+ private String webServiceHost = UNDEFINED_HOSTNAME;
+ // The webservice port that will be used when updating the wsdl
+ private int webServicePort;
+ // The webservice port that will be used when updating the wsdl
+ private int webServiceSecurePort;
+ // Whether we should always modify the soap address to the deployed endpoing location
+ private boolean modifySOAPAddress;
+ // The MBeanServer
+ private MBeanServer server;
+
+ public String getWebServiceHost()
+ {
+ return webServiceHost;
+ }
+
+ public void setWebServiceHost(String host) throws UnknownHostException
+ {
+ if (host == null || host.trim().length() == 0)
+ {
+ log.debug("Using undefined host: " + UNDEFINED_HOSTNAME);
+ host = UNDEFINED_HOSTNAME;
+ }
+ if ("0.0.0.0".equals(host))
+ {
+ InetAddress localHost = InetAddress.getLocalHost();
+ log.debug("Using local host: " + localHost.getHostName());
+ host = localHost.getHostName();
+ }
+ this.webServiceHost = host;
+ }
+
+ public void setWebServicePort(int port)
+ {
+ this.webServicePort = port;
+ }
+
+ public void setWebServiceSecurePort(int port)
+ {
+ this.webServiceSecurePort = port;
+ }
+
+ public boolean isModifySOAPAddress()
+ {
+ return modifySOAPAddress;
+ }
+
+ public void setModifySOAPAddress(boolean modify)
+ {
+ this.modifySOAPAddress = modify;
+ }
+
+ public File getServerTempDir()
+ {
+ try
+ {
+ MBeanServer server = getMBeanServer();
+ ObjectName oname = ObjectNameFactory.create("jboss.system:type=ServerConfig");
+ File tmpdir = (File)server.getAttribute(oname, "ServerTempDir");
+ return tmpdir;
+ }
+ catch (JMException e)
+ {
+ return null;
+ }
+ }
+
+ public File getServerDataDir()
+ {
+ try
+ {
+ MBeanServer server = getMBeanServer();
+ ObjectName oname = ObjectNameFactory.create("jboss.system:type=ServerConfig");
+ File tmpdir = (File)server.getAttribute(oname, "ServerDataDir");
+ return tmpdir;
+ }
+ catch (JMException e)
+ {
+ return null;
+ }
+ }
+
+ public int getWebServicePort()
+ {
+ if (webServicePort <= 0)
+ webServicePort = getConnectorPort("HTTP/1.1", false);
+
+ int localPort = webServicePort;
+ if (localPort <= 0)
+ {
+ // Do not initialize webServicePort with the default, the connector port may become available later
+ log.warn("Unable to calculate 'WebServicePort', using default '8080'");
+ localPort = 8080;
+ }
+
+ return localPort;
+ }
+
+ public int getWebServiceSecurePort()
+ {
+ if (webServiceSecurePort <= 0)
+ webServiceSecurePort = getConnectorPort("HTTP/1.1", true);
+
+ int localPort = webServiceSecurePort;
+ if (localPort <= 0)
+ {
+ // Do not initialize webServiceSecurePort with the default, the connector port may become available later
+ log.warn("Unable to calculate 'WebServiceSecurePort', using default '8443'");
+ localPort = 8443;
+ }
+
+ return localPort;
+ }
+
+ public void create() throws Exception
+ {
+ MBeanServer server = getMBeanServer();
+ if (server != null)
+ {
+ server.registerMBean(this, DefaultServerConfigMBean.OBJECT_NAME);
+ }
+ }
+
+ public void destroy() throws Exception
+ {
+ MBeanServer server = getMBeanServer();
+ if (server != null)
+ {
+ server.unregisterMBean(DefaultServerConfigMBean.OBJECT_NAME);
+ }
+ }
+
+ private int getConnectorPort(final String protocol, final boolean secure)
+ {
+ int port = -1;
+
+ try
+ {
+ MBeanServer server = getMBeanServer();
+ ObjectName connectors = new ObjectName("jboss.web:type=Connector,*");
+
+ Set connectorNames = server.queryNames(connectors, null);
+ for (Object current : connectorNames)
+ {
+ ObjectName currentName = (ObjectName)current;
+
+ try
+ {
+ int connectorPort = (Integer)server.getAttribute(currentName, "port");
+ boolean connectorSecure = (Boolean)server.getAttribute(currentName, "secure");
+ String connectorProtocol = (String)server.getAttribute(currentName, "protocol");
+
+ if (protocol.equals(connectorProtocol) && secure == connectorSecure)
+ {
+ if (port > -1)
+ {
+ log.warn("Found multiple connectors for protocol='" + protocol + "' and secure='" + secure + "', using first port found '" + port + "'");
+ }
+ else
+ {
+ port = connectorPort;
+ }
+ }
+ }
+ catch (AttributeNotFoundException ignored)
+ {
+ }
+ }
+
+ return port;
+ }
+ catch (JMException e)
+ {
+ return -1;
+ }
+ }
+
+ private MBeanServer getMBeanServer()
+ {
+ if (server == null)
+ {
+ for (Iterator i = MBeanServerFactory.findMBeanServer(null).iterator(); i.hasNext();)
+ {
+ server = (MBeanServer)i.next();
+ }
+ }
+ return server;
+ }
+}
Copied: trunk/integration/spi/src/main/java/org/jboss/wsf/framework/management/DefaultServerConfigMBean.java (from rev 4022, trunk/integration/spi/src/main/java/org/jboss/wsf/framework/management/BasicServerConfigMBean.java)
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/framework/management/DefaultServerConfigMBean.java (rev 0)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/framework/management/DefaultServerConfigMBean.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -0,0 +1,33 @@
+/*
+ * 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.wsf.framework.management;
+
+import javax.management.ObjectName;
+
+import org.jboss.wsf.spi.management.ServerConfig;
+import org.jboss.wsf.common.ObjectNameFactory;
+
+public interface DefaultServerConfigMBean extends ServerConfig
+{
+ /** The object name in the MBean server */
+ ObjectName OBJECT_NAME = ObjectNameFactory.create("jboss.ws:service=ServerConfig");
+}
Copied: trunk/integration/spi/src/main/java/org/jboss/wsf/framework/management/EndpointMetricsImpl.java (from rev 4022, trunk/integration/spi/src/main/java/org/jboss/wsf/framework/management/BasicEndpointMetrics.java)
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/framework/management/EndpointMetricsImpl.java (rev 0)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/framework/management/EndpointMetricsImpl.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -0,0 +1,172 @@
+/*
+ * 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.wsf.framework.management;
+
+// $Id$
+
+import java.util.Date;
+
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.management.EndpointMetrics;
+
+/**
+ * Service Endpoint Metrics
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 14-Dec-2005
+ */
+public class EndpointMetricsImpl implements EndpointMetrics
+{
+ private Endpoint endpoint;
+
+ private Date startTime;
+ private Date stopTime;
+ private long requestCount;
+ private long responseCount;
+ private long faultCount;
+ private long maxProcessingTime;
+ private long minProcessingTime;
+ private long avgProcessingTime;
+ private long totalProcessingTime;
+
+ public Endpoint getEndpoint()
+ {
+ return endpoint;
+ }
+
+ public void setEndpoint(Endpoint endpoint)
+ {
+ this.endpoint = endpoint;
+ }
+
+ public void start()
+ {
+ startTime = new Date();
+ stopTime = null;
+ requestCount = 0;
+ responseCount = 0;
+ faultCount = 0;
+ maxProcessingTime = 0;
+ minProcessingTime = 0;
+ avgProcessingTime = 0;
+ totalProcessingTime = 0;
+ }
+
+ public void stop()
+ {
+ stopTime = new Date();
+ }
+
+ public long processRequestMessage()
+ {
+ requestCount++;
+ return System.currentTimeMillis();
+ }
+
+ public void processResponseMessage(long beginTime)
+ {
+ responseCount++;
+ processAnyMessage(beginTime);
+ }
+
+ public void processFaultMessage(long beginTime)
+ {
+ faultCount++;
+ processAnyMessage(beginTime);
+ }
+
+ private void processAnyMessage(long beginTime)
+ {
+ if (beginTime > 0)
+ {
+ long procTime = System.currentTimeMillis() - beginTime;
+
+ if (minProcessingTime == 0)
+ minProcessingTime = procTime;
+
+ maxProcessingTime = Math.max(maxProcessingTime, procTime);
+ minProcessingTime = Math.min(minProcessingTime, procTime);
+ totalProcessingTime = totalProcessingTime + procTime;
+ avgProcessingTime = totalProcessingTime / (responseCount + faultCount);
+ }
+ }
+
+ public Date getStartTime()
+ {
+ return startTime;
+ }
+
+ public Date getStopTime()
+ {
+ return stopTime;
+ }
+
+ public long getMinProcessingTime()
+ {
+ return minProcessingTime;
+ }
+
+ public long getMaxProcessingTime()
+ {
+ return maxProcessingTime;
+ }
+
+ public long getAverageProcessingTime()
+ {
+ return avgProcessingTime;
+ }
+
+ public long getTotalProcessingTime()
+ {
+ return totalProcessingTime;
+ }
+
+ public long getRequestCount()
+ {
+ return requestCount;
+ }
+
+ public long getFaultCount()
+ {
+ return faultCount;
+ }
+
+ public long getResponseCount()
+ {
+ return responseCount;
+ }
+
+ public String toString()
+ {
+ StringBuilder buffer = new StringBuilder("\nEndpoint Metrics: " + endpoint.getName());
+ buffer.append("\n startTime=" + startTime);
+ buffer.append("\n stopTime=" + stopTime);
+ buffer.append("\n requestCount=" + requestCount);
+ buffer.append("\n responseCount=" + responseCount);
+ buffer.append("\n faultCount=" + faultCount);
+ buffer.append("\n maxProcessingTime=" + maxProcessingTime);
+ buffer.append("\n minProcessingTime=" + minProcessingTime);
+ buffer.append("\n avgProcessingTime=" + avgProcessingTime);
+ buffer.append("\n totalProcessingTime=" + totalProcessingTime);
+ return buffer.toString();
+ }
+}
Modified: trunk/integration/spi/src/main/java/org/jboss/wsf/framework/transport/jms/JMSTransportSupport.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/framework/transport/jms/JMSTransportSupport.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/framework/transport/jms/JMSTransportSupport.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -126,7 +126,7 @@
protected void processSOAPMessage(String fromName, InputStream inputStream, OutputStream outStream) throws SOAPException, IOException, RemoteException
{
SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- EndpointRegistry epRegistry = spiProvider.getSPI(EndpointRegistryFactory.class).createEndpointRegistry();
+ EndpointRegistry epRegistry = spiProvider.getSPI(EndpointRegistryFactory.class).getEndpointRegistry();
Endpoint endpoint = getEndpointForDestination(epRegistry, fromName);
Added: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/Extensible.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/Extensible.java (rev 0)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/Extensible.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -0,0 +1,64 @@
+/*
+ * 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.wsf.spi;
+
+//$Id: Deployment.java 3999 2007-07-26 11:33:20Z thomas.diesler(a)jboss.com $
+
+import java.util.Collection;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * A general extendible artifact
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 20-Apr-2007
+ */
+public interface Extensible
+{
+ /** Add arbitrary attachments */
+ <T> T addAttachment(Class<T> key, Object value);
+
+ /** Get arbitrary attachments */
+ <T> Collection<T> getAttachments();
+
+ /** Get an arbitrary attachment */
+ <T> T getAttachment(Class<T> key);
+
+ /** Remove arbitrary attachments */
+ <T> T removeAttachment(Class<T> key);
+
+ /** Get an property */
+ Object getProperty(String key);
+
+ /** Set a property */
+ void setProperty(String key, Object value);
+
+ /** Remove a property */
+ void removeProperty(String key);
+
+ /** Get the set of property names */
+ Set<String> getProperties();
+
+ /** Set a map of properties */
+ void setProperties(Map<String, Object> props);
+}
\ No newline at end of file
Modified: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/Deployment.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/Deployment.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/Deployment.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -21,6 +21,8 @@
*/
package org.jboss.wsf.spi.deployment;
+import org.jboss.wsf.spi.Extensible;
+
// $Id$
/**
@@ -31,7 +33,7 @@
* @author Thomas.Diesler(a)jboss.com
* @since 20-Apr-2007
*/
-public interface Deployment extends Extendible
+public interface Deployment extends Extensible
{
public enum DeploymentType
{
Deleted: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/DeploymentAspectManagerFactory.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/DeploymentAspectManagerFactory.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/DeploymentAspectManagerFactory.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -1,35 +0,0 @@
-/*
- * 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.wsf.spi.deployment;
-
-import org.jboss.wsf.spi.SPIView;
-
-/**
- * Creates DeploymentAspectManager's by {@link org.jboss.wsf.spi.deployment.Deployment.DeploymentType}
- *
- * @author Heiko.Braun(a)jboss.com
- * Created: Jul 20, 2007
- */
-public abstract class DeploymentAspectManagerFactory implements SPIView
-{
- public abstract DeploymentAspectManager createDeploymentAspectManager(Deployment.DeploymentType deploymentType);
-}
Added: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/DeploymentAspectManagerFactory.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/DeploymentAspectManagerFactory.java (rev 0)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/DeploymentAspectManagerFactory.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -0,0 +1,35 @@
+/*
+ * 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.wsf.spi.deployment;
+
+import org.jboss.wsf.spi.SPIView;
+
+/**
+ * Creates DeploymentAspectManager's by {@link org.jboss.wsf.spi.deployment.Deployment.DeploymentType}
+ *
+ * @author Heiko.Braun(a)jboss.com
+ * Created: Jul 20, 2007
+ */
+public abstract class DeploymentAspectManagerFactory implements SPIView
+{
+ public abstract DeploymentAspectManager getDeploymentAspectManager(Deployment.DeploymentType deploymentType);
+}
Modified: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/DeploymentModelFactory.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/DeploymentModelFactory.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/DeploymentModelFactory.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -29,8 +29,8 @@
*/
public abstract class DeploymentModelFactory implements SPIView
{
- public abstract Deployment createDeployment(String simpleName, ClassLoader initialLoader);
- public abstract Service createService();
- public abstract Endpoint createEndpoint();
+ public abstract Deployment newDeployment(String simpleName, ClassLoader initialLoader);
+ public abstract Service newService();
+ public abstract Endpoint newEndpoint();
}
Modified: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/Endpoint.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/Endpoint.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/Endpoint.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -25,6 +25,7 @@
import javax.management.ObjectName;
+import org.jboss.wsf.spi.Extensible;
import org.jboss.wsf.spi.invocation.InvocationHandler;
import org.jboss.wsf.spi.invocation.RequestHandler;
import org.jboss.wsf.spi.management.EndpointMetrics;
@@ -35,7 +36,7 @@
* @author Thomas.Diesler(a)jboss.com
* @since 20-Apr-2007
*/
-public interface Endpoint extends Extendible
+public interface Endpoint extends Extensible
{
static final String SEPID_DOMAIN = "jboss.ws";
static final String SEPID_PROPERTY_CONTEXT = "context";
Deleted: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/Extendible.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/Extendible.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/Extendible.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -1,60 +0,0 @@
-/*
- * 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.wsf.spi.deployment;
-
-//$Id: Deployment.java 3999 2007-07-26 11:33:20Z thomas.diesler(a)jboss.com $
-
-import java.util.Collection;
-import java.util.Set;
-
-/**
- * A general extendible artifact
- *
- * @author Thomas.Diesler(a)jboss.com
- * @since 20-Apr-2007
- */
-public interface Extendible
-{
- /** Add arbitrary attachments */
- <T> T addAttachment(Class<T> key, Object value);
-
- /** Get arbitrary attachments */
- <T> Collection<T> getAttachments();
-
- /** Get an arbitrary attachment */
- <T> T getAttachment(Class<T> key);
-
- /** Remove arbitrary attachments */
- <T> T removeAttachment(Class<T> key);
-
- /** Get an context property */
- Object getProperty(String key);
-
- /** Set an context property */
- void setProperty(String key, Object value);
-
- /** Remove an context property */
- void removeProperty(String key);
-
- /** Get the set of context property names */
- Set<String> getProperties();
-}
\ No newline at end of file
Modified: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/LifecycleHandlerFactory.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/LifecycleHandlerFactory.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/LifecycleHandlerFactory.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -29,5 +29,5 @@
*/
public abstract class LifecycleHandlerFactory implements SPIView
{
- public abstract LifecycleHandler createLifecylceHandler();
+ public abstract LifecycleHandler newLifecylceHandler();
}
Modified: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/Service.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/Service.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/Service.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -25,6 +25,8 @@
import java.util.List;
+import org.jboss.wsf.spi.Extensible;
+
/**
* A general service deployment.
*
@@ -33,7 +35,7 @@
* @author Thomas.Diesler(a)jboss.com
* @since 20-Apr-2007
*/
-public interface Service extends Extendible
+public interface Service extends Extensible
{
/** Get the deployment this service belongs to */
Deployment getDeployment();
Added: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/http/HttpContext.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/http/HttpContext.java (rev 0)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/http/HttpContext.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -0,0 +1,39 @@
+/*
+ * 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.wsf.spi.http;
+
+import org.jboss.wsf.spi.Extensible;
+
+// $Id: HttpContext.java 1757 2006-12-22 15:40:24Z thomas.diesler(a)jboss.com $
+
+/**
+ * An abstract HTTP Context
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 07-Jul-2006
+ */
+public interface HttpContext extends Extensible
+{
+ HttpServer getHttpServer();
+
+ String getContextRoot();
+}
Added: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/http/HttpContextFactory.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/http/HttpContextFactory.java (rev 0)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/http/HttpContextFactory.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -0,0 +1,37 @@
+/*
+ * 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.wsf.spi.http;
+
+import org.jboss.wsf.spi.SPIView;
+
+// $Id: HttpContext.java 1757 2006-12-22 15:40:24Z thomas.diesler(a)jboss.com $
+
+/**
+ * A factory for an abstract HTTP Context
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 07-Jul-2006
+ */
+public abstract class HttpContextFactory implements SPIView
+{
+ public abstract HttpContext newHttpContext(HttpServer server, String contextRoot);
+}
Added: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/http/HttpServer.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/http/HttpServer.java (rev 0)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/http/HttpServer.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -0,0 +1,49 @@
+/*
+ * 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.wsf.spi.http;
+
+// $Id: HttpServer.java 3959 2007-07-20 14:44:19Z heiko.braun(a)jboss.com $
+
+import javax.xml.ws.Endpoint;
+
+import org.jboss.wsf.spi.Extensible;
+
+/**
+ * An abstract HTTP Server
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 07-Jul-2006
+ */
+public interface HttpServer extends Extensible
+{
+ /** Start an instance of this HTTP server */
+ void start();
+
+ /** Create an HTTP context */
+ HttpContext createContext(String string);
+
+ /** Publish an JAXWS endpoint to the HTTP server */
+ void publish(HttpContext context, Endpoint endpoint);
+
+ /** Destroys an JAXWS endpoint on the HTTP server */
+ void destroy(HttpContext context, Endpoint endpoint);
+}
Added: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/http/HttpServerFactory.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/http/HttpServerFactory.java (rev 0)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/http/HttpServerFactory.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -0,0 +1,37 @@
+/*
+ * 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.wsf.spi.http;
+
+import org.jboss.wsf.spi.SPIView;
+
+// $Id: HttpContext.java 1757 2006-12-22 15:40:24Z thomas.diesler(a)jboss.com $
+
+/**
+ * A factory for an abstract HTTP server
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 07-Jul-2006
+ */
+public abstract class HttpServerFactory implements SPIView
+{
+ public abstract HttpServer newHttpServer();
+}
Modified: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/DefaultInvocationHandlerJAXWS.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/DefaultInvocationHandlerJAXWS.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/DefaultInvocationHandlerJAXWS.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -80,7 +80,7 @@
{
SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
ResourceInjectorFactory factory = spiProvider.getSPI(ResourceInjectorFactory.class);
- ResourceInjector injector = factory.createResourceInjector();
+ ResourceInjector injector = factory.newResourceInjector();
injector.inject(targetBean, wsContext);
}
Modified: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/InvocationHandlerFactory.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/InvocationHandlerFactory.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/InvocationHandlerFactory.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -33,5 +33,5 @@
*/
public abstract class InvocationHandlerFactory implements SPIView
{
- public abstract InvocationHandler createInvocationHandler(InvocationType type);
+ public abstract InvocationHandler newInvocationHandler(InvocationType type);
}
Modified: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/RequestHandlerFactory.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/RequestHandlerFactory.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/RequestHandlerFactory.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -29,5 +29,5 @@
*/
public abstract class RequestHandlerFactory implements SPIView
{
- public abstract RequestHandler createRequestHandler();
+ public abstract RequestHandler newRequestHandler();
}
Modified: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/ResourceInjectorFactory.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/ResourceInjectorFactory.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/ResourceInjectorFactory.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -29,5 +29,5 @@
*/
public abstract class ResourceInjectorFactory implements SPIView
{
- public abstract ResourceInjector createResourceInjector();
+ public abstract ResourceInjector newResourceInjector();
}
Modified: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/SecurityAdaptorFactory.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/SecurityAdaptorFactory.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/SecurityAdaptorFactory.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -35,5 +35,5 @@
*/
public abstract class SecurityAdaptorFactory implements SPIView
{
- public abstract SecurityAdaptor createSecurityAdapter();
+ public abstract SecurityAdaptor newSecurityAdapter();
}
Modified: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/WebServiceContextFactory.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/WebServiceContextFactory.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/WebServiceContextFactory.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -31,5 +31,5 @@
*/
public abstract class WebServiceContextFactory implements SPIView
{
- public abstract ExtendableWebServiceContext createWebServiceContext(InvocationType type, MessageContext messageContext);
+ public abstract ExtendableWebServiceContext newWebServiceContext(InvocationType type, MessageContext messageContext);
}
Deleted: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/management/EndpointRegistryFactory.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/management/EndpointRegistryFactory.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/management/EndpointRegistryFactory.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -1,41 +0,0 @@
-/*
- * 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.wsf.spi.management;
-
-//$Id$
-
-import org.jboss.kernel.Kernel;
-import org.jboss.kernel.spi.registry.KernelRegistry;
-import org.jboss.kernel.spi.registry.KernelRegistryEntry;
-import org.jboss.ws.integration.KernelLocator;
-import org.jboss.wsf.spi.SPIView;
-
-/**
- * Get the endpoint registry from the kernel
- *
- * @author Thomas.Diesler(a)jboss.com
- * @since 20-Apr-2007
- */
-public abstract class EndpointRegistryFactory implements SPIView
-{
- public abstract EndpointRegistry createEndpointRegistry();
-}
Added: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/management/EndpointRegistryFactory.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/management/EndpointRegistryFactory.java (rev 0)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/management/EndpointRegistryFactory.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -0,0 +1,37 @@
+/*
+ * 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.wsf.spi.management;
+
+//$Id$
+
+import org.jboss.wsf.spi.SPIView;
+
+/**
+ * Get the endpoint registry from the kernel
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 20-Apr-2007
+ */
+public abstract class EndpointRegistryFactory implements SPIView
+{
+ public abstract EndpointRegistry getEndpointRegistry();
+}
Deleted: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/management/ServerConfigFactory.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/management/ServerConfigFactory.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/management/ServerConfigFactory.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -1,37 +0,0 @@
-/*
- * 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.wsf.spi.management;
-
-//$Id$
-
-import org.jboss.wsf.spi.SPIView;
-
-/**
- * Factory to container independent config
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 08-May-2006
- */
-public abstract class ServerConfigFactory implements SPIView
-{
- public abstract ServerConfig getServerConfig();
-}
Added: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/management/ServerConfigFactory.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/management/ServerConfigFactory.java (rev 0)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/management/ServerConfigFactory.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -0,0 +1,37 @@
+/*
+ * 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.wsf.spi.management;
+
+//$Id$
+
+import org.jboss.wsf.spi.SPIView;
+
+/**
+ * Factory to container independent config
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 08-May-2006
+ */
+public abstract class ServerConfigFactory implements SPIView
+{
+ public abstract ServerConfig getServerConfig();
+}
Modified: trunk/integration/spi/src/main/java/org/jboss/wsf/test/TestDeployerJBoss.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/test/TestDeployerJBoss.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/test/TestDeployerJBoss.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -81,7 +81,7 @@
Object prevPassword = null;
SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- SecurityAdaptor securityAdaptor = spiProvider.getSPI(SecurityAdaptorFactory.class).createSecurityAdapter();
+ SecurityAdaptor securityAdaptor = spiProvider.getSPI(SecurityAdaptorFactory.class).newSecurityAdapter();
if (username != null || password != null)
{
prevUsername = securityAdaptor.getPrincipal();
Deleted: trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/EndpointRegistryFactoryImpl.java
===================================================================
--- trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/EndpointRegistryFactoryImpl.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/EndpointRegistryFactoryImpl.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -1,45 +0,0 @@
-/*
- * 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.wsf.stack.sunri;
-
-import org.jboss.wsf.spi.management.EndpointRegistryFactory;
-import org.jboss.wsf.spi.management.EndpointRegistry;
-import org.jboss.wsf.common.KernelAwareSPIFactory;
-
-/**
- * An EndpointRegistryFactory implementation that retrieves
- * the registry from MC kernel.
- *
- * @see EndpointRegistry.BEAN_NAME
- *
- * @author Heiko.Braun(a)jboss.com
- * Created: Jul 23, 2007
- */
-public class EndpointRegistryFactoryImpl extends EndpointRegistryFactory
-{
- public EndpointRegistry createEndpointRegistry()
- {
- return new KernelAwareSPIFactory().getKernelProvidedSPI(
- EndpointRegistry.BEAN_NAME, EndpointRegistry.class
- );
- }
-}
Added: trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/EndpointRegistryFactoryImpl.java
===================================================================
--- trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/EndpointRegistryFactoryImpl.java (rev 0)
+++ trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/EndpointRegistryFactoryImpl.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -0,0 +1,45 @@
+/*
+ * 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.wsf.stack.sunri;
+
+import org.jboss.wsf.spi.management.EndpointRegistryFactory;
+import org.jboss.wsf.spi.management.EndpointRegistry;
+import org.jboss.wsf.common.KernelAwareSPIFactory;
+
+/**
+ * An EndpointRegistryFactory implementation that retrieves
+ * the registry from MC kernel.
+ *
+ * @see EndpointRegistry.BEAN_NAME
+ *
+ * @author Heiko.Braun(a)jboss.com
+ * Created: Jul 23, 2007
+ */
+public class EndpointRegistryFactoryImpl extends EndpointRegistryFactory
+{
+ public EndpointRegistry getEndpointRegistry()
+ {
+ return new KernelAwareSPIFactory().getKernelProvidedSPI(
+ EndpointRegistry.BEAN_NAME, EndpointRegistry.class
+ );
+ }
+}
Modified: trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/EndpointServlet.java
===================================================================
--- trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/EndpointServlet.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/EndpointServlet.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -53,7 +53,7 @@
{
super.init(servletConfig);
SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- epRegistry = spiProvider.getSPI(EndpointRegistryFactory.class).createEndpointRegistry();
+ epRegistry = spiProvider.getSPI(EndpointRegistryFactory.class).getEndpointRegistry();
}
public void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
Modified: trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/RequestHandlerFactoryImpl.java
===================================================================
--- trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/RequestHandlerFactoryImpl.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/RequestHandlerFactoryImpl.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -30,7 +30,7 @@
*/
public class RequestHandlerFactoryImpl extends RequestHandlerFactory
{
- public RequestHandler createRequestHandler()
+ public RequestHandler newRequestHandler()
{
return new RequestHandlerImpl();
}
Modified: trunk/integration/sunri/src/main/resources/jbossws-sunri-config.xml
===================================================================
--- trunk/integration/sunri/src/main/resources/jbossws-sunri-config.xml 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/integration/sunri/src/main/resources/jbossws-sunri-config.xml 2007-07-28 07:14:06 UTC (rev 4023)
@@ -1,6 +1,6 @@
<!-- An abstraction of server configuration aspects. -->
- <bean name="WSServerConfig" class="org.jboss.wsf.framework.management.BasicServerConfig">
+ <bean name="WSServerConfig" class="org.jboss.wsf.framework.management.DefaultServerConfig">
<!--
The WSDL, that is a required deployment artifact for an endpoint, has a <soap:address>
element which points to the location of the endpoint. JBoss supports rewriting of that SOAP address.
Deleted: trunk/integration/sunri/src/main/resources/jbossws-sunri.jar/META-INF/services/org.jboss.wsf.spi.deployment.LifecycleHandlerFactory
===================================================================
--- trunk/integration/sunri/src/main/resources/jbossws-sunri.jar/META-INF/services/org.jboss.wsf.spi.deployment.LifecycleHandlerFactory 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/integration/sunri/src/main/resources/jbossws-sunri.jar/META-INF/services/org.jboss.wsf.spi.deployment.LifecycleHandlerFactory 2007-07-28 07:14:06 UTC (rev 4023)
@@ -1 +0,0 @@
-org.jboss.wsf.framework.deployment.LifecycleHandlerFactoryImpl
\ No newline at end of file
Modified: trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/CXFServletExt.java
===================================================================
--- trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/CXFServletExt.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/CXFServletExt.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -75,7 +75,7 @@
// Init the Endpoint
SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- epRegistry = spiProvider.getSPI(EndpointRegistryFactory.class).createEndpointRegistry();
+ epRegistry = spiProvider.getSPI(EndpointRegistryFactory.class).getEndpointRegistry();
ServletContext context = servletConfig.getServletContext();
String contextPath = context.getContextPath();
Deleted: trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/EndpointRegistryFactoryImpl.java
===================================================================
--- trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/EndpointRegistryFactoryImpl.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/EndpointRegistryFactoryImpl.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -1,45 +0,0 @@
-/*
- * 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.wsf.stack.xfire;
-
-import org.jboss.wsf.spi.management.EndpointRegistryFactory;
-import org.jboss.wsf.spi.management.EndpointRegistry;
-import org.jboss.wsf.common.KernelAwareSPIFactory;
-
-/**
- * An EndpointRegistryFactory implementation that retrieves
- * the registry from MC kernel.
- *
- * @see EndpointRegistry.BEAN_NAME
- *
- * @author Heiko.Braun(a)jboss.com
- * Created: Jul 23, 2007
- */
-public class EndpointRegistryFactoryImpl extends EndpointRegistryFactory
-{
- public EndpointRegistry createEndpointRegistry()
- {
- return new KernelAwareSPIFactory().getKernelProvidedSPI(
- EndpointRegistry.BEAN_NAME, EndpointRegistry.class
- );
- }
-}
Added: trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/EndpointRegistryFactoryImpl.java
===================================================================
--- trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/EndpointRegistryFactoryImpl.java (rev 0)
+++ trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/EndpointRegistryFactoryImpl.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -0,0 +1,45 @@
+/*
+ * 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.wsf.stack.xfire;
+
+import org.jboss.wsf.spi.management.EndpointRegistryFactory;
+import org.jboss.wsf.spi.management.EndpointRegistry;
+import org.jboss.wsf.common.KernelAwareSPIFactory;
+
+/**
+ * An EndpointRegistryFactory implementation that retrieves
+ * the registry from MC kernel.
+ *
+ * @see EndpointRegistry.BEAN_NAME
+ *
+ * @author Heiko.Braun(a)jboss.com
+ * Created: Jul 23, 2007
+ */
+public class EndpointRegistryFactoryImpl extends EndpointRegistryFactory
+{
+ public EndpointRegistry getEndpointRegistry()
+ {
+ return new KernelAwareSPIFactory().getKernelProvidedSPI(
+ EndpointRegistry.BEAN_NAME, EndpointRegistry.class
+ );
+ }
+}
Modified: trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/EndpointServlet.java
===================================================================
--- trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/EndpointServlet.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/EndpointServlet.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -53,7 +53,7 @@
{
super.init(servletConfig);
SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- epRegistry = spiProvider.getSPI(EndpointRegistryFactory.class).createEndpointRegistry();
+ epRegistry = spiProvider.getSPI(EndpointRegistryFactory.class).getEndpointRegistry();
}
public void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
Modified: trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/RequestHandlerFactoryImpl.java
===================================================================
--- trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/RequestHandlerFactoryImpl.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/RequestHandlerFactoryImpl.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -30,7 +30,7 @@
*/
public class RequestHandlerFactoryImpl extends RequestHandlerFactory
{
- public RequestHandler createRequestHandler()
+ public RequestHandler newRequestHandler()
{
return new RequestHandlerImpl();
}
Modified: trunk/integration/xfire/src/main/resources/jbossws-xfire-config.xml
===================================================================
--- trunk/integration/xfire/src/main/resources/jbossws-xfire-config.xml 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/integration/xfire/src/main/resources/jbossws-xfire-config.xml 2007-07-28 07:14:06 UTC (rev 4023)
@@ -1,6 +1,6 @@
<!-- An abstraction of server configuration aspects. -->
- <bean name="WSServerConfig" class="org.jboss.wsf.framework.management.BasicServerConfig">
+ <bean name="WSServerConfig" class="org.jboss.wsf.framework.management.DefaultServerConfig">
<!--
The WSDL, that is a required deployment artifact for an endpoint, has a <soap:address>
element which points to the location of the endpoint. JBoss supports rewriting of that SOAP address.
Deleted: trunk/integration/xfire/src/main/resources/jbossws-xfire.jar/META-INF/services/org.jboss.wsf.spi.deployment.LifecycleHandlerFactory
===================================================================
--- trunk/integration/xfire/src/main/resources/jbossws-xfire.jar/META-INF/services/org.jboss.wsf.spi.deployment.LifecycleHandlerFactory 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/integration/xfire/src/main/resources/jbossws-xfire.jar/META-INF/services/org.jboss.wsf.spi.deployment.LifecycleHandlerFactory 2007-07-28 07:14:06 UTC (rev 4023)
@@ -1 +0,0 @@
-org.jboss.wsf.framework.deployment.LifecycleHandlerFactoryImpl
\ No newline at end of file
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceObjectFactoryJAXRPC.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceObjectFactoryJAXRPC.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceObjectFactoryJAXRPC.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -186,7 +186,7 @@
try
{
SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- EndpointRegistry epRegistry = spiProvider.getSPI(EndpointRegistryFactory.class).createEndpointRegistry();
+ EndpointRegistry epRegistry = spiProvider.getSPI(EndpointRegistryFactory.class).getEndpointRegistry();
Endpoint endpoint = epRegistry.resolve( new PortComponentResolver(pcLink) );
if (endpoint == null)
throw new WSException("Cannot resolve port-component-link: " + pcLink);
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/spi/EndpointImpl.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/spi/EndpointImpl.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/spi/EndpointImpl.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -41,10 +41,12 @@
import org.jboss.logging.Logger;
import org.jboss.util.NotImplementedException;
import org.jboss.ws.core.jaxws.binding.BindingProviderImpl;
-import org.jboss.ws.core.server.HttpContext;
-import org.jboss.ws.core.server.HttpServer;
import org.jboss.wsf.spi.SPIProvider;
import org.jboss.wsf.spi.SPIProviderResolver;
+import org.jboss.wsf.spi.http.HttpContext;
+import org.jboss.wsf.spi.http.HttpContextFactory;
+import org.jboss.wsf.spi.http.HttpServer;
+import org.jboss.wsf.spi.http.HttpServerFactory;
import org.jboss.wsf.spi.management.ServerConfigFactory;
import org.w3c.dom.Element;
@@ -120,7 +122,8 @@
checkPublishEndpointPermission();
// Create and start the HTTP server
- HttpServer httpServer = HttpServer.create();
+ SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
+ HttpServer httpServer = spiProvider.getSPI(HttpServerFactory.class).newHttpServer();
httpServer.setProperties(properties);
httpServer.start();
Deleted: trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/HttpContext.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/HttpContext.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/HttpContext.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -1,52 +0,0 @@
-/*
- * 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.ws.core.server;
-
-// $Id$
-
-/**
- * An abstract HTTP Context
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 07-Jul-2006
- */
-public class HttpContext
-{
- private HttpServer server;
- private String contextRoot;
-
- public HttpContext(HttpServer server, String contextRoot)
- {
- this.server = server;
- this.contextRoot = contextRoot;
- }
-
- public HttpServer getHttpServer()
- {
- return server;
- }
-
- public String getContextRoot()
- {
- return contextRoot;
- }
-}
Deleted: trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/HttpServer.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/HttpServer.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/HttpServer.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -1,92 +0,0 @@
-/*
- * 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.ws.core.server;
-
-// $Id$
-
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.xml.ws.Endpoint;
-
-import org.jboss.wsf.common.ServiceLoader;
-
-/**
- * An abstract HTTP Server
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 07-Jul-2006
- */
-public abstract class HttpServer
-{
- public static String HTTP_SERVER_PROPERTY = HttpServer.class.getName();
-
- private Map<String, Object> properties = new HashMap<String, Object>();
-
- // Hide constructor
- protected HttpServer ()
- {
- }
-
- /**
- * Create an instance of an HTTP server.
- * The discovery algorithm is described in {@link FactoryFinder.find(String,String)}
- */
- public static HttpServer create()
- {
- HttpServer server = (HttpServer) ServiceLoader.loadService(HTTP_SERVER_PROPERTY, null);
- return server;
- }
-
- /** Start an instance of this HTTP server */
- public abstract void start();
-
- /** Create an HTTP context */
- public abstract HttpContext createContext(String string);
-
- /** Publish an JAXWS endpoint to the HTTP server */
- public abstract void publish(HttpContext context, Endpoint endpoint);
-
- /** Destroys an JAXWS endpoint on the HTTP server */
- public abstract void destroy(HttpContext context, Endpoint endpoint);
-
- public Map<String, Object> getProperties()
- {
- return properties;
- }
-
- public void setProperties(Map<String, Object> map)
- {
- properties = map;
- }
-
- public void setProperty(String key, Object value)
- {
- properties.put(key, value);
- }
-
- public Object getProperty(String key)
- {
- return properties.get(key);
- }
-
-}
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/PortComponentLinkServlet.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/PortComponentLinkServlet.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/PortComponentLinkServlet.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -67,7 +67,7 @@
{
super.init(config);
SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- epRegistry = spiProvider.getSPI(EndpointRegistryFactory.class).createEndpointRegistry();
+ epRegistry = spiProvider.getSPI(EndpointRegistryFactory.class).getEndpointRegistry();
}
/**
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -279,7 +279,7 @@
if (msgContext.get(MessageContext.SERVLET_REQUEST) != null)
{
SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- wsContext = spiProvider.getSPI(WebServiceContextFactory.class).createWebServiceContext(
+ wsContext = spiProvider.getSPI(WebServiceContextFactory.class).newWebServiceContext(
InvocationType.JAXWS_JSE, (SOAPMessageContextJAXWS)msgContext
);
}
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/security/ReceiveUsernameOperation.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/security/ReceiveUsernameOperation.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/security/ReceiveUsernameOperation.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -47,7 +47,7 @@
{
UsernameToken user = (UsernameToken)token;
SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- SecurityAdaptor securityAdaptor = spiProvider.getSPI(SecurityAdaptorFactory.class).createSecurityAdapter();
+ SecurityAdaptor securityAdaptor = spiProvider.getSPI(SecurityAdaptorFactory.class).newSecurityAdapter();
securityAdaptor.setPrincipal(new SimplePrincipal(user.getUsername()));
securityAdaptor.setCredential(user.getPassword());
}
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/JBossWSProviderImpl.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/JBossWSProviderImpl.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/JBossWSProviderImpl.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -98,7 +98,7 @@
SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
DeploymentModelFactory factory = spiProvider.getSPI(DeploymentModelFactory.class);
- Deployment dep = factory.createDeployment("wsprovide-deployment", loader);
+ Deployment dep = factory.newDeployment("wsprovide-deployment", loader);
builder.buildWebServiceMetaData(dep, umd, endpointClass, null);
try
Modified: trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/addressrewrite/AddressRewriteTestCase.java
===================================================================
--- trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/addressrewrite/AddressRewriteTestCase.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/addressrewrite/AddressRewriteTestCase.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -29,7 +29,7 @@
import javax.xml.rpc.Service;
import javax.xml.rpc.ServiceFactory;
-import org.jboss.wsf.framework.management.BasicServerConfigMBean;
+import org.jboss.wsf.framework.management.DefaultServerConfigMBean;
import org.jboss.wsf.test.JBossWSTest;
/**
@@ -51,14 +51,14 @@
{
wsdlLocation = "http://" + getServerHost() + ":8080/jaxrpc-addressrewrite/ValidURL?wsdl";
wsdlLocationSec = "http://" + getServerHost() + ":8080/jaxrpc-addressrewrite-sec/ValidURL?wsdl";
- modifySOAPAddress = (Boolean)getServer().getAttribute(BasicServerConfigMBean.OBJECT_NAME, "ModifySOAPAddress");
- webServiceHost = (String)getServer().getAttribute(BasicServerConfigMBean.OBJECT_NAME, "WebServiceHost");
+ modifySOAPAddress = (Boolean)getServer().getAttribute(DefaultServerConfigMBean.OBJECT_NAME, "ModifySOAPAddress");
+ webServiceHost = (String)getServer().getAttribute(DefaultServerConfigMBean.OBJECT_NAME, "WebServiceHost");
}
public void tearDown() throws Exception
{
Attribute attr = new Attribute("ModifySOAPAddress", modifySOAPAddress);
- getServer().setAttribute(BasicServerConfigMBean.OBJECT_NAME, attr);
+ getServer().setAttribute(DefaultServerConfigMBean.OBJECT_NAME, attr);
}
public void testRewrite() throws Exception
@@ -158,6 +158,6 @@
private void setModifySOAPAddress(Boolean value) throws Exception
{
Attribute attr = new Attribute("ModifySOAPAddress", value);
- getServer().setAttribute(BasicServerConfigMBean.OBJECT_NAME, attr);
+ getServer().setAttribute(DefaultServerConfigMBean.OBJECT_NAME, attr);
}
}
\ No newline at end of file
Modified: trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/binding/BindingCustomizationTestCase.java
===================================================================
--- trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/binding/BindingCustomizationTestCase.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/binding/BindingCustomizationTestCase.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -49,7 +49,7 @@
public void testCustomizationWriteAccess() throws Exception
{
- Endpoint endpoint = deploymentModelFactory.createEndpoint();
+ Endpoint endpoint = deploymentModelFactory.newEndpoint();
JAXBBindingCustomization jaxbCustomization = new JAXBBindingCustomization();
jaxbCustomization.put(JAXBBindingCustomization.DEFAULT_NAMESPACE_REMAP, "http://org.jboss.bindingCustomization");
endpoint.addAttachment(BindingCustomization.class, jaxbCustomization);
@@ -70,7 +70,7 @@
public void testCustomizationReadAccess() throws Exception
{
- Endpoint endpoint = deploymentModelFactory.createEndpoint();
+ Endpoint endpoint = deploymentModelFactory.newEndpoint();
JAXBBindingCustomization jaxbCustomization = new JAXBBindingCustomization();
jaxbCustomization.put(JAXBBindingCustomization.DEFAULT_NAMESPACE_REMAP, "http://org.jboss.bindingCustomization");
endpoint.addAttachment(BindingCustomization.class, jaxbCustomization);
Modified: trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/endpoint/EndpointServlet.java
===================================================================
--- trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/endpoint/EndpointServlet.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/endpoint/EndpointServlet.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -35,8 +35,11 @@
import javax.xml.ws.Service;
import javax.xml.ws.soap.SOAPBinding;
-import org.jboss.ws.core.server.HttpContext;
-import org.jboss.ws.core.server.HttpServer;
+import org.jboss.wsf.spi.SPIProvider;
+import org.jboss.wsf.spi.SPIProviderResolver;
+import org.jboss.wsf.spi.http.HttpContext;
+import org.jboss.wsf.spi.http.HttpServer;
+import org.jboss.wsf.spi.http.HttpServerFactory;
/**
* Test Endpoint deployment
@@ -58,11 +61,12 @@
endpoint = Endpoint.create(SOAPBinding.SOAP11HTTP_BINDING, epImpl);
// Create and start the HTTP server
- HttpServer server = HttpServer.create();
- server.start();
+ SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
+ HttpServer httpServer = spiProvider.getSPI(HttpServerFactory.class).newHttpServer();
+ httpServer.start();
// Create the context and publish the endpoint
- HttpContext context = server.createContext("/jaxws-endpoint");
+ HttpContext context = httpServer.createContext("/jaxws-endpoint");
endpoint.publish(context);
}
Modified: trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/endpoint/EndpointTestCase.java
===================================================================
--- trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/endpoint/EndpointTestCase.java 2007-07-27 13:54:43 UTC (rev 4022)
+++ trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/endpoint/EndpointTestCase.java 2007-07-28 07:14:06 UTC (rev 4023)
@@ -80,7 +80,7 @@
if (isTargetJBoss50())
{
System.out.println("FIXME: [JBWEB-68] Servlet.init(ServletConfig) not called");
- return;
+ //return;
}
URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-endpoint?wsdl");
@@ -94,7 +94,7 @@
if (isTargetJBoss50())
{
System.out.println("FIXME: [JBWEB-68] Servlet.init(ServletConfig) not called");
- return;
+ //return;
}
// Create the port
@@ -113,7 +113,7 @@
if (isTargetJBoss50())
{
System.out.println("FIXME: [JBWEB-68] Servlet.init(ServletConfig) not called");
- return;
+ //return;
}
URL url = new URL("http://" + getServerHost() + ":8080/jaxws-endpoint-servlet?param=hello-world");
[View Less]
17 years, 8 months
JBossWS SVN: r4022 - in trunk: integration/jboss40/src/main/resources and 12 other directories.
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2007-07-27 09:54:43 -0400 (Fri, 27 Jul 2007)
New Revision: 4022
Added:
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/DefaultWebAppDesciptorModifierImpl.java
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/RewriteResults.java
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/WebAppDesciptorModifier.java
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/…
[View More]WebXMLRewriterImpl.java
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/DefaultWebAppDesciptorModifierImpl.java
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/RewriteResults.java
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/WebAppDesciptorModifier.java
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/WebXMLRewriterImpl.java
Removed:
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/DefaultWebAppDesciptorModifierImpl.java
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/RewriteResults.java
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/WebAppDesciptorModifier.java
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/WebAppDesciptorModifierImpl.java
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/WebXMLRewriter.java
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/WebXMLRewriterImpl.java
trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/WebAppDesciptorModifierImpl.java
trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/WebAppDesciptorModifierImpl.java
Modified:
trunk/JBossWS-Trunk.iws
trunk/integration/jboss40/src/main/resources/jbossws-jboss40-config.xml
trunk/integration/jboss42/int-42.iml
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ContainerMetaDataAdapter.java
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ModifyWebMetaDataDeploymentAspect.java
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/WebAppDeploymentAspect.java
trunk/integration/jboss42/src/main/resources/jbossws-jboss42-config.xml
trunk/integration/jboss50/int-50.iml
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ContainerMetaDataAdapter.java
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ModifyWebMetaDataDeploymentAspect.java
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/WebAppDeploymentAspect.java
trunk/integration/jboss50/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-beans.xml
trunk/integration/native/src/main/resources/jbossws-native-config.xml
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/WebAppGeneratorDeploymentAspect.java
trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/SunJaxwsDeploymentAspect.java
trunk/integration/sunri/src/main/resources/jbossws-sunri-config.xml
trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/DescriptorDeploymentAspect.java
trunk/integration/xfire/src/main/resources/jbossws-xfire-config.xml
Log:
Eleminate WebXMLRewriter dependency. It's kept redundant in container intergation packages now
Modified: trunk/JBossWS-Trunk.iws
===================================================================
--- trunk/JBossWS-Trunk.iws 2007-07-27 09:55:27 UTC (rev 4021)
+++ trunk/JBossWS-Trunk.iws 2007-07-27 13:54:43 UTC (rev 4022)
@@ -20,20 +20,41 @@
</component>
<component name="ChangeListManager">
<list default="true" name="Default" comment="">
+ <change type="DELETED" beforePath="$PROJECT_DIR$/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/WebAppDesciptorModifierImpl.java" afterPath="" />
+ <change type="DELETED" beforePath="$PROJECT_DIR$/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/DefaultWebAppDesciptorModifierImpl.java" afterPath="" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/integration/jboss50/int-50.iml" afterPath="$PROJECT_DIR$/integration/jboss50/int-50.iml" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/integration/sunri/int-sunri.iml" afterPath="$PROJECT_DIR$/integration/sunri/int-sunri.iml" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/integration/jboss42/int-42.iml" afterPath="$PROJECT_DIR$/integration/jboss42/int-42.iml" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/integration/native/int-native.iml" afterPath="$PROJECT_DIR$/integration/native/int-native.iml" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/integration/xfire/int-xfire.iml" afterPath="$PROJECT_DIR$/integration/xfire/int-xfire.iml" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/integration/spi/src/main/java/org/jboss/wsf/framework/DefaultSPIProviderResolver.java" afterPath="$PROJECT_DIR$/integration/spi/src/main/java/org/jboss/wsf/framework/DefaultSPIProviderResolver.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/testsuite/testsuite.iml" afterPath="$PROJECT_DIR$/testsuite/testsuite.iml" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/integration/jboss40/int-40.iml" afterPath="$PROJECT_DIR$/integration/jboss40/int-40.iml" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/build/build.iml" afterPath="$PROJECT_DIR$/build/build.iml" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/build/eclipse/jbossws.userlibraries" afterPath="$PROJECT_DIR$/build/eclipse/jbossws.userlibraries" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/integration/jboss42/src/main/resources/jbossws-jboss42-config.xml" afterPath="$PROJECT_DIR$/integration/jboss42/src/main/resources/jbossws-jboss42-config.xml" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/WebXMLRewriterImpl.java" />
+ <change type="DELETED" beforePath="$PROJECT_DIR$/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/WebXMLRewriterImpl.java" afterPath="" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/integration/jboss40/src/main/resources/jbossws-jboss40-config.xml" afterPath="$PROJECT_DIR$/integration/jboss40/src/main/resources/jbossws-jboss40-config.xml" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/WebXMLRewriterImpl.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/DescriptorDeploymentAspect.java" afterPath="$PROJECT_DIR$/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/DescriptorDeploymentAspect.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/WebAppDeploymentAspect.java" afterPath="$PROJECT_DIR$/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/WebAppDeploymentAspect.java" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/WebAppDesciptorModifier.java" />
+ <change type="DELETED" beforePath="$PROJECT_DIR$/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/WebAppDesciptorModifierImpl.java" afterPath="" />
+ <change type="DELETED" beforePath="$PROJECT_DIR$/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/RewriteResults.java" afterPath="" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/RewriteResults.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/integration/xfire/src/main/resources/jbossws-xfire-config.xml" afterPath="$PROJECT_DIR$/integration/xfire/src/main/resources/jbossws-xfire-config.xml" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/WebAppDesciptorModifier.java" />
<change type="MODIFICATION" beforePath="/home/hbraun/dev/prj/jbossas/trunk/server/src/resources/dtd/jboss-web_4_0.dtd" afterPath="/home/hbraun/dev/prj/jbossas/trunk/server/src/resources/dtd/jboss-web_4_0.dtd" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/RewriteResults.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/WebAppGeneratorDeploymentAspect.java" afterPath="$PROJECT_DIR$/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/WebAppGeneratorDeploymentAspect.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/integration/native/src/main/resources/jbossws-native-config.xml" afterPath="$PROJECT_DIR$/integration/native/src/main/resources/jbossws-native-config.xml" />
<change type="MODIFICATION" beforePath="/home/hbraun/dev/prj/jbossas/trunk/server/src/resources/dtd/jboss-web_4_2.dtd" afterPath="/home/hbraun/dev/prj/jbossas/trunk/server/src/resources/dtd/jboss-web_4_2.dtd" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/jbossws-core/jbossws-core.iml" afterPath="$PROJECT_DIR$/jbossws-core/jbossws-core.iml" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/integration/spi/spi.iml" afterPath="$PROJECT_DIR$/integration/spi/spi.iml" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/WebAppDeploymentAspect.java" afterPath="$PROJECT_DIR$/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/WebAppDeploymentAspect.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/integration/jboss42/int-42.iml" afterPath="$PROJECT_DIR$/integration/jboss42/int-42.iml" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ModifyWebMetaDataDeploymentAspect.java" afterPath="$PROJECT_DIR$/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ModifyWebMetaDataDeploymentAspect.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/integration/sunri/src/main/resources/jbossws-sunri-config.xml" afterPath="$PROJECT_DIR$/integration/sunri/src/main/resources/jbossws-sunri-config.xml" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/DefaultWebAppDesciptorModifierImpl.java" />
+ <change type="DELETED" beforePath="$PROJECT_DIR$/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/WebXMLRewriter.java" afterPath="" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/integration/jboss50/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-beans.xml" afterPath="$PROJECT_DIR$/integration/jboss50/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-beans.xml" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/DefaultWebAppDesciptorModifierImpl.java" />
+ <change type="DELETED" beforePath="$PROJECT_DIR$/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/WebAppDesciptorModifier.java" afterPath="" />
+ <change type="DELETED" beforePath="$PROJECT_DIR$/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/WebAppDesciptorModifierImpl.java" afterPath="" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/SunJaxwsDeploymentAspect.java" afterPath="$PROJECT_DIR$/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/SunJaxwsDeploymentAspect.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ModifyWebMetaDataDeploymentAspect.java" afterPath="$PROJECT_DIR$/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ModifyWebMetaDataDeploymentAspect.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ContainerMetaDataAdapter.java" afterPath="$PROJECT_DIR$/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ContainerMetaDataAdapter.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ContainerMetaDataAdapter.java" afterPath="$PROJECT_DIR$/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ContainerMetaDataAdapter.java" />
</list>
</component>
<component name="ChangeListSynchronizer" />
@@ -157,7 +178,7 @@
<option name="CONDITION" value="" />
<option name="LOG_MESSAGE" value="" />
</breakpoint>
- <breakpoint url="file://$PROJECT_DIR$/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/SunJaxwsDeploymentAspect.java" line="50" class="org.jboss.wsf.stack.sunri.SunJaxwsDeploymentAspect" package="org.jboss.wsf.stack.sunri">
+ <breakpoint url="file://$PROJECT_DIR$/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/SunJaxwsDeploymentAspect.java" line="48" class="org.jboss.wsf.stack.sunri.SunJaxwsDeploymentAspect" package="org.jboss.wsf.stack.sunri">
<option name="ENABLED" value="true" />
<option name="SUSPEND_POLICY" value="SuspendAll" />
<option name="LOG_ENABLED" value="false" />
@@ -293,39 +314,7 @@
<option name="myCurrentFavoritesList" value="JBossWS-Trunk" />
</component>
<component name="FileEditorManager">
- <leaf>
- <file leaf-file-name="InvocationHandlerEJB3.java" pinned="false" current="true" current-in-tab="true">
- <entry file="file://$PROJECT_DIR$/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerEJB3.java">
- <provider selected="true" editor-type-id="text-editor">
- <state line="127" column="33" selection-start="4801" selection-end="4801" vertical-scroll-proportion="0.33614457">
- <folding />
- </state>
- </provider>
- </entry>
- </file>
- <file leaf-file-name="StatelessBeanContext.java" pinned="false" current="false" current-in-tab="false">
- <entry file="file:///home/hbraun/dev/prj/jbossas/trunk/ejb3/src/main/org/jboss/ejb3/stateless/StatelessBeanContext.java">
- <provider selected="true" editor-type-id="text-editor">
- <state line="45" column="15" selection-start="1624" selection-end="1624" vertical-scroll-proportion="0.56213015">
- <folding>
- <element signature="imports" expanded="true" />
- </folding>
- </state>
- </provider>
- </entry>
- </file>
- <file leaf-file-name="EJBContainerInvocation.java" pinned="false" current="false" current-in-tab="false">
- <entry file="file:///home/hbraun/dev/prj/jbossas/trunk/ejb3/src/main/org/jboss/ejb3/EJBContainerInvocation.java">
- <provider selected="true" editor-type-id="text-editor">
- <state line="23" column="0" selection-start="1057" selection-end="1057" vertical-scroll-proportion="-0.6192771">
- <folding>
- <element signature="imports" expanded="true" />
- </folding>
- </state>
- </provider>
- </entry>
- </file>
- </leaf>
+ <leaf />
</component>
<component name="FindManager">
<FindUsagesManager>
@@ -356,7 +345,188 @@
<option name="LAST_EDITED_TAB_NAME" value="Libraries (Classpath)" />
</component>
<component name="NamedScopeManager" />
- <component name="PackagesPane" />
+ <component name="PackagesPane">
+ <subPane>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="JBossWS-Trunk.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewProjectNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="JBossWS-Trunk.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="spi" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewModuleNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="JBossWS-Trunk.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="spi" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="org" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageElementNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="jboss" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageElementNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="wsf" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageElementNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="JBossWS-Trunk.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="spi" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="org" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageElementNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="jboss" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageElementNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="wsf" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageElementNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="spi" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageElementNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="JBossWS-Trunk.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="spi" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="org" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageElementNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="jboss" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageElementNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="wsf" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageElementNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="framework" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageElementNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="JBossWS-Trunk.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="spi" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="org" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageElementNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="jboss" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageElementNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="wsf" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageElementNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="framework" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageElementNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="deployment" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageElementNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="JBossWS-Trunk.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="spi" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="org" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageElementNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="jboss" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageElementNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="JBossWS-Trunk.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="int-native" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewModuleNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="JBossWS-Trunk.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="int-native" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="org" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageElementNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="jboss" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageElementNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="wsf" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageElementNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="stack" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageElementNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="jbws" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageElementNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ </subPane>
+ </component>
<component name="PerforceChangeBrowserSettings">
<option name="USE_CLIENT_FILTER" value="true" />
<option name="CLIENT" value="" />
@@ -427,8 +597,8 @@
<component name="PropertiesComponent">
<property name="GoToFile.includeJavaFiles" value="false" />
<property name="GoToClass.toSaveIncludeLibraries" value="false" />
+ <property name="RunManagerConfig.compileBeforeRunning" value="false" />
<property name="RunManagerConfig.showSettingsBeforeRunnig" value="false" />
- <property name="RunManagerConfig.compileBeforeRunning" value="false" />
<property name="MemberChooser.sorted" value="false" />
<property name="MemberChooser.showClasses" value="true" />
<property name="GoToClass.includeLibraries" value="false" />
@@ -439,6 +609,8 @@
</component>
<component name="RecentsManager">
<key name="CopyClassDialog.RECENTS_KEY">
+ <recent name="org.jboss.wsf.container.jboss50" />
+ <recent name="org.jboss.wsf.container.jboss42" />
<recent name="org.jboss.wsf.stack.jbws" />
<recent name="org.jboss.wsf.stack.sunri" />
<recent name="org.jboss.wsf.stack.xfire" />
@@ -451,107 +623,18 @@
<recent name="org.jboss.wsf.stack.jbws" />
</key>
</component>
- <component name="RestoreUpdateTree">
- <UpdateInfo date="7/26/07 4:18 PM" ActionInfo="_Update">
- <UpdatedFiles>
- <FILE-GROUP>
- <option name="myUpdateName" value="Updated from server" />
- <option name="myStatusName" value="Changed on server" />
- <option name="mySupportsDeletion" value="false" />
- <option name="myCanBeAbsent" value="false" />
- <option name="myId" value="CHANGED_ON_SERVER" />
- <FILE-GROUP>
- <option name="myUpdateName" value="Updated" />
- <option name="myStatusName" value="Changed" />
- <option name="mySupportsDeletion" value="false" />
- <option name="myCanBeAbsent" value="false" />
- <option name="myId" value="UPDATED" />
- <PATH>$PROJECT_DIR$/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/WebXMLRewriterImpl.java</PATH>
- <PATH>$PROJECT_DIR$/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/WebAppGeneratorDeploymentAspect.java</PATH>
- <PATH>$PROJECT_DIR$/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/ContextRootDeploymentAspect.java</PATH>
- </FILE-GROUP>
- <FILE-GROUP>
- <option name="myUpdateName" value="Created" />
- <option name="myStatusName" value="Created" />
- <option name="mySupportsDeletion" value="false" />
- <option name="myCanBeAbsent" value="false" />
- <option name="myId" value="CREATED" />
- </FILE-GROUP>
- <FILE-GROUP>
- <option name="myUpdateName" value="Deleted" />
- <option name="myStatusName" value="Deleted" />
- <option name="mySupportsDeletion" value="false" />
- <option name="myCanBeAbsent" value="true" />
- <option name="myId" value="REMOVED_FROM_REPOSITORY" />
- <PATH>$PROJECT_DIR$/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/UnifiedDeploymentInfo.java</PATH>
- <PATH>$PROJECT_DIR$/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/JAXRPCClientDeployment.java</PATH>
- <PATH>$PROJECT_DIR$/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/JAXRPCDeployment.java</PATH>
- <PATH>$PROJECT_DIR$/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/JAXWSDeployment.java</PATH>
- <PATH>$PROJECT_DIR$/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/JAXRPCClientDeployment.java</PATH>
- <PATH>$PROJECT_DIR$/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/JAXRPCDeployment.java</PATH>
- <PATH>$PROJECT_DIR$/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/JAXWSDeployment.java</PATH>
- </FILE-GROUP>
- <FILE-GROUP>
- <option name="myUpdateName" value="Restored" />
- <option name="myStatusName" value="Will be restored" />
- <option name="mySupportsDeletion" value="false" />
- <option name="myCanBeAbsent" value="false" />
- <option name="myId" value="RESTORED" />
- </FILE-GROUP>
- </FILE-GROUP>
- <FILE-GROUP>
- <option name="myUpdateName" value="Modified" />
- <option name="myStatusName" value="Modified" />
- <option name="mySupportsDeletion" value="false" />
- <option name="myCanBeAbsent" value="false" />
- <option name="myId" value="MODIFIED" />
- </FILE-GROUP>
- <FILE-GROUP>
- <option name="myUpdateName" value="Skipped" />
- <option name="myStatusName" value="Skipped" />
- <option name="mySupportsDeletion" value="false" />
- <option name="myCanBeAbsent" value="false" />
- <option name="myId" value="SKIPPED" />
- </FILE-GROUP>
- <FILE-GROUP>
- <option name="myUpdateName" value="Merged with conflicts" />
- <option name="myStatusName" value="Will be merged with conflicts" />
- <option name="mySupportsDeletion" value="false" />
- <option name="myCanBeAbsent" value="false" />
- <option name="myId" value="MERGED_WITH_CONFLICTS" />
- </FILE-GROUP>
- <FILE-GROUP>
- <option name="myUpdateName" value="Merged" />
- <option name="myStatusName" value="Will be merged" />
- <option name="mySupportsDeletion" value="false" />
- <option name="myCanBeAbsent" value="false" />
- <option name="myId" value="MERGED" />
- </FILE-GROUP>
- <FILE-GROUP>
- <option name="myUpdateName" value="Not in repository" />
- <option name="myStatusName" value="Not in repository" />
- <option name="mySupportsDeletion" value="true" />
- <option name="myCanBeAbsent" value="false" />
- <option name="myId" value="UNKNOWN" />
- </FILE-GROUP>
- <FILE-GROUP>
- <option name="myUpdateName" value="Locally added" />
- <option name="myStatusName" value="Locally added" />
- <option name="mySupportsDeletion" value="false" />
- <option name="myCanBeAbsent" value="false" />
- <option name="myId" value="LOCALLY_ADDED" />
- </FILE-GROUP>
- <FILE-GROUP>
- <option name="myUpdateName" value="Locally removed" />
- <option name="myStatusName" value="Locally removed" />
- <option name="mySupportsDeletion" value="false" />
- <option name="myCanBeAbsent" value="false" />
- <option name="myId" value="LOCALLY_REMOVED" />
- </FILE-GROUP>
- </UpdatedFiles>
- </UpdateInfo>
- </component>
+ <component name="RestoreUpdateTree" />
<component name="RunManager" selected="Remote.client">
+ <configuration default="true" type="Application" factoryName="Application" enabled="false" merge="false">
+ <option name="MAIN_CLASS_NAME" />
+ <option name="VM_PARAMETERS" />
+ <option name="PROGRAM_PARAMETERS" />
+ <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
+ <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
+ <option name="ALTERNATIVE_JRE_PATH" />
+ <option name="ENABLE_SWING_INSPECTOR" value="false" />
+ <module name="" />
+ </configuration>
<configuration default="true" type="Applet" factoryName="Applet">
<module name="" />
<option name="MAIN_CLASS_NAME" />
@@ -564,16 +647,6 @@
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
</configuration>
- <configuration default="true" type="Application" factoryName="Application" enabled="false" merge="false">
- <option name="MAIN_CLASS_NAME" />
- <option name="VM_PARAMETERS" />
- <option name="PROGRAM_PARAMETERS" />
- <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
- <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
- <option name="ALTERNATIVE_JRE_PATH" />
- <option name="ENABLE_SWING_INSPECTOR" value="false" />
- <module name="" />
- </configuration>
<configuration default="true" type="JUnit" factoryName="JUnit" enabled="false" merge="false">
<module name="" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
@@ -589,6 +662,9 @@
<option name="TEST_SEARCH_SCOPE">
<value defaultName="wholeProject" />
</option>
+ <method>
+ <option name="Make" value="true" />
+ </method>
</configuration>
<configuration default="true" type="Remote" factoryName="Remote">
<option name="USE_SOCKET_TRANSPORT" value="true" />
@@ -691,32 +767,34 @@
</todo-panel>
</component>
<component name="ToolWindowManager">
- <frame x="0" y="25" width="1680" height="1000" extended-state="6" />
- <editor active="true" />
+ <frame x="0" y="25" width="1680" height="1000" extended-state="0" />
+ <editor active="false" />
<layout>
- <window_info id="UI Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="-1" />
- <window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="-1" />
- <window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="-1" />
+ <window_info id="UI Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="3" />
+ <window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="8" />
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="1" />
- <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.50342464" order="1" />
+ <window_info id="IDEtalk Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="8" />
+ <window_info id="IDEtalk" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="3" />
+ <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3295325" order="8" />
+ <window_info id="simpleUML" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="3" />
+ <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="7" />
+ <window_info id="File View" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="3" />
+ <window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.27469134" order="0" />
+ <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="2" />
+ <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.2080247" order="2" />
+ <window_info id="soapUI Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="-1" />
+ <window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="3" />
+ <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.5080275" order="1" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.39862543" order="4" />
- <window_info id="IDEtalk Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="-1" />
- <window_info id="IDEtalk" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="-1" />
- <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3295325" order="8" />
- <window_info id="simpleUML" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="-1" />
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="8" />
- <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="7" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25585696" order="1" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" order="0" />
+ <window_info id="Module Dependencies" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3298397" order="3" />
<window_info id="CVS" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="8" />
- <window_info id="Module Dependencies" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3298397" order="3" />
- <window_info id="Dependency Viewer" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.66323024" order="8" />
- <window_info id="File View" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="3" />
- <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.3220859" order="0" />
- <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.13440198" order="2" />
+ <window_info id="Dependency Viewer" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.6536697" order="8" />
+ <window_info id="soapUI Navigator" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="-1" />
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" order="6" />
- <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="2" />
- <window_info id="TunnelliJ 1.3" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="-1" />
+ <window_info id="TunnelliJ 1.3" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="8" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="5" />
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="0" />
<window_info id="Favorites" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="3" />
@@ -796,125 +874,131 @@
<component name="com.intellij.ide.util.scopeChooser.ScopeChooserConfigurable" proportions="0.16666667" version="1">
<option name="myLastEditedConfigurable" value="Local Scopes" />
</component>
- <component name="com.intellij.openapi.roots.ui.configuration.projectRoot.ProjectRootMasterDetailsConfigurable" proportions="0.16666667" version="1">
+ <component name="com.intellij.openapi.roots.ui.configuration.projectRoot.ProjectRootMasterDetailsConfigurable" proportions="0.322179" version="1">
<option name="myPlainMode" value="false" />
- <option name="myLastEditedConfigurable" value="as-ejb3" />
+ <option name="myLastEditedConfigurable" value="int-42" />
</component>
<component name="com.intellij.profile.ui.ErrorOptionsConfigurable" proportions="" version="1">
<option name="myLastEditedConfigurable" />
</component>
<component name="editorHistoryManager">
- <entry file="file://$PROJECT_DIR$/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ServiceMetaData.java">
+ <entry file="file://$PROJECT_DIR$/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/DeploymentAspectManagerFactory.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="428" column="27" selection-start="12534" selection-end="12534" vertical-scroll-proportion="0.07619048">
+ <state line="31" column="22" selection-start="1291" selection-end="1291" vertical-scroll-proportion="0.25866336">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/UnifiedMetaData.java">
+ <entry file="file://$PROJECT_DIR$/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/DeploymentModelFactory.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="175" column="17" selection-start="5373" selection-end="5373" vertical-scroll-proportion="0.024242423">
+ <state line="29" column="22" selection-start="1184" selection-end="1184" vertical-scroll-proportion="0.20777643">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/integration/jboss40/src/main/resources/jbossws-jboss40.jar/META-INF/services/org.jboss.wsf.spi.invocation.InvocationHandlerFactory">
+ <entry file="file://$PROJECT_DIR$/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/LifecycleHandlerFactory.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="0" column="49" selection-start="49" selection-end="49" vertical-scroll-proportion="0.0" />
+ <state line="31" column="47" selection-start="1276" selection-end="1276" vertical-scroll-proportion="0.25394896">
+ <folding />
+ </state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/integration/jboss40/build.xml">
+ <entry file="file://$PROJECT_DIR$/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/InvocationHandlerFactory.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="76" column="70" selection-start="4241" selection-end="4241" vertical-scroll-proportion="0.6060606">
+ <state line="33" column="22" selection-start="1273" selection-end="1273" vertical-scroll-proportion="0.25394896">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/integration/spi/src/main/java/org/jboss/wsf/framework/DefaultSPIProviderResolver.java">
+ <entry file="file://$PROJECT_DIR$/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/LifecycleHandler.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="81" column="10" selection-start="2762" selection-end="2984" vertical-scroll-proportion="0.2857143">
+ <state line="30" column="17" selection-start="1179" selection-end="1179" vertical-scroll-proportion="0.23086269">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/Deployment.java">
+ <entry file="file://$PROJECT_DIR$/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ModifyWebMetaDataDeploymentAspect.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="33" column="17" selection-start="1315" selection-end="1315" vertical-scroll-proportion="0.2923077">
+ <state line="49" column="56" selection-start="1870" selection-end="1902" vertical-scroll-proportion="0.31510106">
+ <folding>
+ <element signature="imports" expanded="true" />
+ </folding>
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/integration/native/output/lib/jbossws-native50/jbossws-beans.xml">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="55" column="52" selection-start="3022" selection-end="3022" vertical-scroll-proportion="0.15133172">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/ArchiveDeployment.java">
+ <entry file="file://$PROJECT_DIR$/integration/native/src/main/resources/jbossws-native-config.xml">
<provider selected="true" editor-type-id="text-editor">
- <state line="40" column="20" selection-start="1423" selection-end="1423" vertical-scroll-proportion="0.38224852">
+ <state line="53" column="40" selection-start="2940" selection-end="2960" vertical-scroll-proportion="-0.055690072">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/integration/native/src/main/java/org/jboss/wsf/stack/jbws/PublishContractDeploymentAspect.java">
+ <entry file="file://$PROJECT_DIR$/integration/sunri/src/main/resources/jbossws-sunri-config.xml">
<provider selected="true" editor-type-id="text-editor">
- <state line="50" column="51" selection-start="1926" selection-end="1926" vertical-scroll-proportion="0.53964496">
+ <state line="69" column="40" selection-start="3657" selection-end="3657" vertical-scroll-proportion="0.3329298">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/integration/native/src/main/java/org/jboss/wsf/stack/jbws/WSDLFilePublisher.java">
+ <entry file="file://$PROJECT_DIR$/integration/xfire/src/main/resources/jbossws-xfire-config.xml">
<provider selected="true" editor-type-id="text-editor">
- <state line="74" column="10" selection-start="2749" selection-end="2749" vertical-scroll-proportion="0.15621302">
+ <state line="34" column="40" selection-start="1858" selection-end="1858" vertical-scroll-proportion="0.3329298">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/JAXWSDeployerHookEJB3.java">
+ <entry file="file://$PROJECT_DIR$/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/WebXMLRewriterImpl.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="46" column="13" selection-start="1863" selection-end="1863" vertical-scroll-proportion="-0.6970414">
+ <state line="109" column="52" selection-start="3569" selection-end="3569" vertical-scroll-proportion="0.59334123">
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
- <entry file="file:///home/hbraun/dev/prj/jbossas/trunk/ejb3/src/main/org/jboss/ejb3/EJBContainerInvocation.java">
+ <entry file="file://$PROJECT_DIR$/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/DefaultWebAppDesciptorModifierImpl.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="23" column="0" selection-start="1057" selection-end="1057" vertical-scroll-proportion="-0.6192771">
+ <state line="118" column="58" selection-start="4478" selection-end="4478" vertical-scroll-proportion="2.214031">
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
- <entry file="file:///home/hbraun/dev/prj/jbossas/trunk/ejb3/src/main/org/jboss/ejb3/BeanContext.java">
+ <entry file="file://$PROJECT_DIR$/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/WebAppDeploymentAspect.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="23" column="29" selection-start="1086" selection-end="1086" vertical-scroll-proportion="0.06745562">
+ <state line="47" column="23" selection-start="1854" selection-end="1854" vertical-scroll-proportion="-0.27602905">
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
- <entry file="jar://$PROJECT_DIR$/integration/spi/thirdparty/jboss-javaee.jar!/javax/ejb/EJBContext.class">
+ <entry file="file://$PROJECT_DIR$/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/WebAppDesciptorModifier.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="5" column="17" selection-start="151" selection-end="151" vertical-scroll-proportion="0.08994083">
- <folding />
+ <state line="23" column="47" selection-start="1103" selection-end="1103" vertical-scroll-proportion="0.06777646">
+ <folding>
+ <element signature="imports" expanded="true" />
+ </folding>
</state>
</provider>
</entry>
- <entry file="file:///home/hbraun/dev/prj/jbossas/trunk/ejb3/src/main/org/jboss/ejb3/stateless/StatelessBeanContext.java">
+ <entry file="file://$PROJECT_DIR$/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/WebXMLRewriterImpl.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="45" column="15" selection-start="1624" selection-end="1624" vertical-scroll-proportion="0.56213015">
+ <state line="25" column="0" selection-start="1141" selection-end="1263" vertical-scroll-proportion="0.11058264">
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerEJB3.java">
- <provider selected="true" editor-type-id="text-editor">
- <state line="127" column="33" selection-start="4801" selection-end="4801" vertical-scroll-proportion="0.33614457">
- <folding />
- </state>
- </provider>
- </entry>
</component>
<component name="simpleUML.DiagramSettingsWorkspace" />
<component name="simpleUML.UMLToolWindowPlugin">
Modified: trunk/integration/jboss40/src/main/resources/jbossws-jboss40-config.xml
===================================================================
--- trunk/integration/jboss40/src/main/resources/jbossws-jboss40-config.xml 2007-07-27 09:55:27 UTC (rev 4021)
+++ trunk/integration/jboss40/src/main/resources/jbossws-jboss40-config.xml 2007-07-27 13:54:43 UTC (rev 4022)
@@ -152,9 +152,9 @@
<bean name="WSSecurityHandlerEJB21" class="org.jboss.wsf.container.jboss42.SecurityHandlerEJB21"/>
<bean name="WSSecurityHandlerEJB3" class="org.jboss.wsf.container.jboss42.SecurityHandlerEJB3"/>
<bean name="WSServiceRefMetaDataAdapter" class="org.jboss.wsf.container.jboss40.ServiceRefMetaDataAdapter"/>
- <bean name="WSWebAppDesciptorModifier" class="org.jboss.wsf.framework.deployment.DefaultWebAppDesciptorModifierImpl"/>
+ <bean name="WSWebAppDesciptorModifier" class="org.jboss.wsf.container.jboss42.DefaultWebAppDesciptorModifierImpl"/>
<bean name="WSWebMetaDataAdapter" class="org.jboss.wsf.container.jboss42.JSEArchiveMetaDataAdapter"/>
- <bean name="WSWebXMLRewriter" class="org.jboss.wsf.framework.deployment.WebXMLRewriterImpl">
+ <bean name="WSWebXMLRewriter" class="org.jboss.org.jboss.wsf.container.jboss42.WebXMLRewriterImpl">
<property name="desciptorModifier"><inject bean="WSWebAppDesciptorModifier"/></property>
</bean>
Modified: trunk/integration/jboss42/int-42.iml
===================================================================
--- trunk/integration/jboss42/int-42.iml 2007-07-27 09:55:27 UTC (rev 4021)
+++ trunk/integration/jboss42/int-42.iml 2007-07-27 13:54:43 UTC (rev 4022)
@@ -9,31 +9,40 @@
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="spi" />
- <orderEntry type="library" name="jboss-logging-spi" level="project" />
+ <orderEntry type="module" module-name="42-ejb3" />
+ <orderEntry type="module" module-name="42-server" />
+ <orderEntry type="library" name="jaxws-api" level="application" />
+ <orderEntry type="module" module-name="jbossws-core" />
<orderEntry type="module-library">
<library>
<CLASSES>
- <root url="jar://$MODULE_DIR$/../spi/thirdparty/jaxws-api.jar!/" />
+ <root url="jar://$MODULE_DIR$/../../../../jbossas/branches/Branch_4_2/build/output/jboss-4.2.1.GA/server/default/lib/dom4j.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
- <orderEntry type="module" module-name="42-server" />
+ <orderEntry type="library" name="jaxws-api" level="application" />
+ <orderEntry type="library" name="jboss-logging-spi" level="application" />
+ <orderEntry type="library" name="servlet-api" level="application" />
<orderEntry type="module-library">
<library>
<CLASSES>
- <root url="jar://$MODULE_DIR$/../../jbossws-core/thirdparty/ejb3.deployer/jboss-ejb3.jar!/" />
+ <root url="jar://$MODULE_DIR$/../../../../jbossas/branches/Branch_4_2/build/output/jboss-4.2.1.GA/lib/jboss-system.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
- <orderEntry type="library" name="jboss-system" level="project" />
- <orderEntry type="library" name="jboss-jmx" level="project" />
- <orderEntry type="library" name="jboss-system-jmx" level="project" />
- <orderEntry type="module" module-name="jbossws-core" />
- <orderEntry type="library" name="jaxws-api" level="application" />
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../jbossas/branches/Branch_4_2/build/output/jboss-4.2.1.GA/lib/jboss-jmx.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
<orderEntryProperties />
</component>
</module>
Modified: trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ContainerMetaDataAdapter.java
===================================================================
--- trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ContainerMetaDataAdapter.java 2007-07-27 09:55:27 UTC (rev 4021)
+++ trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ContainerMetaDataAdapter.java 2007-07-27 13:54:43 UTC (rev 4022)
@@ -23,20 +23,19 @@
// $Id$
-import java.io.File;
-import java.net.MalformedURLException;
-import java.net.URL;
-
import org.jboss.deployment.DeploymentInfo;
import org.jboss.logging.Logger;
import org.jboss.metadata.ApplicationMetaData;
import org.jboss.metadata.WebMetaData;
-import org.jboss.wsf.framework.deployment.WebXMLRewriter;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
import org.jboss.wsf.spi.metadata.j2ee.JSEArchiveMetaData;
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+
/**
* Build container independent deployment info.
*
@@ -78,7 +77,7 @@
if (webMetaData != null)
dep.addAttachment(JSEArchiveMetaData.class, webMetaData);
- dep.setProperty(WebXMLRewriter.WEBAPP_URL, getDeploymentURL(di));
+ dep.setProperty("org.jboss.ws.webapp.url", getDeploymentURL(di));
}
else if (dep.getType() == DeploymentType.JAXRPC_EJB3 || dep.getType() == DeploymentType.JAXWS_EJB3)
{
Added: trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/DefaultWebAppDesciptorModifierImpl.java
===================================================================
--- trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/DefaultWebAppDesciptorModifierImpl.java (rev 0)
+++ trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/DefaultWebAppDesciptorModifierImpl.java 2007-07-27 13:54:43 UTC (rev 4022)
@@ -0,0 +1,164 @@
+/*
+ * 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.wsf.container.jboss42;
+
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.logging.Logger;
+import org.dom4j.Document;
+import org.dom4j.Element;
+
+import java.util.Iterator;
+import java.util.Map;
+
+/**
+ * Modifies web.xml for jbossws
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 19-May-2006
+ */
+public class DefaultWebAppDesciptorModifierImpl implements WebAppDesciptorModifier
+{
+ // logging support
+ private static Logger log = Logger.getLogger(DefaultWebAppDesciptorModifierImpl.class);
+
+ public RewriteResults modifyDescriptor(Deployment dep, Document webXml) throws ClassNotFoundException
+ {
+ RewriteResults results = new RewriteResults();
+ Element root = webXml.getRootElement();
+
+ String propKey = "org.jboss.ws.webapp.ServletClass";
+ String servletClass = (String)dep.getProperty(propKey);
+ if (servletClass == null)
+ throw new IllegalStateException("Cannot obtain context property: " + propKey);
+
+ propKey = "org.jboss.ws.webapp.ContextParameterMap";
+ Map<String, String> contextParams = (Map<String, String>)dep.getProperty(propKey);
+ if (contextParams != null)
+ {
+ for (Map.Entry<String, String> entry : contextParams.entrySet())
+ {
+ Element contextParam = root.addElement("context-param");
+ contextParam.addElement("param-name").addText(entry.getKey());
+ contextParam.addElement("param-value").addText(entry.getValue());
+ }
+ }
+
+ propKey = "org.jboss.ws.webapp.ServletContextListener";
+ String listenerClass = (String)dep.getProperty(propKey);
+ if (listenerClass != null)
+ {
+ Element listener = root.addElement("listener");
+ listener.addElement("listener-class").setText(listenerClass);
+ }
+
+ for (Iterator it = root.elementIterator("servlet"); it.hasNext();)
+ {
+ Element servlet = (Element)it.next();
+ String linkName = servlet.element("servlet-name").getTextTrim();
+
+ // find the servlet-class
+ Element classElement = servlet.element("servlet-class");
+
+ // JSP
+ if (classElement == null)
+ continue;
+
+ String orgServletClassName = classElement.getTextTrim();
+
+ // Get the servlet class
+ Class orgServletClass = null;
+ try
+ {
+ ClassLoader loader = dep.getInitialClassLoader();
+ orgServletClass = loader.loadClass(orgServletClassName);
+ }
+ catch (ClassNotFoundException ex)
+ {
+ log.warn("Cannot load servlet class: " + orgServletClassName);
+ }
+
+ String targetBeanName = null;
+
+ // Nothing to do if we have an <init-param>
+ if (isAlreadyModified(servlet))
+ {
+ for (Iterator itParam = servlet.elementIterator("init-param"); itParam.hasNext();)
+ {
+ Element elParam = (Element)itParam.next();
+ String paramName = elParam.element("param-name").getTextTrim();
+ String paramValue = elParam.element("param-value").getTextTrim();
+ if (Endpoint.SEPID_DOMAIN_ENDPOINT.equals(paramName))
+ {
+ targetBeanName = paramValue;
+ }
+ }
+ }
+ else
+ {
+ // Check if it is a real servlet that we can ignore
+ if (orgServletClass != null && javax.servlet.Servlet.class.isAssignableFrom(orgServletClass))
+ {
+ log.info("Ignore servlet: " + orgServletClassName);
+ continue;
+ }
+ else if (orgServletClassName.endsWith("Servlet"))
+ {
+ log.info("Ignore <servlet-class> that ends with 'Servlet': " + orgServletClassName);
+ continue;
+ }
+
+ classElement.setText(servletClass);
+
+ // add additional init params
+ if (orgServletClassName.equals(servletClass) == false)
+ {
+ targetBeanName = orgServletClassName;
+ Element paramElement = servlet.addElement("init-param");
+ paramElement.addElement("param-name").addText(Endpoint.SEPID_DOMAIN_ENDPOINT);
+ paramElement.addElement("param-value").addText(targetBeanName);
+ }
+ }
+
+ if (targetBeanName == null)
+ throw new IllegalStateException("Cannot obtain service endpoint bean for: " + linkName);
+
+ // remember the target bean name
+ results.sepTargetMap.put(linkName, targetBeanName);
+ }
+
+ return results;
+ }
+
+ // Return true if the web.xml is already modified
+ private boolean isAlreadyModified(Element servlet)
+ {
+ for (Iterator it = servlet.elementIterator("init-param"); it.hasNext();)
+ {
+ Element elParam = (Element)it.next();
+ String paramName = elParam.element("param-name").getTextTrim();
+ if (Endpoint.SEPID_DOMAIN_ENDPOINT.equals(paramName))
+ return true;
+ }
+ return false;
+ }
+}
Property changes on: trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/DefaultWebAppDesciptorModifierImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ModifyWebMetaDataDeploymentAspect.java
===================================================================
--- trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ModifyWebMetaDataDeploymentAspect.java 2007-07-27 09:55:27 UTC (rev 4021)
+++ trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ModifyWebMetaDataDeploymentAspect.java 2007-07-27 13:54:43 UTC (rev 4022)
@@ -23,9 +23,9 @@
//$Id: ModifyWebMetaDataDeployer.java 3772 2007-07-01 19:29:13Z thomas.diesler(a)jboss.com $
-import org.jboss.wsf.spi.deployment.*;
-import org.jboss.wsf.framework.deployment.WebXMLRewriter;
-import org.jboss.wsf.framework.deployment.RewriteResults;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.DeploymentAspect;
+import org.jboss.wsf.spi.deployment.Endpoint;
/**
* A deployer that modifies the web.xml meta data
@@ -35,9 +35,9 @@
*/
public class ModifyWebMetaDataDeploymentAspect extends DeploymentAspect
{
- private WebXMLRewriter webXMLRewriter;
+ private WebXMLRewriterImpl webXMLRewriter;
- public void setWebXMLRewriter(WebXMLRewriter serviceEndpointPublisher)
+ public void setWebXMLRewriter(WebXMLRewriterImpl serviceEndpointPublisher)
{
this.webXMLRewriter = serviceEndpointPublisher;
}
Added: trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/RewriteResults.java
===================================================================
--- trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/RewriteResults.java (rev 0)
+++ trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/RewriteResults.java 2007-07-27 13:54:43 UTC (rev 4022)
@@ -0,0 +1,38 @@
+/*
+ * 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.wsf.container.jboss42;
+
+import java.net.URL;
+import java.util.Map;
+import java.util.HashMap;
+
+/**
+ * @author Heiko.Braun(a)jboss.com
+ * Created: Jul 19, 2007
+ */
+public class RewriteResults
+{
+ // The URL to the rewritten web.xml
+ public URL webXML;
+ // Maps the servlet name to the target bean
+ public Map<String, String> sepTargetMap = new HashMap<String, String>();
+}
Property changes on: trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/RewriteResults.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/WebAppDeploymentAspect.java
===================================================================
--- trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/WebAppDeploymentAspect.java 2007-07-27 09:55:27 UTC (rev 4021)
+++ trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/WebAppDeploymentAspect.java 2007-07-27 13:54:43 UTC (rev 4022)
@@ -23,19 +23,19 @@
// $Id: WebAppDeployerDeployer.java 3183 2007-05-22 13:06:13Z thomas.diesler(a)jboss.com $
-import java.net.URL;
-
-import javax.management.MBeanServer;
-
import org.jboss.deployment.DeploymentInfo;
import org.jboss.deployment.MainDeployerMBean;
import org.jboss.logging.Logger;
import org.jboss.mx.util.MBeanProxy;
import org.jboss.mx.util.MBeanProxyCreationException;
import org.jboss.mx.util.MBeanServerLocator;
-import org.jboss.wsf.framework.deployment.WebXMLRewriter;
-import org.jboss.wsf.spi.deployment.*;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.DeploymentAspect;
+import org.jboss.wsf.spi.deployment.WSFDeploymentException;
+import javax.management.MBeanServer;
+import java.net.URL;
+
/**
* Publish the HTTP service endpoint to Tomcat
*
@@ -47,9 +47,9 @@
// provide logging
private static Logger log = Logger.getLogger(WebAppDeploymentAspect.class);
- private WebXMLRewriter webXMLRewriter;
+ private WebXMLRewriterImpl webXMLRewriter;
- public void setWebXMLRewriter(WebXMLRewriter serviceEndpointPublisher)
+ public void setWebXMLRewriter(WebXMLRewriterImpl serviceEndpointPublisher)
{
this.webXMLRewriter = serviceEndpointPublisher;
}
@@ -58,7 +58,7 @@
{
if (dep.getType().toString().endsWith("EJB21") || dep.getType().toString().endsWith("EJB3"))
{
- URL warURL = (URL)dep.getProperty(WebXMLRewriter.WEBAPP_URL);
+ URL warURL = (URL)dep.getProperty("org.jboss.ws.webapp.url");
log.debug("publishServiceEndpoint: " + warURL);
try
@@ -83,7 +83,7 @@
public void destroy(Deployment dep)
{
- URL warURL = (URL)dep.getProperty(WebXMLRewriter.WEBAPP_URL);
+ URL warURL = (URL)dep.getProperty("org.jboss.ws.webapp.url");
if (warURL == null)
{
log.error("Cannot obtain warURL");
Added: trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/WebAppDesciptorModifier.java
===================================================================
--- trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/WebAppDesciptorModifier.java (rev 0)
+++ trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/WebAppDesciptorModifier.java 2007-07-27 13:54:43 UTC (rev 4022)
@@ -0,0 +1,40 @@
+/*
+ * 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.wsf.container.jboss42;
+
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.dom4j.Document;
+
+/**
+ * Modifies the web app according to the stack requirements.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 19-May-2007
+ */
+public interface WebAppDesciptorModifier
+{
+ final String SERVLET_CONTEXT_LISTENER = "org.jboss.ws.webapp.ServletContextListener";
+ final String CONTEXT_PARAMETER_MAP = "org.jboss.ws.webapp.ContextParameterMap";
+ final String SERVLET_CLASS = "org.jboss.ws.webapp.ServletClass";
+
+ RewriteResults modifyDescriptor(Deployment dep, Document webXml) throws ClassNotFoundException;
+}
Property changes on: trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/WebAppDesciptorModifier.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/WebXMLRewriterImpl.java
===================================================================
--- trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/WebXMLRewriterImpl.java (rev 0)
+++ trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/WebXMLRewriterImpl.java 2007-07-27 13:54:43 UTC (rev 4022)
@@ -0,0 +1,121 @@
+/*
+ * 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.wsf.container.jboss42;
+
+
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.common.IOUtils;
+
+import javax.xml.ws.WebServiceException;
+import java.net.URL;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.InputStream;
+import java.io.FileOutputStream;
+
+import org.dom4j.io.SAXReader;
+import org.dom4j.io.OutputFormat;
+import org.dom4j.io.XMLWriter;
+import org.dom4j.Document;
+
+/**
+ * The rewriter for web.xml
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 19-May-2007
+ */
+public class WebXMLRewriterImpl
+{
+ private WebAppDesciptorModifier desciptorModifier;
+
+ public WebXMLRewriterImpl()
+ {
+ this.desciptorModifier = new DefaultWebAppDesciptorModifierImpl();
+ }
+
+ public WebAppDesciptorModifier getDesciptorModifier()
+ {
+ return desciptorModifier;
+ }
+
+ public void setDesciptorModifier(WebAppDesciptorModifier desciptorModifier)
+ {
+ this.desciptorModifier = desciptorModifier;
+ }
+
+ public RewriteResults rewriteWebXml(Deployment dep)
+ {
+ URL warURL = (URL)dep.getProperty("org.jboss.ws.webapp.url");
+ File warFile = new File(warURL.getFile());
+ if (warFile.isDirectory() == false)
+ throw new WebServiceException("Expected a war directory: " + warURL);
+
+ File webXML = new File(warURL.getFile() + "/WEB-INF/web.xml");
+ if (webXML.isFile() == false)
+ throw new WebServiceException("Cannot find web.xml: " + webXML);
+
+ try
+ {
+ // After redeployment there might be a stale copy of the original web.xml.org, we delete it
+ File orgWebXML = new File(webXML.getCanonicalPath() + ".org");
+ orgWebXML.delete();
+
+ // Rename the web.xml
+ if (webXML.renameTo(orgWebXML) == false)
+ throw new WebServiceException("Cannot rename web.xml: " + orgWebXML);
+
+ FileInputStream stream = new FileInputStream(orgWebXML);
+ return rewriteWebXml(stream, webXML, dep);
+ }
+ catch (RuntimeException rte)
+ {
+ throw rte;
+ }
+ catch (Exception e)
+ {
+ throw new WebServiceException(e);
+ }
+ }
+
+ private RewriteResults rewriteWebXml(InputStream source, File destFile, Deployment dep) throws Exception
+ {
+ if (destFile == null)
+ {
+ destFile = File.createTempFile("jbossws-alt-web", "xml", IOUtils.createTempDirectory());
+ destFile.deleteOnExit();
+ }
+
+ SAXReader reader = new SAXReader();
+ Document document = reader.read(source);
+
+ RewriteResults results = desciptorModifier.modifyDescriptor(dep, document);
+ results.webXML = destFile.toURL();
+
+ FileOutputStream fos = new FileOutputStream(destFile);
+ OutputFormat format = OutputFormat.createPrettyPrint();
+ XMLWriter writer = new XMLWriter(fos, format);
+ writer.write(document);
+ writer.close();
+
+ return results;
+ }
+}
Property changes on: trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/WebXMLRewriterImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: trunk/integration/jboss42/src/main/resources/jbossws-jboss42-config.xml
===================================================================
--- trunk/integration/jboss42/src/main/resources/jbossws-jboss42-config.xml 2007-07-27 09:55:27 UTC (rev 4021)
+++ trunk/integration/jboss42/src/main/resources/jbossws-jboss42-config.xml 2007-07-27 13:54:43 UTC (rev 4022)
@@ -150,9 +150,9 @@
<bean name="WSEndpointMetrics" class="org.jboss.wsf.framework.management.BasicEndpointMetrics"/>
<bean name="WSSecurityHandlerEJB21" class="org.jboss.wsf.container.jboss42.SecurityHandlerEJB21"/>
<bean name="WSSecurityHandlerEJB3" class="org.jboss.wsf.container.jboss42.SecurityHandlerEJB3"/>
- <bean name="WSWebAppDesciptorModifier" class="org.jboss.wsf.framework.deployment.DefaultWebAppDesciptorModifierImpl"/>
+ <bean name="WSWebAppDesciptorModifier" class="org.jboss.wsf.container.jboss42.DefaultWebAppDesciptorModifierImpl"/>
<bean name="WSWebMetaDataAdapter" class="org.jboss.wsf.container.jboss42.JSEArchiveMetaDataAdapter"/>
- <bean name="WSWebXMLRewriter" class="org.jboss.wsf.framework.deployment.WebXMLRewriterImpl">
+ <bean name="WSWebXMLRewriter" class="org.jboss.wsf.container.jboss42.WebXMLRewriterImpl">
<property name="desciptorModifier"><inject bean="WSWebAppDesciptorModifier"/></property>
</bean>
Modified: trunk/integration/jboss50/int-50.iml
===================================================================
--- trunk/integration/jboss50/int-50.iml 2007-07-27 09:55:27 UTC (rev 4021)
+++ trunk/integration/jboss50/int-50.iml 2007-07-27 13:54:43 UTC (rev 4022)
@@ -27,6 +27,60 @@
</orderEntry>
<orderEntry type="library" name="jboss-aop-jdk50" level="application" />
<orderEntry type="library" name="jboss-jaxrpc" level="application" />
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../jbossws-core/thirdparty/jboss-vfs.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../jbossws-core/thirdparty/jboss-logging-spi.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../jbossws-core/thirdparty/jboss-deployers.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../jbossas/trunk/build/output/jboss-5.0.0.Beta3/lib/jboss-deployers-client-spi.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../jbossas/trunk/build/output/jboss-5.0.0.Beta3/lib/jboss-deployers-vfs-spi.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../jbossas/trunk/build/output/jboss-5.0.0.Beta3/lib/dom4j.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
<orderEntryProperties />
</component>
</module>
Modified: trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ContainerMetaDataAdapter.java
===================================================================
--- trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ContainerMetaDataAdapter.java 2007-07-27 09:55:27 UTC (rev 4021)
+++ trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ContainerMetaDataAdapter.java 2007-07-27 13:54:43 UTC (rev 4022)
@@ -23,19 +23,18 @@
//$Id$
-import java.net.URL;
-
import org.jboss.deployers.structure.spi.DeploymentUnit;
import org.jboss.ejb3.Ejb3Deployment;
import org.jboss.logging.Logger;
import org.jboss.metadata.ApplicationMetaData;
import org.jboss.metadata.WebMetaData;
-import org.jboss.wsf.framework.deployment.WebXMLRewriter;
import org.jboss.wsf.spi.deployment.ArchiveDeployment;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
import org.jboss.wsf.spi.metadata.j2ee.JSEArchiveMetaData;
+import java.net.URL;
+
/**
* Build container independent deployment info.
*
@@ -82,7 +81,7 @@
if (dep instanceof ArchiveDeployment)
{
URL webURL = ((ArchiveDeployment)dep).getRootFile().toURL();
- dep.setProperty(WebXMLRewriter.WEBAPP_URL, webURL);
+ dep.setProperty("org.jboss.ws.webapp.url", webURL);
}
}
Added: trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/DefaultWebAppDesciptorModifierImpl.java
===================================================================
--- trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/DefaultWebAppDesciptorModifierImpl.java (rev 0)
+++ trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/DefaultWebAppDesciptorModifierImpl.java 2007-07-27 13:54:43 UTC (rev 4022)
@@ -0,0 +1,164 @@
+/*
+ * 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.wsf.container.jboss50;
+
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.logging.Logger;
+import org.dom4j.Document;
+import org.dom4j.Element;
+
+import java.util.Map;
+import java.util.Iterator;
+
+/**
+ * Modifies web.xml for jbossws
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 19-May-2006
+ */
+public class DefaultWebAppDesciptorModifierImpl implements WebAppDesciptorModifier
+{
+ // logging support
+ private static Logger log = Logger.getLogger(DefaultWebAppDesciptorModifierImpl.class);
+
+ public RewriteResults modifyDescriptor(Deployment dep, Document webXml) throws ClassNotFoundException
+ {
+ RewriteResults results = new RewriteResults();
+ Element root = webXml.getRootElement();
+
+ String propKey = "org.jboss.ws.webapp.ServletClass";
+ String servletClass = (String)dep.getProperty(propKey);
+ if (servletClass == null)
+ throw new IllegalStateException("Cannot obtain context property: " + propKey);
+
+ propKey = "org.jboss.ws.webapp.ContextParameterMap";
+ Map<String, String> contextParams = (Map<String, String>)dep.getProperty(propKey);
+ if (contextParams != null)
+ {
+ for (Map.Entry<String, String> entry : contextParams.entrySet())
+ {
+ Element contextParam = root.addElement("context-param");
+ contextParam.addElement("param-name").addText(entry.getKey());
+ contextParam.addElement("param-value").addText(entry.getValue());
+ }
+ }
+
+ propKey = "org.jboss.ws.webapp.ServletContextListener";
+ String listenerClass = (String)dep.getProperty(propKey);
+ if (listenerClass != null)
+ {
+ Element listener = root.addElement("listener");
+ listener.addElement("listener-class").setText(listenerClass);
+ }
+
+ for (Iterator it = root.elementIterator("servlet"); it.hasNext();)
+ {
+ Element servlet = (Element)it.next();
+ String linkName = servlet.element("servlet-name").getTextTrim();
+
+ // find the servlet-class
+ Element classElement = servlet.element("servlet-class");
+
+ // JSP
+ if (classElement == null)
+ continue;
+
+ String orgServletClassName = classElement.getTextTrim();
+
+ // Get the servlet class
+ Class orgServletClass = null;
+ try
+ {
+ ClassLoader loader = dep.getInitialClassLoader();
+ orgServletClass = loader.loadClass(orgServletClassName);
+ }
+ catch (ClassNotFoundException ex)
+ {
+ log.warn("Cannot load servlet class: " + orgServletClassName);
+ }
+
+ String targetBeanName = null;
+
+ // Nothing to do if we have an <init-param>
+ if (isAlreadyModified(servlet))
+ {
+ for (Iterator itParam = servlet.elementIterator("init-param"); itParam.hasNext();)
+ {
+ Element elParam = (Element)itParam.next();
+ String paramName = elParam.element("param-name").getTextTrim();
+ String paramValue = elParam.element("param-value").getTextTrim();
+ if (Endpoint.SEPID_DOMAIN_ENDPOINT.equals(paramName))
+ {
+ targetBeanName = paramValue;
+ }
+ }
+ }
+ else
+ {
+ // Check if it is a real servlet that we can ignore
+ if (orgServletClass != null && javax.servlet.Servlet.class.isAssignableFrom(orgServletClass))
+ {
+ log.info("Ignore servlet: " + orgServletClassName);
+ continue;
+ }
+ else if (orgServletClassName.endsWith("Servlet"))
+ {
+ log.info("Ignore <servlet-class> that ends with 'Servlet': " + orgServletClassName);
+ continue;
+ }
+
+ classElement.setText(servletClass);
+
+ // add additional init params
+ if (orgServletClassName.equals(servletClass) == false)
+ {
+ targetBeanName = orgServletClassName;
+ Element paramElement = servlet.addElement("init-param");
+ paramElement.addElement("param-name").addText(Endpoint.SEPID_DOMAIN_ENDPOINT);
+ paramElement.addElement("param-value").addText(targetBeanName);
+ }
+ }
+
+ if (targetBeanName == null)
+ throw new IllegalStateException("Cannot obtain service endpoint bean for: " + linkName);
+
+ // remember the target bean name
+ results.sepTargetMap.put(linkName, targetBeanName);
+ }
+
+ return results;
+ }
+
+ // Return true if the web.xml is already modified
+ private boolean isAlreadyModified(Element servlet)
+ {
+ for (Iterator it = servlet.elementIterator("init-param"); it.hasNext();)
+ {
+ Element elParam = (Element)it.next();
+ String paramName = elParam.element("param-name").getTextTrim();
+ if (Endpoint.SEPID_DOMAIN_ENDPOINT.equals(paramName))
+ return true;
+ }
+ return false;
+ }
+}
Property changes on: trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/DefaultWebAppDesciptorModifierImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ModifyWebMetaDataDeploymentAspect.java
===================================================================
--- trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ModifyWebMetaDataDeploymentAspect.java 2007-07-27 09:55:27 UTC (rev 4021)
+++ trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ModifyWebMetaDataDeploymentAspect.java 2007-07-27 13:54:43 UTC (rev 4022)
@@ -29,7 +29,6 @@
import org.jboss.metadata.web.ParamValue;
import org.jboss.metadata.web.ParamValue.ParamType;
import org.jboss.metadata.web.Servlet;
-import org.jboss.wsf.framework.deployment.WebAppDesciptorModifier;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.DeploymentAspect;
import org.jboss.wsf.spi.deployment.Endpoint;
@@ -48,19 +47,19 @@
@Override
public void create(Deployment dep)
{
- String propKey = WebAppDesciptorModifier.SERVLET_CLASS;
+ String propKey = "org.jboss.ws.webapp.ServletClass";
String servletClass = (String)dep.getProperty(propKey);
if (servletClass == null)
throw new IllegalStateException("Cannot obtain context property: " + propKey);
modifyServletClass(dep, servletClass);
- propKey = WebAppDesciptorModifier.SERVLET_CONTEXT_LISTENER;
+ propKey = "org.jboss.ws.webapp.ServletContextListener";
String listenerClass = (String)dep.getProperty(propKey);
if (listenerClass != null)
modifyListener(dep, listenerClass);
- propKey = WebAppDesciptorModifier.CONTEXT_PARAMETER_MAP;
+ propKey = "org.jboss.ws.webapp.ContextParameterMap";
Map<String, String> contextParams = (Map<String, String>)dep.getProperty(propKey);
if (contextParams != null)
modifyContextParams(dep, contextParams);
Added: trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/RewriteResults.java
===================================================================
--- trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/RewriteResults.java (rev 0)
+++ trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/RewriteResults.java 2007-07-27 13:54:43 UTC (rev 4022)
@@ -0,0 +1,38 @@
+/*
+ * 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.wsf.container.jboss50;
+
+import java.net.URL;
+import java.util.Map;
+import java.util.HashMap;
+
+/**
+ * @author Heiko.Braun(a)jboss.com
+ * Created: Jul 19, 2007
+ */
+public class RewriteResults
+{
+ // The URL to the rewritten web.xml
+ public URL webXML;
+ // Maps the servlet name to the target bean
+ public Map<String, String> sepTargetMap = new HashMap<String, String>();
+}
Property changes on: trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/RewriteResults.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/WebAppDeploymentAspect.java
===================================================================
--- trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/WebAppDeploymentAspect.java 2007-07-27 09:55:27 UTC (rev 4021)
+++ trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/WebAppDeploymentAspect.java 2007-07-27 13:54:43 UTC (rev 4022)
@@ -23,20 +23,19 @@
// $Id: WebAppDeployerDeployer.java 3772 2007-07-01 19:29:13Z thomas.diesler(a)jboss.com $
-import java.net.URL;
-import java.util.HashMap;
-import java.util.Map;
-
import org.jboss.deployers.client.spi.DeployerClient;
import org.jboss.deployers.vfs.spi.client.VFSDeploymentFactory;
import org.jboss.logging.Logger;
import org.jboss.virtual.VFS;
import org.jboss.virtual.VirtualFile;
-import org.jboss.wsf.framework.deployment.WebXMLRewriter;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.DeploymentAspect;
import org.jboss.wsf.spi.deployment.WSFDeploymentException;
+import java.net.URL;
+import java.util.Map;
+import java.util.HashMap;
+
/**
* Publish the HTTP service endpoint to Tomcat
*
@@ -49,7 +48,7 @@
private static Logger log = Logger.getLogger(WebAppDeploymentAspect.class);
private DeployerClient mainDeployer;
- private WebXMLRewriter webXMLRewriter;
+ private WebXMLRewriterImpl webXMLRewriter;
private Map<String, org.jboss.deployers.client.spi.Deployment> deploymentMap = new HashMap<String, org.jboss.deployers.client.spi.Deployment>();
public void setMainDeployer(DeployerClient mainDeployer)
@@ -57,7 +56,7 @@
this.mainDeployer = mainDeployer;
}
- public void setWebXMLRewriter(WebXMLRewriter serviceEndpointPublisher)
+ public void setWebXMLRewriter(WebXMLRewriterImpl serviceEndpointPublisher)
{
this.webXMLRewriter = serviceEndpointPublisher;
}
@@ -66,7 +65,7 @@
{
if (dep.getType().toString().endsWith("EJB21") || dep.getType().toString().endsWith("EJB3"))
{
- URL warURL = (URL)dep.getProperty(WebXMLRewriter.WEBAPP_URL);
+ URL warURL = (URL)dep.getProperty("org.jboss.ws.webapp.url");
log.debug("publishServiceEndpoint: " + warURL);
try
@@ -87,7 +86,7 @@
public void destroy(Deployment dep)
{
- URL warURL = (URL)dep.getProperty(WebXMLRewriter.WEBAPP_URL);
+ URL warURL = (URL)dep.getProperty("org.jboss.ws.webapp.url");
if (warURL == null)
{
log.error("Cannot obtain warURL");
Added: trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/WebAppDesciptorModifier.java
===================================================================
--- trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/WebAppDesciptorModifier.java (rev 0)
+++ trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/WebAppDesciptorModifier.java 2007-07-27 13:54:43 UTC (rev 4022)
@@ -0,0 +1,40 @@
+/*
+ * 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.wsf.container.jboss50;
+
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.dom4j.Document;
+
+/**
+ * Modifies the web app according to the stack requirements.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 19-May-2007
+ */
+public interface WebAppDesciptorModifier
+{
+ final String SERVLET_CONTEXT_LISTENER = "org.jboss.ws.webapp.ServletContextListener";
+ final String CONTEXT_PARAMETER_MAP = "org.jboss.ws.webapp.ContextParameterMap";
+ final String SERVLET_CLASS = "org.jboss.ws.webapp.ServletClass";
+
+ RewriteResults modifyDescriptor(Deployment dep, Document webXml) throws ClassNotFoundException;
+}
Property changes on: trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/WebAppDesciptorModifier.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/WebXMLRewriterImpl.java
===================================================================
--- trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/WebXMLRewriterImpl.java (rev 0)
+++ trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/WebXMLRewriterImpl.java 2007-07-27 13:54:43 UTC (rev 4022)
@@ -0,0 +1,119 @@
+/*
+ * 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.wsf.container.jboss50;
+
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.common.IOUtils;
+import org.dom4j.io.SAXReader;
+import org.dom4j.io.OutputFormat;
+import org.dom4j.io.XMLWriter;
+import org.dom4j.Document;
+
+import javax.xml.ws.WebServiceException;
+import java.net.URL;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.InputStream;
+import java.io.FileOutputStream;
+
+/**
+ * The rewriter for web.xml
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 19-May-2007
+ */
+public class WebXMLRewriterImpl
+{
+ private WebAppDesciptorModifier desciptorModifier;
+
+ public WebXMLRewriterImpl()
+ {
+ this.desciptorModifier = new DefaultWebAppDesciptorModifierImpl();
+ }
+
+ public WebAppDesciptorModifier getDesciptorModifier()
+ {
+ return desciptorModifier;
+ }
+
+ public void setDesciptorModifier(WebAppDesciptorModifier desciptorModifier)
+ {
+ this.desciptorModifier = desciptorModifier;
+ }
+
+ public RewriteResults rewriteWebXml(Deployment dep)
+ {
+ URL warURL = (URL)dep.getProperty("org.jboss.ws.webapp.url");
+ File warFile = new File(warURL.getFile());
+ if (warFile.isDirectory() == false)
+ throw new WebServiceException("Expected a war directory: " + warURL);
+
+ File webXML = new File(warURL.getFile() + "/WEB-INF/web.xml");
+ if (webXML.isFile() == false)
+ throw new WebServiceException("Cannot find web.xml: " + webXML);
+
+ try
+ {
+ // After redeployment there might be a stale copy of the original web.xml.org, we delete it
+ File orgWebXML = new File(webXML.getCanonicalPath() + ".org");
+ orgWebXML.delete();
+
+ // Rename the web.xml
+ if (webXML.renameTo(orgWebXML) == false)
+ throw new WebServiceException("Cannot rename web.xml: " + orgWebXML);
+
+ FileInputStream stream = new FileInputStream(orgWebXML);
+ return rewriteWebXml(stream, webXML, dep);
+ }
+ catch (RuntimeException rte)
+ {
+ throw rte;
+ }
+ catch (Exception e)
+ {
+ throw new WebServiceException(e);
+ }
+ }
+
+ private RewriteResults rewriteWebXml(InputStream source, File destFile, Deployment dep) throws Exception
+ {
+ if (destFile == null)
+ {
+ destFile = File.createTempFile("jbossws-alt-web", "xml", IOUtils.createTempDirectory());
+ destFile.deleteOnExit();
+ }
+
+ SAXReader reader = new SAXReader();
+ Document document = reader.read(source);
+
+ RewriteResults results = desciptorModifier.modifyDescriptor(dep, document);
+ results.webXML = destFile.toURL();
+
+ FileOutputStream fos = new FileOutputStream(destFile);
+ OutputFormat format = OutputFormat.createPrettyPrint();
+ XMLWriter writer = new XMLWriter(fos, format);
+ writer.write(document);
+ writer.close();
+
+ return results;
+ }
+}
Property changes on: trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/WebXMLRewriterImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: trunk/integration/jboss50/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-beans.xml
===================================================================
--- trunk/integration/jboss50/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-beans.xml 2007-07-27 09:55:27 UTC (rev 4021)
+++ trunk/integration/jboss50/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-beans.xml 2007-07-27 13:54:43 UTC (rev 4022)
@@ -196,8 +196,8 @@
<bean name="WSEndpointMetrics" class="org.jboss.wsf.framework.management.BasicEndpointMetrics"/>
<bean name="WSSecurityHandlerEJB21" class="org.jboss.wsf.container.jboss50.SecurityHandlerEJB21"/>
<bean name="WSSecurityHandlerEJB3" class="org.jboss.wsf.container.jboss50.SecurityHandlerEJB3"/>
- <bean name="WSWebAppDesciptorModifier" class="org.jboss.wsf.framework.deployment.DefaultWebAppDesciptorModifierImpl"/>
- <bean name="WSWebXMLRewriter" class="org.jboss.wsf.framework.deployment.WebXMLRewriterImpl">
+ <bean name="WSWebAppDesciptorModifier" class="org.jboss.wsf.container.jboss50.DefaultWebAppDesciptorModifierImpl"/>
+ <bean name="WSWebXMLRewriter" class="org.jboss.wsf.container.jboss50.WebXMLRewriterImpl">
<property name="desciptorModifier"><inject bean="WSWebAppDesciptorModifier"/></property>
</bean>
Modified: trunk/integration/native/src/main/resources/jbossws-native-config.xml
===================================================================
--- trunk/integration/native/src/main/resources/jbossws-native-config.xml 2007-07-27 09:55:27 UTC (rev 4021)
+++ trunk/integration/native/src/main/resources/jbossws-native-config.xml 2007-07-27 13:54:43 UTC (rev 4022)
@@ -51,7 +51,7 @@
<property name="provides">ContextProperties</property>
<property name="contextProperties">
<map keyClass="java.lang.String" valueClass="java.lang.String">
- <entry><key>ServletClass</key><value>org.jboss.wsf.stack.jbws.EndpointServlet</value></entry>
+ <entry><key>org.jboss.ws.webapp.ServletClass</key><value>org.jboss.wsf.stack.jbws.EndpointServlet</value></entry>
</map>
</property>
</bean>
Deleted: trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/DefaultWebAppDesciptorModifierImpl.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/DefaultWebAppDesciptorModifierImpl.java 2007-07-27 09:55:27 UTC (rev 4021)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/DefaultWebAppDesciptorModifierImpl.java 2007-07-27 13:54:43 UTC (rev 4022)
@@ -1,164 +0,0 @@
-/*
- * 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.wsf.framework.deployment;
-
-import java.util.Iterator;
-import java.util.Map;
-
-import org.dom4j.Document;
-import org.dom4j.Element;
-import org.jboss.logging.Logger;
-import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.deployment.Endpoint;
-
-/**
- * Modifies web.xml for jbossws
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 19-May-2006
- */
-public class DefaultWebAppDesciptorModifierImpl implements WebAppDesciptorModifier
-{
- // logging support
- private static Logger log = Logger.getLogger(DefaultWebAppDesciptorModifierImpl.class);
-
- public RewriteResults modifyDescriptor(Deployment dep, Document webXml) throws ClassNotFoundException
- {
- RewriteResults results = new RewriteResults();
- Element root = webXml.getRootElement();
-
- String propKey = SERVLET_CLASS;
- String servletClass = (String)dep.getProperty(propKey);
- if (servletClass == null)
- throw new IllegalStateException("Cannot obtain context property: " + propKey);
-
- propKey = CONTEXT_PARAMETER_MAP;
- Map<String, String> contextParams = (Map<String, String>)dep.getProperty(propKey);
- if (contextParams != null)
- {
- for (Map.Entry<String, String> entry : contextParams.entrySet())
- {
- Element contextParam = root.addElement("context-param");
- contextParam.addElement("param-name").addText(entry.getKey());
- contextParam.addElement("param-value").addText(entry.getValue());
- }
- }
-
- propKey = SERVLET_CONTEXT_LISTENER;
- String listenerClass = (String)dep.getProperty(propKey);
- if (listenerClass != null)
- {
- Element listener = root.addElement("listener");
- listener.addElement("listener-class").setText(listenerClass);
- }
-
- for (Iterator it = root.elementIterator("servlet"); it.hasNext();)
- {
- Element servlet = (Element)it.next();
- String linkName = servlet.element("servlet-name").getTextTrim();
-
- // find the servlet-class
- Element classElement = servlet.element("servlet-class");
-
- // JSP
- if (classElement == null)
- continue;
-
- String orgServletClassName = classElement.getTextTrim();
-
- // Get the servlet class
- Class orgServletClass = null;
- try
- {
- ClassLoader loader = dep.getInitialClassLoader();
- orgServletClass = loader.loadClass(orgServletClassName);
- }
- catch (ClassNotFoundException ex)
- {
- log.warn("Cannot load servlet class: " + orgServletClassName);
- }
-
- String targetBeanName = null;
-
- // Nothing to do if we have an <init-param>
- if (isAlreadyModified(servlet))
- {
- for (Iterator itParam = servlet.elementIterator("init-param"); itParam.hasNext();)
- {
- Element elParam = (Element)itParam.next();
- String paramName = elParam.element("param-name").getTextTrim();
- String paramValue = elParam.element("param-value").getTextTrim();
- if (Endpoint.SEPID_DOMAIN_ENDPOINT.equals(paramName))
- {
- targetBeanName = paramValue;
- }
- }
- }
- else
- {
- // Check if it is a real servlet that we can ignore
- if (orgServletClass != null && javax.servlet.Servlet.class.isAssignableFrom(orgServletClass))
- {
- log.info("Ignore servlet: " + orgServletClassName);
- continue;
- }
- else if (orgServletClassName.endsWith("Servlet"))
- {
- log.info("Ignore <servlet-class> that ends with 'Servlet': " + orgServletClassName);
- continue;
- }
-
- classElement.setText(servletClass);
-
- // add additional init params
- if (orgServletClassName.equals(servletClass) == false)
- {
- targetBeanName = orgServletClassName;
- Element paramElement = servlet.addElement("init-param");
- paramElement.addElement("param-name").addText(Endpoint.SEPID_DOMAIN_ENDPOINT);
- paramElement.addElement("param-value").addText(targetBeanName);
- }
- }
-
- if (targetBeanName == null)
- throw new IllegalStateException("Cannot obtain service endpoint bean for: " + linkName);
-
- // remember the target bean name
- results.sepTargetMap.put(linkName, targetBeanName);
- }
-
- return results;
- }
-
- // Return true if the web.xml is already modified
- private boolean isAlreadyModified(Element servlet)
- {
- for (Iterator it = servlet.elementIterator("init-param"); it.hasNext();)
- {
- Element elParam = (Element)it.next();
- String paramName = elParam.element("param-name").getTextTrim();
- if (Endpoint.SEPID_DOMAIN_ENDPOINT.equals(paramName))
- return true;
- }
- return false;
- }
-}
\ No newline at end of file
Deleted: trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/RewriteResults.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/RewriteResults.java 2007-07-27 09:55:27 UTC (rev 4021)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/RewriteResults.java 2007-07-27 13:54:43 UTC (rev 4022)
@@ -1,38 +0,0 @@
-/*
- * 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.wsf.framework.deployment;
-
-import java.net.URL;
-import java.util.Map;
-import java.util.HashMap;
-
-/**
- * @author Heiko.Braun(a)jboss.com
- * Created: Jul 19, 2007
- */
-public class RewriteResults
-{
- // The URL to the rewritten web.xml
- public URL webXML;
- // Maps the servlet name to the target bean
- public Map<String, String> sepTargetMap = new HashMap<String, String>();
-}
Deleted: trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/WebAppDesciptorModifier.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/WebAppDesciptorModifier.java 2007-07-27 09:55:27 UTC (rev 4021)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/WebAppDesciptorModifier.java 2007-07-27 13:54:43 UTC (rev 4022)
@@ -1,41 +0,0 @@
-/*
- * 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.wsf.framework.deployment;
-
-import org.dom4j.Document;
-import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.framework.deployment.RewriteResults;
-
-/**
- * Modifies the web app according to the stack requirements.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 19-May-2007
- */
-public interface WebAppDesciptorModifier
-{
- final String SERVLET_CONTEXT_LISTENER = "ServletContextListener";
- final String CONTEXT_PARAMETER_MAP = "ContextParameterMap";
- final String SERVLET_CLASS = "ServletClass";
-
- RewriteResults modifyDescriptor(Deployment dep, Document webXml) throws ClassNotFoundException;
-}
\ No newline at end of file
Deleted: trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/WebAppDesciptorModifierImpl.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/WebAppDesciptorModifierImpl.java 2007-07-27 09:55:27 UTC (rev 4021)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/WebAppDesciptorModifierImpl.java 2007-07-27 13:54:43 UTC (rev 4022)
@@ -1,164 +0,0 @@
-/*
- * 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.wsf.framework.deployment;
-
-import java.util.Iterator;
-import java.util.Map;
-
-import org.dom4j.Document;
-import org.dom4j.Element;
-import org.jboss.logging.Logger;
-import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.deployment.Endpoint;
-
-/**
- * Modifies web.xml for jbossws
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 19-May-2006
- */
-public class WebAppDesciptorModifierImpl implements WebAppDesciptorModifier
-{
- // logging support
- private static Logger log = Logger.getLogger(WebAppDesciptorModifierImpl.class);
-
- public RewriteResults modifyDescriptor(Deployment dep, Document webXml) throws ClassNotFoundException
- {
- RewriteResults results = new RewriteResults();
- Element root = webXml.getRootElement();
-
- String propKey = SERVLET_CLASS;
- String servletClass = (String)dep.getProperty(propKey);
- if (servletClass == null)
- throw new IllegalStateException("Cannot obtain context property: " + propKey);
-
- propKey = CONTEXT_PARAMETER_MAP;
- Map<String, String> contextParams = (Map<String, String>)dep.getProperty(propKey);
- if (contextParams != null)
- {
- for (Map.Entry<String, String> entry : contextParams.entrySet())
- {
- Element contextParam = root.addElement("context-param");
- contextParam.addElement("param-name").addText(entry.getKey());
- contextParam.addElement("param-value").addText(entry.getValue());
- }
- }
-
- propKey = SERVLET_CONTEXT_LISTENER;
- String listenerClass = (String)dep.getProperty(propKey);
- if (listenerClass != null)
- {
- Element listener = root.addElement("listener");
- listener.addElement("listener-class").setText(listenerClass);
- }
-
- for (Iterator it = root.elementIterator("servlet"); it.hasNext();)
- {
- Element servlet = (Element)it.next();
- String linkName = servlet.element("servlet-name").getTextTrim();
-
- // find the servlet-class
- Element classElement = servlet.element("servlet-class");
-
- // JSP
- if (classElement == null)
- continue;
-
- String orgServletClassName = classElement.getTextTrim();
-
- // Get the servlet class
- Class orgServletClass = null;
- try
- {
- ClassLoader loader = dep.getInitialClassLoader();
- orgServletClass = loader.loadClass(orgServletClassName);
- }
- catch (ClassNotFoundException ex)
- {
- log.warn("Cannot load servlet class: " + orgServletClassName);
- }
-
- String targetBeanName = null;
-
- // Nothing to do if we have an <init-param>
- if (isAlreadyModified(servlet))
- {
- for (Iterator itParam = servlet.elementIterator("init-param"); itParam.hasNext();)
- {
- Element elParam = (Element)itParam.next();
- String paramName = elParam.element("param-name").getTextTrim();
- String paramValue = elParam.element("param-value").getTextTrim();
- if (Endpoint.SEPID_DOMAIN_ENDPOINT.equals(paramName))
- {
- targetBeanName = paramValue;
- }
- }
- }
- else
- {
- // Check if it is a real servlet that we can ignore
- if (orgServletClass != null && javax.servlet.Servlet.class.isAssignableFrom(orgServletClass))
- {
- log.info("Ignore servlet: " + orgServletClassName);
- continue;
- }
- else if (orgServletClassName.endsWith("Servlet"))
- {
- log.info("Ignore <servlet-class> that ends with 'Servlet': " + orgServletClassName);
- continue;
- }
-
- classElement.setText(servletClass);
-
- // add additional init params
- if (orgServletClassName.equals(servletClass) == false)
- {
- targetBeanName = orgServletClassName;
- Element paramElement = servlet.addElement("init-param");
- paramElement.addElement("param-name").addText(Endpoint.SEPID_DOMAIN_ENDPOINT);
- paramElement.addElement("param-value").addText(targetBeanName);
- }
- }
-
- if (targetBeanName == null)
- throw new IllegalStateException("Cannot obtain service endpoint bean for: " + linkName);
-
- // remember the target bean name
- results.sepTargetMap.put(linkName, targetBeanName);
- }
-
- return results;
- }
-
- // Return true if the web.xml is already modified
- private boolean isAlreadyModified(Element servlet)
- {
- for (Iterator it = servlet.elementIterator("init-param"); it.hasNext();)
- {
- Element elParam = (Element)it.next();
- String paramName = elParam.element("param-name").getTextTrim();
- if (Endpoint.SEPID_DOMAIN_ENDPOINT.equals(paramName))
- return true;
- }
- return false;
- }
-}
\ No newline at end of file
Modified: trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/WebAppGeneratorDeploymentAspect.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/WebAppGeneratorDeploymentAspect.java 2007-07-27 09:55:27 UTC (rev 4021)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/WebAppGeneratorDeploymentAspect.java 2007-07-27 13:54:43 UTC (rev 4022)
@@ -76,12 +76,12 @@
if (dep.getType().toString().endsWith("EJB21"))
{
URL webAppURL = generatWebDeployment((ArchiveDeployment)dep, securityHandlerEJB21);
- dep.setProperty(WebXMLRewriter.WEBAPP_URL, webAppURL);
+ dep.setProperty("org.jboss.ws.webapp.url", webAppURL);
}
else if (dep.getType().toString().endsWith("EJB3"))
{
URL webAppURL = generatWebDeployment((ArchiveDeployment)dep, securityHandlerEJB3);
- dep.setProperty(WebXMLRewriter.WEBAPP_URL, webAppURL);
+ dep.setProperty("org.jboss.ws.webapp.url", webAppURL);
}
}
Deleted: trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/WebXMLRewriter.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/WebXMLRewriter.java 2007-07-27 09:55:27 UTC (rev 4021)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/WebXMLRewriter.java 2007-07-27 13:54:43 UTC (rev 4022)
@@ -1,35 +0,0 @@
-/*
- * 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.wsf.framework.deployment;
-
-import org.jboss.wsf.spi.deployment.Deployment;
-
-/**
- * @author Heiko.Braun(a)jboss.com
- * Created: Jul 19, 2007
- */
-public interface WebXMLRewriter
-{
- final String WEBAPP_URL = "org.jboss.ws.webapp.url";
-
- RewriteResults rewriteWebXml(Deployment dep);
-}
Deleted: trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/WebXMLRewriterImpl.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/WebXMLRewriterImpl.java 2007-07-27 09:55:27 UTC (rev 4021)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/WebXMLRewriterImpl.java 2007-07-27 13:54:43 UTC (rev 4022)
@@ -1,120 +0,0 @@
-/*
- * 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.wsf.framework.deployment;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.InputStream;
-import java.net.URL;
-
-import javax.xml.ws.WebServiceException;
-
-import org.dom4j.Document;
-import org.dom4j.io.OutputFormat;
-import org.dom4j.io.SAXReader;
-import org.dom4j.io.XMLWriter;
-import org.jboss.wsf.common.IOUtils;
-import org.jboss.wsf.spi.deployment.Deployment;
-
-/**
- * The rewriter for web.xml
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 19-May-2007
- */
-public class WebXMLRewriterImpl implements WebXMLRewriter
-{
- private WebAppDesciptorModifier desciptorModifier;
-
- public WebXMLRewriterImpl()
- {
- this.desciptorModifier = new DefaultWebAppDesciptorModifierImpl();
- }
-
- public WebAppDesciptorModifier getDesciptorModifier()
- {
- return desciptorModifier;
- }
-
- public void setDesciptorModifier(WebAppDesciptorModifier desciptorModifier)
- {
- this.desciptorModifier = desciptorModifier;
- }
-
- public RewriteResults rewriteWebXml(Deployment dep)
- {
- URL warURL = (URL)dep.getProperty(WebXMLRewriter.WEBAPP_URL);
- File warFile = new File(warURL.getFile());
- if (warFile.isDirectory() == false)
- throw new WebServiceException("Expected a war directory: " + warURL);
-
- File webXML = new File(warURL.getFile() + "/WEB-INF/web.xml");
- if (webXML.isFile() == false)
- throw new WebServiceException("Cannot find web.xml: " + webXML);
-
- try
- {
- // After redeployment there might be a stale copy of the original web.xml.org, we delete it
- File orgWebXML = new File(webXML.getCanonicalPath() + ".org");
- orgWebXML.delete();
-
- // Rename the web.xml
- if (webXML.renameTo(orgWebXML) == false)
- throw new WebServiceException("Cannot rename web.xml: " + orgWebXML);
-
- FileInputStream stream = new FileInputStream(orgWebXML);
- return rewriteWebXml(stream, webXML, dep);
- }
- catch (RuntimeException rte)
- {
- throw rte;
- }
- catch (Exception e)
- {
- throw new WebServiceException(e);
- }
- }
-
- private RewriteResults rewriteWebXml(InputStream source, File destFile, Deployment dep) throws Exception
- {
- if (destFile == null)
- {
- destFile = File.createTempFile("jbossws-alt-web", "xml", IOUtils.createTempDirectory());
- destFile.deleteOnExit();
- }
-
- SAXReader reader = new SAXReader();
- Document document = reader.read(source);
-
- RewriteResults results = desciptorModifier.modifyDescriptor(dep, document);
- results.webXML = destFile.toURL();
-
- FileOutputStream fos = new FileOutputStream(destFile);
- OutputFormat format = OutputFormat.createPrettyPrint();
- XMLWriter writer = new XMLWriter(fos, format);
- writer.write(document);
- writer.close();
-
- return results;
- }
-}
\ No newline at end of file
Modified: trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/SunJaxwsDeploymentAspect.java
===================================================================
--- trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/SunJaxwsDeploymentAspect.java 2007-07-27 09:55:27 UTC (rev 4021)
+++ trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/SunJaxwsDeploymentAspect.java 2007-07-27 13:54:43 UTC (rev 4022)
@@ -23,19 +23,17 @@
//$Id: SunJaxwsDeployer.java 3802 2007-07-05 16:44:32Z thomas.diesler(a)jboss.com $
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.xml.ws.BindingType;
-import javax.xml.ws.soap.SOAPBinding;
-
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.DeploymentAspect;
import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.framework.deployment.WebAppDesciptorModifier;
import org.jboss.wsf.stack.sunri.metadata.sunjaxws.DDEndpoint;
import org.jboss.wsf.stack.sunri.metadata.sunjaxws.DDEndpoints;
+import javax.xml.ws.BindingType;
+import javax.xml.ws.soap.SOAPBinding;
+import java.util.HashMap;
+import java.util.Map;
+
/**
* A deployer that generates sun-jaxws.xml
*
@@ -76,7 +74,7 @@
dep.addAttachment(DDEndpoints.class, dd);
- String propKey = WebAppDesciptorModifier.CONTEXT_PARAMETER_MAP;
+ String propKey = "org.jboss.ws.webapp.ContextParameterMap";
Map<String, String> contextParams = (Map<String, String>)dep.getProperty(propKey);
if (contextParams == null)
{
Deleted: trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/WebAppDesciptorModifierImpl.java
===================================================================
--- trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/WebAppDesciptorModifierImpl.java 2007-07-27 09:55:27 UTC (rev 4021)
+++ trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/WebAppDesciptorModifierImpl.java 2007-07-27 13:54:43 UTC (rev 4022)
@@ -1,136 +0,0 @@
-/*
- * 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.wsf.stack.sunri;
-
-import java.util.Iterator;
-
-import org.dom4j.Document;
-import org.dom4j.Element;
-import org.jboss.logging.Logger;
-import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.framework.deployment.WebAppDesciptorModifier;
-import org.jboss.wsf.stack.sunri.metadata.sunjaxws.DDEndpoints;
-import org.jboss.wsf.framework.deployment.RewriteResults;
-
-/**
- * Modifies web.xml for sun-ri
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 19-May-2006
- */
-public class WebAppDesciptorModifierImpl implements WebAppDesciptorModifier
-{
- // logging support
- private static Logger log = Logger.getLogger(WebAppDesciptorModifierImpl.class);
-
- private String listenerClass;
- private String servletClass;
-
- public String getListenerClass()
- {
- return listenerClass;
- }
-
- public void setListenerClass(String listenerClass)
- {
- this.listenerClass = listenerClass;
- }
-
- public String getServletClass()
- {
- return servletClass;
- }
-
- public void setServletClass(String servletClass)
- {
- this.servletClass = servletClass;
- }
-
- public RewriteResults modifyDescriptor(Deployment dep, Document webXml) throws ClassNotFoundException
- {
- RewriteResults results = new RewriteResults();
-
- Element root = webXml.getRootElement();
-
- DDEndpoints ddSunJaxws = dep.getAttachment(DDEndpoints.class);
- if (ddSunJaxws == null)
- throw new IllegalStateException("Cannot obtain sun-jaxws meta data");
-
- Element contextParam = root.addElement("context-param");
- contextParam.addElement("param-name").addText(WSServletContextListenerJBWS.PARAM_SUN_JAXWS_URL);
- contextParam.addElement("param-value").addText(ddSunJaxws.createFileURL().toExternalForm());
-
- root.addElement("listener").addElement("listener-class").addText(listenerClass);
-
- for (Iterator it = root.elementIterator("servlet"); it.hasNext();)
- {
- Element servlet = (Element)it.next();
- String linkName = servlet.element("servlet-name").getTextTrim();
-
- // find the servlet-class
- Element classElement = servlet.element("servlet-class");
-
- // JSP
- if (classElement == null)
- continue;
-
- String orgServletClassName = classElement.getTextTrim();
-
- // Get the servlet class
- Class orgServletClass = null;
- try
- {
- ClassLoader loader = dep.getInitialClassLoader();
- orgServletClass = loader.loadClass(orgServletClassName);
- }
- catch (ClassNotFoundException ex)
- {
- log.warn("Cannot load servlet class: " + orgServletClassName);
- }
-
- String targetBeanName = null;
-
- // Check if it is a real servlet that we can ignore
- if (orgServletClass != null && javax.servlet.Servlet.class.isAssignableFrom(orgServletClass))
- {
- log.info("Ignore servlet: " + orgServletClassName);
- continue;
- }
- else if (orgServletClassName.endsWith("Servlet"))
- {
- log.info("Ignore <servlet-class> that ends with 'Servlet': " + orgServletClassName);
- continue;
- }
-
- classElement.setText(servletClass);
- targetBeanName = orgServletClassName;
-
- if (targetBeanName == null)
- throw new IllegalStateException("Cannot obtain service endpoint bean for: " + linkName);
-
- // remember the target bean name
- results.sepTargetMap.put(linkName, targetBeanName);
- }
-
- return results;
- }
-}
\ No newline at end of file
Modified: trunk/integration/sunri/src/main/resources/jbossws-sunri-config.xml
===================================================================
--- trunk/integration/sunri/src/main/resources/jbossws-sunri-config.xml 2007-07-27 09:55:27 UTC (rev 4021)
+++ trunk/integration/sunri/src/main/resources/jbossws-sunri-config.xml 2007-07-27 13:54:43 UTC (rev 4022)
@@ -67,8 +67,8 @@
<property name="provides">ContextProperties</property>
<property name="contextProperties">
<map keyClass="java.lang.String" valueClass="java.lang.String">
- <entry><key>ServletClass</key><value>org.jboss.wsf.stack.sunri.EndpointServlet</value></entry>
- <entry><key>ServletContextListener</key><value>org.jboss.wsf.stack.sunri.WSServletContextListenerJBWS</value></entry>
+ <entry><key>org.jboss.ws.webapp.ServletClass</key><value>org.jboss.wsf.stack.sunri.EndpointServlet</value></entry>
+ <entry><key>org.jboss.ws.webapp.ServletContextListener</key><value>org.jboss.wsf.stack.sunri.WSServletContextListenerJBWS</value></entry>
</map>
</property>
</bean>
Modified: trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/DescriptorDeploymentAspect.java
===================================================================
--- trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/DescriptorDeploymentAspect.java 2007-07-27 09:55:27 UTC (rev 4021)
+++ trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/DescriptorDeploymentAspect.java 2007-07-27 13:54:43 UTC (rev 4022)
@@ -23,19 +23,18 @@
//$Id: XFireServicesDeployer.java 3802 2007-07-05 16:44:32Z thomas.diesler(a)jboss.com $
-import java.util.HashMap;
-import java.util.Map;
-
import org.jboss.logging.Logger;
import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
import org.jboss.wsf.spi.deployment.DeploymentAspect;
import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.framework.deployment.WebAppDesciptorModifier;
-import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
import org.jboss.wsf.stack.xfire.metadata.services.DDBean;
import org.jboss.wsf.stack.xfire.metadata.services.DDBeans;
import org.jboss.wsf.stack.xfire.metadata.services.DDEndpoint;
+import java.util.HashMap;
+import java.util.Map;
+
/**
* A deployer that generates cxf.xml
*
@@ -106,7 +105,7 @@
dep.addAttachment(DDBeans.class, dd);
- String propKey = WebAppDesciptorModifier.CONTEXT_PARAMETER_MAP;
+ String propKey = "org.jboss.ws.webapp.ContextParameterMap";
Map<String, String> contextParams = (Map<String, String>)dep.getProperty(propKey);
if (contextParams == null)
{
Deleted: trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/WebAppDesciptorModifierImpl.java
===================================================================
--- trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/WebAppDesciptorModifierImpl.java 2007-07-27 09:55:27 UTC (rev 4021)
+++ trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/WebAppDesciptorModifierImpl.java 2007-07-27 13:54:43 UTC (rev 4022)
@@ -1,123 +0,0 @@
-/*
- * 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.wsf.stack.xfire;
-
-import java.util.Iterator;
-
-import org.dom4j.Document;
-import org.dom4j.Element;
-import org.jboss.logging.Logger;
-import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.framework.deployment.WebAppDesciptorModifier;
-import org.jboss.wsf.stack.xfire.metadata.services.DDBeans;
-import org.jboss.wsf.framework.deployment.RewriteResults;
-
-/**
- * Modifies web.xml for xfire
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 21-May-2006
- */
-public class WebAppDesciptorModifierImpl implements WebAppDesciptorModifier
-{
- // logging support
- private static Logger log = Logger.getLogger(WebAppDesciptorModifierImpl.class);
-
- private String servletClass;
-
- public String getServletClass()
- {
- return servletClass;
- }
-
- public void setServletClass(String servletClass)
- {
- this.servletClass = servletClass;
- }
-
- public RewriteResults modifyDescriptor(Deployment dep, Document webXml) throws ClassNotFoundException
- {
- RewriteResults results = new RewriteResults();
-
- Element root = webXml.getRootElement();
-
- DDBeans ddbeans = dep.getAttachment(DDBeans.class);
- if (ddbeans == null)
- throw new IllegalStateException("Cannot obtain sun-jaxws meta data");
-
- Element contextParam = root.addElement("context-param");
- contextParam.addElement("param-name").addText(CXFServletExt.PARAM_CXF_BEANS_URL);
- contextParam.addElement("param-value").addText(ddbeans.createFileURL().toExternalForm());
-
- for (Iterator it = root.elementIterator("servlet"); it.hasNext();)
- {
- Element servlet = (Element)it.next();
- String linkName = servlet.element("servlet-name").getTextTrim();
-
- // find the servlet-class
- Element classElement = servlet.element("servlet-class");
-
- // JSP
- if (classElement == null)
- continue;
-
- String orgServletClassName = classElement.getTextTrim();
-
- // Get the servlet class
- Class orgServletClass = null;
- try
- {
- ClassLoader loader = dep.getInitialClassLoader();
- orgServletClass = loader.loadClass(orgServletClassName);
- }
- catch (ClassNotFoundException ex)
- {
- log.warn("Cannot load servlet class: " + orgServletClassName);
- }
-
- String targetBeanName = null;
-
- // Check if it is a real servlet that we can ignore
- if (orgServletClass != null && javax.servlet.Servlet.class.isAssignableFrom(orgServletClass))
- {
- log.info("Ignore servlet: " + orgServletClassName);
- continue;
- }
- else if (orgServletClassName.endsWith("Servlet"))
- {
- log.info("Ignore <servlet-class> that ends with 'Servlet': " + orgServletClassName);
- continue;
- }
-
- classElement.setText(servletClass);
- targetBeanName = orgServletClassName;
-
- if (targetBeanName == null)
- throw new IllegalStateException("Cannot obtain service endpoint bean for: " + linkName);
-
- // remember the target bean name
- results.sepTargetMap.put(linkName, targetBeanName);
- }
-
- return results;
- }
-}
\ No newline at end of file
Modified: trunk/integration/xfire/src/main/resources/jbossws-xfire-config.xml
===================================================================
--- trunk/integration/xfire/src/main/resources/jbossws-xfire-config.xml 2007-07-27 09:55:27 UTC (rev 4021)
+++ trunk/integration/xfire/src/main/resources/jbossws-xfire-config.xml 2007-07-27 13:54:43 UTC (rev 4022)
@@ -32,7 +32,7 @@
<property name="provides">ContextProperties</property>
<property name="contextProperties">
<map keyClass="java.lang.String" valueClass="java.lang.String">
- <entry><key>ServletClass</key><value>org.jboss.wsf.stack.xfire.CXFServletExt</value></entry>
+ <entry><key>org.jboss.ws.webapp.ServletClass</key><value>org.jboss.wsf.stack.xfire.CXFServletExt</value></entry>
</map>
</property>
</bean>
[View Less]
17 years, 8 months
JBossWS SVN: r4021 - trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-07-27 05:55:27 -0400 (Fri, 27 Jul 2007)
New Revision: 4021
Modified:
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicService.java
Log:
Allow getEndpointByName to return null
Modified: trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicService.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/…
[View More]BasicService.java 2007-07-27 09:29:58 UTC (rev 4020)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicService.java 2007-07-27 09:55:27 UTC (rev 4021)
@@ -71,9 +71,6 @@
public Endpoint getEndpointByName(String shortName)
{
- if (shortName == null)
- throw new IllegalArgumentException("shortName cannot be null");
-
Endpoint retEndpoint = null;
for (Endpoint ep : endpoints)
{
[View Less]
17 years, 8 months
JBossWS SVN: r4020 - in trunk: integration/spi/src/main/java/org/jboss/wsf/spi/deployment and 6 other directories.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-07-27 05:29:58 -0400 (Fri, 27 Jul 2007)
New Revision: 4020
Modified:
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicService.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/Service.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/spi/EndpointImpl.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java
trunk/jbossws-core/src/main/java/org/…
[View More]jboss/ws/metadata/builder/jaxrpc/JAXRPCServerMetaDataBuilder.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSProviderMetaDataBuilder.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/OperationMetaData.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ServerEndpointMetaData.java
trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/wspolicy/PolicyMetaDataBuilderTestCase.java
Log:
Make Endpoint mandatory in ServerEndpointMetaData
Modified: trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicService.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicService.java 2007-07-27 06:52:56 UTC (rev 4019)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BasicService.java 2007-07-27 09:29:58 UTC (rev 4020)
@@ -69,6 +69,23 @@
return endpoints;
}
+ public Endpoint getEndpointByName(String shortName)
+ {
+ if (shortName == null)
+ throw new IllegalArgumentException("shortName cannot be null");
+
+ Endpoint retEndpoint = null;
+ for (Endpoint ep : endpoints)
+ {
+ if (ep.getShortName().equals(shortName))
+ {
+ retEndpoint = ep;
+ break;
+ }
+ }
+ return retEndpoint;
+ }
+
public String getContextRoot()
{
return contextRoot;
Modified: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/Service.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/Service.java 2007-07-27 06:52:56 UTC (rev 4019)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/Service.java 2007-07-27 09:29:58 UTC (rev 4020)
@@ -47,6 +47,9 @@
/** Get the list of endpoints */
List<Endpoint> getEndpoints();
+ /** Get an endpoint by name */
+ Endpoint getEndpointByName(String simpleName);
+
/** Get the context root for this service */
String getContextRoot();
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/spi/EndpointImpl.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/spi/EndpointImpl.java 2007-07-27 06:52:56 UTC (rev 4019)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/spi/EndpointImpl.java 2007-07-27 09:29:58 UTC (rev 4020)
@@ -45,7 +45,6 @@
import org.jboss.ws.core.server.HttpServer;
import org.jboss.wsf.spi.SPIProvider;
import org.jboss.wsf.spi.SPIProviderResolver;
-import org.jboss.wsf.spi.management.ServerConfig;
import org.jboss.wsf.spi.management.ServerConfigFactory;
import org.w3c.dom.Element;
@@ -74,7 +73,7 @@
public EndpointImpl(String bindingId, Object implementor)
{
- if(log.isDebugEnabled()) log.debug("new EndpointImpl(bindingId=" + bindingId + ",implementor=" + implementor + ")");
+ log.debug("new EndpointImpl(bindingId=" + bindingId + ",implementor=" + implementor + ")");
if (implementor == null)
throw new IllegalArgumentException("Implementor cannot be null");
@@ -105,7 +104,7 @@
@Override
public void publish(String address)
{
- if(log.isDebugEnabled()) log.debug("publish: " + address);
+ log.debug("publish: " + address);
URI addrURI;
try
@@ -142,7 +141,7 @@
@Override
public void publish(Object context)
{
- if(log.isDebugEnabled()) log.debug("publish: " + context);
+ log.debug("publish: " + context);
if (isDestroyed)
throw new IllegalStateException("Endpoint already destroyed");
@@ -155,7 +154,7 @@
try
{
SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- ServerConfig serverConfig = spiProvider.getSPI(ServerConfigFactory.class).getServerConfig();
+ spiProvider.getSPI(ServerConfigFactory.class).getServerConfig();
isStandalone = false;
}
catch (Exception ex)
@@ -179,8 +178,8 @@
@Override
public void stop()
{
- if(log.isDebugEnabled()) log.debug("stop");
-
+ log.debug("stop");
+
if (serverContext == null || isPublished == false)
log.error("Endpoint not published");
@@ -245,7 +244,6 @@
properties = map;
}
-
private void checkPublishEndpointPermission()
{
// 5.10 Conformance (Checking publishEndpoint Permission): When any of the publish methods defined
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java 2007-07-27 06:52:56 UTC (rev 4019)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java 2007-07-27 09:29:58 UTC (rev 4020)
@@ -138,7 +138,7 @@
String linkName = sepMetaData.getLinkName();
if (linkName != null)
{
- Endpoint endpoint = getEndpointByName(dep, linkName);
+ Endpoint endpoint = dep.getService().getEndpointByName(linkName);
if (endpoint != null)
urlPattern = endpoint.getURLPattern();
}
@@ -175,23 +175,6 @@
sepMetaData.setEndpointAddress(getServiceEndpointAddress(null, servicePath));
}
- private Endpoint getEndpointByName(Deployment dep, String shortName)
- {
- if (shortName == null)
- throw new IllegalArgumentException("shortName cannot be null");
-
- Endpoint retEndpoint = null;
- for (Endpoint ep : dep.getService().getEndpoints())
- {
- if (ep.getShortName().equals(shortName))
- {
- retEndpoint = ep;
- break;
- }
- }
- return retEndpoint;
- }
-
public static ObjectName createServiceEndpointID(Deployment dep, ServerEndpointMetaData sepMetaData)
{
String linkName = sepMetaData.getLinkName();
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCServerMetaDataBuilder.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCServerMetaDataBuilder.java 2007-07-27 06:52:56 UTC (rev 4019)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCServerMetaDataBuilder.java 2007-07-27 09:29:58 UTC (rev 4020)
@@ -43,6 +43,7 @@
import org.jboss.ws.metadata.wsse.WSSecurityConfiguration;
import org.jboss.ws.metadata.wsse.WSSecurityOMFactory;
import org.jboss.wsf.spi.deployment.ArchiveDeployment;
+import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.metadata.j2ee.EJBMetaData;
import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
import org.jboss.wsf.spi.metadata.j2ee.EJBSecurityMetaData;
@@ -111,6 +112,7 @@
PortComponentMetaData[] pcMetaDataArr = wsdMetaData.getPortComponents();
for (PortComponentMetaData pcMetaData : pcMetaDataArr)
{
+ String linkName = pcMetaData.getEjbLink() != null ? pcMetaData.getEjbLink() : pcMetaData.getServletLink();
QName portName = pcMetaData.getWsdlPort();
// JBWS-722
@@ -131,9 +133,9 @@
serviceMetaData.setServiceName(wsdlEndpoint.getWsdlService().getName());
QName interfaceQName = wsdlEndpoint.getInterface().getName();
- ServerEndpointMetaData sepMetaData = new ServerEndpointMetaData(serviceMetaData, portName, interfaceQName, Type.JAXRPC);
+ Endpoint ep = dep.getService().getEndpointByName(linkName);
+ ServerEndpointMetaData sepMetaData = new ServerEndpointMetaData(serviceMetaData, ep, portName, interfaceQName, Type.JAXRPC);
sepMetaData.setPortComponentName(pcMetaData.getPortComponentName());
- String linkName = pcMetaData.getEjbLink() != null ? pcMetaData.getEjbLink() : pcMetaData.getServletLink();
sepMetaData.setLinkName(linkName);
serviceMetaData.addEndpoint(sepMetaData);
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSProviderMetaDataBuilder.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSProviderMetaDataBuilder.java 2007-07-27 06:52:56 UTC (rev 4019)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSProviderMetaDataBuilder.java 2007-07-27 09:29:58 UTC (rev 4020)
@@ -49,6 +49,7 @@
import org.jboss.ws.metadata.wsdl.WSDLUtils;
import org.jboss.wsf.common.JavaUtils;
import org.jboss.wsf.spi.deployment.ArchiveDeployment;
+import org.jboss.wsf.spi.deployment.Endpoint;
/**
* A server side meta data builder that is based on JSR-181 annotations
@@ -99,7 +100,9 @@
// Setup the ServerEndpointMetaData
QName portQName = new QName(targetNS, portName);
QName portTypeQName = new QName(targetNS, name);
- ServerEndpointMetaData sepMetaData = new ServerEndpointMetaData(serviceMetaData, portQName, portTypeQName, Type.JAXWS);
+
+ Endpoint ep = dep.getService().getEndpointByName(linkName);
+ ServerEndpointMetaData sepMetaData = new ServerEndpointMetaData(serviceMetaData, ep, portQName, portTypeQName, Type.JAXWS);
sepMetaData.setLinkName(linkName);
sepMetaData.setStyle(Style.DOCUMENT);
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java 2007-07-27 06:52:56 UTC (rev 4019)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java 2007-07-27 09:29:58 UTC (rev 4020)
@@ -60,6 +60,7 @@
import org.jboss.wsf.common.IOUtils;
import org.jboss.wsf.spi.deployment.ArchiveDeployment;
import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerChainMetaData;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerChainsMetaData;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData;
@@ -104,7 +105,7 @@
{
try
{
- EndpointResult result = processWebService(dep, wsMetaData, sepClass);
+ EndpointResult result = processWebService(dep, wsMetaData, sepClass, linkName);
// Clear the java types, etc.
resetMetaDataBuilder(dep.getInitialClassLoader());
@@ -275,13 +276,14 @@
}
}
- private EndpointResult processWebService(Deployment dep, UnifiedMetaData wsMetaData, Class<?> sepClass)
- throws ClassNotFoundException, IOException
+ private EndpointResult processWebService(Deployment dep, UnifiedMetaData wsMetaData, Class<?> sepClass, String linkName) throws ClassNotFoundException, IOException
{
WebService anWebService = sepClass.getAnnotation(WebService.class);
if (anWebService == null)
throw new WSException("Cannot obtain @WebService annotation from: " + sepClass.getName());
+ Endpoint ep = dep.getService().getEndpointByName(linkName);
+
Class<?> seiClass = null;
String seiName;
WSDLUtils wsdlUtils = WSDLUtils.getInstance();
@@ -340,11 +342,11 @@
EndpointResult result = new EndpointResult();
result.serviceMetaData = new ServiceMetaData(wsMetaData, new QName(serviceNS, serviceName));
- result.sepMetaData = new ServerEndpointMetaData(result.serviceMetaData, portQName, portTypeQName, EndpointMetaData.Type.JAXWS);
+ result.sepMetaData = new ServerEndpointMetaData(result.serviceMetaData, ep, portQName, portTypeQName, EndpointMetaData.Type.JAXWS);
result.epClass = (seiClass != null ? seiClass : sepClass);
result.serviceMetaData.addEndpoint(result.sepMetaData);
wsMetaData.addService(result.serviceMetaData);
-
+
if (dep instanceof ArchiveDeployment)
result.wsdlLocation = ((ArchiveDeployment)dep).getMetaDataFileURL(wsdlLocation);
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/OperationMetaData.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/OperationMetaData.java 2007-07-27 06:52:56 UTC (rev 4019)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/OperationMetaData.java 2007-07-27 09:29:58 UTC (rev 4020)
@@ -68,14 +68,6 @@
private List<FaultMetaData> faults = new ArrayList<FaultMetaData>();
private ParameterMetaData returnParam;
- public OperationMetaData(QName qname, String javaName)
- {
- UnifiedMetaData umd = new UnifiedMetaData(new ResourceLoaderAdapter());
- ServiceMetaData smd = new ServiceMetaData(umd, new QName("mock-service"));
- ServerEndpointMetaData epmd = new ServerEndpointMetaData(smd, new QName("mock-endpoint"), new QName("mock-interface"), Type.JAXRPC);
- initOperationMetaData(epmd, qname, javaName);
- }
-
public OperationMetaData(EndpointMetaData epMetaData, QName qname, String javaName)
{
log.trace("new OperationMetaData: [xmlName=" + qname + ",javaName=" + javaName + "]");
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ServerEndpointMetaData.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ServerEndpointMetaData.java 2007-07-27 06:52:56 UTC (rev 4019)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ServerEndpointMetaData.java 2007-07-27 09:29:58 UTC (rev 4020)
@@ -73,11 +73,12 @@
// The optional secure wsdl access
private boolean secureWSDLAccess;
- public ServerEndpointMetaData(ServiceMetaData service, QName portName, QName portTypeName, Type type)
+ public ServerEndpointMetaData(ServiceMetaData service, Endpoint endpoint, QName portName, QName portTypeName, Type type)
{
super(service, portName, portTypeName, type);
+ this.endpoint = endpoint;
+
super.configName = ConfigurationProvider.DEFAULT_ENDPOINT_CONFIG_NAME;
-
if (type == Type.JAXRPC)
configFile = ConfigurationProvider.DEFAULT_JAXRPC_ENDPOINT_CONFIG_FILE;
else
Modified: trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/wspolicy/PolicyMetaDataBuilderTestCase.java
===================================================================
--- trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/wspolicy/PolicyMetaDataBuilderTestCase.java 2007-07-27 06:52:56 UTC (rev 4019)
+++ trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/wspolicy/PolicyMetaDataBuilderTestCase.java 2007-07-27 09:29:58 UTC (rev 4020)
@@ -63,7 +63,7 @@
ServiceMetaData serviceMetaData = new ServiceMetaData(umd, serviceName);
QName portName = new QName("http://org.jboss.ws/jaxws/endpoint", "EndpointInterfacePort");
QName portTypeName = new QName("http://org.jboss.ws/jaxws/endpoint", "EndpointInterface");
- EndpointMetaData epMetaData = new ServerEndpointMetaData(serviceMetaData, portName, portTypeName, Type.JAXWS);
+ EndpointMetaData epMetaData = new ServerEndpointMetaData(serviceMetaData, null, portName, portTypeName, Type.JAXWS);
Map<String, Class> map = new HashMap<String, Class>();
map.put("http://schemas.xmlsoap.org/ws/2005/02/rm/policy", NopAssertionDeployer.class);
@@ -112,7 +112,7 @@
UnifiedMetaData umd = new UnifiedMetaData(vfRoot);
ServiceMetaData serviceMetaData = new ServiceMetaData(umd, new QName("dummyServiceName"));
umd.addService(serviceMetaData);
- EndpointMetaData epMetaData = new ServerEndpointMetaData(serviceMetaData, new QName("dummyPortName"), new QName("dummyPortTypeName"), Type.JAXWS);
+ EndpointMetaData epMetaData = new ServerEndpointMetaData(serviceMetaData, null, new QName("dummyPortName"), new QName("dummyPortTypeName"), Type.JAXWS);
serviceMetaData.addEndpoint(epMetaData);
builder.processPolicyAnnotations(epMetaData, TestMultipleEndpointPolicy.class);
[View Less]
17 years, 8 months
JBossWS SVN: r4019 - trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-07-27 02:52:56 -0400 (Fri, 27 Jul 2007)
New Revision: 4019
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ServerEndpointMetaData.java
Log:
Prevent NPE in tools layer
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ServerEndpointMetaData.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ServerEndpointMetaData.java …
[View More]2007-07-27 06:31:03 UTC (rev 4018)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ServerEndpointMetaData.java 2007-07-27 06:52:56 UTC (rev 4019)
@@ -193,12 +193,15 @@
@Override
public String getEndpointAddress()
{
- return endpoint.getAddress();
+ return endpoint != null ? endpoint.getAddress() : null;
}
@Override
public void setEndpointAddress(String endpointAddress)
{
+ if (endpoint == null)
+ throw new IllegalStateException("Endpoint not available");
+
endpoint.setAddress(endpointAddress);
}
[View Less]
17 years, 8 months
JBossWS SVN: r4018 - in trunk: integration/spi/src/main/java/org/jboss/wsf/common and 11 other directories.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-07-27 02:31:03 -0400 (Fri, 27 Jul 2007)
New Revision: 4018
Modified:
trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java
trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/WSDLFilePublisher.java
trunk/integration/spi/src/main/java/org/jboss/wsf/common/IOUtils.java
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/EndpointAddressDeploymentAspect.java
trunk/…
[View More]integration/spi/src/main/java/org/jboss/wsf/framework/deployment/WebAppGeneratorDeploymentAspect.java
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/management/ServerConfigFactoryImpl.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/management/ServerConfigFactory.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceReferenceable.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/spi/EndpointImpl.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/wsdl/xsd/SchemaUtils.java
trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/jbws1190/TestEndpointImpl.java
trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/jbws1205/TestEndpointImpl.java
trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/endpoint/EndpointTestCase.java
trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1190/TestEndpointImpl.java
Log:
Refactor ServerConfigFactory
Modified: trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java
===================================================================
--- trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java 2007-07-27 06:12:20 UTC (rev 4017)
+++ trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java 2007-07-27 06:31:03 UTC (rev 4018)
@@ -527,7 +527,7 @@
wsdlHost += ":" + reqURL.getPort();
SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- ServerConfig config = spiProvider.getSPI(ServerConfigFactory.class).createServerConfig();
+ ServerConfig config = spiProvider.getSPI(ServerConfigFactory.class).getServerConfig();
if (ServerConfig.UNDEFINED_HOSTNAME.equals(config.getWebServiceHost()) == false)
wsdlHost = config.getWebServiceHost();
Modified: trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/WSDLFilePublisher.java
===================================================================
--- trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/WSDLFilePublisher.java 2007-07-27 06:12:20 UTC (rev 4017)
+++ trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/WSDLFilePublisher.java 2007-07-27 06:31:03 UTC (rev 4018)
@@ -242,7 +242,7 @@
{
String deploymentDir = (dep.getParent() != null ? dep.getParent().getSimpleName() : dep.getSimpleName());
SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- ServerConfig config = spiProvider.getSPI(ServerConfigFactory.class).createServerConfig();
+ ServerConfig config = spiProvider.getSPI(ServerConfigFactory.class).getServerConfig();
File serviceDir = new File(config.getServerDataDir().getCanonicalPath() + "/wsdl/" + deploymentDir);
deleteWsdlPublishDirectory(serviceDir);
}
@@ -297,7 +297,7 @@
if (predefinedLocation == false)
{
SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- ServerConfig config = spiProvider.getSPI(ServerConfigFactory.class).createServerConfig();
+ ServerConfig config = spiProvider.getSPI(ServerConfigFactory.class).getServerConfig();
locationFile = new File(config.getServerDataDir().getCanonicalPath() + "/wsdl/" + archiveName);
}
else
Modified: trunk/integration/spi/src/main/java/org/jboss/wsf/common/IOUtils.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/common/IOUtils.java 2007-07-27 06:12:20 UTC (rev 4017)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/common/IOUtils.java 2007-07-27 06:31:03 UTC (rev 4018)
@@ -128,7 +128,7 @@
// TODO: recursive dependency, ohoh
SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- ServerConfig config = spiProvider.getSPI(ServerConfigFactory.class).createServerConfig();
+ ServerConfig config = spiProvider.getSPI(ServerConfigFactory.class).getServerConfig();
tmpdir = new File(config.getServerTempDir().getCanonicalPath() + "/jbossws");
tmpdir.mkdirs();
}
Modified: trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/EndpointAddressDeploymentAspect.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/EndpointAddressDeploymentAspect.java 2007-07-27 06:12:20 UTC (rev 4017)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/EndpointAddressDeploymentAspect.java 2007-07-27 06:31:03 UTC (rev 4018)
@@ -48,7 +48,7 @@
SPIProvider provider = SPIProviderResolver.getInstance().getProvider();
ServerConfigFactory spi = provider.getSPI(ServerConfigFactory.class);
- ServerConfig serverConfig = spi.createServerConfig();
+ ServerConfig serverConfig = spi.getServerConfig();
String host = serverConfig.getWebServiceHost();
int port = serverConfig.getWebServicePort();
Modified: trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/WebAppGeneratorDeploymentAspect.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/WebAppGeneratorDeploymentAspect.java 2007-07-27 06:12:20 UTC (rev 4017)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/WebAppGeneratorDeploymentAspect.java 2007-07-27 06:31:03 UTC (rev 4018)
@@ -95,7 +95,7 @@
{
// TODO: recursive dependency, ohoh
SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- ServerConfig config = spiProvider.getSPI(ServerConfigFactory.class).createServerConfig();
+ ServerConfig config = spiProvider.getSPI(ServerConfigFactory.class).getServerConfig();
File tmpdir = new File(config.getServerTempDir().getCanonicalPath() + "/deploy");
String deploymentName = dep.getCanonicalName().replace('/', '-');
Modified: trunk/integration/spi/src/main/java/org/jboss/wsf/framework/management/ServerConfigFactoryImpl.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/framework/management/ServerConfigFactoryImpl.java 2007-07-27 06:12:20 UTC (rev 4017)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/framework/management/ServerConfigFactoryImpl.java 2007-07-27 06:31:03 UTC (rev 4018)
@@ -31,7 +31,7 @@
*/
public class ServerConfigFactoryImpl extends ServerConfigFactory
{
- public ServerConfig createServerConfig()
+ public ServerConfig getServerConfig()
{
return new KernelAwareSPIFactory().getKernelProvidedSPI(
ServerConfig.BEAN_NAME, ServerConfig.class
Modified: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/management/ServerConfigFactory.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/management/ServerConfigFactory.java 2007-07-27 06:12:20 UTC (rev 4017)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/management/ServerConfigFactory.java 2007-07-27 06:31:03 UTC (rev 4018)
@@ -33,5 +33,5 @@
*/
public abstract class ServerConfigFactory implements SPIView
{
- public abstract ServerConfig createServerConfig();
+ public abstract ServerConfig getServerConfig();
}
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceReferenceable.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceReferenceable.java 2007-07-27 06:12:20 UTC (rev 4017)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceReferenceable.java 2007-07-27 06:31:03 UTC (rev 4018)
@@ -105,7 +105,7 @@
try
{
SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- ServerConfig config = spiProvider.getSPI(ServerConfigFactory.class).createServerConfig();
+ ServerConfig config = spiProvider.getSPI(ServerConfigFactory.class).getServerConfig();
String host = config.getWebServiceHost();
int port = config.getWebServicePort();
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/spi/EndpointImpl.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/spi/EndpointImpl.java 2007-07-27 06:12:20 UTC (rev 4017)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/spi/EndpointImpl.java 2007-07-27 06:31:03 UTC (rev 4018)
@@ -30,7 +30,6 @@
import java.util.Map;
import java.util.StringTokenizer;
import java.util.concurrent.Executor;
-import java.io.File;
import javax.xml.transform.Source;
import javax.xml.ws.Binding;
@@ -44,10 +43,10 @@
import org.jboss.ws.core.jaxws.binding.BindingProviderImpl;
import org.jboss.ws.core.server.HttpContext;
import org.jboss.ws.core.server.HttpServer;
-import org.jboss.wsf.spi.management.ServerConfigFactory;
-import org.jboss.wsf.spi.management.ServerConfig;
import org.jboss.wsf.spi.SPIProvider;
import org.jboss.wsf.spi.SPIProviderResolver;
+import org.jboss.wsf.spi.management.ServerConfig;
+import org.jboss.wsf.spi.management.ServerConfigFactory;
import org.w3c.dom.Element;
/**
@@ -156,7 +155,7 @@
try
{
SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- ServerConfig serverConfig = spiProvider.getSPI(ServerConfigFactory.class).createServerConfig();File tmpDir = serverConfig.getServerTempDir();
+ ServerConfig serverConfig = spiProvider.getSPI(ServerConfigFactory.class).getServerConfig();
isStandalone = false;
}
catch (Exception ex)
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java 2007-07-27 06:12:20 UTC (rev 4017)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java 2007-07-27 06:31:03 UTC (rev 4018)
@@ -240,7 +240,7 @@
uriScheme = "http";
SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- ServerConfig config = spiProvider.getSPI(ServerConfigFactory.class).createServerConfig();
+ ServerConfig config = spiProvider.getSPI(ServerConfigFactory.class).getServerConfig();
String host = config.getWebServiceHost();
int port = config.getWebServicePort();
@@ -322,7 +322,7 @@
String serviceEndpointURL = getServiceEndpointAddress(uriScheme, servicePath);
SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- ServerConfig config = spiProvider.getSPI(ServerConfigFactory.class).createServerConfig();
+ ServerConfig config = spiProvider.getSPI(ServerConfigFactory.class).getServerConfig();
boolean alwaysModify = config.isModifySOAPAddress();
if (alwaysModify || uriScheme == null || orgAddress.indexOf("REPLACE_WITH_ACTUAL_URL") >= 0)
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/wsdl/xsd/SchemaUtils.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/wsdl/xsd/SchemaUtils.java 2007-07-27 06:12:20 UTC (rev 4017)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/wsdl/xsd/SchemaUtils.java 2007-07-27 06:31:03 UTC (rev 4018)
@@ -521,7 +521,7 @@
try
{
SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- ServerConfig serverConfig = spiProvider.getSPI(ServerConfigFactory.class).createServerConfig();File tmpDir = serverConfig.getServerTempDir();
+ ServerConfig serverConfig = spiProvider.getSPI(ServerConfigFactory.class).getServerConfig();File tmpDir = serverConfig.getServerTempDir();
tmpdir = serverConfig.getServerTempDir();
tmpdir = new File(tmpdir.getCanonicalPath() + "/jbossws");
tmpdir.mkdirs();
Modified: trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/jbws1190/TestEndpointImpl.java
===================================================================
--- trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/jbws1190/TestEndpointImpl.java 2007-07-27 06:12:20 UTC (rev 4017)
+++ trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/jbws1190/TestEndpointImpl.java 2007-07-27 06:31:03 UTC (rev 4018)
@@ -45,7 +45,7 @@
public void testAddress(final String archive, final String service, final String scheme, final String port)
{
SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- ServerConfig serverConfig = spiProvider.getSPI(ServerConfigFactory.class).createServerConfig();
+ ServerConfig serverConfig = spiProvider.getSPI(ServerConfigFactory.class).getServerConfig();
File dataDir = serverConfig.getServerDataDir();
File wsdlDir = new File(dataDir.getAbsolutePath() + File.separator + "wsdl" + File.separator + archive);
Modified: trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/jbws1205/TestEndpointImpl.java
===================================================================
--- trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/jbws1205/TestEndpointImpl.java 2007-07-27 06:12:20 UTC (rev 4017)
+++ trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/jbws1205/TestEndpointImpl.java 2007-07-27 06:31:03 UTC (rev 4018)
@@ -49,7 +49,7 @@
try
{
SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- ServerConfig serverConfig = spiProvider.getSPI(ServerConfigFactory.class).createServerConfig();File tmpDir = serverConfig.getServerTempDir();
+ ServerConfig serverConfig = spiProvider.getSPI(ServerConfigFactory.class).getServerConfig();File tmpDir = serverConfig.getServerTempDir();
tmpDir = new File(tmpDir.getCanonicalPath() + "/jbossws");
baseFiles = getXsdTempFiles(tmpDir);
Modified: trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/endpoint/EndpointTestCase.java
===================================================================
--- trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/endpoint/EndpointTestCase.java 2007-07-27 06:12:20 UTC (rev 4017)
+++ trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/endpoint/EndpointTestCase.java 2007-07-27 06:31:03 UTC (rev 4018)
@@ -62,7 +62,7 @@
{
MBeanServerConnection server = JBossWSTestHelper.getServer();
useJBossWebLoader = (Boolean)server.getAttribute(new ObjectName("jboss.web:service=WebServer"), "UseJBossWebLoader");
- server.setAttribute(new ObjectName("jboss.web:service=WebServer"), new Attribute("UseJBossWebLoader", new Boolean(true)));
+ server.setAttribute(new ObjectName("jboss.web:service=WebServer"), new Attribute("UseJBossWebLoader", Boolean.TRUE));
super.setUp();
}
Modified: trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1190/TestEndpointImpl.java
===================================================================
--- trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1190/TestEndpointImpl.java 2007-07-27 06:12:20 UTC (rev 4017)
+++ trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1190/TestEndpointImpl.java 2007-07-27 06:31:03 UTC (rev 4018)
@@ -51,7 +51,7 @@
public void testAddress(final String archive, final String service, final String scheme, final String port)
{
SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- ServerConfig serverConfig = spiProvider.getSPI(ServerConfigFactory.class).createServerConfig();File tmpDir = serverConfig.getServerTempDir();
+ ServerConfig serverConfig = spiProvider.getSPI(ServerConfigFactory.class).getServerConfig();File tmpDir = serverConfig.getServerTempDir();
File dataDir = serverConfig.getServerDataDir();
File wsdlDir = new File(dataDir.getAbsolutePath() + File.separator + "wsdl" + File.separator + archive);
[View Less]
17 years, 8 months
JBossWS SVN: r4017 - trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-07-27 02:12:20 -0400 (Fri, 27 Jul 2007)
New Revision: 4017
Modified:
trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/CXFServletExt.java
trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/RequestHandlerImpl.java
Log:
Use ServletContext attribute instead of Endpoint attachment
Modified: trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/CXFServletExt.java
================================================…
[View More]===================
--- trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/CXFServletExt.java 2007-07-27 06:00:11 UTC (rev 4016)
+++ trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/CXFServletExt.java 2007-07-27 06:12:20 UTC (rev 4017)
@@ -29,6 +29,7 @@
import javax.management.ObjectName;
import javax.servlet.ServletConfig;
+import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -75,9 +76,12 @@
// Init the Endpoint
SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
epRegistry = spiProvider.getSPI(EndpointRegistryFactory.class).createEndpointRegistry();
- String contextPath = servletConfig.getServletContext().getContextPath();
+
+ ServletContext context = servletConfig.getServletContext();
+ String contextPath = context.getContextPath();
endpoint = initServiceEndpoint(contextPath);
- endpoint.addAttachment(ServletController.class, getController());
+
+ context.setAttribute(ServletController.class.getName(), getController());
}
public ServletController createServletController()
Modified: trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/RequestHandlerImpl.java
===================================================================
--- trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/RequestHandlerImpl.java 2007-07-27 06:00:11 UTC (rev 4016)
+++ trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/RequestHandlerImpl.java 2007-07-27 06:12:20 UTC (rev 4017)
@@ -56,7 +56,7 @@
public void handleHttpRequest(Endpoint ep, HttpServletRequest req, HttpServletResponse res, ServletContext context) throws ServletException, IOException
{
- ServletController controller = ep.getAttachment(ServletController.class);
+ ServletController controller = (ServletController)context.getAttribute(ServletController.class.getName());
if (controller == null)
throw new IllegalStateException("Cannot obtain servlet controller");
[View Less]
17 years, 8 months
JBossWS SVN: r4016 - in trunk: integration/spi/src/main/java/org/jboss/wsf/framework/management and 5 other directories.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-07-27 02:00:11 -0400 (Fri, 27 Jul 2007)
New Revision: 4016
Added:
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/management/ContextServlet.java
Removed:
trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/ContextServlet.java
Modified:
trunk/integration/native/src/main/resources/jbossws-context.war/WEB-INF/web.xml
trunk/integration/sunri/src/main/resources/jbossws-context.war/WEB-INF/web.xml
trunk/integration/xfire/…
[View More]src/main/resources/jbossws-context.war/WEB-INF/web.xml
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ClientEndpointMetaData.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ServerEndpointMetaData.java
trunk/jbossws-core/src/main/java/org/jboss/ws/tools/metadata/ToolsEndpointMetaData.java
Log:
Delegate endpoint address access
Modified: trunk/integration/native/src/main/resources/jbossws-context.war/WEB-INF/web.xml
===================================================================
--- trunk/integration/native/src/main/resources/jbossws-context.war/WEB-INF/web.xml 2007-07-27 05:29:21 UTC (rev 4015)
+++ trunk/integration/native/src/main/resources/jbossws-context.war/WEB-INF/web.xml 2007-07-27 06:00:11 UTC (rev 4016)
@@ -14,7 +14,7 @@
<servlet>
<servlet-name>ContextServlet</servlet-name>
- <servlet-class>org.jboss.ws.core.server.ContextServlet</servlet-class>
+ <servlet-class>org.jboss.wsf.framework.management.ContextServlet</servlet-class>
</servlet>
<servlet>
Copied: trunk/integration/spi/src/main/java/org/jboss/wsf/framework/management/ContextServlet.java (from rev 4012, trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/ContextServlet.java)
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/framework/management/ContextServlet.java (rev 0)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/framework/management/ContextServlet.java 2007-07-27 06:00:11 UTC (rev 4016)
@@ -0,0 +1,181 @@
+/*
+ * 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.wsf.framework.management;
+
+// $Id$
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.net.URL;
+import java.util.Set;
+
+import javax.management.ObjectName;
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.jboss.logging.Logger;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.management.EndpointMetrics;
+import org.jboss.wsf.spi.management.EndpointRegistry;
+import org.jboss.wsf.spi.management.EndpointRegistryFactory;
+import org.jboss.wsf.spi.SPIProvider;
+import org.jboss.wsf.spi.SPIProviderResolver;
+
+/**
+ * The servlet that that is associated with context /jbossws
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 21-Mar-2005
+ */
+public class ContextServlet extends HttpServlet
+{
+ // provide logging
+ protected final Logger log = Logger.getLogger(ContextServlet.class);
+
+ protected EndpointRegistry epRegistry;
+
+ public void init(ServletConfig config) throws ServletException
+ {
+ super.init(config);
+ SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
+ epRegistry = spiProvider.getSPI(EndpointRegistryFactory.class).createEndpointRegistry();
+ }
+
+ /** Process GET requests.
+ */
+ public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
+ {
+ PrintWriter writer = res.getWriter();
+ res.setContentType("text/html");
+
+ writer.print("<html>");
+ setupHTMLResponseHeader(writer);
+
+ URL requestURL = new URL(req.getRequestURL().toString());
+
+ writer.print("<body>");
+
+ writer.print("<div class='pageHeader'>JBossWS/Services</div>");
+ writer.print("<div class='pageSection'>");
+ writer.print("<fieldset>");
+ writer.print("<legend><b>Registered Service Endpoints</b></legend>");
+ writer.print("<table>");
+
+ // begin iteration
+ Set<ObjectName> epNames = epRegistry.getEndpoints();
+
+ if (epNames.isEmpty())
+ {
+ writer.print("<tr>");
+ writer.print(" <td><h3>There are currently no endpoints deployed</h3></td>");
+ writer.print("</tr>");
+ }
+
+ for (ObjectName oname : epNames)
+ {
+ Endpoint ep = epRegistry.getEndpoint(oname);
+
+ writer.print("<tr>");
+ writer.print(" <td>Endpoint Name</td>");
+ writer.print(" <td>" + ep.getName() + "</td>");
+ writer.print("</tr>");
+ writer.print("<tr>");
+ writer.print(" <td>Endpoint Address</td>");
+ writer.print(" <td><a href='" + ep.getAddress() + "?wsdl'>" + ep.getAddress() + "?wsdl</a></td>");
+ writer.print("</tr>");
+ writer.print("<tr>");
+ writer.print(" <td colspan=2>");
+ writer.print(" ");
+ writer.print("");
+
+ EndpointMetrics metrics = ep.getEndpointMetrics();
+ if (metrics != null)
+ {
+ writer.print("<table class='metrics'>");
+ writer.print("<tr>");
+ writer.print(" <td>StartTime</td>");
+ writer.print(" <td>StopTime</td>");
+ writer.print(" <td></td>");
+ writer.print("</tr>");
+ writer.print("<tr>");
+ writer.print(" <td>" + metrics.getStartTime() + "</td>");
+
+ String stopTime = metrics.getStopTime() != null ? metrics.getStopTime().toString() : "";
+ writer.print(" <td>" + stopTime + "</td>");
+ writer.print(" <td></td>");
+ writer.print("</tr>");
+ writer.print("<tr>");
+
+ writer.print(" <td>RequestCount</td>");
+ writer.print(" <td>ResponseCount</td>");
+ writer.print(" <td>FaultCount</td>");
+ writer.print("</tr>");
+ writer.print("<tr>");
+ writer.print(" <td>" + metrics.getRequestCount() + "</td>");
+ writer.print(" <td>" + metrics.getResponseCount() + "</td>");
+ writer.print(" <td>" + metrics.getFaultCount() + "</td>");
+ writer.print("</tr>");
+ writer.print("<tr>");
+ writer.print(" <td>MinProcessingTime</td>");
+ writer.print(" <td>MaxProcessingTime</td>");
+ writer.print(" <td>AvgProcessingTime</td>");
+ writer.print("</tr>");
+ writer.print("<tr>");
+ writer.print(" <td>" + metrics.getMinProcessingTime() + "</td>");
+ writer.print(" <td>" + metrics.getMaxProcessingTime() + "</td>");
+ writer.print(" <td>" + metrics.getAverageProcessingTime() + "</td>");
+ writer.print("</tr>");
+ writer.print("");
+ writer.print("");
+ writer.print("</table>");
+ writer.print("");
+ }
+
+ writer.print(" </td>");
+ writer.print("</tr>");
+
+ writer.print("<tr><td colspan='3'> </td></tr>");
+ }
+ // end iteration
+ writer.print("</table>");
+ writer.print("");
+ writer.print("</fieldset>");
+ writer.print("</div>");
+
+ writer.print("</body>");
+ writer.print("</html>");
+ writer.close();
+ }
+
+ private void setupHTMLResponseHeader(PrintWriter writer)
+ {
+ Package wsPackage = Package.getPackage("org.jboss.ws");
+ writer.println("<head>");
+ writer.println("<meta http-equiv='Content-Type content='text/html; charset=iso-8859-1'>");
+ writer.println("<title>JBossWS / " + wsPackage.getImplementationVersion() + "</title>");
+ writer.println("<link rel='stylesheet' href='./styles.css'>");
+ writer.println("</head>");
+ }
+}
Modified: trunk/integration/sunri/src/main/resources/jbossws-context.war/WEB-INF/web.xml
===================================================================
--- trunk/integration/sunri/src/main/resources/jbossws-context.war/WEB-INF/web.xml 2007-07-27 05:29:21 UTC (rev 4015)
+++ trunk/integration/sunri/src/main/resources/jbossws-context.war/WEB-INF/web.xml 2007-07-27 06:00:11 UTC (rev 4016)
@@ -14,14 +14,9 @@
<servlet>
<servlet-name>ContextServlet</servlet-name>
- <servlet-class>org.jboss.ws.core.server.ContextServlet</servlet-class>
+ <servlet-class>org.jboss.wsf.framework.management.ContextServlet</servlet-class>
</servlet>
- <servlet>
- <servlet-name>PortComponentLinkServlet</servlet-name>
- <servlet-class>org.jboss.ws.core.server.PortComponentLinkServlet</servlet-class>
- </servlet>
-
<!-- now the mappings -->
<servlet-mapping>
@@ -29,11 +24,6 @@
<url-pattern>/services/*</url-pattern>
</servlet-mapping>
- <servlet-mapping>
- <servlet-name>PortComponentLinkServlet</servlet-name>
- <url-pattern>/pclink</url-pattern>
- </servlet-mapping>
-
<!--
currently the W3C haven't settled on a media type for WSDL;
http://www.w3.org/TR/2003/WD-wsdl12-20030303/#ietf-draft
Modified: trunk/integration/xfire/src/main/resources/jbossws-context.war/WEB-INF/web.xml
===================================================================
--- trunk/integration/xfire/src/main/resources/jbossws-context.war/WEB-INF/web.xml 2007-07-27 05:29:21 UTC (rev 4015)
+++ trunk/integration/xfire/src/main/resources/jbossws-context.war/WEB-INF/web.xml 2007-07-27 06:00:11 UTC (rev 4016)
@@ -14,14 +14,9 @@
<servlet>
<servlet-name>ContextServlet</servlet-name>
- <servlet-class>org.jboss.ws.core.server.ContextServlet</servlet-class>
+ <servlet-class>org.jboss.wsf.framework.management.ContextServlet</servlet-class>
</servlet>
- <servlet>
- <servlet-name>PortComponentLinkServlet</servlet-name>
- <servlet-class>org.jboss.ws.core.server.PortComponentLinkServlet</servlet-class>
- </servlet>
-
<!-- now the mappings -->
<servlet-mapping>
@@ -29,11 +24,6 @@
<url-pattern>/services/*</url-pattern>
</servlet-mapping>
- <servlet-mapping>
- <servlet-name>PortComponentLinkServlet</servlet-name>
- <url-pattern>/pclink</url-pattern>
- </servlet-mapping>
-
<!--
currently the W3C haven't settled on a media type for WSDL;
http://www.w3.org/TR/2003/WD-wsdl12-20030303/#ietf-draft
Deleted: trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/ContextServlet.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/ContextServlet.java 2007-07-27 05:29:21 UTC (rev 4015)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/ContextServlet.java 2007-07-27 06:00:11 UTC (rev 4016)
@@ -1,183 +0,0 @@
-/*
- * 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.ws.core.server;
-
-// $Id$
-
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.net.URL;
-import java.util.Set;
-
-import javax.management.ObjectName;
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
-import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.management.EndpointMetrics;
-import org.jboss.wsf.spi.management.EndpointRegistry;
-import org.jboss.wsf.spi.management.EndpointRegistryFactory;
-import org.jboss.wsf.spi.SPIProvider;
-import org.jboss.wsf.spi.SPIProviderResolver;
-
-/**
- * The servlet that that is associated with context /jbossws
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 21-Mar-2005
- */
-public class ContextServlet extends HttpServlet
-{
- // provide logging
- protected final Logger log = Logger.getLogger(ContextServlet.class);
-
- protected EndpointRegistry epRegistry;
-
- public void init(ServletConfig config) throws ServletException
- {
- super.init(config);
- SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- epRegistry = spiProvider.getSPI(EndpointRegistryFactory.class).createEndpointRegistry();
- }
-
- /** Process GET requests.
- */
- public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
- {
- PrintWriter writer = res.getWriter();
- res.setContentType("text/html");
-
- writer.print("<html>");
- setupHTMLResponseHeader(writer);
-
- URL requestURL = new URL(req.getRequestURL().toString());
-
- writer.print("<body>");
-
- writer.print("<div class='pageHeader'>JBossWS/Services</div>");
- writer.print("<div class='pageSection'>");
- writer.print("<fieldset>");
- writer.print("<legend><b>Registered Service Endpoints</b></legend>");
- writer.print("<table>");
-
- // begin iteration
- Set<ObjectName> epNames = epRegistry.getEndpoints();
-
- if (epNames.isEmpty())
- {
- writer.print("<tr>");
- writer.print(" <td><h3>There are currently no endpoints deployed</h3></td>");
- writer.print("</tr>");
- }
-
- for (ObjectName oname : epNames)
- {
- Endpoint ep = epRegistry.getEndpoint(oname);
- ServerEndpointMetaData sepMetaData = ep.getAttachment(ServerEndpointMetaData.class);
-
- writer.print("<tr>");
- writer.print(" <td>Endpoint Name</td>");
- writer.print(" <td>" + ep.getName() + "</td>");
- writer.print("</tr>");
- writer.print("<tr>");
- writer.print(" <td>Endpoint Address</td>");
- writer.print(" <td><a href='" + sepMetaData.getEndpointAddress() + "?wsdl'>" + sepMetaData.getEndpointAddress() + "?wsdl</a></td>");
- writer.print("</tr>");
- writer.print("<tr>");
- writer.print(" <td colspan=2>");
- writer.print(" ");
- writer.print("");
-
- EndpointMetrics metrics = ep.getEndpointMetrics();
- if (metrics != null)
- {
- writer.print("<table class='metrics'>");
- writer.print("<tr>");
- writer.print(" <td>StartTime</td>");
- writer.print(" <td>StopTime</td>");
- writer.print(" <td></td>");
- writer.print("</tr>");
- writer.print("<tr>");
- writer.print(" <td>" + metrics.getStartTime() + "</td>");
-
- String stopTime = metrics.getStopTime() != null ? metrics.getStopTime().toString() : "";
- writer.print(" <td>" + stopTime + "</td>");
- writer.print(" <td></td>");
- writer.print("</tr>");
- writer.print("<tr>");
-
- writer.print(" <td>RequestCount</td>");
- writer.print(" <td>ResponseCount</td>");
- writer.print(" <td>FaultCount</td>");
- writer.print("</tr>");
- writer.print("<tr>");
- writer.print(" <td>" + metrics.getRequestCount() + "</td>");
- writer.print(" <td>" + metrics.getResponseCount() + "</td>");
- writer.print(" <td>" + metrics.getFaultCount() + "</td>");
- writer.print("</tr>");
- writer.print("<tr>");
- writer.print(" <td>MinProcessingTime</td>");
- writer.print(" <td>MaxProcessingTime</td>");
- writer.print(" <td>AvgProcessingTime</td>");
- writer.print("</tr>");
- writer.print("<tr>");
- writer.print(" <td>" + metrics.getMinProcessingTime() + "</td>");
- writer.print(" <td>" + metrics.getMaxProcessingTime() + "</td>");
- writer.print(" <td>" + metrics.getAverageProcessingTime() + "</td>");
- writer.print("</tr>");
- writer.print("");
- writer.print("");
- writer.print("</table>");
- writer.print("");
- }
-
- writer.print(" </td>");
- writer.print("</tr>");
-
- writer.print("<tr><td colspan='3'> </td></tr>");
- }
- // end iteration
- writer.print("</table>");
- writer.print("");
- writer.print("</fieldset>");
- writer.print("</div>");
-
- writer.print("</body>");
- writer.print("</html>");
- writer.close();
- }
-
- private void setupHTMLResponseHeader(PrintWriter writer)
- {
- Package wsPackage = Package.getPackage("org.jboss.ws");
- writer.println("<head>");
- writer.println("<meta http-equiv='Content-Type content='text/html; charset=iso-8859-1'>");
- writer.println("<title>JBossWS / " + wsPackage.getImplementationVersion() + "</title>");
- writer.println("<link rel='stylesheet' href='./styles.css'>");
- writer.println("</head>");
- }
-}
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ClientEndpointMetaData.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ClientEndpointMetaData.java 2007-07-27 05:29:21 UTC (rev 4015)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ClientEndpointMetaData.java 2007-07-27 06:00:11 UTC (rev 4016)
@@ -36,6 +36,8 @@
*/
public class ClientEndpointMetaData extends EndpointMetaData
{
+ // The endpoint address
+ private String endpointAddress;
public ClientEndpointMetaData(ServiceMetaData service, QName qname, QName portTypeName, Type type)
{
@@ -48,6 +50,16 @@
configFile = ConfigurationProvider.DEFAULT_JAXWS_CLIENT_CONFIG_FILE;
}
+ public String getEndpointAddress()
+ {
+ return endpointAddress;
+ }
+
+ public void setEndpointAddress(String endpointAddress)
+ {
+ this.endpointAddress = endpointAddress;
+ }
+
public String toString()
{
StringBuilder buffer = new StringBuilder("\nClientEndpointMetaData:");
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java 2007-07-27 05:29:21 UTC (rev 4015)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java 2007-07-27 06:00:11 UTC (rev 4016)
@@ -110,8 +110,6 @@
protected String configName;
// The REQUIRED config-file
protected String configFile;
- // The endpoint address
- private String endpointAddress;
// The endpoint interface name
private String seiName;
// The endpoint interface
@@ -180,15 +178,9 @@
return portTypeName;
}
- public String getEndpointAddress()
- {
- return endpointAddress;
- }
+ public abstract String getEndpointAddress();
- public void setEndpointAddress(String endpointAddress)
- {
- this.endpointAddress = endpointAddress;
- }
+ public abstract void setEndpointAddress(String endpointAddress);
public String getBindingId()
{
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ServerEndpointMetaData.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ServerEndpointMetaData.java 2007-07-27 05:29:21 UTC (rev 4015)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ServerEndpointMetaData.java 2007-07-27 06:00:11 UTC (rev 4016)
@@ -190,6 +190,18 @@
this.secureWSDLAccess = secureWSDLAccess;
}
+ @Override
+ public String getEndpointAddress()
+ {
+ return endpoint.getAddress();
+ }
+
+ @Override
+ public void setEndpointAddress(String endpointAddress)
+ {
+ endpoint.setAddress(endpointAddress);
+ }
+
/**
* Will be set through a deployment aspect
* @return List<BindingCustomization> of available customizations
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/tools/metadata/ToolsEndpointMetaData.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/tools/metadata/ToolsEndpointMetaData.java 2007-07-27 05:29:21 UTC (rev 4015)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/tools/metadata/ToolsEndpointMetaData.java 2007-07-27 06:00:11 UTC (rev 4016)
@@ -37,6 +37,7 @@
public class ToolsEndpointMetaData extends EndpointMetaData
{
public String typeNamespace;
+ private String endpointAddress;
public ToolsEndpointMetaData(ServiceMetaData service, QName portName, QName portTypeName)
{
@@ -44,4 +45,14 @@
super.configName = ConfigurationProvider.DEFAULT_CLIENT_CONFIG_NAME;
super.configFile = ConfigurationProvider.DEFAULT_JAXRPC_CLIENT_CONFIG_FILE;
}
+
+ public String getEndpointAddress()
+ {
+ return endpointAddress;
+ }
+
+ public void setEndpointAddress(String endpointAddress)
+ {
+ this.endpointAddress = endpointAddress;
+ }
}
\ No newline at end of file
[View Less]
17 years, 8 months
JBossWS SVN: r4015 - trunk/integration/jboss40.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-07-27 01:29:21 -0400 (Fri, 27 Jul 2007)
New Revision: 4015
Modified:
trunk/integration/jboss40/build.xml
Log:
Fix exclude
Modified: trunk/integration/jboss40/build.xml
===================================================================
--- trunk/integration/jboss40/build.xml 2007-07-27 04:39:07 UTC (rev 4014)
+++ trunk/integration/jboss40/build.xml 2007-07-27 05:29:21 UTC (rev 4015)
@@ -72,7 +72,7 @@
<include name="org/jboss/wsf/…
[View More]container/jboss40/**"/>
<include name="org/jboss/wsf/container/jboss42/**"/>
<exclude name="org/jboss/wsf/container/jboss42/jms/**"/>
- <exclude name="org/jboss/wsf/container/jboss42/ApplicationMetaDataAdapterEJB21.java"/>
+ <exclude name="org/jboss/wsf/container/jboss42/EJBArchiveMetaDataAdapterEJB21.java"/>
<exclude name="org/jboss/wsf/container/jboss42/InvocationHandlerEJB3.java"/>
<exclude name="org/jboss/wsf/container/jboss42/InvocationHandlerFactoryImpl.java"/>
<classpath refid="jbws40.integration.classpath"/>
[View Less]
17 years, 8 months
JBossWS SVN: r4014 - trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-07-27 00:39:07 -0400 (Fri, 27 Jul 2007)
New Revision: 4014
Removed:
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/ContainerMetaData.java
Modified:
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/EJBArchiveMetaData.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/EJBMetaData.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/JSEArchiveMetaData.java
…
[View More]Log:
Refactor container meta data
Deleted: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/ContainerMetaData.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/ContainerMetaData.java 2007-07-27 04:37:52 UTC (rev 4013)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/ContainerMetaData.java 2007-07-27 04:39:07 UTC (rev 4014)
@@ -1,83 +0,0 @@
-/*
- * 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.wsf.spi.metadata.j2ee;
-
-//$Id: BasicDeploymentContext.java 3959 2007-07-20 14:44:19Z heiko.braun(a)jboss.com $
-
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-
-import org.jboss.wsf.spi.deployment.Extendible;
-
-/**
- * A general extendible artifact
- *
- * @author Thomas.Diesler(a)jboss.com
- * @since 20-Apr-2007
- */
-public class ContainerMetaData implements Extendible
-{
- private Map<Class, Object> attachments = new HashMap<Class, Object>();
- private Map<String, Object> properties = new HashMap<String, Object>();
-
- public Collection<Object> getAttachments()
- {
- return attachments.values();
- }
-
- public <T> T getAttachment(Class<T> clazz)
- {
- return (T)attachments.get(clazz);
- }
-
- public <T> T addAttachment(Class<T> clazz, Object obj)
- {
- return (T)attachments.put(clazz, obj);
- }
-
- public <T> T removeAttachment(Class<T> key)
- {
- return (T)attachments.remove(key);
- }
-
- public Set<String> getProperties()
- {
- return properties.keySet();
- }
-
- public Object getProperty(String key)
- {
- return properties.get(key);
- }
-
- public void removeProperty(String key)
- {
- properties.remove(key);
- }
-
- public void setProperty(String key, Object value)
- {
- properties.put(key, value);
- }
-}
Modified: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/EJBArchiveMetaData.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/EJBArchiveMetaData.java 2007-07-27 04:37:52 UTC (rev 4013)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/EJBArchiveMetaData.java 2007-07-27 04:39:07 UTC (rev 4014)
@@ -33,7 +33,7 @@
* @author Thomas.Diesler(a)jboss.org
* @since 05-May-2006
*/
-public class EJBArchiveMetaData extends ContainerMetaData
+public class EJBArchiveMetaData
{
/** ArrayList<BeanMetaData> for the ejbs */
private List<EJBMetaData> beans = new ArrayList<EJBMetaData>();
Modified: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/EJBMetaData.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/EJBMetaData.java 2007-07-27 04:37:52 UTC (rev 4013)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/EJBMetaData.java 2007-07-27 04:39:07 UTC (rev 4014)
@@ -29,7 +29,7 @@
* @author Thomas.Diesler(a)jboss.org
* @since 05-May-2006
*/
-public abstract class EJBMetaData extends ContainerMetaData
+public abstract class EJBMetaData
{
// The ejb-name element specifies an enterprise bean's name.
private String ejbName;
Modified: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/JSEArchiveMetaData.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/JSEArchiveMetaData.java 2007-07-27 04:37:52 UTC (rev 4013)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/JSEArchiveMetaData.java 2007-07-27 04:39:07 UTC (rev 4014)
@@ -33,7 +33,7 @@
* @author Thomas.Diesler(a)jboss.org
* @since 05-May-2006
*/
-public class JSEArchiveMetaData extends ContainerMetaData
+public class JSEArchiveMetaData
{
// The war context root as specified at the jboss-web.xml descriptor level.
private String contextRoot;
[View Less]
17 years, 8 months