[jbossws-commits] JBossWS SVN: r14606 - in container/jboss60/branches/jbossws-jboss600: src/main/java/org/jboss/webservices/integration/config and 9 other directories.

jbossws-commits at lists.jboss.org jbossws-commits at lists.jboss.org
Wed Jun 22 22:56:42 EDT 2011


Author: jim.ma
Date: 2011-06-22 22:56:41 -0400 (Wed, 22 Jun 2011)
New Revision: 14606

Added:
   container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/config/Message.properties
   container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/deployers/Message.properties
   container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/deployers/deployment/Message.properties
   container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/endpoint/Message.properties
   container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/injection/Message.properties
   container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/invocation/Message.properties
   container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/security/Message.properties
   container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/tomcat/Message.properties
   container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/util/Message.properties
   container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/weld/Message.properties
Modified:
   container/jboss60/branches/jbossws-jboss600/pom.xml
   container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/config/ServerConfigImpl.java
   container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/deployers/AbstractDescriptorDeployer.java
   container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/deployers/JAXRPCIntegrationClassPathDeployer.java
   container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/deployers/WSEJBAdapterDeployer.java
   container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/deployers/deployment/AbstractDeploymentModelBuilder.java
   container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/endpoint/HornetQJMSResolver.java
   container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/injection/EJBBeanReferenceResolver.java
   container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/injection/InjectionMetaDataDeploymentAspect.java
   container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/injection/ServiceRefResourceProvider.java
   container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/injection/VirtualFileAdaptor.java
   container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerEJB21.java
   container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerEJB3.java
   container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerFactoryImpl.java
   container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/invocation/ServiceEndpointInterceptorEJB21.java
   container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/security/JACCPermissionsDeploymentAspect.java
   container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/security/JaasSecurityDomainAdaptorResolverImpl.java
   container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/security/SecurityDomainContextAdaptor.java
   container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifier.java
   container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/util/ASHelper.java
   container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/weld/WeldInvocationHandler.java
Log:
[JBWS-3316]:i18n the message and logging

Modified: container/jboss60/branches/jbossws-jboss600/pom.xml
===================================================================
--- container/jboss60/branches/jbossws-jboss600/pom.xml	2011-06-22 22:47:15 UTC (rev 14605)
+++ container/jboss60/branches/jbossws-jboss600/pom.xml	2011-06-23 02:56:41 UTC (rev 14606)
@@ -252,6 +252,12 @@
       <resource>
         <directory>src/main/resources/jbossws-jboss.jar</directory>
       </resource>
