Author: jim.ma
Date: 2013-04-08 05:08:50 -0400 (Mon, 08 Apr 2013)
New Revision: 17464
Modified:
container/jboss71/branches/jbossws-jboss713/pom.xml
container/jboss71/branches/jbossws-jboss713/server-integration/src/main/java/org/jboss/as/webservices/publish/EndpointPublisherImpl.java
container/jboss71/branches/jbossws-jboss713/server-integration/src/main/java/org/jboss/as/webservices/publish/WSEndpointDeploymentUnit.java
container/jboss71/branches/jbossws-jboss713/server-integration/src/main/java/org/jboss/as/webservices/service/EndpointPublishService.java
Log:
[JBWS-3611]:fix the jboss713 IL and upgrade the spi and common
Modified: container/jboss71/branches/jbossws-jboss713/pom.xml
===================================================================
--- container/jboss71/branches/jbossws-jboss713/pom.xml 2013-04-08 09:06:14 UTC (rev
17463)
+++ container/jboss71/branches/jbossws-jboss713/pom.xml 2013-04-08 09:08:50 UTC (rev
17464)
@@ -51,8 +51,8 @@
<properties>
<jbossws.api.version>1.0.1.Final</jbossws.api.version>
- <jbossws.spi.version>2.1.1-SNAPSHOT</jbossws.spi.version>
- <jbossws.common.version>2.1.1-SNAPSHOT</jbossws.common.version>
+ <jbossws.spi.version>2.2.0-SNAPSHOT</jbossws.spi.version>
+ <jbossws.common.version>2.2.0-SNAPSHOT</jbossws.common.version>
<jboss.msc.version>1.0.2.GA</jboss.msc.version>
<jboss.version>7.1.3.Final</jboss.version>
<jboss.jaxws.api.version>2.0.1.Final</jboss.jaxws.api.version>
Modified:
container/jboss71/branches/jbossws-jboss713/server-integration/src/main/java/org/jboss/as/webservices/publish/EndpointPublisherImpl.java
===================================================================
---
container/jboss71/branches/jbossws-jboss713/server-integration/src/main/java/org/jboss/as/webservices/publish/EndpointPublisherImpl.java 2013-04-08
09:06:14 UTC (rev 17463)
+++
container/jboss71/branches/jbossws-jboss713/server-integration/src/main/java/org/jboss/as/webservices/publish/EndpointPublisherImpl.java 2013-04-08
09:08:50 UTC (rev 17464)
@@ -58,6 +58,7 @@
import org.jboss.wsf.spi.deployment.DeploymentAspectManager;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.deployment.WSFServlet;
+import org.jboss.wsf.spi.metadata.webservices.JBossWebservicesMetaData;
import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData;
import org.jboss.wsf.spi.publish.Context;
import org.jboss.wsf.spi.publish.EndpointPublisher;
@@ -83,18 +84,28 @@
this.runningInService = runningInService;
}
+
@Override
public Context publish(String context, ClassLoader loader, Map<String, String>
urlPatternToClassNameMap) throws Exception {
- return publish(getBaseTarget(), context, loader, urlPatternToClassNameMap,
null);
+ return publish(getBaseTarget(), context, loader, urlPatternToClassNameMap, null,
null, null);
}
@Override
public Context publish(String context, ClassLoader loader, Map<String, String>
urlPatternToClassNameMap, WebservicesMetaData metadata) throws Exception {
- return publish(getBaseTarget(), context, loader, urlPatternToClassNameMap,
metadata);
+ return publish(getBaseTarget(), context, loader, urlPatternToClassNameMap, null,
metadata, null);
}
+
- public Context publish(ServiceTarget target, String context, ClassLoader loader,
Map<String, String> urlPatternToClassNameMap, WebservicesMetaData metadata) throws
Exception {
- WSEndpointDeploymentUnit unit = new WSEndpointDeploymentUnit(loader, context,
urlPatternToClassNameMap, metadata);
+ @Override
+ public Context publish(String context, ClassLoader loader, Map<String, String>
urlPatternToClassNameMap,
+ WebservicesMetaData metadata, JBossWebservicesMetaData jbwsMetadata) throws
Exception {
+ return publish(getBaseTarget(), context, loader, urlPatternToClassNameMap, null,
metadata, jbwsMetadata);
+ }
+
+ public Context publish(ServiceTarget target, String context, ClassLoader loader,
+ Map<String, String> urlPatternToClassNameMap, JBossWebMetaData jbwmd,
WebservicesMetaData metadata, JBossWebservicesMetaData jbwsMetadata)
+ throws Exception {
+ WSEndpointDeploymentUnit unit = new WSEndpointDeploymentUnit(loader, context,
urlPatternToClassNameMap, jbwmd, metadata, jbwsMetadata);
return new Context(context, publish(target, unit));
}
@@ -279,4 +290,6 @@
public void destroyInstance(Object o) throws IllegalAccessException,
InvocationTargetException {
}
}
+
+
}
Modified:
container/jboss71/branches/jbossws-jboss713/server-integration/src/main/java/org/jboss/as/webservices/publish/WSEndpointDeploymentUnit.java
===================================================================
---
container/jboss71/branches/jbossws-jboss713/server-integration/src/main/java/org/jboss/as/webservices/publish/WSEndpointDeploymentUnit.java 2013-04-08
09:06:14 UTC (rev 17463)
+++
container/jboss71/branches/jbossws-jboss713/server-integration/src/main/java/org/jboss/as/webservices/publish/WSEndpointDeploymentUnit.java 2013-04-08
09:08:50 UTC (rev 17464)
@@ -35,6 +35,7 @@
import org.jboss.metadata.web.jboss.JBossWebMetaData;
import org.jboss.msc.service.ServiceName;
import org.jboss.msc.service.ServiceRegistry;
+import org.jboss.wsf.spi.metadata.webservices.JBossWebservicesMetaData;
import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData;
public class WSEndpointDeploymentUnit extends SimpleAttachable implements DeploymentUnit
{
@@ -42,32 +43,35 @@
private String deploymentName;
public WSEndpointDeploymentUnit(ClassLoader loader, String context,
Map<String,String> urlPatternToClassName, WebservicesMetaData metadata) {
- this(loader, context, urlPatternToClassName, new JBossWebMetaData(), metadata);
- }
+ this(loader, context, urlPatternToClassName, new JBossWebMetaData(), metadata,
null);
+ }
- public WSEndpointDeploymentUnit(ClassLoader loader, String context, Map<String,
String> urlPatternToClassName,
- JBossWebMetaData jbossWebMetaData, WebservicesMetaData metadata) {
- this.deploymentName = context + ".deployment";
+ public WSEndpointDeploymentUnit(ClassLoader loader, String context, Map<String,
String> urlPatternToClassName,
+ JBossWebMetaData jbossWebMetaData, WebservicesMetaData metadata,
JBossWebservicesMetaData jbwsMetaData) {
+ this.deploymentName = context + ".deployment";
- JAXWSDeployment jaxwsDeployment = new JAXWSDeployment();
- if (jbossWebMetaData == null) {
- jbossWebMetaData = new JBossWebMetaData();
- }
- jbossWebMetaData.setContextRoot(context);
- String endpointName = null;
- String className = null;
- for (String urlPattern : urlPatternToClassName.keySet()) {
- className = urlPatternToClassName.get(urlPattern);
- endpointName = getShortName(className, urlPattern);
- addEndpoint(jbossWebMetaData, jaxwsDeployment, endpointName, className,
urlPattern);
- }
- this.putAttachment(WSAttachmentKeys.CLASSLOADER_KEY, loader);
- this.putAttachment(WSAttachmentKeys.JAXWS_ENDPOINTS_KEY, jaxwsDeployment);
- this.putAttachment(WSAttachmentKeys.JBOSSWEB_METADATA_KEY, jbossWebMetaData);
- if (metadata != null) {
- this.putAttachment(WSAttachmentKeys.WEBSERVICES_METADATA_KEY, metadata);
- }
- }
+ JAXWSDeployment jaxwsDeployment = new JAXWSDeployment();
+ if (jbossWebMetaData == null) {
+ jbossWebMetaData = new JBossWebMetaData();
+ }
+ jbossWebMetaData.setContextRoot(context);
+ String endpointName = null;
+ String className = null;
+ for (String urlPattern : urlPatternToClassName.keySet()) {
+ className = urlPatternToClassName.get(urlPattern);
+ endpointName = getShortName(className, urlPattern);
+ addEndpoint(jbossWebMetaData, jaxwsDeployment, endpointName, className,
urlPattern);
+ }
+ this.putAttachment(WSAttachmentKeys.CLASSLOADER_KEY, loader);
+ this.putAttachment(WSAttachmentKeys.JAXWS_ENDPOINTS_KEY, jaxwsDeployment);
+ this.putAttachment(WSAttachmentKeys.JBOSSWEB_METADATA_KEY, jbossWebMetaData);
+ if (metadata != null) {
+ this.putAttachment(WSAttachmentKeys.WEBSERVICES_METADATA_KEY, metadata);
+ }
+ if (jbwsMetaData != null) {
+ this.putAttachment(WSAttachmentKeys.JBOSS_WEBSERVICES_METADATA_KEY,
jbwsMetaData);
+ }
+ }
private String getShortName(String className, String urlPattern) {
final StringTokenizer st = new StringTokenizer(urlPattern, "/*");
Modified:
container/jboss71/branches/jbossws-jboss713/server-integration/src/main/java/org/jboss/as/webservices/service/EndpointPublishService.java
===================================================================
---
container/jboss71/branches/jbossws-jboss713/server-integration/src/main/java/org/jboss/as/webservices/service/EndpointPublishService.java 2013-04-08
09:06:14 UTC (rev 17463)
+++
container/jboss71/branches/jbossws-jboss713/server-integration/src/main/java/org/jboss/as/webservices/service/EndpointPublishService.java 2013-04-08
09:08:50 UTC (rev 17464)
@@ -29,6 +29,7 @@
import org.jboss.as.web.WebSubsystemServices;
import org.jboss.as.webservices.publish.EndpointPublisherImpl;
import org.jboss.as.webservices.util.WSServices;
+import org.jboss.metadata.web.jboss.JBossWebMetaData;
import org.jboss.msc.service.Service;
import org.jboss.msc.service.ServiceBuilder;
import org.jboss.msc.service.ServiceBuilder.DependencyType;
@@ -39,6 +40,8 @@
import org.jboss.msc.service.StartException;
import org.jboss.msc.service.StopContext;
import org.jboss.msc.value.InjectedValue;
+import org.jboss.wsf.spi.metadata.webservices.JBossWebservicesMetaData;
+import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData;
import org.jboss.wsf.spi.publish.Context;
/**
@@ -55,16 +58,22 @@
private final ClassLoader loader;
private final String context;
private final Map<String,String> urlPatternToClassName;
+ private final JBossWebMetaData jbwmd;
+ private final WebservicesMetaData wsmd;
+ private final JBossWebservicesMetaData jbwsmd;
private final InjectedValue<VirtualHost> hostInjector = new
InjectedValue<VirtualHost>();
-
+
private EndpointPublishService(final String context, final ClassLoader loader,
- final Map<String,String> urlPatternToClassName) {
- this.name = WSServices.ENDPOINT_PUBLISH_SERVICE.append(context);
- this.loader = loader;
- this.context = context;
- this.urlPatternToClassName = urlPatternToClassName;
- }
+ final Map<String,String> urlPatternToClassName, JBossWebMetaData jbwmd,
WebservicesMetaData wsmd, JBossWebservicesMetaData jbwsmd) {
+ this.name = WSServices.ENDPOINT_PUBLISH_SERVICE.append(context);
+ this.loader = loader;
+ this.context = context;
+ this.urlPatternToClassName = urlPatternToClassName;
+ this.jbwmd = jbwmd;
+ this.wsmd = wsmd;
+ this.jbwsmd = jbwsmd;
+ }
@Override
public Context getValue() {
@@ -84,7 +93,7 @@
ROOT_LOGGER.starting(name);
try {
EndpointPublisherImpl publisher = new
EndpointPublisherImpl(hostInjector.getValue().getHost(), true);
- wsctx = publisher.publish(ctx.getChildTarget(), context, loader,
urlPatternToClassName, null);
+ wsctx = publisher.publish(ctx.getChildTarget(), context, loader,
urlPatternToClassName, jbwmd, wsmd, jbwsmd);
} catch (Exception e) {
throw new StartException(e);
}
@@ -101,22 +110,29 @@
}
}
- public static ServiceBuilder<Context> createServiceBuilder(final ServiceTarget
serviceTarget, final String context,
- final ClassLoader loader, final String hostName, final
Map<String,String> urlPatternToClassName) {
- final EndpointPublishService service = new EndpointPublishService(context,
loader, urlPatternToClassName);
- final ServiceBuilder<Context> builder =
serviceTarget.addService(service.getName(), service);
- builder.addDependency(DependencyType.REQUIRED, WSServices.CONFIG_SERVICE);
- builder.addDependency(DependencyType.REQUIRED, WSServices.REGISTRY_SERVICE);
- builder.addDependency(WebSubsystemServices.JBOSS_WEB_HOST.append(hostName),
VirtualHost.class,
- service.getHostInjector());
- return builder;
- }
+ public static ServiceBuilder<Context> createServiceBuilder(final ServiceTarget
serviceTarget, final String context, final ClassLoader loader, final String hostName,
+ final Map<String, String> urlPatternToClassName)
+ {
+ return createServiceBuilder(serviceTarget, context, loader, hostName,
urlPatternToClassName, null, null, null);
+ }
- public static void install(final ServiceTarget serviceTarget, final String context,
final ClassLoader loader,
- final String hostName, final Map<String,String> urlPatternToClassName)
{
- ServiceBuilder<Context> builder = createServiceBuilder(serviceTarget,
context, loader, hostName, urlPatternToClassName);
- builder.setInitialMode(Mode.ACTIVE);
- builder.install();
- }
+ public static ServiceBuilder<Context> createServiceBuilder(final ServiceTarget
serviceTarget, final String context, final ClassLoader loader, final String hostName,
+ final Map<String, String> urlPatternToClassName, JBossWebMetaData jbwmd,
WebservicesMetaData wsmd, JBossWebservicesMetaData jbwsmd)
+ {
+ final EndpointPublishService service = new EndpointPublishService(context, loader,
urlPatternToClassName, jbwmd, wsmd, jbwsmd);
+ final ServiceBuilder<Context> builder =
serviceTarget.addService(service.getName(), service);
+ builder.addDependency(DependencyType.REQUIRED, WSServices.CONFIG_SERVICE);
+ builder.addDependency(DependencyType.REQUIRED, WSServices.REGISTRY_SERVICE);
+ builder.addDependency(WebSubsystemServices.JBOSS_WEB_HOST.append(hostName),
VirtualHost.class, service.getHostInjector());
+ return builder;
+ }
+ public static void install(final ServiceTarget serviceTarget, final String context,
final ClassLoader loader, final String hostName,
+ final Map<String, String> urlPatternToClassName)
+ {
+ ServiceBuilder<Context> builder = createServiceBuilder(serviceTarget,
context, loader, hostName, urlPatternToClassName);
+ builder.setInitialMode(Mode.ACTIVE);
+ builder.install();
+ }
+
}