Author: richard.opalka(a)jboss.com
Date: 2009-11-25 02:30:31 -0500 (Wed, 25 Nov 2009)
New Revision: 11150
Modified:
framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/ContextRootDeploymentAspect.java
framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/URLPatternDeploymentAspect.java
Log:
[JBWS-2838] implementing new context mode creator
Modified:
framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/ContextRootDeploymentAspect.java
===================================================================
---
framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/ContextRootDeploymentAspect.java 2009-11-25
07:17:57 UTC (rev 11149)
+++
framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/ContextRootDeploymentAspect.java 2009-11-25
07:30:31 UTC (rev 11150)
@@ -21,6 +21,7 @@
*/
package org.jboss.wsf.framework.deployment;
+import org.jboss.ws.Constants;
import org.jboss.wsf.spi.annotation.AuthMethod;
import org.jboss.wsf.spi.annotation.TransportGuarantee;
import org.jboss.wsf.spi.annotation.WebContext;
@@ -100,7 +101,7 @@
{
String simpleName = dep.getSimpleName();
String contextRoot = simpleName.substring(0, simpleName.length() - 4);
- if (dep.getParent() != null)
+ if (dep.getParent() != null && Constants.BC_CONTEXT_MODE)
{
simpleName = dep.getParent().getSimpleName();
contextRoot = simpleName.substring(0, simpleName.length() - 4) + "-" +
contextRoot;
Modified:
framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/URLPatternDeploymentAspect.java
===================================================================
---
framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/URLPatternDeploymentAspect.java 2009-11-25
07:17:57 UTC (rev 11149)
+++
framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/URLPatternDeploymentAspect.java 2009-11-25
07:30:31 UTC (rev 11150)
@@ -23,6 +23,9 @@
import java.util.StringTokenizer;
+import javax.jws.WebService;
+
+import org.jboss.ws.Constants;
import org.jboss.wsf.spi.annotation.WebContext;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.DeploymentAspect;
@@ -101,7 +104,24 @@
Class beanClass = ep.getTargetBeanClass();
WebContext anWebContext =
(WebContext)beanClass.getAnnotation(WebContext.class);
if (anWebContext != null && anWebContext.urlPattern().length() > 0)
+ {
urlPattern = anWebContext.urlPattern();
+ }
+ else if (!Constants.BC_CONTEXT_MODE)
+ {
+ WebService webServiceAnnotation =
(WebService)beanClass.getAnnotation(WebService.class);
+ String name = webServiceAnnotation != null ? webServiceAnnotation.name() :
null;
+ if (name.length() > 0)
+ {
+ urlPattern = name;
+ }
+ else
+ {
+ String fullClassName = beanClass.getName();
+ urlPattern =
fullClassName.substring(fullClassName.lastIndexOf('.') + 1);
+ }
+ }
+
}
return urlPattern;
Show replies by date