+      <resource>
+        <directory>src/main/java</directory>
+         <includes>
+          <include>**/*.properties</include>
+         </includes>
+      </resource>
     </resources>
     <plugins>
       <plugin>

Added: container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/config/Message.properties
===================================================================
--- container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/config/Message.properties	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/config/Message.properties	2011-06-23 02:56:41 UTC (rev 14606)
@@ -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-jboss600/src/main/java/org/jboss/webservices/integration/config/ServerConfigImpl.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/config/ServerConfigImpl.java	2011-06-22 22:47:15 UTC (rev 14605)
+++ container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/config/ServerConfigImpl.java	2011-06-23 02:56:41 UTC (rev 14606)
@@ -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-jboss600/src/main/java/org/jboss/webservices/integration/deployers/AbstractDescriptorDeployer.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/deployers/AbstractDescriptorDeployer.java	2011-06-22 22:47:15 UTC (rev 14605)
+++ container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/deployers/AbstractDescriptorDeployer.java	2011-06-23 02:56:41 UTC (rev 14606)
@@ -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)
@@ -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-jboss600/src/main/java/org/jboss/webservices/integration/deployers/JAXRPCIntegrationClassPathDeployer.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/deployers/JAXRPCIntegrationClassPathDeployer.java	2011-06-22 22:47:15 UTC (rev 14605)
+++ container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/deployers/JAXRPCIntegrationClassPathDeployer.java	2011-06-23 02:56:41 UTC (rev 14606)
@@ -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-jboss600/src/main/java/org/jboss/webservices/integration/deployers/Message.properties
===================================================================
--- container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/deployers/Message.properties	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/deployers/Message.properties	2011-06-23 02:56:41 UTC (rev 14606)
@@ -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-jboss600/src/main/java/org/jboss/webservices/integration/deployers/WSEJBAdapterDeployer.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/deployers/WSEJBAdapterDeployer.java	2011-06-22 22:47:15 UTC (rev 14605)
+++ container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/deployers/WSEJBAdapterDeployer.java	2011-06-23 02:56:41 UTC (rev 14606)
@@ -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.wsf.spi.deployment.integration.WebServiceDeclaration;
 import org.jboss.wsf.spi.deployment.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-jboss600/src/main/java/org/jboss/webservices/integration/deployers/deployment/AbstractDeploymentModelBuilder.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/deployers/deployment/AbstractDeploymentModelBuilder.java	2011-06-22 22:47:15 UTC (rev 14605)
+++ container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/deployers/deployment/AbstractDeploymentModelBuilder.java	2011-06-23 02:56:41 UTC (rev 14606)
@@ -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));
    }
 }

Added: container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/deployers/deployment/Message.properties
===================================================================
--- container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/deployers/deployment/Message.properties	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/deployers/deployment/Message.properties	2011-06-23 02:56:41 UTC (rev 14606)
@@ -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-jboss600/src/main/java/org/jboss/webservices/integration/endpoint/HornetQJMSResolver.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/endpoint/HornetQJMSResolver.java	2011-06-22 22:47:15 UTC (rev 14605)
+++ container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/endpoint/HornetQJMSResolver.java	2011-06-23 02:56:41 UTC (rev 14606)
@@ -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-jboss600/src/main/java/org/jboss/webservices/integration/endpoint/Message.properties
===================================================================
--- container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/endpoint/Message.properties	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/endpoint/Message.properties	2011-06-23 02:56:41 UTC (rev 14606)
@@ -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-jboss600/src/main/java/org/jboss/webservices/integration/injection/EJBBeanReferenceResolver.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/injection/EJBBeanReferenceResolver.java	2011-06-22 22:47:15 UTC (rev 14605)
+++ container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/injection/EJBBeanReferenceResolver.java	2011-06-23 02:56:41 UTC (rev 14606)
@@ -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-jboss600/src/main/java/org/jboss/webservices/integration/injection/InjectionMetaDataDeploymentAspect.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/injection/InjectionMetaDataDeploymentAspect.java	2011-06-22 22:47:15 UTC (rev 14605)
+++ container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/injection/InjectionMetaDataDeploymentAspect.java	2011-06-23 02:56:41 UTC (rev 14606)
@@ -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;

Added: container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/injection/Message.properties
===================================================================
--- container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/injection/Message.properties	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/injection/Message.properties	2011-06-23 02:56:41 UTC (rev 14606)
@@ -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-jboss600/src/main/java/org/jboss/webservices/integration/injection/ServiceRefResourceProvider.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/injection/ServiceRefResourceProvider.java	2011-06-22 22:47:15 UTC (rev 14605)
+++ container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/injection/ServiceRefResourceProvider.java	2011-06-23 02:56:41 UTC (rev 14606)
@@ -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));
             }
          }
       }
@@ -677,8 +679,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())
@@ -693,8 +694,7 @@
             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()));
 
    }
 }

Modified: container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/injection/VirtualFileAdaptor.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/injection/VirtualFileAdaptor.java	2011-06-22 22:47:15 UTC (rev 14605)
+++ container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/injection/VirtualFileAdaptor.java	2011-06-23 02:56:41 UTC (rev 14606)
@@ -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-jboss600/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerEJB21.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerEJB21.java	2011-06-22 22:47:15 UTC (rev 14605)
+++ container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerEJB21.java	2011-06-23 02:56:41 UTC (rev 14606)
@@ -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-jboss600/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerEJB3.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerEJB3.java	2011-06-22 22:47:15 UTC (rev 14605)
+++ container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerEJB3.java	2011-06-23 02:56:41 UTC (rev 14606)
@@ -22,6 +22,7 @@
 package org.jboss.webservices.integration.invocation;
 
 import java.lang.reflect.Method;
+import java.util.ResourceBundle;
 
 import javax.naming.Context;
 import javax.naming.NamingException;
@@ -30,6 +31,7 @@
 
 import org.jboss.ejb3.EJBContainer;
 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;
@@ -50,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/";
 
@@ -83,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"));
       }
    }
 
@@ -101,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));
          }
       }
 
@@ -134,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

Modified: container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerFactoryImpl.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerFactoryImpl.java	2011-06-22 22:47:15 UTC (rev 14605)
+++ container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerFactoryImpl.java	2011-06-23 02:56:41 UTC (rev 14606)
@@ -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-jboss600/src/main/java/org/jboss/webservices/integration/invocation/Message.properties
===================================================================
--- container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/invocation/Message.properties	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/invocation/Message.properties	2011-06-23 02:56:41 UTC (rev 14606)
@@ -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-jboss600/src/main/java/org/jboss/webservices/integration/invocation/ServiceEndpointInterceptorEJB21.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/invocation/ServiceEndpointInterceptorEJB21.java	2011-06-22 22:47:15 UTC (rev 14605)
+++ container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/invocation/ServiceEndpointInterceptorEJB21.java	2011-06-23 02:56:41 UTC (rev 14606)
@@ -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-jboss600/src/main/java/org/jboss/webservices/integration/security/JACCPermissionsDeploymentAspect.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/security/JACCPermissionsDeploymentAspect.java	2011-06-22 22:47:15 UTC (rev 14605)
+++ container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/security/JACCPermissionsDeploymentAspect.java	2011-06-23 02:56:41 UTC (rev 14606)
@@ -21,14 +21,17 @@
  */
 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.wsf.spi.deployment.Deployment;
