Author: richard.opalka(a)jboss.com
Date: 2011-08-17 05:32:38 -0400 (Wed, 17 Aug 2011)
New Revision: 14889
Added:
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/config/Message.properties
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/Message.properties
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/deployment/Message.properties
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/endpoint/Message.properties
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/injection/Message.properties
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/invocation/Message.properties
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/security/Message.properties
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/security/SecurityDomainContextAdaptor.java
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/security/SecurityDomainContextDeploymentAspect.java
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/tomcat/Message.properties
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/util/Message.properties
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/weld/Message.properties
Modified:
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/config/ServerConfigImpl.java
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/AbstractDescriptorDeployer.java
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/JAXRPCIntegrationClassPathDeployer.java
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/WSDescriptorDeployer.java
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/WSEJBAdapterDeployer.java
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/WSTypeDeployer.java
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/deployment/AbstractDeploymentModelBuilder.java
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXRPC_EJB21.java
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/deployment/WSDeploymentBuilder.java
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/endpoint/HornetQJMSResolver.java
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/injection/EJBBeanReferenceResolver.java
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/injection/InjectionMetaDataDeploymentAspect.java
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/injection/ServiceRefResourceProvider.java
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/injection/VirtualFileAdaptor.java
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/injection/WebServiceContextResourceProvider.java
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerEJB21.java
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerEJB3.java
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerFactoryImpl.java
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/invocation/ServiceEndpointInterceptorEJB21.java
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/metadata/ContainerMetaDataDeploymentAspect.java
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/security/JACCPermissionsDeploymentAspect.java
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/security/JaasSecurityDomainAdaptorResolverImpl.java
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/security/SecurityAdapterImpl.java
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB3.java
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataCreatingDeploymentAspect.java
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataCreator.java
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifier.java
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/util/ASHelper.java
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/weld/WeldInvocationHandler.java
Log:
logging support
Added:
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/config/Message.properties
===================================================================
---
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/config/Message.properties
(rev 0)
+++
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/config/Message.properties 2011-08-17
09:32:38 UTC (rev 14889)
@@ -0,0 +1,2 @@
+COULD_NOT_OBTAIN_ATTRIBUTE_FROM=Could not obtain attribute {0} from {1}
+COULD_NOT_DESIRED_DIRECTORY_FROM_URL=Could not desired directory from URL: {0}
Modified:
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/config/ServerConfigImpl.java
===================================================================
---
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/config/ServerConfigImpl.java 2011-08-17
09:14:23 UTC (rev 14888)
+++
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/config/ServerConfigImpl.java 2011-08-17
09:32:38 UTC (rev 14889)
@@ -24,10 +24,12 @@
import java.io.File;
import java.net.URISyntaxException;
import java.net.URL;
+import java.util.ResourceBundle;
import javax.management.JMException;
import javax.management.ObjectName;
+import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.management.AbstractServerConfig;
import org.jboss.ws.common.management.AbstractServerConfigMBean;
@@ -40,6 +42,7 @@
*/
public final class ServerConfigImpl extends AbstractServerConfig implements
AbstractServerConfigMBean
{
+ private static final ResourceBundle bundle =
BundleUtils.getBundle(ServerConfigImpl.class);
/**
* Constructor.
*/
@@ -97,7 +100,7 @@
}
catch (final JMException e)
{
- throw new RuntimeException("Could not obtain attribute " +
attributeName + " from " + on, e);
+ throw new RuntimeException(BundleUtils.getMessage(bundle,
"COULD_NOT_OBTAIN_ATTRIBUTE_FROM", new Object[]{ attributeName , on}), e);
}
// Represent as a File
@@ -108,7 +111,7 @@
}
catch (final URISyntaxException urise)
{
- throw new RuntimeException("Could not desired directory from URL: " +
location, urise);
+ throw new RuntimeException(BundleUtils.getMessage(bundle,
"COULD_NOT_DESIRED_DIRECTORY_FROM_URL", location), urise);
}
return dir;
Modified:
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/AbstractDescriptorDeployer.java
===================================================================
---
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/AbstractDescriptorDeployer.java 2011-08-17
09:14:23 UTC (rev 14888)
+++
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/AbstractDescriptorDeployer.java 2011-08-17
09:32:38 UTC (rev 14889)
@@ -21,9 +21,12 @@
*/
package org.jboss.webservices.integration.deployers;
+import java.util.ResourceBundle;
+
import org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer;
import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
import org.jboss.vfs.VirtualFile;
+import org.jboss.ws.api.util.BundleUtils;
import org.jboss.wsf.spi.metadata.DescriptorParser;
/**
@@ -33,6 +36,7 @@
*/
abstract class AbstractDescriptorDeployer<P extends DescriptorParser<T>, T>
extends AbstractVFSParsingDeployer<T>
{
+ private static final ResourceBundle bundle =
BundleUtils.getBundle(AbstractDescriptorDeployer.class);
private P ddParser;
AbstractDescriptorDeployer(Class<T> output)
@@ -45,7 +49,7 @@
@Override
protected T parse(final VFSDeploymentUnit unit, final VirtualFile file, final T root)
throws Exception
{
- if (this.ddParser != null) //default to using new parsers if available
+ if (this.ddParser != null)
{
return this.ddParser.parse(file.toURL());
}
@@ -59,7 +63,7 @@
protected void setParser(final P ddParser)
{
if (this.ddParser != null)
- throw new IllegalStateException("Only one " + this.ddParser.getClass()
+ " instance can be installed in MC");
+ throw new IllegalStateException(BundleUtils.getMessage(bundle,
"ONLY_ONE_INSTANCE_CAN_BE_INSTALLED_IN_MC", this.ddParser.getClass() ));
this.ddParser = ddParser;
this.setName(this.ddParser.getDescriptorName());
Modified:
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/JAXRPCIntegrationClassPathDeployer.java
===================================================================
---
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/JAXRPCIntegrationClassPathDeployer.java 2011-08-17
09:14:23 UTC (rev 14888)
+++
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/JAXRPCIntegrationClassPathDeployer.java 2011-08-17
09:32:38 UTC (rev 14889)
@@ -23,6 +23,7 @@
import java.net.URL;
import java.util.HashSet;
+import java.util.ResourceBundle;
import java.util.Set;
import org.jboss.deployers.vfs.plugins.classloader.UrlIntegrationDeployer;
@@ -30,6 +31,7 @@
import org.jboss.util.StringPropertyReplacer;
import org.jboss.vfs.VFS;
import org.jboss.vfs.VirtualFile;
+import org.jboss.ws.api.util.BundleUtils;
import org.jboss.wsf.spi.management.ServerConfig;
/**
@@ -42,6 +44,7 @@
*/
public abstract class JAXRPCIntegrationClassPathDeployer<T> extends
UrlIntegrationDeployer<T>
{
+ private static final ResourceBundle bundle =
BundleUtils.getBundle(JAXRPCIntegrationClassPathDeployer.class);
private Set<String> libs;
private boolean integrationLibsFound = false;
private ServerConfig wsServerConfig;
@@ -90,7 +93,7 @@
}
catch (Exception e)
{
- throw new IllegalArgumentException("Unexpected error: " + e);
+ throw new IllegalArgumentException(BundleUtils.getMessage(bundle,
"UNEXPECTED_ERROR", e));
}
return result;
}
Added:
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/Message.properties
===================================================================
---
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/Message.properties
(rev 0)
+++
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/Message.properties 2011-08-17
09:32:38 UTC (rev 14889)
@@ -0,0 +1,4 @@
+ONLY_ONE_INSTANCE_CAN_BE_INSTALLED_IN_MC=Only one {0} instance can be installed in MC
+INGORING_EJB_DEPLOYMENT_WITH_NULL_CLASSNAME=Ingoring EJB deployment with null classname:
{0}
+FAILED_TO_LOAD_COMPONENT_CLASS=Failed to load component class {0} from {1}
+UNEXPECTED_ERROR=Unexpected error: {0}
Modified:
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/WSDescriptorDeployer.java
===================================================================
---
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/WSDescriptorDeployer.java 2011-08-17
09:14:23 UTC (rev 14888)
+++
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/WSDescriptorDeployer.java 2011-08-17
09:32:38 UTC (rev 14889)
@@ -31,6 +31,7 @@
*/
public final class WSDescriptorDeployer extends
AbstractDescriptorDeployer<WebservicesDescriptorParser, WebservicesMetaData>
{
+
/**
* Constructor.
*/
@@ -48,4 +49,5 @@
{
super.setParser(parser);
}
+
}
Modified:
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/WSEJBAdapterDeployer.java
===================================================================
---
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/WSEJBAdapterDeployer.java 2011-08-17
09:14:23 UTC (rev 14888)
+++
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/WSEJBAdapterDeployer.java 2011-08-17
09:32:38 UTC (rev 14889)
@@ -24,6 +24,7 @@
import java.lang.annotation.Annotation;
import java.util.ArrayList;
import java.util.List;
+import java.util.ResourceBundle;
import javax.management.MalformedObjectNameException;
import javax.management.ObjectName;
@@ -38,6 +39,7 @@
import org.jboss.metadata.ejb.jboss.JBossEnterpriseBeanMetaData;
import org.jboss.metadata.ejb.jboss.JBossMetaData;
import org.jboss.webservices.integration.util.ASHelper;
+import org.jboss.ws.api.util.BundleUtils;
import org.jboss.webservices.integration.WebServiceDeclaration;
import org.jboss.webservices.integration.WebServiceDeployment;
import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData;
@@ -49,6 +51,7 @@
*/
public final class WSEJBAdapterDeployer extends AbstractRealDeployer
{
+ private static final ResourceBundle bundle =
BundleUtils.getBundle(WSEJBAdapterDeployer.class);
/**
* Constructor.
*/
@@ -96,7 +99,7 @@
}
else
{
- this.log.warn("Ingoring EJB deployment with null classname: " +
ejbName);
+ this.log.warn(BundleUtils.getMessage(bundle,
"INGORING_EJB_DEPLOYMENT_WITH_NULL_CLASSNAME", ejbName));
}
}
@@ -229,8 +232,7 @@
}
catch (ClassNotFoundException cnfe)
{
- throw new RuntimeException("Failed to load component class: " +
this.getComponentClassName()
- + " from loader: " + this.loader);
+ throw new RuntimeException(BundleUtils.getMessage(bundle,
"FAILED_TO_LOAD_COMPONENT_CLASS", new Object[]{this.getComponentClassName(),
this.loader}));
}
}
}
Modified:
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/WSTypeDeployer.java
===================================================================
---
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/WSTypeDeployer.java 2011-08-17
09:14:23 UTC (rev 14888)
+++
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/WSTypeDeployer.java 2011-08-17
09:32:38 UTC (rev 14889)
@@ -27,9 +27,8 @@
import org.jboss.metadata.ejb.jboss.JBossMetaData;
import org.jboss.metadata.web.jboss.JBossWebMetaData;
import org.jboss.webservices.integration.util.ASHelper;
-import org.jboss.webservices.integration.WebServiceDeployment;
import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
-import org.jboss.wsf.spi.metadata.jms.JMSEndpointsMetaData;
+import org.jboss.webservices.integration.WebServiceDeployment;
import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData;
/**
@@ -85,11 +84,6 @@
this.log.debug("Detected JAXRPC EJB21 deployment");
unit.addAttachment(DeploymentType.class, DeploymentType.JAXRPC_EJB21);
}
- else if (this.isJaxwsJmsDeployment(unit))
- {
- this.log.debug("Detected JAXWS JMS deployment");
- unit.addAttachment(DeploymentType.class, DeploymentType.JAXWS_JMS);
- }
}
/**
@@ -160,15 +154,4 @@
return false;
}
-
- /**
- * Returns true if JAXWS JMS deployment is detected.
- *
- * @param unit deployment unit
- * @return true if JAXWS JMS, false otherwise
- */
- private boolean isJaxwsJmsDeployment(final DeploymentUnit unit)
- {
- return ASHelper.hasAttachment(unit, JMSEndpointsMetaData.class);
- }
}
Modified:
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/deployment/AbstractDeploymentModelBuilder.java
===================================================================
---
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/deployment/AbstractDeploymentModelBuilder.java 2011-08-17
09:14:23 UTC (rev 14888)
+++
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/deployment/AbstractDeploymentModelBuilder.java 2011-08-17
09:32:38 UTC (rev 14889)
@@ -24,6 +24,7 @@
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
+import java.util.ResourceBundle;
import java.util.Set;
import org.jboss.deployers.structure.spi.DeploymentUnit;
@@ -32,6 +33,7 @@
import org.jboss.vfs.VirtualFile;
import org.jboss.webservices.integration.injection.VirtualFileAdaptor;
import org.jboss.webservices.integration.util.ASHelper;
+import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.ResourceLoaderAdapter;
import org.jboss.wsf.spi.SPIProvider;
import org.jboss.wsf.spi.SPIProviderResolver;
@@ -49,6 +51,7 @@
*/
abstract class AbstractDeploymentModelBuilder implements DeploymentModelBuilder
{
+ private static final ResourceBundle bundle =
BundleUtils.getBundle(AbstractDeploymentModelBuilder.class);
/** WSDL, XSD and XML files filter. */
private static final WSVirtualFileFilter WS_FILE_FILTER = new WSVirtualFileFilter();
@@ -105,12 +108,12 @@
{
if (endpointName == null)
{
- throw new NullPointerException("Null endpoint name");
+ throw new NullPointerException(BundleUtils.getMessage(bundle,
"NULL_ENDPOINT_NAME"));
}
if (endpointClass == null)
{
- throw new NullPointerException("Null endpoint class");
+ throw new NullPointerException(BundleUtils.getMessage(bundle,
"NULL_ENDPOINT_CLASS"));
}
final Endpoint endpoint =
this.deploymentModelFactory.newHttpEndpoint(endpointClass);
@@ -132,12 +135,12 @@
{
if (endpointName == null)
{
- throw new NullPointerException("Null endpoint name");
+ throw new NullPointerException(BundleUtils.getMessage(bundle,
"NULL_ENDPOINT_NAME"));
}
if (endpointClass == null)
{
- throw new NullPointerException("Null endpoint class");
+ throw new NullPointerException(BundleUtils.getMessage(bundle,
"NULL_ENDPOINT_CLASS"));
}
final Endpoint endpoint =
this.deploymentModelFactory.newJMSEndpoint(endpointClass);
@@ -230,6 +233,6 @@
return attachmentValue;
}
- throw new IllegalStateException("Deployment unit does not contain " +
attachment);
+ throw new IllegalStateException(BundleUtils.getMessage(bundle,
"DEPLOYMENT_UNIT_DOES_NOT_CONTAIN", attachment));
}
}
Modified:
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXRPC_EJB21.java
===================================================================
---
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXRPC_EJB21.java 2011-08-17
09:14:23 UTC (rev 14888)
+++
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXRPC_EJB21.java 2011-08-17
09:32:38 UTC (rev 14889)
@@ -24,8 +24,8 @@
import org.jboss.deployers.structure.spi.DeploymentUnit;
import org.jboss.metadata.ejb.jboss.JBossEnterpriseBeanMetaData;
import org.jboss.metadata.ejb.jboss.JBossMetaData;
+import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.webservices.integration.WebServiceDeployment;
-import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.metadata.webservices.PortComponentMetaData;
import org.jboss.wsf.spi.metadata.webservices.WebserviceDescriptionMetaData;
import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData;
Added:
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/deployment/Message.properties
===================================================================
---
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/deployment/Message.properties
(rev 0)
+++
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/deployment/Message.properties 2011-08-17
09:32:38 UTC (rev 14889)
@@ -0,0 +1,3 @@
+NULL_ENDPOINT_NAME=Null endpoint name
+NULL_ENDPOINT_CLASS=Null endpoint class
+DEPLOYMENT_UNIT_DOES_NOT_CONTAIN=Deployment unit does not contain {0}
Modified:
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/deployment/WSDeploymentBuilder.java
===================================================================
---
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/deployment/WSDeploymentBuilder.java 2011-08-17
09:14:23 UTC (rev 14888)
+++
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/deployment/WSDeploymentBuilder.java 2011-08-17
09:32:38 UTC (rev 14889)
@@ -47,7 +47,6 @@
WSDeploymentBuilder.builders.put(DeploymentType.JAXRPC_JSE, new
DeploymentModelBuilderJAXRPC_JSE());
WSDeploymentBuilder.builders.put(DeploymentType.JAXWS_EJB3, new
DeploymentModelBuilderJAXWS_EJB3());
WSDeploymentBuilder.builders.put(DeploymentType.JAXRPC_EJB21, new
DeploymentModelBuilderJAXRPC_EJB21());
- WSDeploymentBuilder.builders.put(DeploymentType.JAXWS_JMS, new
DeploymentModelBuilderJAXWS_JMS());
}
/**
Modified:
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/endpoint/HornetQJMSResolver.java
===================================================================
---
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/endpoint/HornetQJMSResolver.java 2011-08-17
09:14:23 UTC (rev 14888)
+++
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/endpoint/HornetQJMSResolver.java 2011-08-17
09:32:38 UTC (rev 14889)
@@ -21,10 +21,13 @@
*/
package org.jboss.webservices.integration.endpoint;
+import java.util.ResourceBundle;
+
import javax.jms.Destination;
import org.apache.log4j.Logger;
import org.hornetq.jms.client.HornetQDestination;
+import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.management.DefaultJMSEndpointResolver;
/**
@@ -34,14 +37,14 @@
*/
public class HornetQJMSResolver extends DefaultJMSEndpointResolver
{
+ private static final ResourceBundle bundle =
BundleUtils.getBundle(HornetQJMSResolver.class);
public void setDestination(Destination destination)
{
if (destination instanceof HornetQDestination)
setFromName(destination, ((HornetQDestination)destination).isQueue());
else
{
- Logger.getLogger(HornetQJMSResolver.class).warn(
- "Destination '" + destination + "' is not a
org.hornetq.jms.client.HornetQDestination instance, falling back to default JMS endpoint
resolution");
+ Logger.getLogger(HornetQJMSResolver.class).warn(BundleUtils.getMessage(bundle,
"DESTINATION_IS_NOT_HQDES", destination));
super.setDestination(destination);
}
}
Added:
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/endpoint/Message.properties
===================================================================
---
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/endpoint/Message.properties
(rev 0)
+++
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/endpoint/Message.properties 2011-08-17
09:32:38 UTC (rev 14889)
@@ -0,0 +1 @@
+DESTINATION_IS_NOT_HQDES=Destination {0}is not a
org.hornetq.jms.client.HornetQDestination instance, falling back to default JMS endpoint
resolution=
Modified:
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/injection/EJBBeanReferenceResolver.java
===================================================================
---
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/injection/EJBBeanReferenceResolver.java 2011-08-17
09:14:23 UTC (rev 14888)
+++
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/injection/EJBBeanReferenceResolver.java 2011-08-17
09:32:38 UTC (rev 14889)
@@ -23,12 +23,14 @@
import java.lang.reflect.Field;
import java.lang.reflect.Method;
+import java.util.ResourceBundle;
import javax.ejb.EJB;
import org.jboss.deployers.structure.spi.DeploymentUnit;
import org.jboss.ejb3.ejbref.resolver.spi.EjbReference;
import org.jboss.ejb3.ejbref.resolver.spi.EjbReferenceResolver;
+import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.injection.resolvers.AbstractReferenceResolver;
/**
@@ -38,6 +40,7 @@
*/
final class EJBBeanReferenceResolver extends AbstractReferenceResolver<EJB>
{
+ private static final ResourceBundle bundle =
BundleUtils.getBundle(EJBBeanReferenceResolver.class);
/**
* Deployment unit used for resolving process.
*/
@@ -60,11 +63,11 @@
if (unit == null)
{
- throw new IllegalArgumentException("Deployment unit cannot be null");
+ throw new IllegalArgumentException(BundleUtils.getMessage(bundle,
"DEPLOYMENT_UNIT_CANNOT_BE_NULL"));
}
if (delegate == null)
{
- throw new IllegalArgumentException("Ejb reference resolver cannot be
null");
+ throw new IllegalArgumentException(BundleUtils.getMessage(bundle,
"EJB_REFERENCE_RESOLVER_CANNOT_BE_NULL"));
}
this.unit = unit;
Modified:
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/injection/InjectionMetaDataDeploymentAspect.java
===================================================================
---
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/injection/InjectionMetaDataDeploymentAspect.java 2011-08-17
09:14:23 UTC (rev 14888)
+++
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/injection/InjectionMetaDataDeploymentAspect.java 2011-08-17
09:32:38 UTC (rev 14889)
@@ -27,6 +27,7 @@
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
+import java.util.ResourceBundle;
import java.util.Set;
import javax.annotation.Resource;
@@ -41,7 +42,9 @@
import org.jboss.metadata.javaee.spec.ResourceInjectionTargetMetaData;
import org.jboss.metadata.web.jboss.JBossWebMetaData;
import org.jboss.webservices.integration.util.ASHelper;
+import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.injection.resolvers.ResourceReferenceResolver;
+import org.jboss.ws.common.integration.AbstractDeploymentAspect;
import org.jboss.ws.common.integration.WSHelper;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Endpoint;
@@ -51,7 +54,6 @@
import org.jboss.wsf.spi.metadata.injection.InjectionMetaData;
import org.jboss.wsf.spi.metadata.injection.InjectionsMetaData;
import org.jboss.wsf.spi.metadata.injection.ReferenceResolver;
-import org.jboss.ws.common.integration.AbstractDeploymentAspect;
/**
* Deployment aspect that builds injection meta data.
@@ -60,6 +62,7 @@
*/
public final class InjectionMetaDataDeploymentAspect extends AbstractDeploymentAspect
{
+ private static final ResourceBundle bundle =
BundleUtils.getBundle(InjectionMetaDataDeploymentAspect.class);
/** Resolver handling @Resource injections. */
private static final ReferenceResolver RESOURCE_RESOLVER = new
ResourceReferenceResolver();
@@ -94,7 +97,7 @@
{
if (this.ejbReferenceResolver == null)
{
- throw new IllegalStateException("No EjbReferenceResolver set by MC");
+ throw new IllegalStateException(BundleUtils.getMessage(bundle,
"NO_EJBREFERENCERESOLVER_SET_BY_MC"));
}
return this.ejbReferenceResolver;
@@ -240,7 +243,7 @@
{
// prepare injection target meta data
targetClass = resourceInjectionTargetMD.getInjectionTargetClass();
- targetName = resourceInjectionTargetMD.getInjectionTargetName();
+ targetName = getTargetName(resourceInjectionTargetMD);
// build injection meta data for injection target
final InjectionMetaData injectionMD = new InjectionMetaData(targetClass,
targetName, envEntryValueClass,
@@ -253,4 +256,15 @@
return retVal;
}
+
+ private String getTargetName(final ResourceInjectionTargetMetaData
resourceInjectionTargetMD)
+ {
+ final String targetName = resourceInjectionTargetMD.getInjectionTargetName();
+ if (targetName.startsWith("set"))
+ {
+ final String propertyName = targetName.substring(3);
+ return propertyName.substring(0, 1).toLowerCase() + propertyName.substring(1);
+ }
+ return targetName;
+ }
}
Added:
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/injection/Message.properties
===================================================================
---
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/injection/Message.properties
(rev 0)
+++
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/injection/Message.properties 2011-08-17
09:32:38 UTC (rev 14889)
@@ -0,0 +1,13 @@
+NO_EJBREFERENCERESOLVER_SET_BY_MC=No EjbReferenceResolver set by MC
+CAN_ONLY_HANDLE_REAL_VFS_DEPLOYMENTS=Can only handle real VFS deployments: {0}
+IGNORING_PORT_REF=Ignoring <port-component-ref> without
<service-endpoint-interface> and <port-qname>: {0}
+INJECTION_TARGET_CLASS_NOT_FOUND=<injection-target> class: {0} was not found in
deployment
+INJECTION_TARGET_NOT_FOUND=<injection-target> could not be found: {0}.
+DEPLOYMENT_UNIT_CANNOT_BE_NULL=Deployment unit cannot be null
+EJB_REFERENCE_RESOLVER_CANNOT_BE_NULL=Ejb reference resolver cannot be null
+NULL_ROOT_URL=Null root url
+NULL_PATH=Null path
+UNABLE_TO_GET_VIRTUALFILE_FROM_URL=Unable to get Virtualfile from URL: {0}
+VIRTUALFILE_DOES_NOT_EXIST=VirtualFile {0} does not exist
+VIRTUALFILE_IS_NOT_MOUNTED=VirtualFile {0} is not mounted
+CHILD_NOT_FOUND=Child {0} not found for VirtualFile {1}
\ No newline at end of file
Modified:
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/injection/ServiceRefResourceProvider.java
===================================================================
---
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/injection/ServiceRefResourceProvider.java 2011-08-17
09:14:23 UTC (rev 14888)
+++
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/injection/ServiceRefResourceProvider.java 2011-08-17
09:32:38 UTC (rev 14889)
@@ -32,6 +32,7 @@
import java.util.Collection;
import java.util.List;
import java.util.Map;
+import java.util.ResourceBundle;
import javax.naming.Referenceable;
import javax.xml.namespace.QName;
@@ -53,6 +54,7 @@
import org.jboss.switchboard.javaee.jboss.environment.JBossServiceRefType;
import org.jboss.switchboard.mc.spi.MCBasedResourceProvider;
import org.jboss.switchboard.spi.Resource;
+import org.jboss.ws.api.util.BundleUtils;
import org.jboss.wsf.spi.SPIProvider;
import org.jboss.wsf.spi.SPIProviderResolver;
import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
@@ -65,8 +67,8 @@
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedStubPropertyMetaData;
import org.jboss.wsf.spi.serviceref.ServiceRefHandler;
+import org.jboss.wsf.spi.serviceref.ServiceRefHandler.Type;
import org.jboss.wsf.spi.serviceref.ServiceRefHandlerFactory;
-import org.jboss.wsf.spi.serviceref.ServiceRefHandler.Type;
/**
* Service reference resource provider.
@@ -82,6 +84,7 @@
*/
public final class ServiceRefResourceProvider implements
MCBasedResourceProvider<ServiceRefType>
{
+ private static final ResourceBundle bundle =
BundleUtils.getBundle(ServiceRefResourceProvider.class);
private static final Logger log = Logger.getLogger(ServiceRefResourceProvider.class);
@@ -151,7 +154,7 @@
}
else
{
- throw new IllegalArgumentException("Can only handle real VFS deployments:
" + tempDeploymentUnit);
+ throw new IllegalArgumentException(BundleUtils.getMessage(bundle,
"CAN_ONLY_HANDLE_REAL_VFS_DEPLOYMENTS", tempDeploymentUnit));
}
}
@@ -219,8 +222,7 @@
}
else
{
- log.warn("Ignoring <port-component-ref> without
<service-endpoint-interface> and <port-qname>: "
- + portComponentUMDM);
+ log.warn(BundleUtils.getMessage(bundle, "IGNORING_PORT_REF",
portComponentUMDM));
}
}
}
@@ -384,7 +386,7 @@
final Addressing addressingSBMD = portComponentSBMD.getAddressing();
if (addressingSBMD != null)
{
- portComponentUMDM.setAddressingAnnotationSpecified(true);
+ portComponentUMDM.setAddressingAnnotationSpecified(true);
portComponentUMDM.setAddressingEnabled(addressingSBMD.isEnabled());
portComponentUMDM.setAddressingRequired(addressingSBMD.isRequired());
portComponentUMDM.setAddressingResponses(addressingSBMD.getResponses());
@@ -393,7 +395,7 @@
// propagate respect binding properties
if (portComponentSBMD.isRespectBindingEnabled())
{
- portComponentUMDM.setRespectBindingAnnotationSpecified(true);
+ portComponentUMDM.setRespectBindingAnnotationSpecified(true);
portComponentUMDM.setRespectBindingEnabled(true);
}
@@ -682,8 +684,7 @@
}
catch (ClassNotFoundException e)
{
- throw new RuntimeException("<injection-target> class: " +
target.getTargetClass()
- + " was not found in deployment");
+ throw new RuntimeException(BundleUtils.getMessage(bundle,
"INJECTION_TARGET_CLASS_NOT_FOUND", target.getTargetClass()));
}
for (Field field : clazz.getDeclaredFields())
@@ -692,14 +693,28 @@
return field;
}
+ final String targetName = getMethodName(target);
for (Method method : clazz.getDeclaredMethods())
{
- if (method.getName().equals(target.getTargetName()))
+ if (method.getName().equals(targetName))
return method;
}
- throw new RuntimeException("<injection-target> could not be found:
" + target.getTargetClass() + "."
- + target.getTargetName());
+ throw new RuntimeException(BundleUtils.getMessage(bundle,
"INJECTION_TARGET_NOT_FOUND", target.getTargetClass()+ "."
+target.getTargetName()));
+ }
+
+ private String getMethodName(final InjectionTarget target)
+ {
+ if (target.getTargetName() == null)
+ {
+ return null;
+ }
+ if (target.getTargetName().startsWith("set"))
+ {
+ return target.getTargetName();
+ }
+
+ return "set" + target.getTargetName().substring(0, 1).toUpperCase() +
target.getTargetName().substring(1);
+ }
- }
}
Modified:
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/injection/VirtualFileAdaptor.java
===================================================================
---
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/injection/VirtualFileAdaptor.java 2011-08-17
09:14:23 UTC (rev 14888)
+++
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/injection/VirtualFileAdaptor.java 2011-08-17
09:32:38 UTC (rev 14889)
@@ -31,6 +31,7 @@
import java.net.URL;
import java.util.LinkedList;
import java.util.List;
+import java.util.ResourceBundle;
import java.util.jar.JarEntry;
import java.util.jar.JarInputStream;
import java.util.jar.JarOutputStream;
@@ -38,6 +39,7 @@
import org.jboss.vfs.VFS;
import org.jboss.vfs.VFSUtils;
import org.jboss.vfs.VirtualFile;
+import org.jboss.ws.api.util.BundleUtils;
import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
import org.jboss.wsf.spi.deployment.WritableUnifiedVirtualFile;
@@ -50,6 +52,7 @@
*/
public final class VirtualFileAdaptor implements WritableUnifiedVirtualFile
{
+ private static final ResourceBundle bundle =
BundleUtils.getBundle(VirtualFileAdaptor.class);
private static final long serialVersionUID = -4509594124653184348L;
private static final ObjectStreamField[] serialPersistentFields =
@@ -79,9 +82,9 @@
protected VirtualFileAdaptor(URL rootUrl, String path, boolean requiresMount)
{
if (rootUrl == null)
- throw new IllegalArgumentException("Null root url");
+ throw new IllegalArgumentException(BundleUtils.getMessage(bundle,
"NULL_ROOT_URL"));
if (path == null)
- throw new IllegalArgumentException("Null path");
+ throw new IllegalArgumentException(BundleUtils.getMessage(bundle,
"NULL_PATH"));
this.rootUrl = rootUrl;
this.path = path;
@@ -106,17 +109,17 @@
}
catch (URISyntaxException e)
{
- throw new IOException("Unable to get Virtualfile from URL: " +
rootUrl, e);
+ throw new IOException(BundleUtils.getMessage(bundle,
"UNABLE_TO_GET_VIRTUALFILE_FROM_URL", rootUrl), e);
}
file = root.getChild(path);
if (!file.exists())
{
- throw new IOException("VirtualFile " + file + " does not
exist");
+ throw new IOException(BundleUtils.getMessage(bundle,
"VIRTUALFILE_DOES_NOT_EXIST", file ));
}
else if (requiresMount && !isMounted(root, file))
{
- throw new IOException("VirtualFile " + file + " is not
mounted");
+ throw new IOException(BundleUtils.getMessage(bundle,
"VIRTUALFILE_IS_NOT_MOUNTED", file ));
}
}
return file;
@@ -132,7 +135,7 @@
final VirtualFile virtualFile = getFile();
final VirtualFile childFile = file.getChild(child);
if(!childFile.exists())
- throw new IOException("Child '" + child + "' not found
for VirtualFile " + virtualFile);
+ throw new IOException(BundleUtils.getMessage(bundle,
"CHILD_NOT_FOUND", new Object[]{ child , virtualFile}));
return new VirtualFileAdaptor(childFile);
}
Modified:
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/injection/WebServiceContextResourceProvider.java
===================================================================
---
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/injection/WebServiceContextResourceProvider.java 2011-08-17
09:14:23 UTC (rev 14888)
+++
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/injection/WebServiceContextResourceProvider.java 2011-08-17
09:32:38 UTC (rev 14889)
@@ -74,7 +74,7 @@
{
return this.target;
}
-
+
@Override
public Collection<?> getInvocationDependencies()
{
Modified:
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerEJB21.java
===================================================================
---
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerEJB21.java 2011-08-17
09:14:23 UTC (rev 14888)
+++
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerEJB21.java 2011-08-17
09:32:38 UTC (rev 14889)
@@ -23,6 +23,7 @@
import java.lang.reflect.Method;
import java.security.Principal;
+import java.util.ResourceBundle;
import javax.management.MBeanServer;
import javax.management.ObjectName;
@@ -37,6 +38,7 @@
import org.jboss.invocation.InvocationType;
import org.jboss.invocation.PayloadKey;
import org.jboss.mx.util.MBeanServerLocator;
+import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.ObjectNameFactory;
import org.jboss.ws.common.integration.WSHelper;
import org.jboss.ws.common.invocation.AbstractInvocationHandler;
@@ -59,6 +61,7 @@
*/
final class InvocationHandlerEJB21 extends AbstractInvocationHandler
{
+ private static final ResourceBundle bundle =
BundleUtils.getBundle(InvocationHandlerEJB21.class);
/** EJB21 JNDI name. */
private String jndiName;
@@ -90,7 +93,7 @@
if (ejbMD == null)
{
- throw new WebServiceException("Cannot obtain ejb meta data for: " +
ejbName);
+ throw new WebServiceException(BundleUtils.getMessage(bundle,
"CANNOT_OBTAIN_EJB_META_DATA", ejbName));
}
// get the bean's JNDI name
@@ -98,7 +101,7 @@
if (this.jndiName == null)
{
- throw new WebServiceException("Cannot obtain JNDI name for: " +
ejbName);
+ throw new WebServiceException(BundleUtils.getMessage(bundle,
"CANNOT_OBTAIN_JNDI_NAME", ejbName));
}
}
@@ -118,7 +121,7 @@
final boolean ejb21NotRegistered =
!this.server.isRegistered(this.ejb21ContainerName);
if (ejb21NotRegistered)
{
- throw new IllegalArgumentException("Cannot find service endpoint target:
" + this.ejb21ContainerName);
+ throw new IllegalArgumentException(BundleUtils.getMessage(bundle,
"CANNOT_FIND_SERVICE_ENDPOINT_TARGET", this.ejb21ContainerName));
}
// Inject the Service endpoint interceptor
@@ -154,7 +157,7 @@
}
catch (Exception e)
{
- this.log.error("Method invocation failed with exception: " +
e.getMessage(), e);
+ this.log.error(BundleUtils.getMessage(bundle,
"METHOD_INVOCATION_FAILED", e.getMessage()), e);
this.handleInvocationException(e);
}
}
@@ -171,13 +174,13 @@
final MessageContext msgContext =
wsInvocation.getInvocationContext().getAttachment(MessageContext.class);
if (msgContext == null)
{
- throw new IllegalStateException("Cannot obtain MessageContext");
+ throw new IllegalStateException(BundleUtils.getMessage(bundle,
"CANNOT_OBTAIN_MESSAGECONTEXT"));
}
final HandlerCallback callback =
wsInvocation.getInvocationContext().getAttachment(HandlerCallback.class);
if (callback == null)
{
- throw new IllegalStateException("Cannot obtain HandlerCallback");
+ throw new IllegalStateException(BundleUtils.getMessage(bundle,
"CANNOT_OBTAIN_HANDLERCALLBACK"));
}
// prepare security data
@@ -234,11 +237,11 @@
currentInterceptor = nextInterceptor;
}
- this.log.warn("Cannot find EJB 21 service endpoint interceptor insert
point");
+ this.log.warn(BundleUtils.getMessage(bundle,
"CANNOT_FIND_EJB21_INSERT_POINT"));
}
catch (Exception ex)
{
- this.log.warn("Cannot register EJB 21 service endpoint interceptor: ",
ex);
+ this.log.warn(BundleUtils.getMessage(bundle,
"CANNOT_REGISTER_EJB21_INTERCEPTOR"), ex);
}
}
}
Modified:
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerEJB3.java
===================================================================
---
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerEJB3.java 2011-08-17
09:14:23 UTC (rev 14888)
+++
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerEJB3.java 2011-08-17
09:32:38 UTC (rev 14889)
@@ -22,18 +22,16 @@
package org.jboss.webservices.integration.invocation;
import java.lang.reflect.Method;
-import java.security.Principal;
+import java.util.ResourceBundle;
import javax.naming.Context;
import javax.naming.NamingException;
-import javax.xml.ws.EndpointReference;
import javax.xml.ws.WebServiceContext;
import javax.xml.ws.WebServiceException;
-import javax.xml.ws.handler.MessageContext;
import org.jboss.ejb3.EJBContainer;
-import org.jboss.ejb3.context.CurrentEJBContext;
import org.jboss.webservices.integration.util.ASHelper;
+import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.injection.ThreadLocalAwareWebServiceContext;
import org.jboss.ws.common.invocation.AbstractInvocationHandler;
import org.jboss.wsf.spi.SPIProvider;
@@ -45,7 +43,6 @@
import org.jboss.wsf.spi.invocation.integration.ServiceEndpointContainer;
import org.jboss.wsf.spi.ioc.IoCContainerProxy;
import org.jboss.wsf.spi.ioc.IoCContainerProxyFactory;
-import org.w3c.dom.Element;
/**
* Handles invocations on EJB3 endpoints.
@@ -55,6 +52,7 @@
*/
final class InvocationHandlerEJB3 extends AbstractInvocationHandler
{
+ private static final ResourceBundle bundle =
BundleUtils.getBundle(InvocationHandlerEJB3.class);
/** EJB3 JNDI context. */
private static final String EJB3_JNDI_PREFIX = "java:env/";
@@ -88,7 +86,7 @@
if (this.containerName == null)
{
- throw new IllegalArgumentException("Container name cannot be null");
+ throw new IllegalArgumentException(BundleUtils.getMessage(bundle,
"CONTAINER_NAME_CANNOT_BE_NULL"));
}
}
@@ -106,7 +104,7 @@
this.serviceEndpointContainer = this.iocContainer.getBean(this.containerName,
ServiceEndpointContainer.class);
if (this.serviceEndpointContainer == null)
{
- throw new WebServiceException("Cannot find service endpoint target:
" + this.containerName);
+ throw new WebServiceException(BundleUtils.getMessage(bundle,
"CANNOT_FIND_SERVICE_ENDPOINT_TARGET", this.containerName));
}
}
@@ -139,7 +137,7 @@
}
catch (Throwable t)
{
- this.log.error("Method invocation failed with exception: " +
t.getMessage(), t);
+ this.log.error(BundleUtils.getMessage(bundle,
"METHOD_INVOCATION_FAILED", t.getMessage()), t);
this.handleInvocationException(t);
}
finally
@@ -187,44 +185,9 @@
{
final InvocationContext invocationContext = invocation.getInvocationContext();
- return new
WebServiceContextAdapter(invocationContext.getAttachment(WebServiceContext.class));
+ return invocationContext.getAttachment(WebServiceContext.class);
}
- private static final class WebServiceContextAdapter implements WebServiceContext
- {
- private final WebServiceContext delegate;
-
- private WebServiceContextAdapter(final WebServiceContext delegate)
- {
- this.delegate = delegate;
- }
-
- public MessageContext getMessageContext()
- {
- return this.delegate.getMessageContext();
- }
-
- public Principal getUserPrincipal()
- {
- return CurrentEJBContext.get().getCallerPrincipal();
- }
-
- public boolean isUserInRole(final String role)
- {
- return CurrentEJBContext.get().isCallerInRole(role);
- }
-
- public EndpointReference getEndpointReference(final Element...
referenceParameters)
- {
- return delegate.getEndpointReference(referenceParameters);
- }
-
- public <T extends EndpointReference> T getEndpointReference(final
Class<T> clazz, final Element... referenceParameters)
- {
- return delegate.getEndpointReference(clazz, referenceParameters);
- }
- }
-
/**
* EJB3 invocation callback allowing EJB 3 beans to access Web Service invocation
properties.
*/
Modified:
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerFactoryImpl.java
===================================================================
---
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerFactoryImpl.java 2011-08-17
09:14:23 UTC (rev 14888)
+++
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerFactoryImpl.java 2011-08-17
09:32:38 UTC (rev 14889)
@@ -21,6 +21,9 @@
*/
package org.jboss.webservices.integration.invocation;
+import java.util.ResourceBundle;
+
+import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.invocation.InvocationHandlerJAXRPC;
import org.jboss.ws.common.invocation.InvocationHandlerJAXWS;
import org.jboss.wsf.spi.invocation.InvocationHandler;
@@ -35,6 +38,7 @@
*/
public final class InvocationHandlerFactoryImpl extends InvocationHandlerFactory
{
+ private static final ResourceBundle bundle =
BundleUtils.getBundle(InvocationHandlerFactoryImpl.class);
/**
* Constructor.
*/
@@ -74,7 +78,7 @@
handler = new InvocationHandlerMDB3();
break;
default :
- throw new IllegalArgumentException("Unable to resolve
spi.invocation.InvocationHandler for type " + type);
+ throw new IllegalArgumentException(BundleUtils.getMessage(bundle,
"UNABLE_TO_RESOLVE", type));
}
return handler;
Added:
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/invocation/Message.properties
===================================================================
---
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/invocation/Message.properties
(rev 0)
+++
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/invocation/Message.properties 2011-08-17
09:32:38 UTC (rev 14889)
@@ -0,0 +1,14 @@
+CONTAINER_NAME_CANNOT_BE_NULL=Container name cannot be null
+CANNOT_FIND_SERVICE_ENDPOINT_TARGET=Cannot find service endpoint target: {0}
+METHOD_INVOCATION_FAILED_WITH_EXCEPTION=Method invocation failed with exception: {0}
+HANDLER_CALLBACK_NOT_AVAILABLE=Handler callback not available
+CANNOT_PROCESS_HANDLEFAULT=Cannot process handlerChain.handleFault:
+CANNOT_OBTAIN_EJB_META_DATA=Cannot obtain ejb meta data for: {0}
+CANNOT_OBTAIN_JNDI_NAME=Cannot obtain JNDI name for: {0}
+CANNOT_FIND_SERVICE_ENDPOINT_TARGET=Cannot find service endpoint target: {0}
+METHOD_INVOCATION_FAILED=Method invocation failed with exception: {0}
+CANNOT_OBTAIN_MESSAGECONTEXT=Cannot obtain MessageContext
+CANNOT_OBTAIN_HANDLERCALLBACK=Cannot obtain HandlerCallback
+CANNOT_FIND_EJB21_INSERT_POINT=Cannot find EJB 21 service endpoint interceptor insert
point
+CANNOT_REGISTER_EJB21_INTERCEPTOR=Cannot register EJB 21 service endpoint interceptor:
+UNABLE_TO_RESOLVE=Unable to resolve spi.invocation.InvocationHandler for type {0}
Modified:
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/invocation/ServiceEndpointInterceptorEJB21.java
===================================================================
---
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/invocation/ServiceEndpointInterceptorEJB21.java 2011-08-17
09:14:23 UTC (rev 14888)
+++
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/invocation/ServiceEndpointInterceptorEJB21.java 2011-08-17
09:32:38 UTC (rev 14889)
@@ -21,10 +21,13 @@
*/
package org.jboss.webservices.integration.invocation;
+import java.util.ResourceBundle;
+
import javax.xml.rpc.handler.soap.SOAPMessageContext;
import org.jboss.ejb.plugins.AbstractInterceptor;
import org.jboss.invocation.InvocationKey;
+import org.jboss.ws.api.util.BundleUtils;
import org.jboss.wsf.spi.invocation.HandlerCallback;
import org.jboss.wsf.spi.invocation.Invocation;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData.HandlerType;
@@ -40,6 +43,7 @@
*/
final class ServiceEndpointInterceptorEJB21 extends AbstractInterceptor
{
+ private static final ResourceBundle bundle =
BundleUtils.getBundle(ServiceEndpointInterceptorEJB21.class);
/**
* Constructor.
*/
@@ -71,7 +75,7 @@
if (callback == null || wsInvocation == null)
{
- log.warn("Handler callback not available");
+ log.warn(BundleUtils.getMessage(bundle,
"HANDLER_CALLBACK_NOT_AVAILABLE"));
return this.getNext().invoke(jbossInvocation);
}
@@ -114,7 +118,7 @@
}
catch (Exception e)
{
- log.warn("Cannot process handlerChain.handleFault, ignoring: ",
e);
+ log.warn(BundleUtils.getMessage(bundle,
"CANNOT_PROCESS_HANDLEFAULT"), e);
}
throw ex;
}
Modified:
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/metadata/ContainerMetaDataDeploymentAspect.java
===================================================================
---
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/metadata/ContainerMetaDataDeploymentAspect.java 2011-08-17
09:14:23 UTC (rev 14888)
+++
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/metadata/ContainerMetaDataDeploymentAspect.java 2011-08-17
09:32:38 UTC (rev 14889)
@@ -22,10 +22,10 @@
package org.jboss.webservices.integration.metadata;
import org.jboss.ws.common.integration.WSHelper;
-import org.jboss.ws.common.integration.AbstractDeploymentAspect;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
import org.jboss.wsf.spi.metadata.j2ee.JSEArchiveMetaData;
+import org.jboss.ws.common.integration.AbstractDeploymentAspect;
/**
* An aspect that builds container independent meta data.
Modified:
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/security/JACCPermissionsDeploymentAspect.java
===================================================================
---
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/security/JACCPermissionsDeploymentAspect.java 2011-08-17
09:14:23 UTC (rev 14888)
+++
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/security/JACCPermissionsDeploymentAspect.java 2011-08-17
09:32:38 UTC (rev 14889)
@@ -21,13 +21,16 @@
*/
package org.jboss.webservices.integration.security;
+import java.util.ResourceBundle;
+
import javax.security.jacc.PolicyConfiguration;
import javax.security.jacc.PolicyConfigurationFactory;
import org.jboss.metadata.web.jboss.JBossWebMetaData;
import org.jboss.web.WebPermissionMapping;
+import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.common.integration.AbstractDeploymentAspect;
import org.jboss.ws.common.integration.WSHelper;
-import org.jboss.ws.common.integration.AbstractDeploymentAspect;
import org.jboss.wsf.spi.deployment.Deployment;
/**
@@ -41,6 +44,7 @@
*/
public final class JACCPermissionsDeploymentAspect extends AbstractDeploymentAspect
{
+ private static final ResourceBundle bundle =
BundleUtils.getBundle(JACCPermissionsDeploymentAspect.class);
/**
* Constructor.
*/
@@ -74,7 +78,7 @@
}
catch (Exception e)
{
- throw new RuntimeException("Exception generating JACC perms: ", e);
+ throw new RuntimeException(BundleUtils.getMessage(bundle,
"EXCEPTION_GENERATING_JACC_PERMS"), e);
}
}
}
Modified:
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/security/JaasSecurityDomainAdaptorResolverImpl.java
===================================================================
---
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/security/JaasSecurityDomainAdaptorResolverImpl.java 2011-08-17
09:14:23 UTC (rev 14888)
+++
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/security/JaasSecurityDomainAdaptorResolverImpl.java 2011-08-17
09:32:38 UTC (rev 14889)
@@ -21,11 +21,14 @@
*/
package org.jboss.webservices.integration.security;
+import java.util.ResourceBundle;
+
import javax.naming.InitialContext;
import javax.naming.NamingException;
import org.jboss.logging.Logger;
import org.jboss.security.plugins.JaasSecurityDomain;
+import org.jboss.ws.api.util.BundleUtils;
import org.jboss.wsf.spi.security.JAASSecurityDomainAdaptor;
import org.jboss.wsf.spi.security.JAASSecurityDomainAdaptorResolver;
@@ -37,6 +40,7 @@
*/
public class JaasSecurityDomainAdaptorResolverImpl implements
JAASSecurityDomainAdaptorResolver
{
+ private static final ResourceBundle bundle =
BundleUtils.getBundle(JaasSecurityDomainAdaptorResolverImpl.class);
public JAASSecurityDomainAdaptor lookup(String jndi) throws Exception
{
InitialContext ic = null;
@@ -46,13 +50,13 @@
Object o = ic.lookup(jndi);
if (!(o instanceof JaasSecurityDomain))
{
- throw new Exception(jndi + " not bound to a JaasSecurityDomain but to a
" + o.getClass().getName() + " instance");
+ throw new Exception(BundleUtils.getMessage(bundle,
"NOT_BUNDTO_JAASSECURITYDOMAIN", new Object[] {jndi,o.getClass().getName()}));
}
return new JaasSecurityDomainAdaptorImpl((JaasSecurityDomain)o);
}
catch (NamingException e)
{
- throw new Exception("JNDI failure handling " + jndi, e);
+ throw new Exception(BundleUtils.getMessage(bundle,
"JNDI_FAILURE_HANDLING", jndi), e);
}
finally
{
@@ -64,7 +68,7 @@
}
catch (NamingException e)
{
- Logger.getLogger(JaasSecurityDomainAdaptorImpl.class).warn(this + "
failed to close InitialContext", e);
+
Logger.getLogger(JaasSecurityDomainAdaptorImpl.class).warn(BundleUtils.getMessage(bundle,
"FAILED_TO_CLOSE_INITIALCONTEXT", this), e);
}
}
}
Added:
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/security/Message.properties
===================================================================
---
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/security/Message.properties
(rev 0)
+++
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/security/Message.properties 2011-08-17
09:32:38 UTC (rev 14889)
@@ -0,0 +1,6 @@
+UNABLE_TO_LOOKUP_AUTHENTICATIONMANAGER=Unable to lookup AuthenticationManager
+SECURITY_CONTEXT_IS_NULL=Security Context is null
+JNDI_FAILURE_HANDLING=JNDI failure handling {0}
+FAILED_TO_CLOSE_INITIALCONTEXT= {0} failed to close InitialContext
+EXCEPTION_GENERATING_JACC_PERMS=Exception generating JACC perms:
+NOT_BUNDTO_JAASSECURITYDOMAIN={0} not bound to a JaasSecurityDomain but to a {1}
instance
\ No newline at end of file
Modified:
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/security/SecurityAdapterImpl.java
===================================================================
---
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/security/SecurityAdapterImpl.java 2011-08-17
09:14:23 UTC (rev 14888)
+++
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/security/SecurityAdapterImpl.java 2011-08-17
09:32:38 UTC (rev 14889)
@@ -21,15 +21,9 @@
*/
package org.jboss.webservices.integration.security;
-import java.security.AccessController;
import java.security.Principal;
-import java.security.PrivilegedAction;
-import javax.security.auth.Subject;
-
import org.jboss.security.SecurityAssociation;
-import org.jboss.security.SecurityContext;
-import org.jboss.security.SecurityContextAssociation;
import org.jboss.wsf.spi.invocation.SecurityAdaptor;
/**
@@ -87,31 +81,4 @@
{
SecurityAssociation.setCredential(credential);
}
-
- /**
- * @see org.jboss.wsf.spi.invocation.SecurityAdaptor#pushSubjectContext(Subject,
Principal, Object)
- *
- * @param subject subject
- * @param principal principal
- * @param credential credential
- */
- public void pushSubjectContext(final Subject subject, final Principal principal, final
Object credential)
- {
- AccessController.doPrivileged(new PrivilegedAction<Void>()
- {
-
- public Void run()
- {
- final SecurityContext securityContext =
SecurityContextAssociation.getSecurityContext();
- if (securityContext == null)
- {
- throw new IllegalStateException("Security Context is null");
- }
-
- securityContext.getUtil().createSubjectInfo(principal, credential, subject);
-
- return null;
- }
- });
- }
}
Added:
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/security/SecurityDomainContextAdaptor.java
===================================================================
---
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/security/SecurityDomainContextAdaptor.java
(rev 0)
+++
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/security/SecurityDomainContextAdaptor.java 2011-08-17
09:32:38 UTC (rev 14889)
@@ -0,0 +1,111 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.webservices.integration.security;
+
+import java.security.AccessController;
+import java.security.Principal;
+import java.security.PrivilegedAction;
+import java.util.ResourceBundle;
+import java.util.Set;
+
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import javax.security.auth.Subject;
+
+import org.jboss.security.AuthenticationManager;
+import org.jboss.security.RealmMapping;
+import org.jboss.security.SecurityContext;
+import org.jboss.security.SecurityContextAssociation;
+import org.jboss.ws.api.util.BundleUtils;
+
+/**
+ * org.jboss.wsf.spi.security.SecurityDomainContext implementation relying on
AuthenticationManager
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 18-May-2011
+ */
+public final class SecurityDomainContextAdaptor implements
org.jboss.wsf.spi.security.SecurityDomainContext {
+ private static final ResourceBundle bundle =
BundleUtils.getBundle(SecurityDomainContextAdaptor.class);
+
+ private AuthenticationManager authenticationManager;
+ private RealmMapping realmMapping;
+
+
+ public SecurityDomainContextAdaptor() {
+ //NOOP
+ }
+
+ private void setupAuthenticationManager() {
+ if (authenticationManager == null) {
+ try
+ {
+ Context ctx = new InitialContext();
+ Object obj = ctx.lookup("java:comp/env/security/securityMgr");
+ authenticationManager = (AuthenticationManager)obj;
+ realmMapping = (RealmMapping)authenticationManager;
+ }
+ catch (NamingException ne)
+ {
+ throw new RuntimeException(BundleUtils.getMessage(bundle,
"UNABLE_TO_LOOKUP_AUTHENTICATIONMANAGER"), ne);
+ }
+ }
+ }
+
+ @Override
+ public boolean isValid(Principal principal, Object credential, Subject activeSubject)
{
+ setupAuthenticationManager();
+ return authenticationManager.isValid(principal, credential, activeSubject);
+ }
+
+ @Override
+ public boolean doesUserHaveRole(Principal principal, Set<Principal> roles) {
+ setupAuthenticationManager();
+ return realmMapping.doesUserHaveRole(principal, roles);
+ }
+
+ @Override
+ public String getSecurityDomain() {
+ setupAuthenticationManager();
+ return authenticationManager.getSecurityDomain();
+ }
+
+ @Override
+ public Set<Principal> getUserRoles(Principal principal) {
+ setupAuthenticationManager();
+ return realmMapping.getUserRoles(principal);
+ }
+
+ @Override
+ public void pushSubjectContext(final Subject subject, final Principal principal,
final Object credential) {
+ AccessController.doPrivileged(new PrivilegedAction<Void>() {
+ public Void run() {
+ SecurityContext securityContext =
SecurityContextAssociation.getSecurityContext();
+ if (securityContext == null) {
+ throw new IllegalStateException(BundleUtils.getMessage(bundle,
"SECURITY_CONTEXT_IS_NULL"));
+ }
+ securityContext.getUtil().createSubjectInfo(principal, credential,
subject);
+ return null;
+ }
+ });
+ }
+}
Added:
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/security/SecurityDomainContextDeploymentAspect.java
===================================================================
---
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/security/SecurityDomainContextDeploymentAspect.java
(rev 0)
+++
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/security/SecurityDomainContextDeploymentAspect.java 2011-08-17
09:32:38 UTC (rev 14889)
@@ -0,0 +1,53 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.webservices.integration.security;
+
+import org.jboss.ws.common.deployment.EndpointLifecycleDeploymentAspect;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.security.SecurityDomainContext;
+
+/**
+ * Extends EndpointLifecycleDeploymentAspect to setup the SecurityDomainContext
+ *
+ * @author <a href="mailto:alessio.soldano@jboss.com">Alessio
Soldano/a>
+ */
+public final class SecurityDomainContextDeploymentAspect extends
EndpointLifecycleDeploymentAspect
+{
+ /**
+ * Constructor.
+ */
+ public SecurityDomainContextDeploymentAspect()
+ {
+ super();
+ }
+
+ @Override
+ public void start(final Deployment dep)
+ {
+ super.start(dep);
+ SecurityDomainContext context = new SecurityDomainContextAdaptor();
+ for (Endpoint ep : dep.getService().getEndpoints()) {
+ ep.setSecurityDomainContext(context);
+ }
+ }
+}
Added:
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/tomcat/Message.properties
===================================================================
---
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/tomcat/Message.properties
(rev 0)
+++
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/tomcat/Message.properties 2011-08-17
09:32:38 UTC (rev 14889)
@@ -0,0 +1 @@
+CANNOT_OBTAIN_DEPLOYMENT_PROPERTY=Cannot obtain deployment property : {0}
Modified:
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB3.java
===================================================================
---
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB3.java 2011-08-17
09:14:23 UTC (rev 14888)
+++
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB3.java 2011-08-17
09:32:38 UTC (rev 14889)
@@ -28,8 +28,8 @@
import org.jboss.ejb3.annotation.SecurityDomain;
import org.jboss.metadata.javaee.spec.SecurityRoleMetaData;
import org.jboss.metadata.javaee.spec.SecurityRolesMetaData;
+import org.jboss.ws.api.annotation.WebContext;
import org.jboss.ws.common.integration.WSHelper;
-import org.jboss.ws.api.annotation.WebContext;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.webservices.integration.WebServiceDeclaration;
Modified:
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataCreatingDeploymentAspect.java
===================================================================
---
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataCreatingDeploymentAspect.java 2011-08-17
09:14:23 UTC (rev 14888)
+++
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataCreatingDeploymentAspect.java 2011-08-17
09:32:38 UTC (rev 14889)
@@ -22,8 +22,8 @@
package org.jboss.webservices.integration.tomcat;
import org.jboss.ws.common.integration.WSHelper;
+import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.ws.common.integration.AbstractDeploymentAspect;
-import org.jboss.wsf.spi.deployment.Deployment;
/**
* A deployment aspect that generates web app meta data for EJB endpoints.
Modified:
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataCreator.java
===================================================================
---
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataCreator.java 2011-08-17
09:14:23 UTC (rev 14888)
+++
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataCreator.java 2011-08-17
09:32:38 UTC (rev 14889)
@@ -189,11 +189,14 @@
for (final Endpoint ep : dep.getService().getEndpoints())
{
- final String endpointName = ep.getShortName();
- final List<String> urlPatterns =
WebMetaDataHelper.getUrlPatterns(((HttpEndpoint)ep).getURLPattern());
+ if (ep instanceof HttpEndpoint)
+ {
+ final String endpointName = ep.getShortName();
+ final List<String> urlPatterns =
WebMetaDataHelper.getUrlPatterns(((HttpEndpoint)ep).getURLPattern());
- this.log.debug("Servlet name: " + endpointName + ", URL patterns:
" + urlPatterns);
- WebMetaDataHelper.newServletMapping(endpointName, urlPatterns,
servletMappings);
+ this.log.debug("Servlet name: " + endpointName + ", URL
patterns: " + urlPatterns);
+ WebMetaDataHelper.newServletMapping(endpointName, urlPatterns,
servletMappings);
+ }
}
}
@@ -233,7 +236,7 @@
final String authMethod = ejbMDAccessor.getAuthMethod(ejbEndpoint);
final boolean hasAuthMethod = authMethod != null;
- if (hasAuthMethod || hasTransportGuarantee)
+ if (ejbEndpoint instanceof HttpEndpoint && (hasAuthMethod ||
hasTransportGuarantee))
{
final List<SecurityConstraintMetaData> securityConstraints =
WebMetaDataHelper
.getSecurityConstraints(jbossWebMD);
Modified:
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifier.java
===================================================================
---
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifier.java 2011-08-17
09:14:23 UTC (rev 14888)
+++
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifier.java 2011-08-17
09:32:38 UTC (rev 14889)
@@ -22,6 +22,7 @@
package org.jboss.webservices.integration.tomcat;
import java.util.List;
+import java.util.ResourceBundle;
import org.jboss.logging.Logger;
import org.jboss.metadata.javaee.spec.ParamValueMetaData;
@@ -29,6 +30,7 @@
import org.jboss.metadata.web.spec.ServletMetaData;
import org.jboss.webservices.integration.util.ASHelper;
import org.jboss.webservices.integration.util.WebMetaDataHelper;
+import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.integration.WSConstants;
import org.jboss.ws.common.integration.WSHelper;
import org.jboss.wsf.spi.deployment.Deployment;
@@ -44,6 +46,7 @@
*/
final class WebMetaDataModifier
{
+ private static final ResourceBundle bundle =
BundleUtils.getBundle(WebMetaDataModifier.class);
/** Logger. */
private final Logger log = Logger.getLogger(WebMetaDataModifier.class);
@@ -124,7 +127,7 @@
if (transportClassName == null)
{
- throw new IllegalStateException("Cannot obtain deployment property:" +
WSConstants.STACK_TRANSPORT_CLASS);
+ throw new IllegalStateException(BundleUtils.getMessage(bundle,
"CANNOT_OBTAIN_DEPLOYMENT_PROPERTY", WSConstants.STACK_TRANSPORT_CLASS));
}
return transportClassName;
Modified:
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/util/ASHelper.java
===================================================================
---
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/util/ASHelper.java 2011-08-17
09:14:23 UTC (rev 14888)
+++
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/util/ASHelper.java 2011-08-17
09:32:38 UTC (rev 14889)
@@ -24,6 +24,7 @@
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
+import java.util.ResourceBundle;
import javax.jws.WebService;
import javax.servlet.Servlet;
@@ -36,6 +37,7 @@
import org.jboss.metadata.web.jboss.JBossServletMetaData;
import org.jboss.metadata.web.jboss.JBossWebMetaData;
import org.jboss.metadata.web.spec.ServletMetaData;
+import org.jboss.ws.api.util.BundleUtils;
import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
import org.jboss.webservices.integration.WebServiceDeclaration;
import org.jboss.webservices.integration.WebServiceDeployment;
@@ -47,6 +49,7 @@
*/
public final class ASHelper
{
+ private static final ResourceBundle bundle = BundleUtils.getBundle(ASHelper.class);
/**
* EJB invocation property.
*/
@@ -272,7 +275,7 @@
}
}
- throw new IllegalStateException("Cannot find servlet for link: " +
servletName);
+ throw new IllegalStateException(BundleUtils.getMessage(bundle,
"CANNOT_FIND_SERVLET_FOR_LINK", servletName));
}
/**
@@ -301,7 +304,7 @@
}
catch (ClassNotFoundException cnfe)
{
- ASHelper.LOGGER.warn("Cannot load servlet class: " +
endpointClassName, cnfe);
+ ASHelper.LOGGER.warn(BundleUtils.getMessage(bundle,
"CANNOT_LOAD_SERVLET_CLASS", endpointClassName), cnfe);
}
}
@@ -322,7 +325,7 @@
final A value = unit.getAttachment(key);
if (value == null)
{
- ASHelper.LOGGER.error("Cannot find attachment in deployment unit: " +
key);
+ ASHelper.LOGGER.error(BundleUtils.getMessage(bundle,
"CANNOT_FIND_ATTACHMENT_IN_DEPLOYMENT_UNIT", key));
throw new IllegalStateException();
}
@@ -367,7 +370,7 @@
{
if (wsDescriptionsMD.size() > 1)
{
- ASHelper.LOGGER.warn("Multiple <webservice-description> elements
not supported");
+ ASHelper.LOGGER.warn(BundleUtils.getMessage(bundle,
"MULTIPLE_WS_DESP_ELEMENTS_NOT_SUPPORTED"));
}
if (wsDescriptionsMD.size() > 0)
Added:
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/util/Message.properties
===================================================================
---
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/util/Message.properties
(rev 0)
+++
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/util/Message.properties 2011-08-17
09:32:38 UTC (rev 14889)
@@ -0,0 +1,4 @@
+CANNOT_FIND_SERVLET_FOR_LINK=Cannot find servlet for link: {0}
+CANNOT_LOAD_SERVLET_CLASS=Cannot load servlet class: {0}
+CANNOT_FIND_ATTACHMENT_IN_DEPLOYMENT_UNIT=Cannot find attachment in deployment unit: {0}
+MULTIPLE_WS_DESP_ELEMENTS_NOT_SUPPORTED=Multiple <webservice-description> elements
not supported
Added:
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/weld/Message.properties
===================================================================
---
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/weld/Message.properties
(rev 0)
+++
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/weld/Message.properties 2011-08-17
09:32:38 UTC (rev 14889)
@@ -0,0 +1 @@
+UNABLE_TO_LOCATE_BEANMANAGER=Unable to locate BeanManager
Modified:
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/weld/WeldInvocationHandler.java
===================================================================
---
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/weld/WeldInvocationHandler.java 2011-08-17
09:14:23 UTC (rev 14888)
+++
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/weld/WeldInvocationHandler.java 2011-08-17
09:32:38 UTC (rev 14889)
@@ -21,11 +21,14 @@
*/
package org.jboss.webservices.integration.weld;
+import java.util.ResourceBundle;
+
import javax.naming.InitialContext;
import javax.naming.NamingException;
import org.jboss.weld.integration.injection.NonContextualObjectInjectionHelper;
import org.jboss.weld.manager.api.WeldManager;
+import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.invocation.AbstractInvocationHandlerJSE;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.invocation.Invocation;
@@ -39,6 +42,7 @@
*/
public final class WeldInvocationHandler extends AbstractInvocationHandlerJSE
{
+ private static final ResourceBundle bundle =
BundleUtils.getBundle(WeldInvocationHandler.class);
private static final String BEAN_MANAGER_JNDI_NAME =
"java:comp/BeanManager";
@@ -81,7 +85,7 @@
WeldManager beanManager = (WeldManager) new
InitialContext().lookup(BEAN_MANAGER_JNDI_NAME);
NonContextualObjectInjectionHelper.injectNonContextualInstance(instance,
beanManager);
} catch (NamingException e) {
- throw new IllegalStateException("Unable to locate BeanManager");
+ throw new IllegalStateException(BundleUtils.getMessage(bundle,
"UNABLE_TO_LOCATE_BEANMANAGER"));
}
}