Author: richard.opalka(a)jboss.com
Date: 2011-09-10 08:55:10 -0400 (Sat, 10 Sep 2011)
New Revision: 14971
Modified:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/DescriptorDeploymentAspect.java
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/Message.properties
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/transport/ServletHelper.java
Log:
[JBWS-3346] code review
Modified:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/DescriptorDeploymentAspect.java
===================================================================
---
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/DescriptorDeploymentAspect.java 2011-09-10
12:49:58 UTC (rev 14970)
+++
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/DescriptorDeploymentAspect.java 2011-09-10
12:55:10 UTC (rev 14971)
@@ -21,6 +21,11 @@
*/
package org.jboss.wsf.stack.cxf.deployment.aspect;
+import static org.jboss.wsf.spi.deployment.DeploymentType.JAXRPC;
+import static org.jboss.ws.common.integration.WSHelper.isJaxwsEjbDeployment;
+import static org.jboss.ws.common.integration.WSHelper.isJaxwsJseDeployment;
+import static org.jboss.ws.common.integration.WSHelper.isJaxrpcDeployment;
+
import java.io.IOException;
import java.net.URL;
import java.util.HashMap;
@@ -31,7 +36,6 @@
import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.integration.AbstractDeploymentAspect;
import org.jboss.ws.common.integration.WSConstants;
-import org.jboss.ws.common.integration.WSHelper;
import org.jboss.wsf.spi.deployment.ArchiveDeployment;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.stack.cxf.client.util.SpringUtils;
@@ -92,23 +96,22 @@
*/
private URL getCXFConfigFromDeployment(Deployment dep)
{
-
- String metadir;
- if (WSHelper.isJaxwsEjbDeployment(dep))
+ if (isJaxrpcDeployment(dep))
{
+ throw new IllegalStateException(BundleUtils.getMessage(bundle,
"UNSUPPORTED_DEPLOYMENT_TYPE", JAXRPC));
+ }
+ String metadir = null;
+ if (isJaxwsEjbDeployment(dep))
+ {
// expected resource location for EJB3 deployments
metadir = "META-INF";
}
- if (WSHelper.isJaxwsJseDeployment(dep))
+ if (isJaxwsJseDeployment(dep))
{
// expected resource location for POJO deployments
+ // if EJBs are bundled in WARs, we default to WEB-INF
metadir = "WEB-INF";
}
- else
- {
- // only POJO and EJB3 deployments are supported
- throw new IllegalStateException(BundleUtils.getMessage(bundle,
"UNSUPPORTED_DEPLOYMENT_TYPE"));
- }
URL cxfURL = null;
try
Modified:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/Message.properties
===================================================================
---
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/Message.properties 2011-09-10
12:49:58 UTC (rev 14970)
+++
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/Message.properties 2011-09-10
12:55:10 UTC (rev 14971)
@@ -1 +1 @@
-UNSUPPORTED_DEPLOYMENT_TYPE=JAXRPC_JSE or JAXRPC_EJB21 endpoint is not supported
+UNSUPPORTED_DEPLOYMENT_TYPE=Unsupported deployment type: {0}
Modified:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/transport/ServletHelper.java
===================================================================
---
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/transport/ServletHelper.java 2011-09-10
12:49:58 UTC (rev 14970)
+++
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/transport/ServletHelper.java 2011-09-10
12:55:10 UTC (rev 14971)
@@ -21,8 +21,9 @@
*/
package org.jboss.wsf.stack.cxf.transport;
+import static org.jboss.ws.common.integration.WSHelper.isJaxwsJseEndpoint;
+
import java.io.IOException;
-import java.lang.reflect.Method;
import java.util.List;
import java.util.ResourceBundle;
@@ -52,7 +53,6 @@
import org.jboss.wsf.spi.SPIProviderResolver;
import org.jboss.wsf.spi.classloading.ClassLoaderProvider;
import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.deployment.Endpoint.EndpointType;
import org.jboss.wsf.spi.invocation.EndpointAssociation;
import org.jboss.wsf.spi.invocation.RequestHandler;
import org.jboss.wsf.spi.management.EndpointRegistry;
@@ -141,7 +141,7 @@
ServerFactoryBean factory = endpoint.getAttachment(ServerFactoryBean.class);
if (factory != null)
{
- if (EndpointType.JAXWS_EJB3 != endpoint.getType() &&
factory.getServiceBean() != null)
+ if (isJaxwsJseEndpoint(endpoint) && factory.getServiceBean() != null)
{
InjectionHelper.callPreDestroyMethod(factory.getServiceBean());
}
Show replies by date