-import org.jboss.ws.common.integration.AbstractDeploymentAspect;
 
 /**
  * Generates JACC permissions. (This is temporary and really hacky solution).
@@ -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-jboss600/src/main/java/org/jboss/webservices/integration/security/JaasSecurityDomainAdaptorResolverImpl.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/security/JaasSecurityDomainAdaptorResolverImpl.java	2011-06-22 22:47:15 UTC (rev 14605)
+++ container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/security/JaasSecurityDomainAdaptorResolverImpl.java	2011-06-23 02:56:41 UTC (rev 14606)
@@ -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-jboss600/src/main/java/org/jboss/webservices/integration/security/Message.properties
===================================================================
--- container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/security/Message.properties	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/security/Message.properties	2011-06-23 02:56:41 UTC (rev 14606)
@@ -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-jboss600/src/main/java/org/jboss/webservices/integration/security/SecurityDomainContextAdaptor.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/security/SecurityDomainContextAdaptor.java	2011-06-22 22:47:15 UTC (rev 14605)
+++ container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/security/SecurityDomainContextAdaptor.java	2011-06-23 02:56:41 UTC (rev 14606)
@@ -24,6 +24,7 @@
 import java.security.AccessController;
 import java.security.Principal;
 import java.security.PrivilegedAction;
+import java.util.ResourceBundle;
 import java.util.Set;
 
 import javax.naming.Context;
@@ -35,6 +36,7 @@
 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
@@ -43,6 +45,7 @@
  * @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;
@@ -63,7 +66,7 @@
           }
           catch (NamingException ne)
           {
-             throw new RuntimeException("Unable to lookup AuthenticationManager", ne);
+             throw new RuntimeException(BundleUtils.getMessage(bundle, "UNABLE_TO_LOOKUP_AUTHENTICATIONMANAGER"),  ne);
           }
        }
     }
@@ -98,7 +101,7 @@
             public Void run() {
                 SecurityContext securityContext = SecurityContextAssociation.getSecurityContext();
                 if (securityContext == null) {
-                   throw new IllegalStateException("Security Context is null");
+                   throw new IllegalStateException(BundleUtils.getMessage(bundle, "SECURITY_CONTEXT_IS_NULL"));
                 }
                 securityContext.getUtil().createSubjectInfo(principal, credential, subject);
                 return null;

Added: container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/tomcat/Message.properties
===================================================================
--- container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/tomcat/Message.properties	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/tomcat/Message.properties	2011-06-23 02:56:41 UTC (rev 14606)
@@ -0,0 +1 @@
+CANNOT_OBTAIN_DEPLOYMENT_PROPERTY=Cannot obtain deployment property : {0}

Modified: container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifier.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifier.java	2011-06-22 22:47:15 UTC (rev 14605)
+++ container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifier.java	2011-06-23 02:56:41 UTC (rev 14606)
@@ -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-jboss600/src/main/java/org/jboss/webservices/integration/util/ASHelper.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/util/ASHelper.java	2011-06-22 22:47:15 UTC (rev 14605)
+++ container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/util/ASHelper.java	2011-06-23 02:56:41 UTC (rev 14606)
@@ -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.wsf.spi.deployment.integration.WebServiceDeclaration;
 import org.jboss.wsf.spi.deployment.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-jboss600/src/main/java/org/jboss/webservices/integration/util/Message.properties
===================================================================
--- container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/util/Message.properties	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/util/Message.properties	2011-06-23 02:56:41 UTC (rev 14606)
@@ -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-jboss600/src/main/java/org/jboss/webservices/integration/weld/Message.properties
===================================================================
--- container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/weld/Message.properties	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/weld/Message.properties	2011-06-23 02:56:41 UTC (rev 14606)
@@ -0,0 +1 @@
+UNABLE_TO_LOCATE_BEANMANAGER=Unable to locate BeanManager

Modified: container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/weld/WeldInvocationHandler.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/weld/WeldInvocationHandler.java	2011-06-22 22:47:15 UTC (rev 14605)
+++ container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/weld/WeldInvocationHandler.java	2011-06-23 02:56:41 UTC (rev 14606)
@@ -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"));
        }
    }
 



More information about the jbossws-commits mailing list