JBossWS SVN: r16752 - in common/trunk: src/main/java/org/jboss/ws/common and 14 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-09-21 11:48:32 -0400 (Fri, 21 Sep 2012)
New Revision: 16752
Added:
common/trunk/src/main/java/org/jboss/ws/common/Loggers.java
common/trunk/src/main/java/org/jboss/ws/common/Messages.java
Removed:
common/trunk/src/main/java/org/jboss/ws/common/Message.properties
common/trunk/src/main/java/org/jboss/ws/common/configuration/Message.properties
common/trunk/src/main/java/org/jboss/ws/common/deployment/Message.properties
common/trunk/src/main/java/org/jboss/ws/common/injection/Message.properties
common/trunk/src/main/java/org/jboss/ws/common/injection/finders/Message.properties
common/trunk/src/main/java/org/jboss/ws/common/injection/resolvers/Message.properties
common/trunk/src/main/java/org/jboss/ws/common/integration/Message.properties
common/trunk/src/main/java/org/jboss/ws/common/invocation/Message.properties
common/trunk/src/main/java/org/jboss/ws/common/management/Message.properties
common/trunk/src/main/java/org/jboss/ws/common/monitoring/Message.properties
common/trunk/src/main/java/org/jboss/ws/common/reflection/Message.properties
common/trunk/src/main/java/org/jboss/ws/common/serviceref/Message.properties
common/trunk/src/main/java/org/jboss/ws/common/sort/Message.properties
common/trunk/src/main/java/org/jboss/ws/common/spi/Message.properties
common/trunk/src/main/java/org/jboss/ws/common/utils/Message.properties
Modified:
common/trunk/pom.xml
common/trunk/src/main/java/org/jboss/ws/common/DOMUtils.java
common/trunk/src/main/java/org/jboss/ws/common/DOMWriter.java
common/trunk/src/main/java/org/jboss/ws/common/IOUtils.java
common/trunk/src/main/java/org/jboss/ws/common/JavaUtils.java
common/trunk/src/main/java/org/jboss/ws/common/ObjectNameFactory.java
common/trunk/src/main/java/org/jboss/ws/common/ResourceLoaderAdapter.java
common/trunk/src/main/java/org/jboss/ws/common/URLLoaderAdapter.java
common/trunk/src/main/java/org/jboss/ws/common/configuration/ConfigHelper.java
common/trunk/src/main/java/org/jboss/ws/common/deployment/AbstractDefaultEndpoint.java
common/trunk/src/main/java/org/jboss/ws/common/deployment/BackwardCompatibleContextRootDeploymentAspect.java
common/trunk/src/main/java/org/jboss/ws/common/deployment/ContextRootDeploymentAspect.java
common/trunk/src/main/java/org/jboss/ws/common/deployment/DefaultJMSEndpoint.java
common/trunk/src/main/java/org/jboss/ws/common/deployment/DefaultLifecycleHandler.java
common/trunk/src/main/java/org/jboss/ws/common/deployment/DeploymentAspectManagerImpl.java
common/trunk/src/main/java/org/jboss/ws/common/deployment/EndpointAddressDeploymentAspect.java
common/trunk/src/main/java/org/jboss/ws/common/deployment/EndpointLifecycleDeploymentAspect.java
common/trunk/src/main/java/org/jboss/ws/common/deployment/EndpointNameDeploymentAspect.java
common/trunk/src/main/java/org/jboss/ws/common/deployment/EndpointRecordProcessorDeploymentAspect.java
common/trunk/src/main/java/org/jboss/ws/common/deployment/JAXBIntroDeploymentAspect.java
common/trunk/src/main/java/org/jboss/ws/common/deployment/ResourceResolverImpl.java
common/trunk/src/main/java/org/jboss/ws/common/deployment/SOAPAddressWSDLParser.java
common/trunk/src/main/java/org/jboss/ws/common/deployment/URLPatternDeploymentAspect.java
common/trunk/src/main/java/org/jboss/ws/common/deployment/VirtualHostDeploymentAspect.java
common/trunk/src/main/java/org/jboss/ws/common/injection/InjectionException.java
common/trunk/src/main/java/org/jboss/ws/common/injection/InjectionHelper.java
common/trunk/src/main/java/org/jboss/ws/common/injection/finders/ReflectionUtils.java
common/trunk/src/main/java/org/jboss/ws/common/injection/resolvers/AbstractReferenceResolver.java
common/trunk/src/main/java/org/jboss/ws/common/integration/AbstractDeploymentAspect.java
common/trunk/src/main/java/org/jboss/ws/common/integration/WSHelper.java
common/trunk/src/main/java/org/jboss/ws/common/invocation/AbstractInvocationHandler.java
common/trunk/src/main/java/org/jboss/ws/common/invocation/AbstractInvocationHandlerJSE.java
common/trunk/src/main/java/org/jboss/ws/common/invocation/InvocationHandlerJAXWS.java
common/trunk/src/main/java/org/jboss/ws/common/invocation/RecordingServerHandler.java
common/trunk/src/main/java/org/jboss/ws/common/management/AbstractServerConfig.java
common/trunk/src/main/java/org/jboss/ws/common/management/DefaultEndpointRegistry.java
common/trunk/src/main/java/org/jboss/ws/common/management/ManagedEndpoint.java
common/trunk/src/main/java/org/jboss/ws/common/management/ManagedEndpointRegistry.java
common/trunk/src/main/java/org/jboss/ws/common/monitoring/LogRecorder.java
common/trunk/src/main/java/org/jboss/ws/common/reflection/AbstractAnnotatedClassProcessor.java
common/trunk/src/main/java/org/jboss/ws/common/serviceref/AbstractServiceObjectFactoryJAXWS.java
common/trunk/src/main/java/org/jboss/ws/common/serviceref/DefaultServiceRefHandler.java
common/trunk/src/main/java/org/jboss/ws/common/serviceref/ServiceRefSerializer.java
common/trunk/src/main/java/org/jboss/ws/common/sort/DeploymentAspectSorter.java
common/trunk/src/main/java/org/jboss/ws/common/spi/DefaultSPIProvider.java
common/trunk/src/main/java/org/jboss/ws/common/utils/AbstractWSDLFilePublisher.java
common/trunk/src/main/java/org/jboss/ws/common/utils/JBossWSEntityResolver.java
common/trunk/src/main/java/org/jboss/ws/common/utils/JarUrlConnection.java
common/trunk/src/main/java/org/jboss/ws/common/utils/UUIDGenerator.java
common/trunk/src/main/java/org/jboss/ws/common/utils/XMLPredefinedEntityReferenceResolver.java
Log:
[JBWS-3509] Converting JBossWS-Common to latest JBoss Logging...
Modified: common/trunk/pom.xml
===================================================================
--- common/trunk/pom.xml 2012-09-21 12:47:11 UTC (rev 16751)
+++ common/trunk/pom.xml 2012-09-21 15:48:32 UTC (rev 16752)
@@ -30,7 +30,8 @@
<jbossws.spi.version>2.1.0-SNAPSHOT</jbossws.spi.version>
<jboss.jaxbintros.version>1.0.2.GA</jboss.jaxbintros.version>
<jboss.common.core.version>2.2.17.GA</jboss.common.core.version>
- <jboss-logging-spi.version>2.1.0.GA</jboss-logging-spi.version>
+ <jboss-logging.version>3.1.2.GA</jboss-logging.version>
+ <jboss-logging-processor.version>1.0.3.Final</jboss-logging-processor.version>
<wsdl4j.version>1.6.2</wsdl4j.version>
<ejb.api.version>1.0.0.CR2</ejb.api.version>
<jms.api.version>1.0.0.Final</jms.api.version>
@@ -80,14 +81,26 @@
<artifactId>jboss-common-core</artifactId>
<version>${jboss.common.core.version}</version>
<scope>provided</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>org.jboss.logging</groupId>
+ <artifactId>jboss-logging-spi</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.jboss.logging</groupId>
- <artifactId>jboss-logging-spi</artifactId>
- <version>${jboss-logging-spi.version}</version>
+ <artifactId>jboss-logging</artifactId>
+ <version>${jboss-logging.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
+ <groupId>org.jboss.logging</groupId>
+ <artifactId>jboss-logging-processor</artifactId>
+ <version>${jboss-logging-processor.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
<groupId>org.jboss.spec.javax.servlet</groupId>
<artifactId>jboss-servlet-api_3.0_spec</artifactId>
<version>${servlet.api.version}</version>
@@ -122,6 +135,7 @@
<showDeprecation>false</showDeprecation>
<compilerArguments>
<endorseddirs>${project.build.directory}/endorsed</endorseddirs>
+ <AgeneratedTranslationFilesPath>${project.basedir}/target/generated-translation-files</AgeneratedTranslationFilesPath>
</compilerArguments>
</configuration>
</plugin>
Modified: common/trunk/src/main/java/org/jboss/ws/common/DOMUtils.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/DOMUtils.java 2012-09-21 12:47:11 UTC (rev 16751)
+++ common/trunk/src/main/java/org/jboss/ws/common/DOMUtils.java 2012-09-21 15:48:32 UTC (rev 16752)
@@ -21,6 +21,9 @@
*/
package org.jboss.ws.common;
+import static org.jboss.ws.common.Loggers.ROOT_LOGGER;
+import static org.jboss.ws.common.Messages.MESSAGES;
+
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
@@ -28,7 +31,6 @@
import java.io.PrintWriter;
import java.io.Reader;
import java.io.UnsupportedEncodingException;
-import java.util.ResourceBundle;
import javax.xml.XMLConstants;
import javax.xml.namespace.QName;
@@ -45,8 +47,6 @@
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
-import org.jboss.logging.Logger;
-import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.utils.JBossWSEntityResolver;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
@@ -66,9 +66,6 @@
*/
public final class DOMUtils extends org.jboss.ws.api.util.DOMUtils
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(DOMUtils.class);
- private static Logger log = Logger.getLogger(DOMUtils.class);
-
private static final String DISABLE_DEFERRED_NODE_EXPANSION = "org.jboss.ws.disable_deferred_node_expansion";
private static final String DEFER_NODE_EXPANSION_FEATURE = "http://apache.org/xml/features/dom/defer-node-expansion";
private static final String ENABLE_DOCTYPE_DECL = "org.jboss.ws.enable_doctype_decl";
@@ -138,7 +135,7 @@
}
catch (Exception e)
{
- throw new RuntimeException(BundleUtils.getMessage(bundle, "UNABLE_TO_CREATE_DOCUMENT_BUILDER"), e);
+ throw MESSAGES.unableToCreateInstanceOf(e, DocumentBuilder.class.getName());
}
}
@@ -154,9 +151,9 @@
}
catch (Throwable t)
{
- boolean debugEnabled = log.isDebugEnabled();
+ boolean debugEnabled = ROOT_LOGGER.isDebugEnabled();
if (debugEnabled)
- log.debug("Cannot load JBossWSEntityResolver");
+ ROOT_LOGGER.couldNotLoad("JBossWSEntityResolver");
String[] resolvers = new String[] { "org.jboss.util.xml.JBossEntityResolver" };
ClassLoader loader = SecurityActions.getContextClassLoader();
for (String resolver : resolvers)
@@ -170,7 +167,7 @@
catch (Exception ex)
{
if (debugEnabled)
- log.debug("Cannot load: " + resolver);
+ ROOT_LOGGER.couldNotLoad(resolver);
}
}
}
@@ -198,7 +195,7 @@
}
catch (ParserConfigurationException pce)
{
- log.error(pce);
+ ROOT_LOGGER.error(pce);
}
}
@@ -229,7 +226,7 @@
}
catch (Exception e)
{
- throw new RuntimeException(BundleUtils.getMessage(bundle, "UNABLE_TO_CREATE_DOCUMENT_BUILDER"), e);
+ throw MESSAGES.unableToCreateInstanceOf(e, DocumentBuilder.class.getName());
}
}
@@ -253,7 +250,7 @@
}
catch (IOException e)
{
- log.error(BundleUtils.getMessage(bundle, "CANNOT_PARSE", xmlString));
+ ROOT_LOGGER.cannotParse(xmlString);
throw e;
}
}
@@ -334,7 +331,7 @@
public static Element createElement(String localPart)
{
Document doc = getOwnerDocument();
- if (log.isTraceEnabled()) log.trace("createElement {}" + localPart);
+ if (ROOT_LOGGER.isTraceEnabled()) ROOT_LOGGER.trace("createElement {}" + localPart);
return doc.createElement(localPart);
}
@@ -345,7 +342,7 @@
public static Element createElement(String localPart, String prefix)
{
Document doc = getOwnerDocument();
- if (log.isTraceEnabled()) log.trace("createElement {}" + prefix + ":" + localPart);
+ if (ROOT_LOGGER.isTraceEnabled()) ROOT_LOGGER.trace("createElement {}" + prefix + ":" + localPart);
return doc.createElement(prefix + ":" + localPart);
}
@@ -358,12 +355,12 @@
Document doc = getOwnerDocument();
if (prefix == null || prefix.length() == 0)
{
- if (log.isTraceEnabled()) log.trace("createElement {" + uri + "}" + localPart);
+ if (ROOT_LOGGER.isTraceEnabled()) ROOT_LOGGER.trace("createElement {" + uri + "}" + localPart);
return doc.createElementNS(uri, localPart);
}
else
{
- if (log.isTraceEnabled()) log.trace("createElement {" + uri + "}" + prefix + ":" + localPart);
+ if (ROOT_LOGGER.isTraceEnabled()) ROOT_LOGGER.trace("createElement {" + uri + "}" + prefix + ":" + localPart);
return doc.createElementNS(uri, prefix + ":" + localPart);
}
}
@@ -479,7 +476,7 @@
}
else
{
- throw new RuntimeException(BundleUtils.getMessage(bundle, "SOURCE_TYPE_NOT_IMPLEMENTED", source.getClass()));
+ throw MESSAGES.sourceTypeNotImplemented(source.getClass());
}
return retElement;
Modified: common/trunk/src/main/java/org/jboss/ws/common/DOMWriter.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/DOMWriter.java 2012-09-21 12:47:11 UTC (rev 16751)
+++ common/trunk/src/main/java/org/jboss/ws/common/DOMWriter.java 2012-09-21 15:48:32 UTC (rev 16752)
@@ -55,6 +55,8 @@
*/
package org.jboss.ws.common;
+import static org.jboss.ws.common.Messages.MESSAGES;
+
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
@@ -64,9 +66,7 @@
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
-import java.util.ResourceBundle;
-import org.jboss.ws.api.util.BundleUtils;
import org.w3c.dom.Attr;
import org.w3c.dom.Element;
import org.w3c.dom.NamedNodeMap;
@@ -79,10 +79,8 @@
* @author Andy Clark, IBM
* @author Thomas.Diesler(a)jboss.org
*/
-@SuppressWarnings("unchecked")
public class DOMWriter
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(DOMWriter.class);
// Print writer
private PrintWriter out;
// True, if canonical output
@@ -140,7 +138,7 @@
}
catch (UnsupportedEncodingException e)
{
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "UNSUPPORTED_ENCODING", charsetName));
+ throw new IllegalArgumentException(e);
}
}
@@ -230,7 +228,7 @@
public void print(Node node)
{
if (prettyprint && ignoreWhitespace)
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "CANNOT_PRETTY_PRINT_AND_IGNORE_WHITESPACE"));
+ throw MESSAGES.cannotPrettyPrintAndIgnoreWhiteSpaces();
rootNode = node;
printInternal(node, false);
@@ -295,7 +293,7 @@
out.print('<');
out.print(nodeName);
- Map nsMap = new HashMap();
+ Map<String, String> nsMap = new HashMap<String, String>();
String elPrefix = node.getPrefix();
String elNamespaceURI = node.getNamespaceURI();
if (elPrefix != null)
@@ -342,11 +340,11 @@
// that are defined further up the tree
if (completeNamespaces)
{
- Iterator itPrefix = nsMap.keySet().iterator();
+ Iterator<String> itPrefix = nsMap.keySet().iterator();
while (itPrefix.hasNext())
{
- String prefix = (String)itPrefix.next();
- String nsURI = (String)nsMap.get(prefix);
+ String prefix = itPrefix.next();
+ String nsURI = nsMap.get(prefix);
if (nsURI == null)
{
nsURI = getNamespaceURI(prefix, element, null);
Modified: common/trunk/src/main/java/org/jboss/ws/common/IOUtils.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/IOUtils.java 2012-09-21 12:47:11 UTC (rev 16751)
+++ common/trunk/src/main/java/org/jboss/ws/common/IOUtils.java 2012-09-21 15:48:32 UTC (rev 16752)
@@ -31,12 +31,9 @@
import java.io.OutputStreamWriter;
import java.io.Reader;
import java.io.Writer;
-import java.util.ResourceBundle;
import javax.activation.DataHandler;
-import javax.xml.ws.WebServiceException;
-import org.jboss.ws.api.util.BundleUtils;
import org.jboss.wsf.spi.SPIProvider;
import org.jboss.wsf.spi.SPIProviderResolver;
import org.jboss.wsf.spi.management.ServerConfig;
@@ -49,7 +46,6 @@
*/
public final class IOUtils
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(IOUtils.class);
// Hide the constructor
private IOUtils()
{
@@ -117,7 +113,7 @@
}
catch (IOException e)
{
- throw new WebServiceException(BundleUtils.getMessage(bundle, "UNABLE_TO_CONVERT_DATAHANDLER", e.getMessage()));
+ throw Messages.MESSAGES.unableToConvertDataHandler(e, dh != null ? dh.getName() : null);
}
}
Modified: common/trunk/src/main/java/org/jboss/ws/common/JavaUtils.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/JavaUtils.java 2012-09-21 12:47:11 UTC (rev 16751)
+++ common/trunk/src/main/java/org/jboss/ws/common/JavaUtils.java 2012-09-21 15:48:32 UTC (rev 16752)
@@ -21,6 +21,9 @@
*/
package org.jboss.ws.common;
+import static org.jboss.ws.common.Loggers.ROOT_LOGGER;
+import static org.jboss.ws.common.Messages.MESSAGES;
+
import java.lang.reflect.Array;
import java.lang.reflect.GenericArrayType;
import java.lang.reflect.Method;
@@ -30,11 +33,7 @@
import java.lang.reflect.WildcardType;
import java.util.HashMap;
import java.util.HashSet;
-import java.util.ResourceBundle;
-import org.jboss.logging.Logger;
-import org.jboss.ws.api.util.BundleUtils;
-
/** Java utilities
*
* @author Thomas.Diesler(a)jboss.org
@@ -42,14 +41,10 @@
*/
public class JavaUtils
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(JavaUtils.class);
- // provide logging
- private static final Logger log = Logger.getLogger(JavaUtils.class);
+ private static HashMap<String, Class<?>> primitiveNames = new HashMap<String, Class<?>>();
+ private static HashMap<String, String> primitiveNameDescriptors = new HashMap<String, String>();
+ private static HashSet<String> reservedKeywords = new HashSet<String>(64,0.8f);
- private static HashMap<String, Class<?>> primitiveNames = new HashMap<String, Class<?>>(8);
- private static HashMap<String, String> primitiveNameDescriptors = new HashMap<String, String>(8);
- private static HashSet<String> reservedKeywords = new HashSet<String>(50);
-
static
{
primitiveNames.put("int", int.class);
@@ -219,7 +214,7 @@
componentType = loader.loadClass(name);
break;
default:
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "INVALID_BINARY_COMPONENT_FOR_ARRAY", javaType.charAt(componentStart)));
+ throw MESSAGES.invalidBinaryComponentForArray(javaType);
}
// componentStart doubles as the number of '['s which is the number of dimensions
@@ -438,17 +433,15 @@
*/
public static boolean isAssignableFrom(Class<?> dest, Class<?> src)
{
- if (dest == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "DESTINATION_CLASS_CANNOT_BE_NULL"));
- if (src == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "SOURCE_CLASS_CANNOT_BE_NULL"));
+ if (dest == null || src == null)
+ throw MESSAGES.cannotCheckClassIsAssignableFrom(dest, src);
boolean isAssignable = dest.isAssignableFrom(src);
if (isAssignable == false && dest.getName().equals(src.getName()))
{
ClassLoader destLoader = dest.getClassLoader();
ClassLoader srcLoader = src.getClassLoader();
- if(log.isTraceEnabled()) log.trace("Not assignable because of conflicting class loaders:\ndstLoader=" + destLoader + "\nsrcLoader=" + srcLoader);
+ if (ROOT_LOGGER.isTraceEnabled()) ROOT_LOGGER.notAssignableDueToConflictingClassLoaders(dest, src, destLoader, srcLoader);
}
if (isAssignable == false && isPrimitive(dest))
@@ -683,7 +676,7 @@
}
catch (Exception e)
{
- if(log.isTraceEnabled()) log.trace("Could not clear blacklists on " + loader);
+ if (ROOT_LOGGER.isTraceEnabled()) ROOT_LOGGER.couldNotClearBlacklist(loader, e);
}
}
}
Added: common/trunk/src/main/java/org/jboss/ws/common/Loggers.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/Loggers.java (rev 0)
+++ common/trunk/src/main/java/org/jboss/ws/common/Loggers.java 2012-09-21 15:48:32 UTC (rev 16752)
@@ -0,0 +1,217 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, Red Hat, Inc., 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.ws.common;
+
+import static org.jboss.logging.Logger.Level.DEBUG;
+import static org.jboss.logging.Logger.Level.ERROR;
+import static org.jboss.logging.Logger.Level.INFO;
+import static org.jboss.logging.Logger.Level.TRACE;
+import static org.jboss.logging.Logger.Level.WARN;
+
+import java.net.URL;
+
+import javax.management.ObjectName;
+
+import org.jboss.logging.BasicLogger;
+import org.jboss.logging.Cause;
+import org.jboss.logging.LogMessage;
+import org.jboss.logging.Message;
+import org.jboss.logging.MessageLogger;
+import org.jboss.wsf.spi.deployment.EndpointState;
+
+/**
+ * JBossWS Common log messages
+ *
+ * @author alessio.soldano(a)jboss.com
+ */
+@MessageLogger(projectCode = "JBWS")
+public interface Loggers extends BasicLogger
+{
+ Loggers ROOT_LOGGER = org.jboss.logging.Logger.getMessageLogger(Loggers.class, "org.jboss.ws.common");
+ Loggers MONITORING_LOGGER = org.jboss.logging.Logger.getMessageLogger(Loggers.class, "org.jboss.ws.common.monitoring");
+ Loggers MANAGEMENT_LOGGER = org.jboss.logging.Logger.getMessageLogger(Loggers.class, "org.jboss.ws.common.management");
+ Loggers DEPLOYMENT_LOGGER = org.jboss.logging.Logger.getMessageLogger(Loggers.class, "org.jboss.ws.common.deployment");
+
+ @LogMessage(level = ERROR)
+ @Message(id = 22001, value = "Cannot get children for resource %s")
+ void cannotGetChildrenForResource(@Cause Throwable cause, URL url);
+
+ @LogMessage(level = ERROR)
+ @Message(id = 22002, value = "Cannot get name for resource %s")
+ void cannotGetNameForResource(@Cause Throwable cause, URL url);
+
+ @LogMessage(level = TRACE)
+ @Message(id = 22010, value = "Class %s is not assignable from %s due to conflicting classloaders: %s and %s")
+ void notAssignableDueToConflictingClassLoaders(Class<?> dest, Class<?> src, ClassLoader destClassLoader, ClassLoader srcClassLoader);
+
+ @LogMessage(level = TRACE)
+ @Message(id = 22011, value = "Could not clear blacklist for classloader %s")
+ void couldNotClearBlacklist(ClassLoader cl, @Cause Throwable cause);
+
+ @LogMessage(level = DEBUG)
+ @Message(id = 22012, value = "Could not load %s")
+ void couldNotLoad(String className);
+
+ @LogMessage(level = ERROR)
+ @Message(id = 22013, value = "Cannot parse: %s")
+ void cannotParse(String s);
+
+ @LogMessage(level = ERROR)
+ @Message(id = 22021, value = "Cannot read resource: %s")
+ void cannotReadResource(String s, @Cause Throwable cause);
+
+ @LogMessage(level = WARN)
+ @Message(id = 22022, value = "Cannot load ID '%s' as URL (protocol = %s)")
+ void cannotLoadIDAsURL(String id, String protocol);
+
+ @LogMessage(level = DEBUG)
+ @Message(id = 22025, value = "WSDL import published to %s")
+ void wsdlImportPublishedTo(URL url);
+
+ @LogMessage(level = DEBUG)
+ @Message(id = 22026, value = "XMLSchema import published to %s")
+ void xmlSchemaImportPublishedTo(URL url);
+
+ @LogMessage(level = WARN)
+ @Message(id = 22027, value = "Cannot delete published wsdl document: %s")
+ void cannotDeletePublishedWsdlDoc(URL url);
+
+ @LogMessage(level = ERROR)
+ @Message(id = 22038, value = "Cannot register endpoint %s with JMX server")
+ void cannotRegisterEndpointWithJmxServer(ObjectName endpointName, @Cause Throwable cause);
+
+ @LogMessage(level = ERROR)
+ @Message(id = 22039, value = "Cannot unregister endpoint %s with JMX server")
+ void cannotUnregisterEndpointWithJmxServer(ObjectName endpointName, @Cause Throwable cause);
+
+ @LogMessage(level = WARN)
+ @Message(id = 22040, value = "MBeanServer not available, cannot unregister endpoint with JMX server")
+ void cannotUnregisterDueToMBeanServerUnavailable();
+
+ @LogMessage(level = DEBUG)
+ @Message(id = 22041, value = "Destroying service endpoint manager")
+ void destroyingServiceEndpointManager();
+
+ @LogMessage(level = DEBUG)
+ @Message(id = 22042, value = "Cannot register processor %s with JMX server, will be trying using the default managed implementation. ")
+ void cannotRegisterProvidedProcessor(ObjectName processorName, @Cause Throwable cause);
+
+ @LogMessage(level = ERROR)
+ @Message(id = 22043, value = "Cannot register processor %s with JMX server")
+ void cannotRegisterProcessorWithJmxServer(ObjectName processorName, @Cause Throwable cause);
+
+ @LogMessage(level = ERROR)
+ @Message(id = 22044, value = "Cannot unregister processor %s with JMX server")
+ void cannotUnregisterProcessorWithJmxServer(ObjectName processorName, @Cause Throwable cause);
+
+ @LogMessage(level = INFO)
+ @Message(id = 22050, value = "Endpoint registered: %s")
+ void endpointRegistered(ObjectName epName);
+
+ @LogMessage(level = INFO)
+ @Message(id = 22051, value = "Endpoint unregistered: %s")
+ void endpointUnregistered(ObjectName epName);
+
+ @LogMessage(level = INFO)
+ @Message(id = 22052, value = "Starting %s %s")
+ void startingWSServerConfig(String implTitle, String implVersion);
+
+ @LogMessage(level = DEBUG)
+ @Message(id = 22053, value = "Unable to calculate webservices port, using default %s")
+ void unableToCalculateWebServicesPort(String def);
+
+ @LogMessage(level = DEBUG)
+ @Message(id = 22054, value = "Unable to calculate webservices secure port, using default %s")
+ void unableToCalculateWebServicesSecurePort(String def);
+
+ @LogMessage(level = DEBUG)
+ @Message(id = 22055, value = "Using undefined webservices host: %s")
+ void usingUndefinedWebServicesHost(String host);
+
+ @LogMessage(level = DEBUG)
+ @Message(id = 22056, value = "Setting webservices host to localhost: %s")
+ void usingLocalHostWebServicesHost(String host);
+
+ @LogMessage(level = DEBUG)
+ @Message(id = 22057, value = "Could not get address for host: %s")
+ void couldNotGetAddressForHost(String host, @Cause Throwable cause);
+
+ @LogMessage(level = WARN)
+ @Message(id = 22058, value = "Could not get port for webservices configuration from configured HTTP connector")
+ void couldNotGetPortFromConfiguredHTTPConnector();
+
+ @LogMessage(level = WARN)
+ @Message(id = 22059, value = "Unable to read from the http servlet request")
+ void unableToReadFromHttpServletRequest(@Cause Throwable cause);
+
+ @LogMessage(level = ERROR)
+ @Message(id = 22060, value = "Cannot trace SOAP message")
+ void cannotTraceSoapMessage(@Cause Throwable cause);
+
+ @LogMessage(level = WARN)
+ @Message(id = 22061, value = "Method invocation failed with exception")
+ void methodInvocationFailed(@Cause Throwable cause);
+
+ @LogMessage(level = TRACE)
+ @Message(id = 22090, value = "Cannot get %s from root file, trying with additional metadata files")
+ void cannotGetRootFileTryingWithAdditionalMetaData(String resourcePath);
+
+ @LogMessage(level = TRACE)
+ @Message(id = 22098, value = "Cannot get %s from %s")
+ void cannotGetRootResourceFrom(String resourcePath, Object uvf, @Cause Throwable cause);
+
+ @LogMessage(level = DEBUG)
+ @Message(id = 22099, value = "Error during deployment: %s")
+ void errorDuringDeployment(String dep, @Cause Throwable cause);
+
+ @LogMessage(level = ERROR)
+ @Message(id = 22100, value = "Error while destroying deployment %s due to previous exception")
+ void errorDestroyingDeployment(String dep, @Cause Throwable cause);
+
+ @LogMessage(level = ERROR)
+ @Message(id = 22102, value = "Cannot stop endpoint in state %s: %s")
+ void cannotStopEndpoint(EndpointState state, ObjectName epName);
+
+ @LogMessage(level = ERROR)
+ @Message(id = 22103, value = "Cannot start endpoint in state %s: %s")
+ void cannotStartEndpoint(EndpointState state, ObjectName epName);
+
+ @LogMessage(level = WARN)
+ @Message(id = 22110, value = "Could not add handler %s as part of client or endpoint configuration")
+ void cannotAddHandler(String className, @Cause Throwable cause);
+
+ @LogMessage(level = WARN)
+ @Message(id = 22111, value = "PortNamePattern and ServiceNamePattern filters not supported; adding handlers anyway")
+ void filtersNotSupported();
+
+ @LogMessage(level = WARN)
+ @Message(id = 22112, value = "Init params not supported; adding handler anyway")
+ void initParamsNotSupported();
+
+ @LogMessage(level = ERROR)
+ @Message(id = 22113, value = "Error closing JAXBIntro configuration stream: %s")
+ void errorClosingJAXBIntroConf(URL url, @Cause Throwable cause);
+
+ @LogMessage(level = TRACE)
+ @Message(id = 22114, value = "%s doesn't work on %s")
+ void aspectDoesNotWorkOnDeployment(Class<?> aspect, Class<?> deployment);
+}
Deleted: common/trunk/src/main/java/org/jboss/ws/common/Message.properties
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/Message.properties 2012-09-21 12:47:11 UTC (rev 16751)
+++ common/trunk/src/main/java/org/jboss/ws/common/Message.properties 2012-09-21 15:48:32 UTC (rev 16752)
@@ -1,15 +0,0 @@
-INVALID_BINARY_COMPONENT_FOR_ARRAY=Invalid binary component for array: {0}
-DESTINATION_CLASS_CANNOT_BE_NULL=Destination class cannot be null
-SOURCE_CLASS_CANNOT_BE_NULL=Source class cannot be null
-UNABLE_TO_CREATE_DOCUMENT_BUILDER=Unable to create document builder
-CANNOT_PARSE=Cannot parse: {0}
-SOURCE_TYPE_NOT_IMPLEMENTED=Source type not implemented: {0}
-UNSUPPORTED_ENCODING=Unsupported encoding: {0}
-CANNOT_PRETTY_PRINT_AND_IGNORE_WHITESPACE=Cannot pretty print and ignore whitespace
-UNABLE_TO_CONVERT_DATAHANDLER=Unable to convert DataHandler to byte[]: {0}
-CANNOT_GET_URL_FOR=Cannot get URL for: {0}
-UNIFIEDVIRTUALFILE_NOT_INITIALIZED=UnifiedVirtualFile not initialized
-CANNOT_GET_CHILDREN_FOR_RESOURCE=Cannot get children for resource: {0}
-UNIFIEDVIRTUALFILE_NOT_INITIALIZED=UnifiedVirtualFile not initialized
-CANNOT_GET_NAME_FOR_RESOURCE=Cannot get name for resource: {0}
-CANNOT_GET_URL_FOR=Cannot get URL for: {0}
\ No newline at end of file
Added: common/trunk/src/main/java/org/jboss/ws/common/Messages.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/Messages.java (rev 0)
+++ common/trunk/src/main/java/org/jboss/ws/common/Messages.java 2012-09-21 15:48:32 UTC (rev 16752)
@@ -0,0 +1,271 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, Red Hat, Inc., 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.ws.common;
+
+import java.io.IOException;
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.net.MalformedURLException;
+import java.util.Collection;
+
+import javax.management.ObjectName;
+import javax.naming.NamingException;
+import javax.xml.ws.WebServiceException;
+
+import org.jboss.logging.Cause;
+import org.jboss.logging.Message;
+import org.jboss.logging.MessageBundle;
+import org.jboss.ws.common.injection.InjectionException;
+import org.jboss.wsf.spi.WSFException;
+import org.jboss.wsf.spi.deployment.EndpointState;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
+
+/**
+ * JBossWS Common exception messages
+ *
+ * @author alessio.soldano(a)jboss.com
+ */
+@MessageBundle(projectCode = "JBWS")
+public interface Messages {
+
+ Messages MESSAGES = org.jboss.logging.Messages.getBundle(Messages.class);
+
+ @Message(id = 22000, value = "Cannot get URL for %s")
+ IOException cannotGetURLFor(String path);
+
+ @Message(id = 22003, value = "UnifiedVirtualFile not initialized; could not load resources from classloader: %s")
+ IllegalStateException unifiedVirtualFileNotInitialized(ClassLoader cl);
+
+ @Message(id = 22004, value = "Invalid ObjectName: %s")
+ Error invalidObjectName(@Cause Throwable cause, String message);
+
+ @Message(id = 22005, value = "Could not get component type from array; invalid binary component for array: %s")
+ IllegalArgumentException invalidBinaryComponentForArray(String arrayType);
+
+ @Message(id = 22006, value = "Could not check whether class '%s' is assignable from class '%s'; both classes must not be null.")
+ IllegalArgumentException cannotCheckClassIsAssignableFrom(Class<?> dest, Class<?> src);
+
+ @Message(id = 22007, value = "Unable to convert DataHandler to byte[]: %s")
+ WebServiceException unableToConvertDataHandler(@Cause Throwable cause, String dhName);
+
+ @Message(id = 22008, value = "Cannot pretty print document and ignore white spaces at the same time")
+ IllegalStateException cannotPrettyPrintAndIgnoreWhiteSpaces();
+
+ @Message(id = 22009, value = "Unable to create instance of %s")
+ RuntimeException unableToCreateInstanceOf(@Cause Throwable cause, String className);
+
+ @Message(id = 22014, value = "Source type not implemented: %s")
+ RuntimeException sourceTypeNotImplemented(Class<?> clazz);
+
+ @Message(id = 22015, value = "Entity resolution: invalid character reference in %s")
+ IllegalArgumentException entityResolutionInvalidCharacterReference(String string);
+
+ @Message(id = 22016, value = "Entity resolution: invalid entity reference in %s")
+ IllegalArgumentException entityResolutionInvalidEntityReference(String string);
+
+ @Message(id = 22017, value = "Entity resolution: invalid entity %s")
+ IllegalArgumentException entityResolutionInvalidEntity(String entity);
+
+ @Message(id = 22018, value = "A UUID must be 16 bytes!")
+ IllegalArgumentException uuidMustBeOf16Bytes();
+
+ @Message(id = 22019, value = "Entity resolution: no entities mapping defined in resource file: %s")
+ IllegalArgumentException entityResolutionNoEntityMapppingDefined(String file);
+
+ @Message(id = 22020, value = "Entity resolution: resource not found: %s")
+ IllegalArgumentException entityResolutionResourceNotFound(String res);
+
+ @Message(id = 22023, value = "Error building an URLConnection capable of handling multiply-nested jars; '!' missing or in unexpected position in provided url: %s")
+ MalformedURLException jarUrlConnectionBuildError(String url);
+
+ @Message(id = 22024, value = "JAR URLConnection unable to locate segment %s for url %s")
+ IOException jarUrlConnectionUnableToLocateSegment(String segment, String url);
+
+ @Message(id = 22028, value = "Cannot find schema import '%s' in deployment '%s'")
+ IllegalArgumentException cannotFindSchemaImportInDeployment(String xsdImport, String deploymentName);
+
+ @Message(id = 22029, value = "Failed to provide spi: %s")
+ WSFException failedToProvideSPI(Class<?> spiType);
+
+ @Message(id = 22030, value = "No deployment aspect found with attribute last='true'")
+ IllegalStateException noDeploymentAspectFoundWithAttributeLast();
+
+ @Message(id = 22031, value = "Cycle detected in sub-graph: %s")
+ IllegalStateException cycleDetectedInSubGraph(Collection<?> c);
+
+ @Message(id = 22032, value = "Cannot marshall service ref meta data")
+ NamingException cannotMarshallServiceRefMetaData(@Cause Throwable cause);
+
+ @Message(id = 22033, value = "Cannot unmarshall service ref meta data")
+ NamingException cannotUnMarshallServiceRefMetaData(@Cause Throwable cause);
+
+ @Message(id = 22034, value = "Missing VFS root for service-ref: %s")
+ IllegalStateException missingVFSRootInServiceRef(String serviceRefName);
+
+ @Message(id = 22035, value = "Missing service reference type for service-ref: %s")
+ IllegalStateException missingServiceRefTypeInServiceRef(String serviceRefName);
+
+ @Message(id = 22036, value = "Cannot create generic javax.xml.ws.Service without wsdlLocation; service-ref metadata = '%s'")
+ IllegalArgumentException cannotCreateServiceWithoutWsdlLocation(UnifiedServiceRefMetaData serviceRefMD);
+
+ @Message(id = 22037, value = "Annotation class cannot be null")
+ IllegalArgumentException annotationClassCannotBeNull();
+
+ @Message(id = 22045, value = "Cannot register / unregister null endpoint")
+ IllegalArgumentException cannotRegisterUnregisterNullEndpoint();
+
+ @Message(id = 22046, value = "Looking for endpoints with null name in the endpoint registry is not supported")
+ IllegalArgumentException endpointNameCannotBeNull();
+
+ @Message(id = 22047, value = "Cannot register endpoint with null name: %s")
+ IllegalArgumentException cannotRegisterEndpointWithNullName(ObjectName epName);
+
+ @Message(id = 22048, value = "Endpoint already registered: %s")
+ IllegalStateException endpointAlreadyRegistered(ObjectName endpointName);
+
+ @Message(id = 22049, value = "Endpoint not registered: %s")
+ IllegalStateException endpointNotRegistered(ObjectName endpointName);
+
+ @Message(id = 22062, value = "Cannot find attachment %s in webservice deployment %s")
+ IllegalStateException cannotFindAttachmentInDeployment(Class<?> attachmentClass, String dep);
+
+ @Message(id = 22063, value = "Reference resolution: cannot resolve %s")
+ IllegalArgumentException cannotResolve(Object obj);
+
+ @Message(id = 22064, value = "Reference resolution: accessible object class cannot be null")
+ IllegalArgumentException accessibleObjectClassCannotBeNull();
+
+ @Message(id = 22065, value = "Method %s annotated with @%s can't declare primitive parameters")
+ InjectionException methodCannotDeclarePrimitiveParameters2(Method m, Class<? extends Annotation> ann);
+
+ @Message(id = 22066, value = "Field %s can't be of primitive or void type")
+ InjectionException fieldCannotBeOfPrimitiveOrVoidType(Field f);
+
+ @Message(id = 22067, value = "Method %s annotated with @%s can't be of primitive or void type")
+ InjectionException fieldCannotBeOfPrimitiveOrVoidType2(Field f, Class<? extends Annotation> ann);
+
+ @Message(id = 22068, value = "Method %s has to have no parameters")
+ InjectionException methodHasToHaveNoParameters(Method m);
+
+ @Message(id = 22069, value = "Method %s annotated with @%s has to have no parameters")
+ InjectionException methodHasToHaveNoParameters2(Method m, Class<? extends Annotation> ann);
+
+ @Message(id = 22070, value = "Method %s has to return void")
+ InjectionException methodHasToReturnVoid(Method m);
+
+ @Message(id = 22071, value = "Method %s annotated with @%s has to return void")
+ InjectionException methodHasToReturnVoid2(Method m, Class<? extends Annotation> ann);
+
+ @Message(id = 22072, value = "Method %s cannot throw checked exceptions")
+ InjectionException methodCannotThrowCheckedException(Method m);
+
+ @Message(id = 22073, value = "Method %s annotated with @%s cannot throw checked exception")
+ InjectionException methodCannotThrowCheckedException2(Method m, Class<? extends Annotation> ann);
+
+ @Message(id = 22074, value = "Method %s cannot be static")
+ InjectionException methodCannotBeStatic(Method m);
+
+ @Message(id = 22075, value = "Method %s annotated with @%s cannot be static")
+ InjectionException methodCannotBeStatic2(Method m, Class<? extends Annotation> ann);
+
+ @Message(id = 22076, value = "Field %s cannot be static or final")
+ InjectionException fieldCannotBeStaticOrFinal(Field f);
+
+ @Message(id = 22077, value = "Field %s annotated with @%s cannot be static")
+ InjectionException fieldCannotBeStaticOrFinal2(Field f, Class<? extends Annotation> ann);
+
+ @Message(id = 22078, value = "Method %s has to declare exactly one parameter")
+ InjectionException methodHasToDeclareExactlyOneParameter(Method m);
+
+ @Message(id = 22079, value = "Method %s annotated with @%s has to declare exactly one parameter")
+ InjectionException methodHasToDeclareExactlyOneParameter2(Method m, Class<? extends Annotation> ann);
+
+ @Message(id = 22080, value = "Method %s doesn't respect Java Beans setter method name")
+ InjectionException methodDoesNotRespectJavaBeanSetterMethodName(Method m);
+
+ @Message(id = 22081, value = "Method %s annotated with @%s doesn't respect Java Beans setter method name")
+ InjectionException methodDoesNotRespectJavaBeanSetterMethodName2(Method m, Class<? extends Annotation> ann);
+
+ @Message(id = 22082, value = "Only one method can exist")
+ InjectionException onlyOneMethodCanExist();
+
+ @Message(id = 22083, value = "Only one method annotated with @%s can exist")
+ InjectionException onlyOneMethodCanExist2(Class<? extends Annotation> ann);
+
+ @Message(id = 22084, value = "Method %s can't declare primitive parameters")
+ InjectionException methodCannotDeclarePrimitiveParameters(Method m);
+
+ @Message(id = 22085, value = "Virtual host must be the same for all endpoints of the deployment %s")
+ IllegalStateException virtualHostMustBeTheSameForAllEndpoints(String dep);
+
+ @Message(id = 22086, value = "Cannot obtain servlet mapping for %s")
+ IllegalStateException cannotObtainServletMapping(String name);
+
+ @Message(id = 22087, value = "Failed to read %s: %s")
+ WebServiceException failedToRead(String descriptor, String mex, @Cause Throwable cause);
+
+ @Message(id = 22088, value = "Unexpected element parsing %s: %s")
+ IllegalStateException unexpectedElement(String descriptor, String elem);
+
+ @Message(id = 22089, value = "Unexpectedly reached end of XML document: %s")
+ IllegalStateException reachedEndOfXMLDocUnexpectedly(String descriptor);
+
+ @Message(id = 22092, value = "Could not find %s in the additional metadatafiles")
+ IOException cannotFindInAdditionalMetaData(String resourcePath);
+
+ @Message(id = 22093, value = "Context root expected to start with leading slash: %s")
+ IllegalStateException contextRootExpectedToStartWithLeadingSlash(String contextRoot);
+
+ @Message(id = 22094, value = "Lifecycle handler not initialized for endpoint %s")
+ IllegalStateException lifecycleHandlerNotInitialized(ObjectName epName);
+
+ @Message(id = 22095, value = "Cannot obtain context root for deployment %s")
+ IllegalStateException cannotObtainContextRoot(String dep);
+
+ @Message(id = 22096, value = "Cannot obtain url pattern for endpoint %s")
+ IllegalStateException cannotObtainUrlPattern(ObjectName epName);
+
+ @Message(id = 22097, value = "Cannot find <url-pattern> for servlet-name %s")
+ RuntimeException cannotFindUrlPatternForServletName(String s);
+
+ @Message(id = 22101, value = "Invocation handler not available for endpoint %s")
+ IllegalStateException invocationHandlerNotAvailable(ObjectName epName);
+
+ @Message(id = 22104, value = "All endpoints must share the same context root; deployment = %s")
+ IllegalStateException allEndpointsMustShareSameContextRoot(String dep);
+
+ @Message(id = 22105, value = "Cannot modify endpoint in state %s: %s")
+ IllegalStateException cannotModifyEndpointInState(EndpointState state, ObjectName epName);
+
+ @Message(id = 22106, value = "Operation %s not supported by %s")
+ RuntimeException operationNotSupportedBy(String op, Class<?> clazz);
+
+ @Message(id = 22107, value = "Could not read configuration from %s")
+ RuntimeException couldNotReadConfiguration(String path, @Cause Throwable cause);
+
+ @Message(id = 22108, value = "Configuration %s not found")
+ RuntimeException configurationNotFound(String conf);
+
+ @Message(id = 22109, value = "%s is not a JAX-WS Handler")
+ RuntimeException notJAXWSHandler(String className);
+}
Modified: common/trunk/src/main/java/org/jboss/ws/common/ObjectNameFactory.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/ObjectNameFactory.java 2012-09-21 12:47:11 UTC (rev 16751)
+++ common/trunk/src/main/java/org/jboss/ws/common/ObjectNameFactory.java 2012-09-21 15:48:32 UTC (rev 16752)
@@ -42,7 +42,7 @@
}
catch (MalformedObjectNameException e)
{
- throw new Error("Invalid ObjectName: " + name + "; " + e);
+ throw Messages.MESSAGES.invalidObjectName(e, name);
}
}
@@ -54,7 +54,7 @@
}
catch (MalformedObjectNameException e)
{
- throw new Error("Invalid ObjectName: " + domain + "," + key + "," + value + "; " + e);
+ throw Messages.MESSAGES.invalidObjectName(e, domain + "," + key + "," + value);
}
}
@@ -66,7 +66,7 @@
}
catch (MalformedObjectNameException e)
{
- throw new Error("Invalid ObjectName: " + domain + "," + table + "; " + e);
+ throw Messages.MESSAGES.invalidObjectName(e, domain + "," + table);
}
}
}
Modified: common/trunk/src/main/java/org/jboss/ws/common/ResourceLoaderAdapter.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/ResourceLoaderAdapter.java 2012-09-21 12:47:11 UTC (rev 16751)
+++ common/trunk/src/main/java/org/jboss/ws/common/ResourceLoaderAdapter.java 2012-09-21 15:48:32 UTC (rev 16752)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2012, 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.
*
@@ -21,6 +21,9 @@
*/
package org.jboss.ws.common;
+import static org.jboss.ws.common.Loggers.ROOT_LOGGER;
+import static org.jboss.ws.common.Messages.MESSAGES;
+
import java.io.File;
import java.io.IOException;
import java.net.MalformedURLException;
@@ -30,12 +33,9 @@
import java.util.Enumeration;
import java.util.LinkedList;
import java.util.List;
-import java.util.ResourceBundle;
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
-import org.jboss.logging.Logger;
-import org.jboss.ws.api.util.BundleUtils;
import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
/**
@@ -48,10 +48,8 @@
*/
public class ResourceLoaderAdapter implements UnifiedVirtualFile
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(ResourceLoaderAdapter.class);
private URL resourceURL;
private ClassLoader loader;
- private static Logger log = Logger.getLogger(ResourceLoaderAdapter.class);
private static final String jarFileSeparator = "/";
public ResourceLoaderAdapter()
@@ -115,7 +113,7 @@
}
if (resourceURL == null)
- throw new IOException(BundleUtils.getMessage(bundle, "CANNOT_GET_URL_FOR", resourcePath));
+ throw MESSAGES.cannotGetURLFor(resourcePath);
return new ResourceLoaderAdapter(loader, resourceURL);
}
@@ -123,14 +121,14 @@
public URL toURL()
{
if (null == this.resourceURL)
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "UNIFIEDVIRTUALFILE_NOT_INITIALIZED"));
+ throw MESSAGES.unifiedVirtualFileNotInitialized(loader);
return resourceURL;
}
public List<UnifiedVirtualFile> getChildren() throws IOException
{
if (null == this.resourceURL)
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "UNIFIEDVIRTUALFILE_NOT_INITIALIZED"));
+ throw MESSAGES.unifiedVirtualFileNotInitialized(loader);
List<UnifiedVirtualFile> list = new LinkedList<UnifiedVirtualFile>();
if (resourceURL.getProtocol().equals("jar"))
{
@@ -191,7 +189,7 @@
}
catch (Exception e)
{
- log.error(BundleUtils.getMessage(bundle, "CANNOT_GET_CHILDREN_FOR_RESOURCE", resourceURL), e);
+ ROOT_LOGGER.cannotGetChildrenForResource(e, resourceURL);
}
}
else //std file/dir
@@ -213,7 +211,7 @@
}
catch (Exception e)
{
- log.error(BundleUtils.getMessage(bundle, "CANNOT_GET_CHILDREN_FOR_RESOURCE", resourceURL), e);
+ ROOT_LOGGER.cannotGetChildrenForResource(e, resourceURL);
}
}
return list;
@@ -222,7 +220,7 @@
public String getName()
{
if (null == this.resourceURL)
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "UNIFIEDVIRTUALFILE_NOT_INITIALIZED"));
+ throw MESSAGES.unifiedVirtualFileNotInitialized(loader);
String name = null;
try
{
@@ -234,7 +232,7 @@
}
catch (Exception e)
{
- log.error(BundleUtils.getMessage(bundle, "CANNOT_GET_NAME_FOR_RESOURCE", resourceURL));
+ ROOT_LOGGER.cannotGetNameForResource(e, resourceURL);
}
return name;
}
Modified: common/trunk/src/main/java/org/jboss/ws/common/URLLoaderAdapter.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/URLLoaderAdapter.java 2012-09-21 12:47:11 UTC (rev 16751)
+++ common/trunk/src/main/java/org/jboss/ws/common/URLLoaderAdapter.java 2012-09-21 15:48:32 UTC (rev 16752)
@@ -21,232 +21,25 @@
*/
package org.jboss.ws.common;
-import java.io.File;
-import java.io.IOException;
-import java.net.MalformedURLException;
import java.net.URL;
-import java.net.URLClassLoader;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.util.Enumeration;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.ResourceBundle;
-import java.util.jar.JarEntry;
-import java.util.jar.JarFile;
-import org.jboss.logging.Logger;
-import org.jboss.ws.api.util.BundleUtils;
-import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
-
/**
* Load resources through a URLClassLoader.<br>
* NOTE: The associated classloader doesn't do parent delegation.
+ *
+ * @deprecated Please use org.jboss.wsf.spi.util.URLLoaderAdapter instead
*
- *
* @author Heiko.Braun(a)jboss.org
* @author alessio.soldano(a)jboss.com
* @since 25.01.2007
*/
-public class URLLoaderAdapter implements UnifiedVirtualFile
+@Deprecated
+public class URLLoaderAdapter extends org.jboss.wsf.spi.util.URLLoaderAdapter
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(URLLoaderAdapter.class);
- private static final long serialVersionUID = 8263115387770740414L;
-
- private URL rootURL;
- private URL resourceURL;
- private transient URLClassLoader loader;
- private static Logger log = Logger.getLogger(URLLoaderAdapter.class);
- private static final String jarFileSeparator = "/";
public URLLoaderAdapter(URL rootURL)
{
- this.rootURL = rootURL;
+ super(rootURL);
}
- private URLLoaderAdapter(URL rootURL, URLClassLoader loader, URL resourceURL)
- {
- this.rootURL = rootURL;
- this.resourceURL = resourceURL;
- this.loader = loader;
- }
-
- public UnifiedVirtualFile findChild(String resourcePath) throws IOException
- {
- URL resourceURL = null;
- if (resourcePath != null)
- {
- // Try the child as URL
- try
- {
- resourceURL = new URL(resourcePath);
- }
- catch (MalformedURLException ex)
- {
- // ignore
- }
-
- // Try the filename as File
- if (resourceURL == null)
- {
- try
- {
- File file = new File(resourcePath);
- if (file.exists())
- resourceURL = file.toURI().toURL();
- }
- catch (MalformedURLException e)
- {
- // ignore
- }
- }
-
- // Try the filename as Resource
- if (resourceURL == null)
- {
- try
- {
- resourceURL = getResourceLoader().getResource(resourcePath);
- }
- catch (Exception ex)
- {
- // ignore
- }
- }
- }
-
- if (resourceURL == null)
- throw new IOException(BundleUtils.getMessage(bundle, "CANNOT_GET_URL_FOR", resourcePath));
-
- return new URLLoaderAdapter(rootURL, loader, resourceURL);
- }
-
- public URL toURL()
- {
- if (resourceURL != null)
- return resourceURL;
- else
- return rootURL;
- }
-
- private URLClassLoader getResourceLoader()
- {
- if (loader == null)
- {
- loader = new URLClassLoader(new URL[] { rootURL });
- }
- return loader;
- }
-
- public List<UnifiedVirtualFile> getChildren() throws IOException
- {
- List<UnifiedVirtualFile> list = new LinkedList<UnifiedVirtualFile>();
-
- URL url = toURL();
-
- if (url.getProtocol().equals("jar"))
- {
- String urlString = url.toExternalForm();
- String jarRoot = urlString.substring(4, urlString.indexOf("ar!") + 2);
- String path = urlString.contains("!") ? urlString.substring(urlString.lastIndexOf("!") + 2) : "";
- if (path.endsWith(jarFileSeparator))
- path = path.substring(0, path.lastIndexOf(jarFileSeparator));
-
- try
- {
- String folder = jarRoot.substring(5,jarRoot.lastIndexOf("/"));
- String filename = jarRoot.substring(jarRoot.lastIndexOf("/")+1);
- final File jar = new File(folder, filename);
-
- PrivilegedAction<JarFile> action = new PrivilegedAction<JarFile>()
- {
- public JarFile run()
- {
- try
- {
- return new JarFile(jar);
- }
- catch (IOException e)
- {
- throw new RuntimeException(e);
- }
- }
- };
- JarFile jarFile = AccessController.doPrivileged(action);
-
- if (jar.canRead())
- {
- Enumeration<JarEntry> entries = jarFile.entries();
- List<String> pathMatch = new LinkedList<String>();
- List<String> finalMatch = new LinkedList<String>();
- while (entries.hasMoreElements())
- {
- JarEntry entry = entries.nextElement();
- String name = entry.getName();
- //keep entries starting with the current resource path (exclude inner classes and the current file)
- if (name.startsWith(path + jarFileSeparator) && (name.length() > path.length() + 1) && !name.contains("$"))
- pathMatch.add(name.substring(path.length() + 1));
- }
-
- for (String s : pathMatch)
- {
- //do not go deeper than the current dir
- if (!s.contains(jarFileSeparator) || s.indexOf(jarFileSeparator) == s.length() - 1)
- finalMatch.add(s);
- }
- for (String s : finalMatch)
- {
- URL sUrl = new URL(urlString + jarFileSeparator + s);
- list.add(new URLLoaderAdapter(rootURL, loader, sUrl));
- }
- }
- }
- catch (Exception e)
- {
- e.printStackTrace();
- log.error(BundleUtils.getMessage(bundle, "CANNOT_GET_CHILDREN_FOR_RESOURCE", url));
- }
- }
- else //std file/dir
- {
- try
- {
- File file = new File(url.toURI());
- if (file.exists() && file.isDirectory())
- {
- File[] files = file.listFiles();
- if (files != null)
- {
- for (File f : files)
- {
- list.add(new URLLoaderAdapter(rootURL, loader, f.toURI().toURL()));
- }
- }
- }
- }
- catch (Exception e)
- {
- log.error(BundleUtils.getMessage(bundle, "CANNOT_GET_CHILDREN_FOR_RESOURCE", url), e);
- }
- }
- return list;
- }
-
- public String getName()
- {
- String name = null;
- try
- {
- String filename = toURL().getFile();
- File f = new File(filename);
- name = f.getName();
- if (f.isDirectory() || (toURL().getProtocol().equals("jar") && filename.endsWith(jarFileSeparator)))
- name = name + jarFileSeparator;
- }
- catch (Exception e)
- {
- log.error(BundleUtils.getMessage(bundle, "CANNOT_GET_NAME_FOR_RESOURCE", toURL()), e);
- }
- return name;
- }
}
Modified: common/trunk/src/main/java/org/jboss/ws/common/configuration/ConfigHelper.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/configuration/ConfigHelper.java 2012-09-21 12:47:11 UTC (rev 16751)
+++ common/trunk/src/main/java/org/jboss/ws/common/configuration/ConfigHelper.java 2012-09-21 15:48:32 UTC (rev 16752)
@@ -21,13 +21,15 @@
*/
package org.jboss.ws.common.configuration;
+import static org.jboss.ws.common.Loggers.ROOT_LOGGER;
+import static org.jboss.ws.common.Messages.MESSAGES;
+
import java.io.IOException;
import java.io.InputStream;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
-import java.util.ResourceBundle;
import java.util.StringTokenizer;
import javax.xml.ws.Binding;
@@ -37,9 +39,7 @@
import javax.xml.ws.http.HTTPBinding;
import javax.xml.ws.soap.SOAPBinding;
-import org.jboss.logging.Logger;
import org.jboss.ws.api.configuration.ClientConfigurer;
-import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.utils.DelegateClassLoader;
import org.jboss.wsf.spi.SPIProvider;
import org.jboss.wsf.spi.SPIProviderResolver;
@@ -62,8 +62,6 @@
*/
public class ConfigHelper implements ClientConfigurer
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(ConfigHelper.class);
-
private static Map<String, String> bindingIDs = new HashMap<String, String>(8);
static {
bindingIDs.put(SOAPBinding.SOAP11HTTP_BINDING, "##SOAP11_HTTP");
@@ -83,7 +81,7 @@
@Override
public void setConfigProperties(Object proxy, String configFile, String configName)
{
- throw new RuntimeException(BundleUtils.getMessage(bundle, "NOT_SUPPORTED", this.getClass()));
+ throw MESSAGES.operationNotSupportedBy("setConfigProperties", this.getClass());
}
protected ClientConfig readConfig(String configFile, String configName) {
@@ -97,7 +95,7 @@
}
catch (Exception e)
{
- throw new RuntimeException(BundleUtils.getMessage(bundle, "COULD_NOT_READ_CONFIG", configFile));
+ throw MESSAGES.couldNotReadConfiguration(configFile, e);
}
finally
{
@@ -117,7 +115,7 @@
}
}
}
- throw new RuntimeException(BundleUtils.getMessage(bundle, "CONFIG_NOT_FOUND", configName));
+ throw MESSAGES.configurationNotFound(configName);
}
}
@@ -162,14 +160,14 @@
{
if (handlerChain.getPortNamePattern() != null || handlerChain.getServiceNamePattern() != null)
{
- Logger.getLogger(ConfigHelper.class).warn(BundleUtils.getMessage(bundle, "FILTERS_NOT_SUPPORTED"));
+ ROOT_LOGGER.filtersNotSupported();
}
if (matchProtocolBinding(protocolBinding, handlerChain.getProtocolBindings())) {
for (UnifiedHandlerMetaData uhmd : handlerChain.getHandlers())
{
if (uhmd.getInitParams() != null && !uhmd.getInitParams().isEmpty())
{
- Logger.getLogger(ConfigHelper.class).warn(BundleUtils.getMessage(bundle, "INIT_PARAMS_NOT_SUPPORTED"));
+ ROOT_LOGGER.initParamsNotSupported();
}
Object h = newInstance(uhmd.getHandlerClass());
if (h != null)
@@ -187,7 +185,7 @@
}
else
{
- throw new RuntimeException(BundleUtils.getMessage(bundle, "NOT_HANDLER_INSTANCE", h));
+ throw MESSAGES.notJAXWSHandler(uhmd.getHandlerClass());
}
}
}
@@ -221,7 +219,7 @@
}
catch (Exception e)
{
- Logger.getLogger(ConfigHelper.class).warnf(e, BundleUtils.getMessage(bundle, "CAN_NOT_ADD_HANDLER" , className));
+ ROOT_LOGGER.cannotAddHandler(className, e);
return null;
}
}
Deleted: common/trunk/src/main/java/org/jboss/ws/common/configuration/Message.properties
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/configuration/Message.properties 2012-09-21 12:47:11 UTC (rev 16751)
+++ common/trunk/src/main/java/org/jboss/ws/common/configuration/Message.properties 2012-09-21 15:48:32 UTC (rev 16752)
@@ -1,7 +0,0 @@
-FILTERS_NOT_SUPPORTED=PortNamePattern and ServiceNamePattern filters not supported; adding handlers anyway.
-INIT_PARAMS_NOT_SUPPORTED=Init params not supported.
-NOT_HANDLER_INSTANCE={0} is not a JAX-WS Handler instance
-CAN_NOT_ADD_HANDLER=Could not add handler {0} as part of client or endpoint configuration
-COULD_NOT_READ_CONFIG=Could not read configuration from file {0}
-CONFIG_NOT_FOUND=Configuration {0} not found
-NOT_SUPPORTED=Operation not supported by ClientConfigurer: {0}
\ No newline at end of file
Modified: common/trunk/src/main/java/org/jboss/ws/common/deployment/AbstractDefaultEndpoint.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/deployment/AbstractDefaultEndpoint.java 2012-09-21 12:47:11 UTC (rev 16751)
+++ common/trunk/src/main/java/org/jboss/ws/common/deployment/AbstractDefaultEndpoint.java 2012-09-21 15:48:32 UTC (rev 16752)
@@ -23,7 +23,6 @@
import java.util.Iterator;
import java.util.List;
-import java.util.ResourceBundle;
import java.util.Vector;
import javax.management.MalformedObjectNameException;
@@ -32,7 +31,7 @@
import org.jboss.ws.api.monitoring.Record;
import org.jboss.ws.api.monitoring.RecordFilter;
import org.jboss.ws.api.monitoring.RecordProcessor;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.common.Messages;
import org.jboss.ws.common.injection.PreDestroyHolder;
import org.jboss.wsf.spi.deployment.AbstractExtensible;
import org.jboss.wsf.spi.deployment.Endpoint;
@@ -55,7 +54,6 @@
*/
public class AbstractDefaultEndpoint extends AbstractExtensible
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(AbstractDefaultEndpoint.class);
protected Service service;
protected ObjectName name;
protected String shortName;
@@ -104,8 +102,6 @@
public synchronized Class<?> getTargetBeanClass()
{
- if (targetBean == null)
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "TARGET_BEAN_NOT_SET"));
if (targetBeanClass != null)
return targetBeanClass;
@@ -256,7 +252,7 @@
protected void assertEndpointSetterAccess()
{
if (state == EndpointState.STARTED)
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "CANNOT_MODIFY_ENDPOINT_PROPERTIES_IN_STATE", state));
+ throw Messages.MESSAGES.cannotModifyEndpointInState(state, getName());
}
public List<RecordProcessor> getRecordProcessors()
Modified: common/trunk/src/main/java/org/jboss/ws/common/deployment/BackwardCompatibleContextRootDeploymentAspect.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/deployment/BackwardCompatibleContextRootDeploymentAspect.java 2012-09-21 12:47:11 UTC (rev 16751)
+++ common/trunk/src/main/java/org/jboss/ws/common/deployment/BackwardCompatibleContextRootDeploymentAspect.java 2012-09-21 15:48:32 UTC (rev 16752)
@@ -21,10 +21,9 @@
*/
package org.jboss.ws.common.deployment;
-import java.util.ResourceBundle;
import java.util.StringTokenizer;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.common.Messages;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
@@ -41,7 +40,6 @@
*/
public class BackwardCompatibleContextRootDeploymentAspect extends ContextRootDeploymentAspect
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(BackwardCompatibleContextRootDeploymentAspect.class);
@Override
protected String getExplicitContextRoot(Deployment dep)
{
@@ -58,7 +56,7 @@
{
String firstToken = st.nextToken();
if (contextRoot != null && contextRoot.equals(firstToken) == false)
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "MUST_SHARE_THE_SAME_CONTEXT_ROOT", new Object[]{ contextRoot ,firstToken}));
+ throw Messages.MESSAGES.allEndpointsMustShareSameContextRoot(dep.getSimpleName());
contextRoot = firstToken;
}
Modified: common/trunk/src/main/java/org/jboss/ws/common/deployment/ContextRootDeploymentAspect.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/deployment/ContextRootDeploymentAspect.java 2012-09-21 12:47:11 UTC (rev 16751)
+++ common/trunk/src/main/java/org/jboss/ws/common/deployment/ContextRootDeploymentAspect.java 2012-09-21 15:48:32 UTC (rev 16752)
@@ -21,12 +21,10 @@
*/
package org.jboss.ws.common.deployment;
-import java.util.ResourceBundle;
-
import org.jboss.ws.api.annotation.AuthMethod;
import org.jboss.ws.api.annotation.TransportGuarantee;
import org.jboss.ws.api.annotation.WebContext;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.common.Messages;
import org.jboss.ws.common.integration.AbstractDeploymentAspect;
import org.jboss.wsf.spi.deployment.ArchiveDeployment;
import org.jboss.wsf.spi.deployment.Deployment;
@@ -42,7 +40,6 @@
*/
public class ContextRootDeploymentAspect extends AbstractDeploymentAspect
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(ContextRootDeploymentAspect.class);
@Override
public void start(Deployment dep)
{
@@ -75,13 +72,13 @@
{
for (Endpoint ep : dep.getService().getEndpoints())
{
- Class implClass = ep.getTargetBeanClass();
- WebContext anWebContext = (WebContext)implClass.getAnnotation(WebContext.class);
+ Class<?> implClass = ep.getTargetBeanClass();
+ WebContext anWebContext = implClass.getAnnotation(WebContext.class);
this.validateSecuritySettings(anWebContext);
if (anWebContext != null && anWebContext.contextRoot().length() > 0)
{
if (contextRoot != null && contextRoot.equals(anWebContext.contextRoot()) == false)
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "MUST_SHARE_THE_SAME_CONTEXT_ROOT"));
+ throw Messages.MESSAGES.allEndpointsMustShareSameContextRoot(dep.getSimpleName());
contextRoot = anWebContext.contextRoot();
}
Modified: common/trunk/src/main/java/org/jboss/ws/common/deployment/DefaultJMSEndpoint.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/deployment/DefaultJMSEndpoint.java 2012-09-21 12:47:11 UTC (rev 16751)
+++ common/trunk/src/main/java/org/jboss/ws/common/deployment/DefaultJMSEndpoint.java 2012-09-21 15:48:32 UTC (rev 16752)
@@ -23,9 +23,6 @@
import java.net.URI;
-import javax.naming.Context;
-
-import org.jboss.wsf.spi.deployment.EndpointType;
import org.jboss.wsf.spi.deployment.JMSEndpoint;
import org.jboss.wsf.spi.management.EndpointMetrics;
Modified: common/trunk/src/main/java/org/jboss/ws/common/deployment/DefaultLifecycleHandler.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/deployment/DefaultLifecycleHandler.java 2012-09-21 12:47:11 UTC (rev 16751)
+++ common/trunk/src/main/java/org/jboss/ws/common/deployment/DefaultLifecycleHandler.java 2012-09-21 15:48:32 UTC (rev 16752)
@@ -21,10 +21,8 @@
*/
package org.jboss.ws.common.deployment;
-import java.util.ResourceBundle;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.common.Loggers;
+import org.jboss.ws.common.Messages;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.deployment.EndpointState;
import org.jboss.wsf.spi.deployment.LifecycleHandler;
@@ -38,19 +36,12 @@
*/
public class DefaultLifecycleHandler implements LifecycleHandler
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(DefaultLifecycleHandler.class);
- // provide logging
- protected final Logger log = Logger.getLogger(getClass());
-
public void start(Endpoint ep)
{
- if (log.isTraceEnabled())
- log.trace("Start: " + ep.getName());
-
EndpointState state = ep.getState();
if (state != EndpointState.UNDEFINED)
{
- log.error(BundleUtils.getMessage(bundle, "CANNOT_START_ENDPOINT_IN_STATE", state));
+ Loggers.DEPLOYMENT_LOGGER.cannotStartEndpoint(state, ep.getName());
}
else
{
@@ -59,7 +50,7 @@
InvocationHandler invHandler = ep.getInvocationHandler();
if (invHandler == null)
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "INVOCATION_HANDLER_NOT_AVAILABLE"));
+ throw Messages.MESSAGES.invocationHandlerNotAvailable(ep.getName());
invHandler.init(ep);
ep.setState(EndpointState.STARTED);
@@ -68,13 +59,10 @@
public void stop(Endpoint ep)
{
- if (log.isTraceEnabled())
- log.trace("Stop: " + ep.getName());
-
EndpointState state = ep.getState();
if (state != EndpointState.STARTED)
{
- log.error(BundleUtils.getMessage(bundle, "CANNOT_STOP_ENDPOINT_IN_STATE", state));
+ Loggers.DEPLOYMENT_LOGGER.cannotStopEndpoint(state, ep.getName());
}
else
{
Modified: common/trunk/src/main/java/org/jboss/ws/common/deployment/DeploymentAspectManagerImpl.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/deployment/DeploymentAspectManagerImpl.java 2012-09-21 12:47:11 UTC (rev 16751)
+++ common/trunk/src/main/java/org/jboss/ws/common/deployment/DeploymentAspectManagerImpl.java 2012-09-21 15:48:32 UTC (rev 16752)
@@ -21,18 +21,18 @@
*/
package org.jboss.ws.common.deployment;
+import static org.jboss.ws.common.Loggers.DEPLOYMENT_LOGGER;
+
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
-import org.jboss.logging.Logger;
-import org.jboss.ws.api.util.BundleUtils;
import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.deployment.DeploymentState;
import org.jboss.wsf.spi.deployment.DeploymentAspect;
import org.jboss.wsf.spi.deployment.DeploymentAspectManager;
+import org.jboss.wsf.spi.deployment.DeploymentState;
import org.jboss.wsf.spi.deployment.WSFDeploymentException;
/**
@@ -42,9 +42,6 @@
*/
public class DeploymentAspectManagerImpl implements DeploymentAspectManager
{
- // provide logging
- private static final Logger log = Logger.getLogger(DeploymentAspectManagerImpl.class);
-
private String name;
private DeploymentAspectManager parent;
private List<DeploymentAspect> depAspects = new ArrayList<DeploymentAspect>();
@@ -79,14 +76,14 @@
depAspects.clear();
depAspects.addAll(aspects);
- if (log.isTraceEnabled())
+ if (DEPLOYMENT_LOGGER.isTraceEnabled())
{
// Debug the aspect list
StringBuilder builder = new StringBuilder("setDeploymentAspects on " + name);
for (DeploymentAspect aspect : aspects)
builder.append("\n " + aspect.getClass().getName() + " provides: " + aspect.getProvidesAsSet() + " requires: " + aspect.getRequiresAsSet());
- log.trace(builder);
+ DEPLOYMENT_LOGGER.trace(builder);
}
}
@@ -141,7 +138,7 @@
}
catch (RuntimeException rte)
{
- log.debug("Error during deployment!", rte);
+ DEPLOYMENT_LOGGER.errorDuringDeployment(dep.getSimpleName(), rte);
while (--i >= 0)
{
// destroy the deployment
@@ -152,7 +149,7 @@
catch (RuntimeException destroyRte)
{
//log previous exception in the exotic case in which also stopping already started aspects fails
- log.error(BundleUtils.getMessage(BundleUtils.getBundle(DeploymentAspectManagerImpl.class),"ERROR_DESTROYING_DEPLOYMENT"), rte);
+ DEPLOYMENT_LOGGER.errorDestroyingDeployment(dep.getSimpleName(), rte);
throw destroyRte;
}
}
@@ -190,11 +187,11 @@
private void logInvocation(DeploymentAspect aspect, String method)
{
- if (log.isTraceEnabled())
+ if (DEPLOYMENT_LOGGER.isTraceEnabled())
{
String name = aspect.getClass().getName();
name = name.substring(name.lastIndexOf(".") + 1);
- log.trace("[" + this.name + "]" + name + ":" + method);
+ DEPLOYMENT_LOGGER.trace("[" + this.name + "]" + name + ":" + method);
}
}
Modified: common/trunk/src/main/java/org/jboss/ws/common/deployment/EndpointAddressDeploymentAspect.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/deployment/EndpointAddressDeploymentAspect.java 2012-09-21 12:47:11 UTC (rev 16751)
+++ common/trunk/src/main/java/org/jboss/ws/common/deployment/EndpointAddressDeploymentAspect.java 2012-09-21 15:48:32 UTC (rev 16752)
@@ -22,17 +22,16 @@
package org.jboss.ws.common.deployment;
import static org.jboss.ws.common.integration.WSHelper.isJaxrpcDeployment;
-import static org.jboss.ws.common.integration.WSHelper.isJaxwsJseEndpoint;
import static org.jboss.ws.common.integration.WSHelper.isJaxwsEjbEndpoint;
+import static org.jboss.ws.common.integration.WSHelper.isJaxwsJseEndpoint;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
-import java.util.ResourceBundle;
import org.jboss.ws.api.annotation.WebContext;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.common.Messages;
import org.jboss.ws.common.integration.AbstractDeploymentAspect;
import org.jboss.wsf.spi.SPIProvider;
import org.jboss.wsf.spi.SPIProviderResolver;
@@ -57,14 +56,13 @@
*/
public class EndpointAddressDeploymentAspect extends AbstractDeploymentAspect
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(EndpointAddressDeploymentAspect.class);
@Override
public void start(Deployment dep)
{
final Service service = dep.getService();
String contextRoot = service.getContextRoot();
if (contextRoot == null)
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "CANNOT_OBTAIN_CONTEXT_ROOT"));
+ throw Messages.MESSAGES.cannotObtainContextRoot(dep.getSimpleName());
// TODO: remove this hack - review API
String protocol = (String)service.getProperty("protocol");
@@ -94,7 +92,7 @@
HttpEndpoint httpEp = (HttpEndpoint)ep;
String urlPattern = httpEp.getURLPattern();
if (urlPattern == null)
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "CANNOT_OBTAIN_URL_PATTERN"));
+ throw Messages.MESSAGES.cannotObtainUrlPattern(ep.getName());
if (urlPattern.endsWith("/*"))
urlPattern = urlPattern.substring(0, urlPattern.length() - 2);
@@ -138,7 +136,7 @@
String urlPattern = servletMappings.get(servletLink);
if (urlPattern == null)
- throw new RuntimeException(BundleUtils.getMessage(bundle, "CANNOT_FIND_URL_PATTERN", servletLink));
+ throw Messages.MESSAGES.cannotFindUrlPatternForServletName(servletLink);
List<JSESecurityMetaData> securityList = webMetaData.getSecurityMetaData();
for (JSESecurityMetaData currentSecurity : securityList)
Modified: common/trunk/src/main/java/org/jboss/ws/common/deployment/EndpointLifecycleDeploymentAspect.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/deployment/EndpointLifecycleDeploymentAspect.java 2012-09-21 12:47:11 UTC (rev 16751)
+++ common/trunk/src/main/java/org/jboss/ws/common/deployment/EndpointLifecycleDeploymentAspect.java 2012-09-21 15:48:32 UTC (rev 16752)
@@ -21,9 +21,7 @@
*/
package org.jboss.ws.common.deployment;
-import java.util.ResourceBundle;
-
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.common.Messages;
import org.jboss.ws.common.integration.AbstractDeploymentAspect;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Endpoint;
@@ -38,8 +36,6 @@
*/
public class EndpointLifecycleDeploymentAspect extends AbstractDeploymentAspect
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(EndpointLifecycleDeploymentAspect.class);
-
@Override
public void start(Deployment dep)
{
@@ -68,7 +64,7 @@
{
LifecycleHandler lifecycleHandler = ep.getLifecycleHandler();
if (lifecycleHandler == null && assertHandler)
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "LIFECYCLEHANDLER_NOT_INITIALISED"));
+ throw Messages.MESSAGES.lifecycleHandlerNotInitialized(ep.getName());
return lifecycleHandler;
}
Modified: common/trunk/src/main/java/org/jboss/ws/common/deployment/EndpointNameDeploymentAspect.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/deployment/EndpointNameDeploymentAspect.java 2012-09-21 12:47:11 UTC (rev 16751)
+++ common/trunk/src/main/java/org/jboss/ws/common/deployment/EndpointNameDeploymentAspect.java 2012-09-21 15:48:32 UTC (rev 16752)
@@ -21,9 +21,7 @@
*/
package org.jboss.ws.common.deployment;
-import java.util.ResourceBundle;
-
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.common.Messages;
import org.jboss.ws.common.ObjectNameFactory;
import org.jboss.ws.common.integration.AbstractDeploymentAspect;
import org.jboss.wsf.spi.deployment.Deployment;
@@ -37,15 +35,12 @@
*/
public class EndpointNameDeploymentAspect extends AbstractDeploymentAspect
{
-
- private static final ResourceBundle bundle = BundleUtils.getBundle(EndpointNameDeploymentAspect.class);
-
@Override
public void start(Deployment dep)
{
final String contextRoot = dep.getService().getContextRoot();
if (contextRoot == null || contextRoot.startsWith("/") == false)
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "CONTEXT_ROOT_EXPECTED_TO_START_WITH_LEADING_SLASH", contextRoot));
+ throw Messages.MESSAGES.contextRootExpectedToStartWithLeadingSlash(contextRoot);
for (Endpoint ep : dep.getService().getEndpoints())
{
Modified: common/trunk/src/main/java/org/jboss/ws/common/deployment/EndpointRecordProcessorDeploymentAspect.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/deployment/EndpointRecordProcessorDeploymentAspect.java 2012-09-21 12:47:11 UTC (rev 16751)
+++ common/trunk/src/main/java/org/jboss/ws/common/deployment/EndpointRecordProcessorDeploymentAspect.java 2012-09-21 15:48:32 UTC (rev 16752)
@@ -23,13 +23,13 @@
import java.util.LinkedList;
import java.util.List;
-import java.util.ResourceBundle;
import javax.management.JMException;
import javax.management.MBeanServer;
+import javax.management.ObjectName;
import org.jboss.ws.api.monitoring.RecordProcessor;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.common.Loggers;
import org.jboss.ws.common.ObjectNameFactory;
import org.jboss.ws.common.integration.AbstractDeploymentAspect;
import org.jboss.ws.common.monitoring.ManagedRecordProcessor;
@@ -44,7 +44,6 @@
*/
public class EndpointRecordProcessorDeploymentAspect extends AbstractDeploymentAspect
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(EndpointRecordProcessorDeploymentAspect.class);
private MBeanServer mbeanServer;
private List<RecordProcessor> processors;
@@ -94,33 +93,35 @@
private void registerRecordProcessor(RecordProcessor processor, Endpoint ep)
{
+ final ObjectName on = ObjectNameFactory.create(ep.getName() + ",recordProcessor=" + processor.getName());
try
{
- mbeanServer.registerMBean(processor, ObjectNameFactory.create(ep.getName() + ",recordProcessor=" + processor.getName()));
+ mbeanServer.registerMBean(processor, on);
}
catch (JMException ex)
{
- log.debug("Cannot register endpoint with JMX server, trying with the default ManagedRecordProcessor: " + ex.getMessage());
+ Loggers.MANAGEMENT_LOGGER.cannotRegisterProvidedProcessor(on, ex);
try
{
- mbeanServer.registerMBean(new ManagedRecordProcessor(processor), ObjectNameFactory.create(ep.getName() + ",recordProcessor=" + processor.getName()));
+ mbeanServer.registerMBean(new ManagedRecordProcessor(processor), on);
}
catch (JMException innerEx)
{
- log.error(BundleUtils.getMessage(bundle, "CANNOT_REGISTER_ENDPOINT_WITH_JMX_SERVER"), innerEx);
+ Loggers.MANAGEMENT_LOGGER.cannotRegisterProcessorWithJmxServer(on, innerEx);
}
}
}
private void unregisterRecordProcessor(RecordProcessor processor, Endpoint ep)
{
+ final ObjectName on = ObjectNameFactory.create(ep.getName() + ",recordProcessor=" + processor.getName());
try
{
- mbeanServer.unregisterMBean(ObjectNameFactory.create(ep.getName() + ",recordProcessor=" + processor.getName()));
+ mbeanServer.unregisterMBean(on);
}
catch (JMException ex)
{
- log.error(BundleUtils.getMessage(bundle, "CANNOT_UNREGISTER_RECORD_PROCESSOR_WITH_JMX_SERVER"), ex);
+ Loggers.MANAGEMENT_LOGGER.cannotUnregisterProcessorWithJmxServer(on, ex);
}
}
Modified: common/trunk/src/main/java/org/jboss/ws/common/deployment/JAXBIntroDeploymentAspect.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/deployment/JAXBIntroDeploymentAspect.java 2012-09-21 12:47:11 UTC (rev 16751)
+++ common/trunk/src/main/java/org/jboss/ws/common/deployment/JAXBIntroDeploymentAspect.java 2012-09-21 15:48:32 UTC (rev 16752)
@@ -23,13 +23,12 @@
import java.io.IOException;
import java.io.InputStream;
-import java.util.ResourceBundle;
+import java.net.URL;
import org.jboss.jaxb.intros.BindingCustomizationFactory;
-import org.jboss.logging.Logger;
import org.jboss.ws.api.binding.BindingCustomization;
import org.jboss.ws.api.binding.JAXBBindingCustomization;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.common.Loggers;
import org.jboss.ws.common.integration.AbstractDeploymentAspect;
import org.jboss.wsf.spi.deployment.ArchiveDeployment;
import org.jboss.wsf.spi.deployment.Deployment;
@@ -44,8 +43,6 @@
*/
public class JAXBIntroDeploymentAspect extends AbstractDeploymentAspect
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(JAXBIntroDeploymentAspect.class);
- private static Logger logger = Logger.getLogger(JAXBIntroDeploymentAspect.class);
private static final String META_INF_JAXB_INTROS_XML = "META-INF/jaxb-intros.xml";
private static final String WEB_INF_JAXB_INTROS_XML = "WEB-INF/jaxb-intros.xml";
@@ -54,19 +51,21 @@
// assert ArchiveDeployment
if(! (deployment instanceof ArchiveDeployment) )
{
- if (log.isTraceEnabled())
- log.trace("JAXBIntroDeploymentAspect doesn't work on " + deployment.getClass());
+ if (Loggers.DEPLOYMENT_LOGGER.isTraceEnabled())
+ Loggers.DEPLOYMENT_LOGGER.aspectDoesNotWorkOnDeployment(this.getClass(), deployment.getClass());
return;
}
ArchiveDeployment archive = (ArchiveDeployment)deployment;
InputStream introsConfigStream = null;
+ URL url = null;
try
{
// META-INF first
UnifiedVirtualFile vfs = archive.getRootFile().findChild(META_INF_JAXB_INTROS_XML);
- introsConfigStream = vfs.toURL().openStream();
+ url = vfs.toURL();
+ introsConfigStream = url.openStream();
} catch (Exception e) {}
if(null == introsConfigStream)
@@ -75,7 +74,8 @@
{
// WEB-INF second
UnifiedVirtualFile vfs = archive.getRootFile().findChild(WEB_INF_JAXB_INTROS_XML);
- introsConfigStream = vfs.toURL().openStream();
+ url = vfs.toURL();
+ introsConfigStream = url.openStream();
} catch (Exception e) {
return;
}
@@ -107,7 +107,7 @@
try {
introsConfigStream.close();
} catch (IOException e) {
- logger.error(BundleUtils.getMessage(bundle, "ERROR_CLOSING_JAXB_INTRODUCTIONS", deployment.getService().getContextRoot() ), e);
+ Loggers.DEPLOYMENT_LOGGER.errorClosingJAXBIntroConf(url, e);
}
}
}
Deleted: common/trunk/src/main/java/org/jboss/ws/common/deployment/Message.properties
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/deployment/Message.properties 2012-09-21 12:47:11 UTC (rev 16751)
+++ common/trunk/src/main/java/org/jboss/ws/common/deployment/Message.properties 2012-09-21 15:48:32 UTC (rev 16752)
@@ -1,24 +0,0 @@
-REQUIRED_CONDITIONS_''_NOT_SATISFIED_BY_''_FOR=Required conditions '{0}' not satisfied by '{1}' for: {2}
-CONTEXT_ROOT_EXPECTED_TO_START_WITH_LEADING_SLASH=Context root expected to start with leading slash: {0}
-TARGET_BEAN_NOT_SET=Target bean not set
-CANNOT_MODIFY_ENDPOINT_PROPERTIES_IN_STATE=Cannot modify endpoint properties in state: {0}
-CONTEXT_ROOT_MUST_BE_THE_SAME_FOR_ALL_DEPLOYED_ENDPOINTS=Context root must be the same for all deployed endpoints
-CANNOT_REGISTER_ENDPOINT_WITH_JMX_SERVER=Cannot register endpoint with JMX server
-CANNOT_UNREGISTER_RECORD_PROCESSOR_WITH_JMX_SERVER=Cannot unregister record processor with JMX server
-MUST_SHARE_THE_SAME_CONTEXT_ROOT=All endpoints must share the same <context-root>: {0}!={1}
-FAILED_TO_READ=Failed to read {0}:{1}
-UNEXPECTED_ELEMENT=Unexpected element: {0}
-REACHED_END_OF_XML_DOCUMENT_UNEXPECTEDLY=Reached end of xml document unexpectedly
-CANNOT_START_ENDPOINT_IN_STATE=Cannot start endpoint in state: {0}
-INVOCATION_HANDLER_NOT_AVAILABLE=Invocation handler not available
-CANNOT_STOP_ENDPOINT_IN_STATE=Cannot stop endpoint in state: {0}
-COULD_NOT_FIND_IN_THE_ADDITIONAL_METADATAFILES=Could not find {0} in the additional metadatafiles!
-VIRTUALHOST_MUST_BE_THE_SAME_FOR_ALL_DEPLOYED_ENDPOINTS=virtualHost must be the same for all deployed endpoints
-CANNOT_OBTAIN_SERVLET_MAPPING_FOR=Cannot obtain servlet mapping for: {0}
-LIFECYCLEHANDLER_NOT_INITIALISED=LifecycleHandler not initialised
-CANNOT_OBTAIN_CONTEXT_ROOT=Cannot obtain context root
-CANNOT_OBTAIN_URL_PATTERN=Cannot obtain url pattern
-CANNOT_FIND_URL_PATTERN=Cannot find <url-pattern> for servlet-name: {0}
-USING_INITAL_CLASS_LAODER_AS_RUNTIME_LAODER=Using inital class laoder as runtime laoder. Hack?
-ERROR_CLOSING_JAXB_INTRODUCTIONS=[{0}] Error closing JAXB Introductions Configurations stream
-ERROR_DESTROYING_DEPLOYMENT=Error while destroying deployment due to previous exception
Modified: common/trunk/src/main/java/org/jboss/ws/common/deployment/ResourceResolverImpl.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/deployment/ResourceResolverImpl.java 2012-09-21 12:47:11 UTC (rev 16751)
+++ common/trunk/src/main/java/org/jboss/ws/common/deployment/ResourceResolverImpl.java 2012-09-21 15:48:32 UTC (rev 16752)
@@ -21,15 +21,15 @@
*/
package org.jboss.ws.common.deployment;
+import static org.jboss.ws.common.Loggers.ROOT_LOGGER;
+
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Collection;
import java.util.Iterator;
-import java.util.ResourceBundle;
-import org.jboss.logging.Logger;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.common.Messages;
import org.jboss.wsf.spi.deployment.ResourceResolver;
import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
@@ -42,9 +42,6 @@
*/
public class ResourceResolverImpl implements ResourceResolver
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(ResourceResolverImpl.class);
- private static Logger log = Logger.getLogger(ResourceResolverImpl.class);
-
private UnifiedVirtualFile rootFile;
private Collection<UnifiedVirtualFile> metadataFiles;
@@ -87,8 +84,7 @@
}
else
{
- if (log.isTraceEnabled())
- log.trace("Cannot get " + resourcePath + " from root file, trying with additional metadata files", e);
+ ROOT_LOGGER.cannotGetRootFileTryingWithAdditionalMetaData(resourcePath);
}
}
}
@@ -115,13 +111,12 @@
}
catch (IOException e)
{
- if (log.isTraceEnabled())
- log.trace("Cannot get " + resourcePath + " from " + uvf, e);
+ ROOT_LOGGER.cannotGetRootResourceFrom(resourcePath, uvf, e);
}
}
}
if (vfResource == null)
- throw new IOException(BundleUtils.getMessage(bundle, "COULD_NOT_FIND_IN_THE_ADDITIONAL_METADATAFILES", resourcePath ));
+ throw Messages.MESSAGES.cannotFindInAdditionalMetaData(resourcePath);
resourceURL = vfResource.toURL();
}
Modified: common/trunk/src/main/java/org/jboss/ws/common/deployment/SOAPAddressWSDLParser.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/deployment/SOAPAddressWSDLParser.java 2012-09-21 12:47:11 UTC (rev 16751)
+++ common/trunk/src/main/java/org/jboss/ws/common/deployment/SOAPAddressWSDLParser.java 2012-09-21 15:48:32 UTC (rev 16752)
@@ -23,6 +23,7 @@
import static javax.xml.stream.XMLStreamConstants.END_ELEMENT;
import static javax.xml.stream.XMLStreamConstants.START_ELEMENT;
+import static org.jboss.ws.common.Messages.MESSAGES;
import static org.jboss.wsf.spi.util.StAXUtils.attributeAsQName;
import static org.jboss.wsf.spi.util.StAXUtils.match;
import static org.jboss.wsf.spi.util.StAXUtils.nextElement;
@@ -32,15 +33,12 @@
import java.net.URL;
import java.util.HashMap;
import java.util.Map;
-import java.util.ResourceBundle;
import javax.xml.namespace.QName;
import javax.xml.stream.XMLStreamConstants;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
-import javax.xml.ws.WebServiceException;
-import org.jboss.ws.api.util.BundleUtils;
import org.jboss.wsf.spi.util.StAXUtils;
/**
@@ -50,7 +48,6 @@
*/
public final class SOAPAddressWSDLParser
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(SOAPAddressWSDLParser.class);
public static final String SOAP_OVER_JMS_NS = "http://www.w3.org/2010/soapjms/";
private static final String WSDL_NS = "http://schemas.xmlsoap.org/wsdl/";
private static final String SOAP_NS = "http://schemas.xmlsoap.org/wsdl/soap/";
@@ -98,11 +95,11 @@
{
is = wsdlUrl.openStream();
XMLStreamReader xmlr = StAXUtils.createXMLStreamReader(is);
- return getMetaData(xmlr);
+ return getMetaData(xmlr, wsdlUrl);
}
catch (Exception e)
{
- throw new WebServiceException(BundleUtils.getMessage(bundle, "FAILED_TO_READ", new Object[]{ wsdlUrl , e.getMessage()}), e);
+ throw MESSAGES.failedToRead(wsdlUrl.toExternalForm(), e.getMessage(), e);
}
finally
{
@@ -114,7 +111,7 @@
}
}
- private static WSDLMetaData getMetaData(XMLStreamReader reader) throws XMLStreamException
+ private static WSDLMetaData getMetaData(XMLStreamReader reader, URL wsdlUrl) throws XMLStreamException
{
int iterate;
try
@@ -138,18 +135,18 @@
if (match(reader, WSDL_NS, DEFINITIONS))
{
String targetNS = reader.getAttributeValue(null, TARGET_NAMESPACE);
- parseDefinitions(reader, metadata, targetNS);
+ parseDefinitions(reader, metadata, targetNS, wsdlUrl);
}
else
{
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "UNEXPECTED_ELEMENT", reader.getLocalName()));
+ throw MESSAGES.unexpectedElement(wsdlUrl.toExternalForm(), reader.getLocalName());
}
}
}
return metadata;
}
- private static void parseDefinitions(XMLStreamReader reader, WSDLMetaData metadata, String targetNS) throws XMLStreamException
+ private static void parseDefinitions(XMLStreamReader reader, WSDLMetaData metadata, String targetNS, URL wsdlUrl) throws XMLStreamException
{
while (reader.hasNext())
{
@@ -165,13 +162,13 @@
case XMLStreamConstants.START_ELEMENT : {
if (match(reader, WSDL_NS, SERVICE)) {
QName name = attributeAsQName(reader, null, NAME, targetNS);
- WSDLServiceMetaData smd = parseService(reader, targetNS);
+ WSDLServiceMetaData smd = parseService(reader, targetNS, wsdlUrl);
smd.setName(name);
metadata.getServices().put(smd.getName(), smd);
}
else if (match(reader, WSDL_NS, BINDING)) {
QName name = attributeAsQName(reader, null, NAME, targetNS);
- WSDLBindingMetaData bmd = parseBinding(reader);
+ WSDLBindingMetaData bmd = parseBinding(reader, wsdlUrl);
bmd.setName(name);
metadata.getBindings().put(bmd.getName(), bmd);
}
@@ -179,10 +176,10 @@
}
}
}
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "REACHED_END_OF_XML_DOCUMENT_UNEXPECTEDLY"));
+ throw MESSAGES.reachedEndOfXMLDocUnexpectedly(wsdlUrl.toExternalForm());
}
- private static WSDLServiceMetaData parseService(XMLStreamReader reader, String targetNS) throws XMLStreamException
+ private static WSDLServiceMetaData parseService(XMLStreamReader reader, String targetNS, URL wsdlUrl) throws XMLStreamException
{
WSDLServiceMetaData smd = new WSDLServiceMetaData();
while (reader.hasNext())
@@ -200,7 +197,7 @@
if (match(reader, WSDL_NS, PORT)) {
QName name = attributeAsQName(reader, null, NAME, targetNS);
QName binding = attributeAsQName(reader, null, BINDING, targetNS);
- WSDLPortMetaData pmd = parsePort(reader);
+ WSDLPortMetaData pmd = parsePort(reader, wsdlUrl);
pmd.setName(name);
pmd.setBindingName(binding);
smd.getPorts().put(pmd.getName(), pmd);
@@ -209,10 +206,10 @@
}
}
}
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "REACHED_END_OF_XML_DOCUMENT_UNEXPECTEDLY"));
+ throw MESSAGES.reachedEndOfXMLDocUnexpectedly(wsdlUrl.toExternalForm());
}
- private static WSDLPortMetaData parsePort(XMLStreamReader reader) throws XMLStreamException
+ private static WSDLPortMetaData parsePort(XMLStreamReader reader, URL wsdlUrl) throws XMLStreamException
{
WSDLPortMetaData pmd = new WSDLPortMetaData();
while (reader.hasNext())
@@ -236,10 +233,10 @@
}
}
}
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "REACHED_END_OF_XML_DOCUMENT_UNEXPECTEDLY"));
+ throw MESSAGES.reachedEndOfXMLDocUnexpectedly(wsdlUrl.toExternalForm());
}
- private static WSDLBindingMetaData parseBinding(XMLStreamReader reader) throws XMLStreamException
+ private static WSDLBindingMetaData parseBinding(XMLStreamReader reader, URL wsdlUrl) throws XMLStreamException
{
WSDLBindingMetaData bmd = new WSDLBindingMetaData();
while (reader.hasNext())
@@ -263,7 +260,7 @@
}
}
}
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "REACHED_END_OF_XML_DOCUMENT_UNEXPECTEDLY"));
+ throw MESSAGES.reachedEndOfXMLDocUnexpectedly(wsdlUrl.toExternalForm());
}
private static class WSDLMetaData
Modified: common/trunk/src/main/java/org/jboss/ws/common/deployment/URLPatternDeploymentAspect.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/deployment/URLPatternDeploymentAspect.java 2012-09-21 12:47:11 UTC (rev 16751)
+++ common/trunk/src/main/java/org/jboss/ws/common/deployment/URLPatternDeploymentAspect.java 2012-09-21 15:48:32 UTC (rev 16752)
@@ -24,13 +24,12 @@
import static org.jboss.ws.common.integration.WSHelper.isEjbEndpoint;
import static org.jboss.ws.common.integration.WSHelper.isJseEndpoint;
-import java.util.ResourceBundle;
import java.util.StringTokenizer;
import javax.jws.WebService;
import org.jboss.ws.api.annotation.WebContext;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.common.Messages;
import org.jboss.ws.common.integration.AbstractDeploymentAspect;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Endpoint;
@@ -47,8 +46,6 @@
*/
public class URLPatternDeploymentAspect extends AbstractDeploymentAspect
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(URLPatternDeploymentAspect.class);
-
@Override
public void start(Deployment dep)
{
@@ -85,7 +82,7 @@
String epName = ep.getShortName();
urlPattern = webMetaData.getServletMappings().get(epName);
if (urlPattern == null)
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "CANNOT_OBTAIN_SERVLET_MAPPING_FOR", epName));
+ throw Messages.MESSAGES.cannotObtainServletMapping(epName);
}
// #2 Use the explicit urlPattern from port-component/port-component-uri
Modified: common/trunk/src/main/java/org/jboss/ws/common/deployment/VirtualHostDeploymentAspect.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/deployment/VirtualHostDeploymentAspect.java 2012-09-21 12:47:11 UTC (rev 16751)
+++ common/trunk/src/main/java/org/jboss/ws/common/deployment/VirtualHostDeploymentAspect.java 2012-09-21 15:48:32 UTC (rev 16752)
@@ -24,10 +24,8 @@
import static org.jboss.ws.common.integration.WSHelper.isJaxwsEjbDeployment;
-import java.util.ResourceBundle;
-
import org.jboss.ws.api.annotation.WebContext;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.common.Messages;
import org.jboss.ws.common.integration.AbstractDeploymentAspect;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Endpoint;
@@ -40,8 +38,6 @@
*/
public final class VirtualHostDeploymentAspect extends AbstractDeploymentAspect
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(VirtualHostDeploymentAspect.class);
-
@Override
public void start(Deployment dep)
{
@@ -71,7 +67,7 @@
{
if (!currentVirtualHost.equals(virtualHost))
{
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "VIRTUALHOST_MUST_BE_THE_SAME_FOR_ALL_DEPLOYED_ENDPOINTS"));
+ throw Messages.MESSAGES.virtualHostMustBeTheSameForAllEndpoints(dep.getSimpleName());
}
}
}
Modified: common/trunk/src/main/java/org/jboss/ws/common/injection/InjectionException.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/injection/InjectionException.java 2012-09-21 12:47:11 UTC (rev 16751)
+++ common/trunk/src/main/java/org/jboss/ws/common/injection/InjectionException.java 2012-09-21 15:48:32 UTC (rev 16752)
@@ -21,10 +21,8 @@
*/
package org.jboss.ws.common.injection;
-import java.util.ResourceBundle;
+import org.jboss.ws.common.Loggers;
-import org.jboss.logging.Logger;
-import org.jboss.ws.api.util.BundleUtils;
/**
* Represents generic injection error.
@@ -33,16 +31,10 @@
*/
public class InjectionException extends RuntimeException
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(InjectionException.class);
-
/**
* Serial version UID.
*/
private static final long serialVersionUID = 1L;
- /**
- * Logger.
- */
- private static final Logger LOG = Logger.getLogger(InjectionException.class);
/**
* Constructor.
@@ -103,10 +95,10 @@
{
if (reason == null)
{
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "REASON_EXPECTED"));
+ throw new IllegalArgumentException();
}
- LOG.error(message == null ? reason.getMessage() : message, reason);
+ Loggers.ROOT_LOGGER.error(message == null ? reason.getMessage() : message, reason);
throw new InjectionException(message, reason);
}
Modified: common/trunk/src/main/java/org/jboss/ws/common/injection/InjectionHelper.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/injection/InjectionHelper.java 2012-09-21 12:47:11 UTC (rev 16751)
+++ common/trunk/src/main/java/org/jboss/ws/common/injection/InjectionHelper.java 2012-09-21 15:48:32 UTC (rev 16752)
@@ -24,12 +24,9 @@
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.Collection;
-import java.util.ResourceBundle;
import javax.xml.ws.WebServiceContext;
-import org.jboss.logging.Logger;
-import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.injection.finders.PostConstructMethodFinder;
import org.jboss.ws.common.injection.finders.PreDestroyMethodFinder;
import org.jboss.ws.common.injection.finders.ResourceFieldFinder;
@@ -43,10 +40,6 @@
*/
public final class InjectionHelper
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(InjectionHelper.class);
-
- private static final Logger LOG = Logger.getLogger(InjectionHelper.class);
-
private static final ClassProcessor<Method> POST_CONSTRUCT_METHOD_FINDER = new PostConstructMethodFinder();
private static final ClassProcessor<Method> PRE_DESTROY_METHOD_FINDER = new PreDestroyMethodFinder();
private static final ClassProcessor<Method> WEB_SERVICE_CONTEXT_METHOD_FINDER = new ResourceMethodFinder(WebServiceContext.class, true);
@@ -111,15 +104,13 @@
public static void callPostConstructMethod(final Object instance)
{
if (instance == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "OBJECT_INSTANCE_CANNOT_BE_NULL"));
+ throw new IllegalArgumentException();
final Collection<Method> methods = POST_CONSTRUCT_METHOD_FINDER.process(instance.getClass());
if (methods.size() > 0)
{
final Method method = methods.iterator().next();
- if (LOG.isTraceEnabled())
- LOG.trace("Calling @PostConstruct annotated method: " + method);
try
{
invokeMethod(instance, method, null);
@@ -142,15 +133,13 @@
public static void callPreDestroyMethod(final Object instance)
{
if (instance == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "OBJECT_INSTANCE_CANNOT_BE_NULL"));
+ throw new IllegalArgumentException();
final Collection<Method> methods = PRE_DESTROY_METHOD_FINDER.process(instance.getClass());
if (methods.size() > 0)
{
final Method method = methods.iterator().next();
- if (LOG.isTraceEnabled())
- LOG.trace("Calling @PreDestroy annotated method: " + method);
try
{
invokeMethod(instance, method, null);
Deleted: common/trunk/src/main/java/org/jboss/ws/common/injection/Message.properties
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/injection/Message.properties 2012-09-21 12:47:11 UTC (rev 16751)
+++ common/trunk/src/main/java/org/jboss/ws/common/injection/Message.properties 2012-09-21 15:48:32 UTC (rev 16752)
@@ -1,2 +0,0 @@
-REASON_EXPECTED=Reason expected
-OBJECT_INSTANCE_CANNOT_BE_NULL=Object instance cannot be null
Deleted: common/trunk/src/main/java/org/jboss/ws/common/injection/finders/Message.properties
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/injection/finders/Message.properties 2012-09-21 12:47:11 UTC (rev 16751)
+++ common/trunk/src/main/java/org/jboss/ws/common/injection/finders/Message.properties 2012-09-21 15:48:32 UTC (rev 16752)
@@ -1,15 +0,0 @@
-METHOD_CANNOT_DECLARE_PRIMITIVE_PARAMETERS=Method {0} can't declare primitive parameters: {1}
-FIELD_CANNOT_BE_OF_PRIMITIVE_TYPE=Field {0} can't be of primitive type: {1}
-METHOD_HAVE_TO_HAVE_NO_PARAMETERS=Method {0} have to have no parameters: {1}
-METHOD_HAVE_TO_RETURN_VOID=Method {0} have to return void: {1}
-FIELD_CANNOT_BE_OF_VOID_TYPE=Field {0} cannot be of void type: {1}
-METHOD_CANNOT_THROW_CHECKED_EXCEPTIONS=Method {0} cannot throw checked exceptions: {1}
-METHOD_CANNOT_BE_STATIC=Method {0} cannot be static: {1}
-FIELD_CANNOT_BE_STATIC=Field {0} cannot be static: {1}
-FIELD_CANNOT_BE_FINAL=Field {0} cannot be final: {1}
-METHOD_HAVE_TO_DECLARE_EXACTLY_ONE_PARAMETER=Method {0} have to declare exactly one parameter: {1}
-METHOD_DOESN'T_FOLLOW_JAVA_BEANS_SETTER_METHOD_NAME=Method {0} doesn't follow Java Beans setter method name: {1}
-ONLY_ONE_METHOD_CAN_EXIST=Only one method {0} can exist
-INJECTION_METADATA_CANNOT_BE_NULL=Injection metadata cannot be null
-MORE_THAN_ONE_FIELD_FOUND_MATCHING_THE_CRITERIA=More than one field found matching the criteria: {0}
-MORE_THAN_ONE_METHOD_FOUND_MATCHING_THE_CRITERIA=More than one method found matching the criteria: {0}
Modified: common/trunk/src/main/java/org/jboss/ws/common/injection/finders/ReflectionUtils.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/injection/finders/ReflectionUtils.java 2012-09-21 12:47:11 UTC (rev 16751)
+++ common/trunk/src/main/java/org/jboss/ws/common/injection/finders/ReflectionUtils.java 2012-09-21 15:48:32 UTC (rev 16752)
@@ -21,16 +21,14 @@
*/
package org.jboss.ws.common.injection.finders;
+import static org.jboss.ws.common.Messages.MESSAGES;
+
import java.lang.annotation.Annotation;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.Collection;
-import java.util.ResourceBundle;
-import org.jboss.ws.api.util.BundleUtils;
-import org.jboss.ws.common.injection.InjectionException;
-
/**
* Reflection utility class.
*
@@ -38,8 +36,6 @@
*/
final class ReflectionUtils
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(ReflectionUtils.class);
-
/**
* Constructor.
*/
@@ -60,7 +56,7 @@
{
if (type.isPrimitive())
{
- throw new InjectionException(BundleUtils.getMessage(bundle, "METHOD_CANNOT_DECLARE_PRIMITIVE_PARAMETERS", new Object[]{ getAnnotationMessage(annotation) , method}));
+ throw annotation == null ? MESSAGES.methodCannotDeclarePrimitiveParameters(method) : MESSAGES.methodCannotDeclarePrimitiveParameters2(method, annotation);
}
}
}
@@ -85,7 +81,7 @@
{
if (field.getType().isPrimitive())
{
- throw new InjectionException(BundleUtils.getMessage(bundle, "FIELD_CANNOT_BE_OF_PRIMITIVE_TYPE", new Object[]{ getAnnotationMessage(annotation) , field}));
+ throw annotation == null ? MESSAGES.fieldCannotBeOfPrimitiveOrVoidType(field) : MESSAGES.fieldCannotBeOfPrimitiveOrVoidType2(field, annotation);
}
}
@@ -109,7 +105,7 @@
{
if (method.getParameterTypes().length != 0)
{
- throw new InjectionException(BundleUtils.getMessage(bundle, "METHOD_HAVE_TO_HAVE_NO_PARAMETERS", new Object[]{ getAnnotationMessage(annotation) , method}));
+ throw annotation == null ? MESSAGES.methodHasToHaveNoParameters(method) : MESSAGES.methodHasToHaveNoParameters2(method, annotation);
}
}
@@ -133,7 +129,7 @@
{
if ((!method.getReturnType().equals(Void.class)) && (!method.getReturnType().equals(Void.TYPE)))
{
- throw new InjectionException(BundleUtils.getMessage(bundle, "METHOD_HAVE_TO_RETURN_VOID", new Object[]{ getAnnotationMessage(annotation) , method}));
+ throw annotation == null ? MESSAGES.methodHasToReturnVoid(method) : MESSAGES.methodHasToReturnVoid2(method, annotation);
}
}
@@ -157,7 +153,7 @@
{
if ((field.getClass().equals(Void.class)) && (field.getClass().equals(Void.TYPE)))
{
- throw new InjectionException(BundleUtils.getMessage(bundle, "FIELD_CANNOT_BE_OF_VOID_TYPE", new Object[]{ getAnnotationMessage(annotation) , field}));
+ throw annotation == null ? MESSAGES.fieldCannotBeOfPrimitiveOrVoidType(field) : MESSAGES.fieldCannotBeOfPrimitiveOrVoidType2(field, annotation);
}
}
@@ -185,7 +181,7 @@
Class<?> exception = declaredExceptions[i];
if (!exception.isAssignableFrom(RuntimeException.class))
{
- throw new InjectionException(BundleUtils.getMessage(bundle, "METHOD_CANNOT_THROW_CHECKED_EXCEPTIONS", new Object[]{ getAnnotationMessage(annotation) , method}));
+ throw annotation == null ? MESSAGES.methodCannotThrowCheckedException(method) : MESSAGES.methodCannotThrowCheckedException2(method, annotation);
}
}
}
@@ -210,7 +206,7 @@
{
if (Modifier.isStatic(method.getModifiers()))
{
- throw new InjectionException(BundleUtils.getMessage(bundle, "METHOD_CANNOT_BE_STATIC", new Object[]{ getAnnotationMessage(annotation) , method}));
+ throw annotation == null ? MESSAGES.methodCannotBeStatic(method) : MESSAGES.methodCannotBeStatic2(method, annotation);
}
}
@@ -234,7 +230,7 @@
{
if (Modifier.isStatic(field.getModifiers()))
{
- throw new InjectionException(BundleUtils.getMessage(bundle, "FIELD_CANNOT_BE_STATIC", new Object[]{ getAnnotationMessage(annotation) , field}));
+ throw annotation == null ? MESSAGES.fieldCannotBeStaticOrFinal(field) : MESSAGES.fieldCannotBeStaticOrFinal2(field, annotation);
}
}
@@ -258,7 +254,7 @@
{
if (Modifier.isFinal(field.getModifiers()))
{
- throw new InjectionException(BundleUtils.getMessage(bundle, "FIELD_CANNOT_BE_FINAL", new Object[]{ getAnnotationMessage(annotation) , field}));
+ throw annotation == null ? MESSAGES.fieldCannotBeStaticOrFinal(field) : MESSAGES.fieldCannotBeStaticOrFinal2(field, annotation);
}
}
@@ -282,7 +278,7 @@
{
if (method.getParameterTypes().length != 1)
{
- throw new InjectionException(BundleUtils.getMessage(bundle, "METHOD_HAVE_TO_DECLARE_EXACTLY_ONE_PARAMETER", new Object[]{ getAnnotationMessage(annotation) , method}));
+ throw annotation == null ? MESSAGES.methodHasToDeclareExactlyOneParameter(method) : MESSAGES.methodHasToDeclareExactlyOneParameter2(method, annotation);
}
}
@@ -311,7 +307,7 @@
if (!correctMethodNameLength || !isSetterMethodName || !isUpperCasedPropertyName)
{
- throw new InjectionException(BundleUtils.getMessage(bundle, "METHOD_DOESN'T_FOLLOW_JAVA_BEANS_SETTER_METHOD_NAME", new Object[]{ getAnnotationMessage(annotation) , method}));
+ throw annotation == null ? MESSAGES.methodDoesNotRespectJavaBeanSetterMethodName(method) : MESSAGES.methodDoesNotRespectJavaBeanSetterMethodName2(method, annotation);
}
}
@@ -335,7 +331,7 @@
{
if (methods.size() > 1)
{
- throw new InjectionException(BundleUtils.getMessage(bundle, "ONLY_ONE_METHOD_CAN_EXIST", getAnnotationMessage(annotation) ));
+ throw annotation == null ? MESSAGES.onlyOneMethodCanExist() : MESSAGES.onlyOneMethodCanExist2(annotation);
}
}
@@ -349,15 +345,4 @@
assertOnlyOneMethod(methods, null);
}
- /**
- * Constructs annotation message. If annotation class is null it returns empty string.
- *
- * @param annotation to construct message for
- * @return annotation message or empty string
- */
- private static String getAnnotationMessage(Class<? extends Annotation> annotation)
- {
- return annotation == null ? "" : "annotated with @" + annotation + " annotation ";
- }
-
}
Modified: common/trunk/src/main/java/org/jboss/ws/common/injection/resolvers/AbstractReferenceResolver.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/injection/resolvers/AbstractReferenceResolver.java 2012-09-21 12:47:11 UTC (rev 16751)
+++ common/trunk/src/main/java/org/jboss/ws/common/injection/resolvers/AbstractReferenceResolver.java 2012-09-21 15:48:32 UTC (rev 16752)
@@ -25,9 +25,8 @@
import java.lang.reflect.AccessibleObject;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
-import java.util.ResourceBundle;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.common.Messages;
import org.jboss.ws.common.injection.ReferenceResolver;
/**
@@ -42,8 +41,6 @@
public abstract class AbstractReferenceResolver<A extends Annotation>
implements ReferenceResolver
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(AbstractReferenceResolver.class);
-
/**
* Resolved annotation.
*/
@@ -58,7 +55,7 @@
if (annotationClass == null)
{
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "ANNOTATION_CLASS_CANNOT_BE_NULL"));
+ throw Messages.MESSAGES.annotationClassCannotBeNull();
}
this.annotationClass = annotationClass;
@@ -71,7 +68,7 @@
{
if (!this.canResolve(accessibleObject))
{
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "CANNOT_RESOLVE", accessibleObject));
+ throw Messages.MESSAGES.cannotResolve(accessibleObject);
}
if (accessibleObject.getClass().equals(Method.class))
@@ -123,7 +120,7 @@
{
if (accessibleObject == null)
{
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "ACCESSIBLEOBJECT_CANNOT_BE_NULL"));
+ throw Messages.MESSAGES.accessibleObjectClassCannotBeNull();
}
}
Deleted: common/trunk/src/main/java/org/jboss/ws/common/injection/resolvers/Message.properties
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/injection/resolvers/Message.properties 2012-09-21 12:47:11 UTC (rev 16751)
+++ common/trunk/src/main/java/org/jboss/ws/common/injection/resolvers/Message.properties 2012-09-21 15:48:32 UTC (rev 16752)
@@ -1,3 +0,0 @@
-ANNOTATION_CLASS_CANNOT_BE_NULL=Annotation class cannot be null
-CANNOT_RESOLVE=Cannot resolve: {0}
-ACCESSIBLEOBJECT_CANNOT_BE_NULL=AccessibleObject cannot be null
Modified: common/trunk/src/main/java/org/jboss/ws/common/integration/AbstractDeploymentAspect.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/integration/AbstractDeploymentAspect.java 2012-09-21 12:47:11 UTC (rev 16751)
+++ common/trunk/src/main/java/org/jboss/ws/common/integration/AbstractDeploymentAspect.java 2012-09-21 15:48:32 UTC (rev 16752)
@@ -26,7 +26,6 @@
import java.util.Set;
import java.util.StringTokenizer;
-import org.jboss.logging.Logger;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.DeploymentAspect;
@@ -39,9 +38,6 @@
*/
public class AbstractDeploymentAspect implements DeploymentAspect
{
- // provide logging
- protected final Logger log = Logger.getLogger(getClass());
-
private String provides;
private String requires;
private int relativeOrder;
Deleted: common/trunk/src/main/java/org/jboss/ws/common/integration/Message.properties
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/integration/Message.properties 2012-09-21 12:47:11 UTC (rev 16751)
+++ common/trunk/src/main/java/org/jboss/ws/common/integration/Message.properties 2012-09-21 15:48:32 UTC (rev 16752)
@@ -1 +0,0 @@
-CAN_NOT_FIND_ATTACHMENT=Cannot find attachment in webservice deployment :{0}
Modified: common/trunk/src/main/java/org/jboss/ws/common/integration/WSHelper.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/integration/WSHelper.java 2012-09-21 12:47:11 UTC (rev 16751)
+++ common/trunk/src/main/java/org/jboss/ws/common/integration/WSHelper.java 2012-09-21 15:48:32 UTC (rev 16752)
@@ -21,17 +21,14 @@
*/
package org.jboss.ws.common.integration;
-import java.util.ResourceBundle;
-
+import static org.jboss.wsf.spi.deployment.DeploymentType.JAXRPC;
+import static org.jboss.wsf.spi.deployment.DeploymentType.JAXWS;
import static org.jboss.wsf.spi.deployment.EndpointType.JAXRPC_EJB21;
import static org.jboss.wsf.spi.deployment.EndpointType.JAXRPC_JSE;
import static org.jboss.wsf.spi.deployment.EndpointType.JAXWS_EJB3;
import static org.jboss.wsf.spi.deployment.EndpointType.JAXWS_JSE;
-import static org.jboss.wsf.spi.deployment.DeploymentType.JAXWS;
-import static org.jboss.wsf.spi.deployment.DeploymentType.JAXRPC;
-import org.jboss.logging.Logger;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.common.Messages;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.deployment.EndpointTypeFilter;
@@ -41,12 +38,8 @@
*
* @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
*/
-public final class WSHelper
-{
+public final class WSHelper {
- private static final ResourceBundle bundle = BundleUtils.getBundle(WSHelper.class);
- private static final Logger LOG = Logger.getLogger( WSHelper.class );
-
private static final EndpointTypeFilter JAXRPC_EJB_ENDPOINT_FILTER = new EndpointTypeFilterImpl( JAXRPC_EJB21 );
private static final EndpointTypeFilter JAXRPC_JSE_ENDPOINT_FILTER = new EndpointTypeFilterImpl( JAXRPC_JSE );
private static final EndpointTypeFilter JAXWS_EJB_ENDPOINT_FILTER = new EndpointTypeFilterImpl( JAXWS_EJB3 );
@@ -77,8 +70,7 @@
final A value = dep.getAttachment( key );
if ( value == null )
{
- LOG.error(BundleUtils.getMessage(bundle, "CAN_NOT_FIND_ATTACHMENT", key ));
- throw new IllegalStateException();
+ throw Messages.MESSAGES.cannotFindAttachmentInDeployment(key, dep.getSimpleName());
}
return value;
}
Modified: common/trunk/src/main/java/org/jboss/ws/common/invocation/AbstractInvocationHandler.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/invocation/AbstractInvocationHandler.java 2012-09-21 12:47:11 UTC (rev 16751)
+++ common/trunk/src/main/java/org/jboss/ws/common/invocation/AbstractInvocationHandler.java 2012-09-21 15:48:32 UTC (rev 16752)
@@ -40,9 +40,8 @@
public abstract class AbstractInvocationHandler extends InvocationHandler
{
- /** Logger. */
- protected final Logger log = Logger.getLogger(this.getClass());
-
+ protected final Logger log = Logger.getLogger(this.getClass()); //TODO! remove after having refactored the AbstractInvocationHandlerEJB3 in ASIL
+
/**
* Constructor.
*/
Modified: common/trunk/src/main/java/org/jboss/ws/common/invocation/AbstractInvocationHandlerJSE.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/invocation/AbstractInvocationHandlerJSE.java 2012-09-21 12:47:11 UTC (rev 16751)
+++ common/trunk/src/main/java/org/jboss/ws/common/invocation/AbstractInvocationHandlerJSE.java 2012-09-21 15:48:32 UTC (rev 16752)
@@ -22,13 +22,12 @@
package org.jboss.ws.common.invocation;
import java.lang.reflect.Method;
-import java.util.ResourceBundle;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.common.Loggers;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.invocation.Invocation;
@@ -40,8 +39,6 @@
*/
public abstract class AbstractInvocationHandlerJSE extends AbstractInvocationHandler
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(AbstractInvocationHandlerJSE.class);
-
private static final String POJO_JNDI_PREFIX = "java:comp/env/";
private volatile boolean initialized;
@@ -115,7 +112,7 @@
}
catch (Exception e)
{
- this.log.error(BundleUtils.getMessage(bundle, "METHOD_INVOCATION_FAILED_WITH_EXCEPTION", e.getMessage()), e);
+ Loggers.ROOT_LOGGER.methodInvocationFailed(e);
// propagate exception
this.handleInvocationException(e);
}
Modified: common/trunk/src/main/java/org/jboss/ws/common/invocation/InvocationHandlerJAXWS.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/invocation/InvocationHandlerJAXWS.java 2012-09-21 12:47:11 UTC (rev 16751)
+++ common/trunk/src/main/java/org/jboss/ws/common/invocation/InvocationHandlerJAXWS.java 2012-09-21 15:48:32 UTC (rev 16752)
@@ -59,7 +59,6 @@
if (!reference.isInitialized())
{
- this.log.debug("Calling postConstruct method on JAXWS JSE endpoint: " + targetBean);
InjectionHelper.callPostConstructMethod(targetBean);
reference.setInitialized();
}
Deleted: common/trunk/src/main/java/org/jboss/ws/common/invocation/Message.properties
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/invocation/Message.properties 2012-09-21 12:47:11 UTC (rev 16751)
+++ common/trunk/src/main/java/org/jboss/ws/common/invocation/Message.properties 2012-09-21 15:48:32 UTC (rev 16752)
@@ -1,3 +0,0 @@
-METHOD_INVOCATION_FAILED_WITH_EXCEPTION=Method invocation failed with exception: {0}
-UNABLE_TO_READ_FROM_THE_HTTP_SERVLET_REQUEST=Unable to read from the http servlet request: {0}
-CANNOT_TRACE_SOAPMESSAGE=Cannot trace SOAPMessage
Modified: common/trunk/src/main/java/org/jboss/ws/common/invocation/RecordingServerHandler.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/invocation/RecordingServerHandler.java 2012-09-21 12:47:11 UTC (rev 16751)
+++ common/trunk/src/main/java/org/jboss/ws/common/invocation/RecordingServerHandler.java 2012-09-21 15:48:32 UTC (rev 16752)
@@ -21,13 +21,13 @@
*/
package org.jboss.ws.common.invocation;
+import static org.jboss.ws.common.Loggers.MONITORING_LOGGER;
import java.net.URL;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
-import java.util.ResourceBundle;
import javax.servlet.http.HttpServletRequest;
import javax.xml.namespace.QName;
@@ -36,13 +36,11 @@
import javax.xml.ws.handler.MessageContext;
import javax.xml.ws.handler.soap.SOAPMessageContext;
-import org.jboss.logging.Logger;
import org.jboss.ws.api.handler.GenericSOAPHandler;
import org.jboss.ws.api.monitoring.Record;
import org.jboss.ws.api.monitoring.Record.MessageType;
import org.jboss.ws.api.monitoring.RecordGroupAssociation;
import org.jboss.ws.api.monitoring.RecordProcessor;
-import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.DOMWriter;
import org.jboss.ws.common.monitoring.RecordFactory;
import org.jboss.wsf.spi.deployment.Endpoint;
@@ -59,10 +57,6 @@
*/
public class RecordingServerHandler extends GenericSOAPHandler
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(RecordingServerHandler.class);
- // provide logging
- private static Logger log = Logger.getLogger(RecordingServerHandler.class);
-
@SuppressWarnings("unchecked")
protected boolean handleInbound(MessageContext ctx)
{
@@ -82,7 +76,7 @@
}
catch (Exception e)
{
- log.warn(BundleUtils.getMessage(bundle, "UNABLE_TO_READ_FROM_THE_HTTP_SERVLET_REQUEST", e.getMessage()));
+ MONITORING_LOGGER.unableToReadFromHttpServletRequest(e);
}
}
record.setHeaders((Map<String,List<String>>)(ctx.get(MessageContext.HTTP_REQUEST_HEADERS)));
@@ -106,7 +100,7 @@
}
catch (SOAPException ex)
{
- log.error(BundleUtils.getMessage(bundle, "CANNOT_TRACE_SOAPMESSAGE"), ex);
+ MONITORING_LOGGER.cannotTraceSoapMessage(ex);
}
}
endpoint.processRecord(record);
@@ -144,7 +138,7 @@
}
catch (SOAPException ex)
{
- log.error(BundleUtils.getMessage(bundle, "CANNOT_TRACE_SOAPMESSAGE"), ex);
+ MONITORING_LOGGER.cannotTraceSoapMessage(ex);
}
}
endpoint.processRecord(record);
Modified: common/trunk/src/main/java/org/jboss/ws/common/management/AbstractServerConfig.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/management/AbstractServerConfig.java 2012-09-21 12:47:11 UTC (rev 16751)
+++ common/trunk/src/main/java/org/jboss/ws/common/management/AbstractServerConfig.java 2012-09-21 15:48:32 UTC (rev 16752)
@@ -21,19 +21,18 @@
*/
package org.jboss.ws.common.management;
+import static org.jboss.ws.common.Loggers.MANAGEMENT_LOGGER;
+
import java.net.Inet6Address;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
-import java.util.ResourceBundle;
import javax.management.MBeanServer;
import javax.management.ObjectName;
-import org.jboss.logging.Logger;
-import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.ObjectNameFactory;
import org.jboss.wsf.spi.SPIProvider;
import org.jboss.wsf.spi.SPIProviderResolver;
@@ -57,9 +56,6 @@
*/
public abstract class AbstractServerConfig implements AbstractServerConfigMBean, ServerConfig
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(AbstractServerConfig.class);
- private static final Logger log = Logger.getLogger(AbstractServerConfig.class);
-
protected static final ObjectName OBJECT_NAME_SERVER_CONFIG;
static
{
@@ -102,13 +98,13 @@
{
if (host == null || host.trim().length() == 0)
{
- log.debug("Using undefined host: " + UNDEFINED_HOSTNAME);
+ MANAGEMENT_LOGGER.usingUndefinedWebServicesHost(UNDEFINED_HOSTNAME);
host = UNDEFINED_HOSTNAME;
}
if ("0.0.0.0".equals(host))
{
InetAddress localHost = InetAddress.getLocalHost();
- log.debug("Using local host: " + localHost.getHostName());
+ if (MANAGEMENT_LOGGER.isDebugEnabled()) MANAGEMENT_LOGGER.usingLocalHostWebServicesHost(localHost.getHostName());
host = localHost.getHostName();
}
this.webServiceHost = toIPv6URLFormat("127.0.0.1".equals(host) ? "localhost" : host); // TCK workaround
@@ -123,7 +119,7 @@
}
catch (UnknownHostException e)
{
- log.debug(BundleUtils.getMessage(bundle, "COULD_NOT_GET_ADDRESS_FOR_HOST", host), e);
+ MANAGEMENT_LOGGER.couldNotGetAddressForHost(host, e);
//ignore, leave isIPv6Address to false
}
final boolean isIPv6Formatted = isIPv6Address && host.startsWith("[");
@@ -159,8 +155,7 @@
int localPort = webServicePort;
if (localPort <= 0)
{
- // Do not initialize webServicePort with the default, the connector port may become available later
- log.debug("Unable to calculate 'WebServicePort', using default '8080'");
+ if (MANAGEMENT_LOGGER.isDebugEnabled()) MANAGEMENT_LOGGER.unableToCalculateWebServicesPort("8080");
localPort = 8080;
}
@@ -175,8 +170,7 @@
int localPort = webServiceSecurePort;
if (localPort <= 0)
{
- // Do not initialize webServiceSecurePort with the default, the connector port may become available later
- log.debug("Unable to calculate 'WebServiceSecurePort', using default '8443'");
+ if (MANAGEMENT_LOGGER.isDebugEnabled()) MANAGEMENT_LOGGER.unableToCalculateWebServicesSecurePort("8443");
localPort = 8443;
}
@@ -194,7 +188,7 @@
}
catch (WSFException e)
{
- log.warn(BundleUtils.getMessage(bundle, "COULD_NOT_GET_WEBSERVERINFO"));
+ MANAGEMENT_LOGGER.couldNotGetPortFromConfiguredHTTPConnector();
}
return port;
}
@@ -206,7 +200,7 @@
SPIProvider spiProvider = SPIProviderResolver.getInstance(cl).getProvider();
this.stackConfig = spiProvider.getSPI(StackConfigFactory.class, cl).getStackConfig();
- log.info(getImplementationTitle() + ' ' + getImplementationVersion());
+ MANAGEMENT_LOGGER.startingWSServerConfig(getImplementationTitle(), getImplementationVersion());
MBeanServer mbeanServer = getMbeanServer();
if (mbeanServer != null) {
mbeanServer.registerMBean(this, AbstractServerConfigMBean.OBJECT_NAME);
Modified: common/trunk/src/main/java/org/jboss/ws/common/management/DefaultEndpointRegistry.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/management/DefaultEndpointRegistry.java 2012-09-21 12:47:11 UTC (rev 16751)
+++ common/trunk/src/main/java/org/jboss/ws/common/management/DefaultEndpointRegistry.java 2012-09-21 15:48:32 UTC (rev 16752)
@@ -21,15 +21,15 @@
*/
package org.jboss.ws.common.management;
+import static org.jboss.ws.common.Loggers.MANAGEMENT_LOGGER;
+import static org.jboss.ws.common.Messages.MESSAGES;
+
import java.util.Map;
-import java.util.ResourceBundle;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import javax.management.ObjectName;
-import org.jboss.logging.Logger;
-import org.jboss.ws.api.util.BundleUtils;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.management.EndpointRegistry;
import org.jboss.wsf.spi.management.EndpointResolver;
@@ -44,19 +44,15 @@
*/
public class DefaultEndpointRegistry implements EndpointRegistry
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(DefaultEndpointRegistry.class);
- // provide logging
- private static final Logger log = Logger.getLogger(DefaultEndpointRegistry.class);
-
private Map<ObjectName, Endpoint> endpoints = new ConcurrentHashMap<ObjectName, Endpoint>();
public Endpoint getEndpoint(ObjectName epName)
{
if (epName == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "ENDPOINT_NAME_CANNOT_BE_NULL"));
+ throw MESSAGES.endpointNameCannotBeNull();
if (isRegistered(epName) == false)
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "ENDPOINT_NOT_REGISTERED", epName));
+ throw MESSAGES.endpointNotRegistered(epName);
Endpoint endpoint = endpoints.get(epName);
return endpoint;
@@ -70,7 +66,7 @@
public boolean isRegistered(ObjectName epName)
{
if (epName == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "ENDPOINT_NAME_CANNOT_BE_NULL"));
+ throw MESSAGES.endpointNameCannotBeNull();
return endpoints.get(epName) != null;
}
@@ -83,29 +79,29 @@
public void register(Endpoint endpoint)
{
if (endpoint == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "ENDPOINT_CANNOT_BE_NULL"));
+ throw MESSAGES.cannotRegisterUnregisterNullEndpoint();
ObjectName epName = endpoint.getName();
if (epName == null)
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "ENDPOINT_NAME_CANNOT_BE_NULL_FOR", endpoint));
+ throw MESSAGES.cannotRegisterEndpointWithNullName(endpoint.getName());
if (isRegistered(epName))
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "ENDPOINT_ALREADY_REGISTERED", epName));
+ throw MESSAGES.endpointAlreadyRegistered(epName);
- log.info("register: " + epName);
+ MANAGEMENT_LOGGER.endpointRegistered(epName);
endpoints.put(epName, endpoint);
}
public void unregister(Endpoint endpoint)
{
if (endpoint == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "ENDPOINT_CANNOT_BE_NULL"));
+ throw MESSAGES.cannotRegisterUnregisterNullEndpoint();
ObjectName epName = endpoint.getName();
if (isRegistered(epName) == false)
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "ENDPOINT_NOT_REGISTERED", epName));
+ throw MESSAGES.endpointNotRegistered(epName);
- log.info("remove: " + epName);
+ MANAGEMENT_LOGGER.endpointUnregistered(epName);
endpoints.remove(epName);
}
}
Modified: common/trunk/src/main/java/org/jboss/ws/common/management/ManagedEndpoint.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/management/ManagedEndpoint.java 2012-09-21 12:47:11 UTC (rev 16751)
+++ common/trunk/src/main/java/org/jboss/ws/common/management/ManagedEndpoint.java 2012-09-21 15:48:32 UTC (rev 16752)
@@ -21,17 +21,17 @@
*/
package org.jboss.ws.common.management;
+import static org.jboss.ws.common.Loggers.MANAGEMENT_LOGGER;
+
import java.util.Date;
import java.util.List;
-import java.util.ResourceBundle;
import javax.management.JMException;
import javax.management.MBeanServer;
+import javax.management.ObjectName;
-import org.jboss.logging.Logger;
import org.jboss.ws.api.monitoring.Record;
import org.jboss.ws.api.monitoring.RecordProcessor;
-import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.ObjectNameFactory;
import org.jboss.ws.common.monitoring.ManagedRecordProcessor;
import org.jboss.wsf.spi.deployment.Endpoint;
@@ -45,10 +45,8 @@
*/
public class ManagedEndpoint implements ManagedEndpointMBean
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(ManagedEndpoint.class);
private Endpoint endpoint;
private MBeanServer mbeanServer;
- private Logger log = Logger.getLogger(this.getClass());
public ManagedEndpoint(Endpoint endpoint, MBeanServer mbeanServer)
{
@@ -132,21 +130,22 @@
public void addRecordProcessor(RecordProcessor processor)
{
+ ObjectName on = ObjectNameFactory.create(endpoint.getName() + ",recordProcessor=" + processor.getName());
this.getRecordProcessors().add(processor);
try
{
- mbeanServer.registerMBean(processor, ObjectNameFactory.create(endpoint.getName() + ",recordProcessor=" + processor.getName()));
+ mbeanServer.registerMBean(processor, on);
}
catch (JMException ex)
{
- log.debug("Cannot register endpoint with JMX server, trying with the default ManagedRecordProcessor: " + ex.getMessage());
+ MANAGEMENT_LOGGER.cannotRegisterProvidedProcessor(on, ex);
try
{
- mbeanServer.registerMBean(new ManagedRecordProcessor(processor), ObjectNameFactory.create(endpoint.getName() + ",recordProcessor=" + processor.getName()));
+ mbeanServer.registerMBean(new ManagedRecordProcessor(processor), on);
}
catch (JMException innerEx)
{
- log.error(BundleUtils.getMessage(bundle, "CANNOT_REGISTER_ENDPOINT_WITH_JMX_SERVER"), innerEx);
+ MANAGEMENT_LOGGER.cannotRegisterProcessorWithJmxServer(on, innerEx);
}
}
}
@@ -159,35 +158,37 @@
public void setRecordProcessors(List<RecordProcessor> processors)
{
//unregister current processors
- for (RecordProcessor processor : processors)
+ for (RecordProcessor processor : endpoint.getRecordProcessors())
{
+ final ObjectName on = ObjectNameFactory.create(endpoint.getName() + ",recordProcessor=" + processor.getName());
try
{
- mbeanServer.unregisterMBean(ObjectNameFactory.create(endpoint.getName() + ",recordProcessor=" + processor.getName()));
+ mbeanServer.unregisterMBean(on);
}
catch (JMException ex)
{
- log.error(BundleUtils.getMessage(bundle, "CANNOT_UNREGISTER_RECORD_PROCESSOR_WITH_JMX_SERVER"), ex);
+ MANAGEMENT_LOGGER.cannotUnregisterProcessorWithJmxServer(on, ex);
}
}
//set and register the new processors
endpoint.setRecordProcessors(processors);
for (RecordProcessor processor : processors)
{
+ final ObjectName on = ObjectNameFactory.create(endpoint.getName() + ",recordProcessor=" + processor.getName());
try
{
- mbeanServer.registerMBean(processor, ObjectNameFactory.create(endpoint.getName() + ",recordProcessor=" + processor.getName()));
+ mbeanServer.registerMBean(processor, on);
}
catch (JMException ex)
{
- log.debug("Cannot register endpoint with JMX server, trying with the default ManagedRecordProcessor: " + ex.getMessage());
+ MANAGEMENT_LOGGER.cannotRegisterProvidedProcessor(on, ex);
try
{
- mbeanServer.registerMBean(new ManagedRecordProcessor(processor), ObjectNameFactory.create(endpoint.getName() + ",recordProcessor=" + processor.getName()));
+ mbeanServer.registerMBean(new ManagedRecordProcessor(processor), on);
}
catch (JMException innerEx)
{
- log.error(BundleUtils.getMessage(bundle, "CANNOT_REGISTER_ENDPOINT_WITH_JMX_SERVER"), innerEx);
+ MANAGEMENT_LOGGER.cannotRegisterProcessorWithJmxServer(on, innerEx);
}
}
}
Modified: common/trunk/src/main/java/org/jboss/ws/common/management/ManagedEndpointRegistry.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/management/ManagedEndpointRegistry.java 2012-09-21 12:47:11 UTC (rev 16751)
+++ common/trunk/src/main/java/org/jboss/ws/common/management/ManagedEndpointRegistry.java 2012-09-21 15:48:32 UTC (rev 16752)
@@ -21,12 +21,11 @@
*/
package org.jboss.ws.common.management;
+import static org.jboss.ws.common.Loggers.MANAGEMENT_LOGGER;
+
import javax.management.JMException;
-import java.util.ResourceBundle;
-import org.jboss.ws.api.util.BundleUtils;
import javax.management.MBeanServer;
-import org.jboss.logging.Logger;
import org.jboss.wsf.spi.deployment.Endpoint;
/**
@@ -37,10 +36,6 @@
*/
public class ManagedEndpointRegistry extends DefaultEndpointRegistry implements ManagedEndpointRegistryMBean
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(ManagedEndpointRegistry.class);
- // provide logging
- private static final Logger log = Logger.getLogger(ManagedEndpointRegistry.class);
-
// The MBeanServer
private MBeanServer mbeanServer;
@@ -66,7 +61,7 @@
}
catch (Exception ex)
{
- log.error(BundleUtils.getMessage(bundle, "CANNOT_REGISTER_ENDPOINT_WITH_JMX_SERVER"), ex);
+ MANAGEMENT_LOGGER.cannotRegisterEndpointWithJmxServer(endpoint.getName(), ex);
}
}
@@ -79,11 +74,11 @@
if (getMbeanServer() != null)
getMbeanServer().unregisterMBean(endpoint.getName());
else
- log.warn(BundleUtils.getMessage(bundle, "MBEANSERVER_NOT_AVAILABLE"));
+ MANAGEMENT_LOGGER.cannotUnregisterDueToMBeanServerUnavailable();
}
catch (JMException ex)
{
- log.error(BundleUtils.getMessage(bundle, "CANNOT_UNREGISTER_ENDPOINT_WITH_JMX_SERVER"), ex);
+ MANAGEMENT_LOGGER.cannotUnregisterEndpointWithJmxServer(endpoint.getName(), ex);
}
}
@@ -97,7 +92,7 @@
public void destroy() throws Exception
{
- log.debug("Destroy service endpoint manager");
+ MANAGEMENT_LOGGER.destroyingServiceEndpointManager();
if (mbeanServer != null)
{
getMbeanServer().unregisterMBean(OBJECT_NAME);
Deleted: common/trunk/src/main/java/org/jboss/ws/common/management/Message.properties
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/management/Message.properties 2012-09-21 12:47:11 UTC (rev 16751)
+++ common/trunk/src/main/java/org/jboss/ws/common/management/Message.properties 2012-09-21 15:48:32 UTC (rev 16752)
@@ -1,13 +0,0 @@
-CANNOT_REGISTER_ENDPOINT_WITH_JMX_SERVER=Cannot register endpoint with JMX server
-CANNOT_UNREGISTER_RECORD_PROCESSOR_WITH_JMX_SERVER=Cannot unregister record processor with JMX server
-COULD_NOT_GET_ADDRESS_FOR_HOST=Could not get address for host: {0}
-FOUND_MULTIPLE_CONNECTORS=Found multiple connectors for protocol={0} and secure={1}, using first port found {2}
-CANNOT_REGISTER_ENDPOINT_WITH_JMX_SERVER=Cannot register endpoint with JMX server
-MBEANSERVER_NOT_AVAILABLE=MBeanServer not available, cannot unregister endpoint with JMX server
-CANNOT_UNREGISTER_ENDPOINT_WITH_JMX_SERVER=Cannot unregister endpoint with JMX server
-ENDPOINT_NAME_CANNOT_BE_NULL=Endpoint name cannot be null
-ENDPOINT_NOT_REGISTERED=Endpoint not registered: {0}
-ENDPOINT_CANNOT_BE_NULL=Endpoint cannot be null
-ENDPOINT_NAME_CANNOT_BE_NULL_FOR=Endpoint name cannot be null for: {0}
-ENDPOINT_ALREADY_REGISTERED=Endpoint already registered: {0}
-ENDPOINT_NOT_REGISTERED=Endpoint not registered: {0}
Modified: common/trunk/src/main/java/org/jboss/ws/common/monitoring/LogRecorder.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/monitoring/LogRecorder.java 2012-09-21 12:47:11 UTC (rev 16751)
+++ common/trunk/src/main/java/org/jboss/ws/common/monitoring/LogRecorder.java 2012-09-21 15:48:32 UTC (rev 16752)
@@ -24,12 +24,10 @@
import java.io.Serializable;
import java.util.List;
import java.util.Map;
-import java.util.ResourceBundle;
-import org.jboss.logging.Logger;
import org.jboss.ws.api.monitoring.Record;
import org.jboss.ws.api.monitoring.Record.MessageType;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.common.Loggers;
/**
* A simple record processor that writes records to the configured log.
@@ -39,11 +37,8 @@
*/
public class LogRecorder extends AbstractRecordProcessor implements Serializable
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(LogRecorder.class);
private static final long serialVersionUID = -7126227194320867819L;
- private Logger log = Logger.getLogger(this.getClass());
-
public LogRecorder()
{
this.name = "LogRecorder";
@@ -75,7 +70,6 @@
}
else
{
- log.warn(BundleUtils.getMessage(bundle, "UNKNOWN_MESSAGE_TYPE", record.getMessageType()));
if (this.isProcessSourceHost() && record.getSourceHost() != null)
{
sb.append("from ");
@@ -127,6 +121,6 @@
{
sb.append(record.getEnvelope());
}
- log.debug(sb.toString());
+ Loggers.MONITORING_LOGGER.debug(LogRecorder.class.getName(), sb.toString(), null);
}
}
Deleted: common/trunk/src/main/java/org/jboss/ws/common/monitoring/Message.properties
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/monitoring/Message.properties 2012-09-21 12:47:11 UTC (rev 16751)
+++ common/trunk/src/main/java/org/jboss/ws/common/monitoring/Message.properties 2012-09-21 15:48:32 UTC (rev 16752)
@@ -1 +0,0 @@
-UNKNOWN_MESSAGE_TYPE=Unknown message type: {0}
Modified: common/trunk/src/main/java/org/jboss/ws/common/reflection/AbstractAnnotatedClassProcessor.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/reflection/AbstractAnnotatedClassProcessor.java 2012-09-21 12:47:11 UTC (rev 16751)
+++ common/trunk/src/main/java/org/jboss/ws/common/reflection/AbstractAnnotatedClassProcessor.java 2012-09-21 15:48:32 UTC (rev 16752)
@@ -23,9 +23,8 @@
import java.lang.annotation.Annotation;
import java.lang.reflect.AccessibleObject;
-import java.util.ResourceBundle;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.common.Messages;
/**
* All annotation aware class processors should extend this class.
@@ -36,8 +35,6 @@
extends AbstractClassProcessor<AO>
implements AnnotationAware<A>
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(AbstractAnnotatedClassProcessor.class);
-
/**
* Annotation class.
*/
@@ -51,7 +48,7 @@
public AbstractAnnotatedClassProcessor(final Class<A> annotationClass)
{
if (annotationClass == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "ANNOTATION_CLASS_CANNOT_BE_NULL"));
+ throw Messages.MESSAGES.annotationClassCannotBeNull();
this.annotationClass = annotationClass;
}
Deleted: common/trunk/src/main/java/org/jboss/ws/common/reflection/Message.properties
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/reflection/Message.properties 2012-09-21 12:47:11 UTC (rev 16751)
+++ common/trunk/src/main/java/org/jboss/ws/common/reflection/Message.properties 2012-09-21 15:48:32 UTC (rev 16752)
@@ -1 +0,0 @@
-ANNOTATION_CLASS_CANNOT_BE_NULL=annotation class cannot be null
Modified: common/trunk/src/main/java/org/jboss/ws/common/serviceref/AbstractServiceObjectFactoryJAXWS.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/serviceref/AbstractServiceObjectFactoryJAXWS.java 2012-09-21 12:47:11 UTC (rev 16751)
+++ common/trunk/src/main/java/org/jboss/ws/common/serviceref/AbstractServiceObjectFactoryJAXWS.java 2012-09-21 15:48:32 UTC (rev 16752)
@@ -29,7 +29,6 @@
import java.util.Hashtable;
import java.util.LinkedList;
import java.util.List;
-import java.util.ResourceBundle;
import javax.naming.Context;
import javax.naming.Name;
@@ -43,7 +42,7 @@
import javax.xml.ws.soap.AddressingFeature;
import javax.xml.ws.soap.MTOMFeature;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.common.Messages;
import org.jboss.wsf.spi.WSFException;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedPortComponentRefMetaData;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
@@ -56,7 +55,6 @@
*/
public abstract class AbstractServiceObjectFactoryJAXWS implements ObjectFactory
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(AbstractServiceObjectFactoryJAXWS.class);
/**
* Creates an object using the location or reference information specified.
* <p/>
@@ -237,7 +235,7 @@
}
else
{
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "CANNOT_CREATE_SERVICE_WITHOUT_WSDLLOCATION", serviceRefMD));
+ throw Messages.MESSAGES.cannotCreateServiceWithoutWsdlLocation(serviceRefMD);
}
}
else
Modified: common/trunk/src/main/java/org/jboss/ws/common/serviceref/DefaultServiceRefHandler.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/serviceref/DefaultServiceRefHandler.java 2012-09-21 12:47:11 UTC (rev 16751)
+++ common/trunk/src/main/java/org/jboss/ws/common/serviceref/DefaultServiceRefHandler.java 2012-09-21 15:48:32 UTC (rev 16752)
@@ -21,11 +21,9 @@
*/
package org.jboss.ws.common.serviceref;
-import java.util.ResourceBundle;
-
import javax.naming.Referenceable;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.common.Messages;
import org.jboss.wsf.spi.SPIProvider;
import org.jboss.wsf.spi.SPIProviderResolver;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
@@ -40,17 +38,16 @@
*/
public final class DefaultServiceRefHandler implements ServiceRefHandler
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(DefaultServiceRefHandler.class);
@Override
public Referenceable createReferenceable(final UnifiedServiceRefMetaData serviceRefMD)
{
if (serviceRefMD.getVfsRoot() == null)
{
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "VFSROOT_MUST_BE_PROVIDED"));
+ throw Messages.MESSAGES.missingVFSRootInServiceRef(serviceRefMD.getServiceRefName());
}
if (serviceRefMD.getType() == null)
{
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "SERVICE_REFERENCE_TYPE_MUST_BE_PROVIDED"));
+ throw Messages.MESSAGES.missingServiceRefTypeInServiceRef(serviceRefMD.getServiceRefName());
}
return this.getBinder(serviceRefMD.getType()).createReferenceable(serviceRefMD);
Deleted: common/trunk/src/main/java/org/jboss/ws/common/serviceref/Message.properties
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/serviceref/Message.properties 2012-09-21 12:47:11 UTC (rev 16751)
+++ common/trunk/src/main/java/org/jboss/ws/common/serviceref/Message.properties 2012-09-21 15:48:32 UTC (rev 16752)
@@ -1,5 +0,0 @@
-CANNOT_CREATE_SERVICE_WITHOUT_WSDLLOCATION=Cannot create generic javax.xml.ws.Service without wsdlLocation: {0}
-VFSROOT_MUST_BE_PROVIDED=VFSRoot must be provided
-SERVICE_REFERENCE_TYPE_MUST_BE_PROVIDED=Service reference type must be provided
-CANNOT_MARSHALL_SERVICE_REF_META_DATA=Cannot marshall service ref meta data, cause: {0}
-CANNOT_UNMARSHALL_SERVICE_REF_META_DATA=Cannot unmarshall service ref meta data, cause: {0}
Modified: common/trunk/src/main/java/org/jboss/ws/common/serviceref/ServiceRefSerializer.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/serviceref/ServiceRefSerializer.java 2012-09-21 12:47:11 UTC (rev 16751)
+++ common/trunk/src/main/java/org/jboss/ws/common/serviceref/ServiceRefSerializer.java 2012-09-21 15:48:32 UTC (rev 16752)
@@ -21,6 +21,8 @@
*/
package org.jboss.ws.common.serviceref;
+import static org.jboss.ws.common.Messages.MESSAGES;
+
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
@@ -28,11 +30,9 @@
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.ObjectStreamClass;
-import java.util.ResourceBundle;
import javax.naming.NamingException;
-import org.jboss.ws.api.util.BundleUtils;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
/**
@@ -42,7 +42,6 @@
*/
final class ServiceRefSerializer
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(ServiceRefSerializer.class);
static final String SERVICE_REF_META_DATA = "SERVICE_REF_META_DATA";
private ServiceRefSerializer()
@@ -62,7 +61,7 @@
}
catch (final IOException e)
{
- throw new NamingException(BundleUtils.getMessage(bundle, "CANNOT_MARSHALL_SERVICE_REF_META_DATA", e.getMessage()));
+ throw MESSAGES.cannotMarshallServiceRefMetaData(e);
}
return baos.toByteArray();
@@ -81,11 +80,11 @@
}
catch (final IOException e)
{
- throw new NamingException(BundleUtils.getMessage(bundle, "CANNOT_UNMARSHALL_SERVICE_REF_META_DATA", e.getMessage()));
+ throw MESSAGES.cannotUnMarshallServiceRefMetaData(e);
}
catch (final ClassNotFoundException e)
{
- throw new NamingException(BundleUtils.getMessage(bundle, "CANNOT_UNMARSHALL_SERVICE_REF_META_DATA", e.getMessage()));
+ throw MESSAGES.cannotUnMarshallServiceRefMetaData(e);
}
return sref;
Modified: common/trunk/src/main/java/org/jboss/ws/common/sort/DeploymentAspectSorter.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/sort/DeploymentAspectSorter.java 2012-09-21 12:47:11 UTC (rev 16751)
+++ common/trunk/src/main/java/org/jboss/ws/common/sort/DeploymentAspectSorter.java 2012-09-21 15:48:32 UTC (rev 16752)
@@ -28,10 +28,9 @@
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
-import java.util.ResourceBundle;
import java.util.Set;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.common.Messages;
import org.jboss.wsf.spi.deployment.DeploymentAspect;
/**
@@ -42,8 +41,6 @@
*/
public final class DeploymentAspectSorter
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(DeploymentAspectSorter.class);
-
private static final DeploymentAspectSorter INSTANCE = new DeploymentAspectSorter();
private DeploymentAspectSorter()
@@ -77,8 +74,7 @@
return aspect;
}
}
-
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "NO_DEPLOYMENT_ASPECT_FOUND"));
+ throw Messages.MESSAGES.noDeploymentAspectFoundWithAttributeLast();
}
private Graph createOrientedGraph(final List<DeploymentAspect> aspects)
@@ -177,7 +173,7 @@
if (this.vertices.size() > 0)
{
// if graph has edges then graph has at least one cycle
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "CYCLE_DETECTED_IN_SUBGRAPH", this.vertices));
+ throw Messages.MESSAGES.cycleDetectedInSubGraph(this.vertices);
}
else
{
Deleted: common/trunk/src/main/java/org/jboss/ws/common/sort/Message.properties
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/sort/Message.properties 2012-09-21 12:47:11 UTC (rev 16751)
+++ common/trunk/src/main/java/org/jboss/ws/common/sort/Message.properties 2012-09-21 15:48:32 UTC (rev 16752)
@@ -1,2 +0,0 @@
-NO_DEPLOYMENT_ASPECT_FOUND=No deployment aspect found with attribute last='true'
-CYCLE_DETECTED_IN_SUBGRAPH=Cycle detected in subgraph: {0}
Modified: common/trunk/src/main/java/org/jboss/ws/common/spi/DefaultSPIProvider.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/spi/DefaultSPIProvider.java 2012-09-21 12:47:11 UTC (rev 16751)
+++ common/trunk/src/main/java/org/jboss/ws/common/spi/DefaultSPIProvider.java 2012-09-21 15:48:32 UTC (rev 16752)
@@ -21,10 +21,8 @@
*/
package org.jboss.ws.common.spi;
-import java.util.ResourceBundle;
-
-import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.api.util.ServiceLoader;
+import org.jboss.ws.common.Messages;
import org.jboss.ws.common.deployment.DefaultDeploymentModelFactory;
import org.jboss.ws.common.deployment.DefaultLifecycleHandlerFactory;
import org.jboss.ws.common.invocation.DefaultResourceInjectorFactory;
@@ -34,7 +32,6 @@
import org.jboss.ws.common.security.DefaultSecurityAdapterFactory;
import org.jboss.ws.common.serviceref.DefaultServiceRefHandlerFactory;
import org.jboss.wsf.spi.SPIProvider;
-import org.jboss.wsf.spi.WSFException;
import org.jboss.wsf.spi.deployment.DeploymentModelFactory;
import org.jboss.wsf.spi.deployment.LifecycleHandlerFactory;
import org.jboss.wsf.spi.invocation.ResourceInjectorFactory;
@@ -50,7 +47,6 @@
*/
class DefaultSPIProvider extends SPIProvider
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(DefaultSPIProvider.class);
/**
* Gets the specified SPI, using the provided classloader
*/
@@ -99,7 +95,7 @@
}
if (returnType == null)
- throw new WSFException(BundleUtils.getMessage(bundle, "FAILED_TO_PROVIDE_SPI", spiType ));
+ throw Messages.MESSAGES.failedToProvideSPI(spiType);
return returnType;
}
Deleted: common/trunk/src/main/java/org/jboss/ws/common/spi/Message.properties
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/spi/Message.properties 2012-09-21 12:47:11 UTC (rev 16751)
+++ common/trunk/src/main/java/org/jboss/ws/common/spi/Message.properties 2012-09-21 15:48:32 UTC (rev 16752)
@@ -1 +0,0 @@
-FAILED_TO_PROVIDE_SPI=Failed to provide SPI:{0}
Modified: common/trunk/src/main/java/org/jboss/ws/common/utils/AbstractWSDLFilePublisher.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/utils/AbstractWSDLFilePublisher.java 2012-09-21 12:47:11 UTC (rev 16751)
+++ common/trunk/src/main/java/org/jboss/ws/common/utils/AbstractWSDLFilePublisher.java 2012-09-21 15:48:32 UTC (rev 16752)
@@ -21,6 +21,8 @@
*/
package org.jboss.ws.common.utils;
+import static org.jboss.ws.common.Loggers.DEPLOYMENT_LOGGER;;
+import static org.jboss.ws.common.Messages.MESSAGES;
import static org.jboss.ws.common.integration.WSHelper.isJseDeployment;
import static org.jboss.ws.common.integration.WSHelper.isWarArchive;
@@ -32,7 +34,6 @@
import java.net.URL;
import java.util.Iterator;
import java.util.List;
-import java.util.ResourceBundle;
import javax.wsdl.Definition;
import javax.wsdl.Import;
@@ -42,8 +43,6 @@
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
-import org.jboss.logging.Logger;
-import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.DOMUtils;
import org.jboss.ws.common.IOUtils;
import org.jboss.wsf.spi.SPIProvider;
@@ -62,9 +61,6 @@
*/
public abstract class AbstractWSDLFilePublisher
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(AbstractWSDLFilePublisher.class);
- private static final Logger log = Logger.getLogger(AbstractWSDLFilePublisher.class);
-
// The deployment info for the web service archive
protected ArchiveDeployment dep;
// The expected wsdl location in the deployment
@@ -113,7 +109,7 @@
}
catch (ParserConfigurationException pce)
{
- log.error(pce);
+ DEPLOYMENT_LOGGER.error(pce);
}
builder = DOMUtils.newDocumentBuilder(factory);
}
@@ -168,7 +164,7 @@
wsdlWriter.writeWSDL(subdef, fw);
fw.close();
- log.debug("WSDL import published to: " + targetURL);
+ DEPLOYMENT_LOGGER.wsdlImportPublishedTo(targetURL);
// recursively publish imports
publishWsdlImports(targetURL, subdef, published, expLocation);
@@ -233,7 +229,7 @@
URL resourceURL = dep.getResourceResolver().resolve(resourcePath);
InputStream is = new ResourceURL(resourceURL).openStream();
if (is == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "CANNOT_FIND_SCHEMA_IMPORT_IN_DEPLOYMENT", resourcePath));
+ throw MESSAGES.cannotFindSchemaImportInDeployment(resourcePath, deploymentName);
FileOutputStream fos = null;
try
@@ -246,7 +242,7 @@
if (fos != null) fos.close();
}
- log.debug("XMLSchema import published to: " + xsdURL);
+ DEPLOYMENT_LOGGER.xmlSchemaImportPublishedTo(xsdURL);
// recursively publish imports
Element subdoc = DOMUtils.parse(xsdURL.openStream(), getDocumentBuilder());
@@ -289,7 +285,7 @@
else
{
if (file.delete() == false)
- log.warn(BundleUtils.getMessage(bundle, "CANNOT_DELETE_PUBLISHED_WSDL_DOCUMENT", file.toURI().toURL()));
+ DEPLOYMENT_LOGGER.cannotDeletePublishedWsdlDoc(file.toURI().toURL());
}
}
Modified: common/trunk/src/main/java/org/jboss/ws/common/utils/JBossWSEntityResolver.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/utils/JBossWSEntityResolver.java 2012-09-21 12:47:11 UTC (rev 16751)
+++ common/trunk/src/main/java/org/jboss/ws/common/utils/JBossWSEntityResolver.java 2012-09-21 15:48:32 UTC (rev 16752)
@@ -21,6 +21,9 @@
*/
package org.jboss.ws.common.utils;
+import static org.jboss.ws.common.Loggers.ROOT_LOGGER;
+import static org.jboss.ws.common.Messages.MESSAGES;
+
import java.io.IOException;
import java.io.InputStream;
import java.net.MalformedURLException;
@@ -31,13 +34,10 @@
import java.util.Enumeration;
import java.util.Map;
import java.util.Properties;
-import java.util.ResourceBundle;
import java.util.WeakHashMap;
import java.util.concurrent.ConcurrentHashMap;
-import org.jboss.logging.Logger;
import org.jboss.util.xml.JBossEntityResolver;
-import org.jboss.ws.api.util.BundleUtils;
import org.jboss.wsf.spi.classloading.ClassLoaderProvider;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
@@ -50,16 +50,12 @@
*/
public class JBossWSEntityResolver extends JBossEntityResolver
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(JBossWSEntityResolver.class);
/**
* A synchronized weak hash map that keeps entities' properties for each classloader.
* Weak keys are used to remove entries when classloaders are garbage collected; values are filenames -> properties.
*/
private static Map<ClassLoader, Map<String, Properties>> propertiesMap = Collections.synchronizedMap(new WeakHashMap<ClassLoader, Map<String, Properties>>());
- // provide logging
- private static final Logger log = Logger.getLogger(JBossWSEntityResolver.class);
-
private ClassLoader additionalClassLoader;
public JBossWSEntityResolver()
@@ -99,7 +95,7 @@
// load entities
props = loadEntitiesMappingFromClasspath(entitiesResource, tccl, this.additionalClassLoader);
if (props.size() == 0)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "NO_ENTITIES_MAPPING_DEFINED_IN_RESOURCE_FILE", entitiesResource));
+ throw MESSAGES.entityResolutionNoEntityMapppingDefined(entitiesResource);
map.put(entitiesResource, props);
}
@@ -126,7 +122,7 @@
InputStream is = new DelegateClassLoader(additionalClassLoader, classLoader).getResourceAsStream(entitiesResource);
// get stream
if (is == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "RESOURCE_NOT_FOUND", entitiesResource ));
+ throw MESSAGES.entityResolutionResourceNotFound(entitiesResource);
// load props
Properties props = new Properties();
@@ -136,7 +132,7 @@
}
catch (IOException ioe)
{
- log.error(BundleUtils.getMessage(bundle, "CANNOT_READ_RESOURCE", entitiesResource), ioe);
+ ROOT_LOGGER.cannotReadResource(entitiesResource, ioe);
}
finally
{
@@ -150,16 +146,16 @@
public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException
{
- if(log.isTraceEnabled()) log.trace("resolveEntity: [pub=" + publicId + ",sysid=" + systemId + "]");
+ if(ROOT_LOGGER.isTraceEnabled()) ROOT_LOGGER.trace(this.getClass().getName(), "resolveEntity: [pub=" + publicId + ",sysid=" + systemId + "]", null);
InputSource inputSource = super.resolveEntity(publicId, systemId);
if (inputSource == null)
- inputSource = resolveSystemIDAsURL(systemId, log.isTraceEnabled());
+ inputSource = resolveSystemIDAsURL(systemId, ROOT_LOGGER.isTraceEnabled());
if (inputSource == null)
{
- if (log.isDebugEnabled())
- log.debug("Cannot resolve entity: [pub=" + publicId + ",sysid=" + systemId + "]");
+ if (ROOT_LOGGER.isDebugEnabled())
+ ROOT_LOGGER.debug(this.getClass().getName(), "Cannot resolve entity: [pub=" + publicId + ",sysid=" + systemId + "]", null);
}
return inputSource;
@@ -193,7 +189,7 @@
return null;
if (trace)
- log.trace("resolveIDAsResourceURL, id=" + id);
+ ROOT_LOGGER.trace(this.getClass().getName(), "resolveIDAsResourceURL, id=" + id, null);
InputSource inputSource = null;
@@ -201,12 +197,9 @@
try
{
if (trace)
- log.trace("Trying to resolve id as a URL");
+ ROOT_LOGGER.trace(this.getClass().getName(), "Trying to resolve id as a URL", null);
URL url = new URL(id);
- if (url.getProtocol().equalsIgnoreCase("file") == false)
- log.warn(BundleUtils.getMessage(bundle, "TRYING_TO_RESOLVE_ID_AS_A_NON-FILE_URL", id));
-
InputStream ins = new ResourceURL(url).openStream();
if (ins != null)
{
@@ -215,21 +208,21 @@
}
else
{
- log.warn(BundleUtils.getMessage(bundle, "CANNOT_LOAD_ID_AS_URL", id));
+ ROOT_LOGGER.cannotLoadIDAsURL(id, url.getProtocol());
}
if (trace)
- log.trace("Resolved id as a URL");
+ ROOT_LOGGER.trace(this.getClass().getName(), "Resolved id as a URL", null);
}
catch (MalformedURLException ignored)
{
if (trace)
- log.trace("id is not a url: " + id, ignored);
+ ROOT_LOGGER.trace(this.getClass().getName(), "id is not a url: " + id, ignored);
}
catch (IOException e)
{
if (trace)
- log.trace("Failed to obtain URL.InputStream from id: " + id, e);
+ ROOT_LOGGER.trace(this.getClass().getName(), "Failed to obtain URL.InputStream from id: " + id, e);
}
return inputSource;
}
Modified: common/trunk/src/main/java/org/jboss/ws/common/utils/JarUrlConnection.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/utils/JarUrlConnection.java 2012-09-21 12:47:11 UTC (rev 16751)
+++ common/trunk/src/main/java/org/jboss/ws/common/utils/JarUrlConnection.java 2012-09-21 15:48:32 UTC (rev 16752)
@@ -29,13 +29,12 @@
import java.net.URLDecoder;
import java.util.ArrayList;
import java.util.List;
-import java.util.ResourceBundle;
import java.util.StringTokenizer;
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
import java.util.jar.JarInputStream;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.common.Messages;
/** <code>URLConnection</code> capable of handling multiply-nested jars.
*
@@ -43,7 +42,6 @@
*/
public class JarUrlConnection extends JarURLConnection
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(JarUrlConnection.class);
// ----------------------------------------------------------------------
// Instance members
// ----------------------------------------------------------------------
@@ -93,10 +91,10 @@
}
else
{
- throw new MalformedURLException(BundleUtils.getMessage(bundle, "ERROR_IN_URL", url.toExternalForm()));
+ throw Messages.MESSAGES.jarUrlConnectionBuildError(url.toExternalForm());
}
- List segments = new ArrayList();
+ List<String> segments = new ArrayList<String>();
StringTokenizer tokens = new StringTokenizer(extraText, "!");
@@ -105,7 +103,7 @@
segments.add(tokens.nextToken());
}
- this.segments = (String[])segments.toArray(new String[segments.size()]);
+ this.segments = segments.toArray(new String[segments.size()]);
this.baseResource = new URL(baseResourceText);
}
@@ -218,7 +216,7 @@
}
}
- throw new IOException(BundleUtils.getMessage(bundle, "UNABLE_TO_LOCATE_SEGMENT", segment));
+ throw Messages.MESSAGES.jarUrlConnectionUnableToLocateSegment(segment, getURL().toExternalForm());
}
/** @see java.net.URLConnection
Deleted: common/trunk/src/main/java/org/jboss/ws/common/utils/Message.properties
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/utils/Message.properties 2012-09-21 12:47:11 UTC (rev 16751)
+++ common/trunk/src/main/java/org/jboss/ws/common/utils/Message.properties 2012-09-21 15:48:32 UTC (rev 16752)
@@ -1,13 +0,0 @@
-NO_ENTITIES_MAPPING_DEFINED_IN_RESOURCE_FILE=No entities mapping defined in resource file: {0}
-RESOURCE_NOT_FOUND=Resource {0} not found
-CANNOT_READ_RESOURCE=Cannot read resource: {0}
-TRYING_TO_RESOLVE_ID_AS_A_NON-FILE_URL=Trying to resolve id as a non-file URL: {0}
-CANNOT_LOAD_ID_AS_URL=Cannot load id as URL: {0}
-INVALID_CHARACTER_REFERENCE=Invalid character reference
-INVALID_ENTITY_REFERENCE=Invalid entity reference
-INVALID_ENTITY=Invalid entity: {0}
-CANNOT_FIND_SCHEMA_IMPORT_IN_DEPLOYMENT=Cannot find schema import in deployment: {0}
-CANNOT_DELETE_PUBLISHED_WSDL_DOCUMENT=Cannot delete published wsdl document: {0}
-ERROR_IN_URL=No ! in url: {0}
-UNABLE_TO_LOCATE_SEGMENT=unable to locate segment: {0}
-A_UUID_MUST_BE_16_BYTES=A UUID must be 16 bytes!
Modified: common/trunk/src/main/java/org/jboss/ws/common/utils/UUIDGenerator.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/utils/UUIDGenerator.java 2012-09-21 12:47:11 UTC (rev 16751)
+++ common/trunk/src/main/java/org/jboss/ws/common/utils/UUIDGenerator.java 2012-09-21 15:48:32 UTC (rev 16752)
@@ -22,9 +22,9 @@
package org.jboss.ws.common.utils;
import java.security.SecureRandom;
-import java.util.ResourceBundle;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.common.Messages;
+
/**
* Generates the string form of IETF variant UUIDs.
*
@@ -37,7 +37,6 @@
*/
public class UUIDGenerator
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(UUIDGenerator.class);
private static SecureRandom rand;
private static String bytesToHex(byte[] buffer, int offset, int length)
@@ -111,7 +110,7 @@
public static String convertToString(byte[] uuid)
{
if (uuid.length != 16)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "A_UUID_MUST_BE_16_BYTES"));
+ throw Messages.MESSAGES.uuidMustBeOf16Bytes();
String string = bytesToHex(uuid, 0, 4) + "-"
+ bytesToHex(uuid, 4, 2) + "-"
Modified: common/trunk/src/main/java/org/jboss/ws/common/utils/XMLPredefinedEntityReferenceResolver.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/utils/XMLPredefinedEntityReferenceResolver.java 2012-09-21 12:47:11 UTC (rev 16751)
+++ common/trunk/src/main/java/org/jboss/ws/common/utils/XMLPredefinedEntityReferenceResolver.java 2012-09-21 15:48:32 UTC (rev 16752)
@@ -21,11 +21,10 @@
*/
package org.jboss.ws.common.utils;
+import static org.jboss.ws.common.Messages.MESSAGES;
+
import java.util.HashMap;
-import java.util.ResourceBundle;
-import org.jboss.ws.api.util.BundleUtils;
-
/**
* Utility class for resolving predefined XML entity and character references.
*
@@ -33,7 +32,6 @@
*/
public class XMLPredefinedEntityReferenceResolver
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(XMLPredefinedEntityReferenceResolver.class);
private static HashMap<String, Character> entities = new HashMap<String, Character>(8);
static
@@ -56,7 +54,7 @@
int end = source.indexOf(';', pos);
if (end == -1)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "INVALID_CHARACTER_REFERENCE"));
+ throw MESSAGES.entityResolutionInvalidCharacterReference(source);
int c = Integer.parseInt(source.substring(pos, end), radix);
builder.append((char) c);
@@ -68,12 +66,12 @@
{
int end = source.indexOf(';', ++pos);
if (end == -1)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "INVALID_ENTITY_REFERENCE"));
+ throw MESSAGES.entityResolutionInvalidEntityReference(source);
String entity = source.substring(pos, end);
Character c = entities.get(entity);
if (c == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "INVALID_ENTITY", entity));
+ throw MESSAGES.entityResolutionInvalidEntity(entity);
builder.append(c.charValue());
@@ -104,7 +102,7 @@
int peek = pos + 1;
if (peek == end)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "INVALID_ENTITY_REFERENCE"));
+ throw MESSAGES.entityResolutionInvalidEntityReference(normalized);
if (normalized.charAt(peek) == '#')
pos = resolveCharRef(normalized, pos, builder);
12 years, 4 months
JBossWS SVN: r16751 - stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1190.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2012-09-21 08:47:11 -0400 (Fri, 21 Sep 2012)
New Revision: 16751
Added:
stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1190/wsa-version-mismatch.xml
Modified:
stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1190/Test119XTestCase.java
Log:
Add wsi bp Test1193
Modified: stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1190/Test119XTestCase.java
===================================================================
--- stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1190/Test119XTestCase.java 2012-09-21 07:34:27 UTC (rev 16750)
+++ stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1190/Test119XTestCase.java 2012-09-21 12:47:11 UTC (rev 16751)
@@ -120,7 +120,7 @@
//To mustunderstand
InputStream msgIns = getClass().getResourceAsStream("./wsa-to-mustunderstand.xml");
String msg = new String(IOUtils.readBytesFromStream(msgIns));
- msg = msg.replaceAll("$PORT", "80");
+ msg = msg.replaceAll("$PORT", "9090");
ByteArrayInputStream bout = new ByteArrayInputStream(msg.getBytes());
@@ -138,7 +138,7 @@
//fault to must understand
msgIns = getClass().getResourceAsStream("./wsa-faultto-mustunderstand.xml");
msg = new String(IOUtils.readBytesFromStream(msgIns));
- msg = msg.replaceAll("$PORT", "80");
+ msg = msg.replaceAll("$PORT", "9090");
bout = new ByteArrayInputStream(msg.getBytes());
@@ -155,7 +155,7 @@
msgIns = getClass().getResourceAsStream("./wsa-faultto-mustunderstand.xml");
msg = new String(IOUtils.readBytesFromStream(msgIns));
- msg = msg.replaceAll("$PORT", "80");
+ msg = msg.replaceAll("$PORT", "9090");
bout = new ByteArrayInputStream(msg.getBytes());
@@ -172,7 +172,7 @@
msgIns = getClass().getResourceAsStream("./wsa-replyto-mustunderstand.xml");
msg = new String(IOUtils.readBytesFromStream(msgIns));
- msg = msg.replaceAll("$PORT", "80");
+ msg = msg.replaceAll("$PORT", "9090");
bout = new ByteArrayInputStream(msg.getBytes());
@@ -188,7 +188,7 @@
}
msgIns = getClass().getResourceAsStream("./wsa-msgid-mustunderstand.xml");
msg = new String(IOUtils.readBytesFromStream(msgIns));
- msg = msg.replaceAll("$PORT", "80");
+ msg = msg.replaceAll("$PORT", "9090");
bout = new ByteArrayInputStream(msg.getBytes());
@@ -204,5 +204,45 @@
}
}
+ public void testVersionMisMatch() throws Exception
+ {
+ //test1194-version mismatch
+ // construct proxy
+ URL url = new URL("http://localhost:9090/jaxws-bp12test1190/Test1190");
+ HttpURLConnection httpConn = (HttpURLConnection) url.openConnection();
+ InputStream msgIns = getClass().getResourceAsStream("./wsa-version-mismatch.xml");
+ String msg = new String(IOUtils.readBytesFromStream(msgIns));
+ httpConn.setRequestProperty("Content-Length", String.valueOf(msg.length()));
+ httpConn.setRequestProperty("Content-Type", "text/xml; charset=utf-8");
+ httpConn.setRequestProperty("SOAPAction", "test");
+ httpConn.setRequestMethod("POST");
+ httpConn.setDoOutput(true);
+ httpConn.setDoInput(true);
+
+ OutputStream out = httpConn.getOutputStream();
+ out.write(msg.getBytes());
+ out.close();
+
+ if (httpConn.getResponseCode() >= 500)
+ {
+ InputStreamReader isr = new InputStreamReader(httpConn.getErrorStream());
+ BufferedReader in = new BufferedReader(isr);
+
+ String inputLine;
+
+ StringBuffer buffer = new StringBuffer();
+ while ((inputLine = in.readLine()) != null)
+ buffer.append(inputLine);
+
+ in.close();
+ assertTrue("Expected version mismatch error", buffer.toString().contains("soap:VersionMismatch"));
+
+ }
+ else
+ {
+ fail("Expected version mismatch error");
+ }
+
+ }
}
\ No newline at end of file
Added: stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1190/wsa-version-mismatch.xml
===================================================================
--- stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1190/wsa-version-mismatch.xml (rev 0)
+++ stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1190/wsa-version-mismatch.xml 2012-09-21 12:47:11 UTC (rev 16751)
@@ -0,0 +1,13 @@
+<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelopesss/">
+ <soap:Header>
+ <Action xmlns="http://www.w3.org/2005/08/addressing">http://example.org/wsaTestService/wsaTestPortType/echo1Request
+ </Action>
+ <To xmlns="http://www.w3.org/2005/08/addressing">http://localhost:$PORT/jaxws-bp12test1190/Test1190</To>
+ <ReplyTo xmlns="http://www.w3.org/2005/08/addressing">
+ <Address>http://www.w3.org/2005/08/addressing/anonymous</Address>
+ </ReplyTo>
+ </soap:Header>
+ <soap:Body>
+ <echoIn1 xmlns="http://example.org/echo">input string</echoIn1>
+ </soap:Body>
+</soap:Envelope>
\ No newline at end of file
12 years, 4 months
JBossWS SVN: r16750 - in stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests: src/test/etc and 6 other directories.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2012-09-21 03:34:27 -0400 (Fri, 21 Sep 2012)
New Revision: 16750
Added:
stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/src/test/etc/client.keystore
stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1190/
stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1190/ObjectFactory.java
stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1190/Test119XTestCase.java
stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1190/WsaTestPortType.java
stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1190/WsaTestPortType1192Impl.java
stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1190/WsaTestPortTypeImpl.java
stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1190/wsa-faultto-mustunderstand.xml
stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1190/wsa-msgid-mustunderstand.xml
stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1190/wsa-replyto-mustunderstand.xml
stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1190/wsa-to-mustunderstand.xml
stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1190/wsa-without-messageid.xml
stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/src/test/resources/jaxws/bp12/wsa/test1190/
stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/src/test/resources/jaxws/bp12/wsa/test1190/WEB-INF/
stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/src/test/resources/jaxws/bp12/wsa/test1190/WEB-INF/web.xml
stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/src/test/resources/jaxws/bp12/wsa/test1190/WEB-INF/wsdl/
stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/src/test/resources/jaxws/bp12/wsa/test1190/WEB-INF/wsdl/Test1190.wsdl
stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/src/test/resources/jaxws/bp12/wsa/test1190/WEB-INF/wsdl/Test1192.wsdl
Modified:
stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/scripts/cxf-jars-jaxws.xml
stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/src/test/etc/test.truststore
Log:
Add wsi bp test 1190-1192
Modified: stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/scripts/cxf-jars-jaxws.xml
===================================================================
--- stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/scripts/cxf-jars-jaxws.xml 2012-09-20 10:04:59 UTC (rev 16749)
+++ stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/scripts/cxf-jars-jaxws.xml 2012-09-21 07:34:27 UTC (rev 16750)
@@ -124,10 +124,18 @@
<webinf dir="${tests.output.dir}/test-resources/jaxws/bp12/wsa/test1189-nonanon/WEB-INF">
<include name="wsdl/*" />
</webinf>
- </war>
+ </war>
+
+ <!-- jaxws-bp12test119x -->
+ <war warfile="${tests.output.dir}/test-libs/jaxws-bp12test1190.war" webxml="${tests.output.dir}/test-resources/jaxws/bp12/wsa/test1190/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/bp12/wsa/test1190/*.class"/>
+ <exclude name="org/jboss/test/ws/jaxws/bp12/wsa/test1190/*TestCase.class"/>
+ </classes>
+ <webinf dir="${tests.output.dir}/test-resources/jaxws/bp12/wsa/test1190/WEB-INF">
+ <include name="wsdl/*" />
+ </webinf>
+ </war>
+
</target>
-
-
-
-
</project>
Added: stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/src/test/etc/client.keystore
===================================================================
(Binary files differ)
Property changes on: stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/src/test/etc/client.keystore
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/src/test/etc/test.truststore
===================================================================
(Binary files differ)
Added: stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1190/ObjectFactory.java
===================================================================
--- stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1190/ObjectFactory.java (rev 0)
+++ stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1190/ObjectFactory.java 2012-09-21 07:34:27 UTC (rev 16750)
@@ -0,0 +1,95 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, 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.test.ws.jaxws.bp12.wsa.test1190;
+
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.annotation.XmlElementDecl;
+import javax.xml.bind.annotation.XmlRegistry;
+import javax.xml.namespace.QName;
+
+
+/**
+ * This object contains factory methods for each
+ * Java content interface and Java element interface
+ * generated in the org.jboss.test.ws.jaxws.bp12.wsa.test1190 package.
+ * <p>An ObjectFactory allows you to programatically
+ * construct new instances of the Java representation
+ * for XML content. The Java representation of XML
+ * content can consist of schema derived interfaces
+ * and classes representing the binding of schema
+ * type definitions, element declarations and model
+ * groups. Factory methods for each of these are
+ * provided in this class.
+ *
+ */
+@XmlRegistry
+public class ObjectFactory {
+
+ private final static QName _EchoOut1_QNAME = new QName("http://example.org/echo", "echoOut1");
+ private final static QName _EchoIn1_QNAME = new QName("http://example.org/echo", "echoIn1");
+ private final static QName _EchoOut2_QNAME = new QName("http://example.org/echo", "echoOut2");
+ private final static QName _EchoIn2_QNAME = new QName("http://example.org/echo", "echoIn2");
+
+ /**
+ * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.jboss.test.ws.jaxws.bp12.wsa.test1190
+ *
+ */
+ public ObjectFactory() {
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://example.org/echo", name = "echoOut1")
+ public JAXBElement<String> createEchoOut1(String value) {
+ return new JAXBElement<String>(_EchoOut1_QNAME, String.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://example.org/echo", name = "echoIn1")
+ public JAXBElement<String> createEchoIn1(String value) {
+ return new JAXBElement<String>(_EchoIn1_QNAME, String.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://example.org/echo", name = "echoOut2")
+ public JAXBElement<String> createEchoOut2(String value) {
+ return new JAXBElement<String>(_EchoOut2_QNAME, String.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://example.org/echo", name = "echoIn2")
+ public JAXBElement<String> createEchoIn2(String value) {
+ return new JAXBElement<String>(_EchoIn2_QNAME, String.class, null, value);
+ }
+
+}
Added: stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1190/Test119XTestCase.java
===================================================================
--- stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1190/Test119XTestCase.java (rev 0)
+++ stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1190/Test119XTestCase.java 2012-09-21 07:34:27 UTC (rev 16750)
@@ -0,0 +1,208 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, 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.test.ws.jaxws.bp12.wsa.test1190;
+
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.soap.MessageFactory;
+import javax.xml.soap.SOAPMessage;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Dispatch;
+import javax.xml.ws.Service;
+import javax.xml.ws.soap.AddressingFeature;
+import javax.xml.ws.soap.SOAPFaultException;
+
+import junit.framework.Test;
+
+import org.apache.cxf.helpers.IOUtils;
+import org.jboss.wsf.test.JBossWSCXFTestSetup;
+import org.jboss.wsf.test.JBossWSTest;
+
+public class Test119XTestCase extends JBossWSTest
+{
+ private final String serviceURL = "http://" + getServerHost() + ":8080/jaxws-bp12test1190/Test1190";
+
+ public static Test suite()
+ {
+ return new JBossWSCXFTestSetup(Test119XTestCase.class, "jaxws-bp12test1190.war");
+ }
+
+ public void testWSA() throws Exception
+ {
+ // construct proxy
+ QName serviceName = new QName("http://example.org/wsaTestService", "wsaTestService");
+ URL wsdlURL = new URL(serviceURL + "?wsdl");
+ Service service = Service.create(wsdlURL, serviceName);
+ WsaTestPortType port = (WsaTestPortType) service.getPort(WsaTestPortType.class);
+ // invoke method
+ ((BindingProvider) port).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
+ "http://" + getServerHost() + ":9090/jaxws-bp12test1190/Test1190");
+
+ System.out.println("Invoking echo1...");
+ String response = port.echo1("input string");
+ System.out.println("echo1.result: " + response);
+
+
+ System.out.println("Invoking echo2...");
+ port.echo2("input string");
+
+ }
+
+ //Test1191
+ public void testMessageIdMissed() throws Exception
+ {
+ // construct proxy
+ QName serviceName = new QName("http://example.org/wsaTestService", "wsaTestService");
+ QName portName = new QName("http://example.org/wsaTestService", "wsaTestPort");
+ URL wsdlURL = new URL(serviceURL + "?wsdl");
+ Service service = Service.create(wsdlURL, serviceName);
+
+ Dispatch<SOAPMessage> disp = service.createDispatch(portName, SOAPMessage.class,
+ Service.Mode.MESSAGE,
+ new AddressingFeature(false, false));
+ ((BindingProvider) disp).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
+ "http://" + getServerHost() + ":9090/jaxws-bp12test1190/Test1190");
+ InputStream msgIns = getClass().getResourceAsStream("./wsa-without-messageid.xml");
+ String msg = new String(IOUtils.readBytesFromStream(msgIns));
+ msg = msg.replaceAll("$PORT", "9090");
+
+ ByteArrayInputStream bout = new ByteArrayInputStream(msg.getBytes());
+
+ SOAPMessage soapReqMsg = MessageFactory.newInstance().createMessage(null, bout);
+ assertNotNull(soapReqMsg);
+
+ try {
+ disp.invoke(soapReqMsg);
+ fail("SOAPFaultException is expected");
+ } catch (SOAPFaultException ex) {
+ assertTrue("A required header representing a Message Addressing Property is not present is expected",
+ ex.getMessage().contains("A required header representing a Message Addressing Property is not present"));
+ }
+ }
+
+
+ //Test1192
+ public void testMustUnderstand() throws Exception
+ {
+ // construct proxy
+ QName serviceName = new QName("http://example.org/wsaTestService", "wsaTestService");
+ QName portName = new QName("http://example.org/wsaTestService", "wsaTestPort");
+ URL wsdlURL = new URL(serviceURL + "?wsdl");
+ Service service = Service.create(wsdlURL, serviceName);
+
+ Dispatch<SOAPMessage> disp = service.createDispatch(portName, SOAPMessage.class,
+ Service.Mode.MESSAGE,
+ new AddressingFeature(false, false));
+ ((BindingProvider) disp).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
+ "http://" + getServerHost() + ":9090/jaxws-bp12test1190/Test1192");
+ //To mustunderstand
+ InputStream msgIns = getClass().getResourceAsStream("./wsa-to-mustunderstand.xml");
+ String msg = new String(IOUtils.readBytesFromStream(msgIns));
+ msg = msg.replaceAll("$PORT", "80");
+
+ ByteArrayInputStream bout = new ByteArrayInputStream(msg.getBytes());
+
+ SOAPMessage soapReqMsg = MessageFactory.newInstance().createMessage(null, bout);
+ assertNotNull(soapReqMsg);
+
+ try {
+ disp.invoke(soapReqMsg);
+ fail("SOAPFaultException is expected");
+ } catch (SOAPFaultException ex) {
+ assertTrue("[{http://www.w3.org/2005/08/addressing}To] are not understood is expected",
+ ex.getMessage().contains("[{http://www.w3.org/2005/08/addressing}To] are not understood."));
+ }
+
+ //fault to must understand
+ msgIns = getClass().getResourceAsStream("./wsa-faultto-mustunderstand.xml");
+ msg = new String(IOUtils.readBytesFromStream(msgIns));
+ msg = msg.replaceAll("$PORT", "80");
+
+ bout = new ByteArrayInputStream(msg.getBytes());
+
+ soapReqMsg = MessageFactory.newInstance().createMessage(null, bout);
+ assertNotNull(soapReqMsg);
+
+ try {
+ disp.invoke(soapReqMsg);
+ fail("SOAPFaultException is expected");
+ } catch (SOAPFaultException ex) {
+ assertTrue("[{http://www.w3.org/2005/08/addressing}FaultTo] are not understood is expected",
+ ex.getMessage().contains("[{http://www.w3.org/2005/08/addressing}FaultTo] are not understood"));
+ }
+
+ msgIns = getClass().getResourceAsStream("./wsa-faultto-mustunderstand.xml");
+ msg = new String(IOUtils.readBytesFromStream(msgIns));
+ msg = msg.replaceAll("$PORT", "80");
+
+ bout = new ByteArrayInputStream(msg.getBytes());
+
+ soapReqMsg = MessageFactory.newInstance().createMessage(null, bout);
+ assertNotNull(soapReqMsg);
+
+ try {
+ disp.invoke(soapReqMsg);
+ fail("SOAPFaultException is expected");
+ } catch (SOAPFaultException ex) {
+ assertTrue("[{http://www.w3.org/2005/08/addressing}FaultTo] are not understood is expected",
+ ex.getMessage().contains("[{http://www.w3.org/2005/08/addressing}FaultTo] are not understood"));
+ }
+
+ msgIns = getClass().getResourceAsStream("./wsa-replyto-mustunderstand.xml");
+ msg = new String(IOUtils.readBytesFromStream(msgIns));
+ msg = msg.replaceAll("$PORT", "80");
+
+ bout = new ByteArrayInputStream(msg.getBytes());
+
+ soapReqMsg = MessageFactory.newInstance().createMessage(null, bout);
+ assertNotNull(soapReqMsg);
+
+ try {
+ disp.invoke(soapReqMsg);
+ fail("SOAPFaultException is expected");
+ } catch (SOAPFaultException ex) {
+ assertTrue("[{http://www.w3.org/2005/08/addressing}ReplyTo] are not understood is expected",
+ ex.getMessage().contains("[{http://www.w3.org/2005/08/addressing}ReplyTo] are not understood"));
+ }
+ msgIns = getClass().getResourceAsStream("./wsa-msgid-mustunderstand.xml");
+ msg = new String(IOUtils.readBytesFromStream(msgIns));
+ msg = msg.replaceAll("$PORT", "80");
+
+ bout = new ByteArrayInputStream(msg.getBytes());
+
+ soapReqMsg = MessageFactory.newInstance().createMessage(null, bout);
+ assertNotNull(soapReqMsg);
+
+ try {
+ disp.invoke(soapReqMsg);
+ fail("SOAPFaultException is expected");
+ } catch (SOAPFaultException ex) {
+ assertTrue("[{http://www.w3.org/2005/08/addressing}MessageID] are not understood is expected",
+ ex.getMessage().contains("[{http://www.w3.org/2005/08/addressing}MessageID] are not understood"));
+ }
+
+ }
+
+}
\ No newline at end of file
Added: stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1190/WsaTestPortType.java
===================================================================
--- stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1190/WsaTestPortType.java (rev 0)
+++ stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1190/WsaTestPortType.java 2012-09-21 07:34:27 UTC (rev 16750)
@@ -0,0 +1,49 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, 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.test.ws.jaxws.bp12.wsa.test1190;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import javax.xml.bind.annotation.XmlSeeAlso;
+
+@WebService(targetNamespace = "http://example.org/wsaTestService", name = "wsaTestPortType")
+(a)XmlSeeAlso({ObjectFactory.class})
+@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
+public interface WsaTestPortType {
+
+ @WebResult(name = "echoOut1", targetNamespace = "http://example.org/echo", partName = "wsaEchoOutPart")
+ @WebMethod
+ public java.lang.String echo1(
+ @WebParam(partName = "wsaEchoInPart", name = "echoIn1", targetNamespace = "http://example.org/echo")
+ java.lang.String wsaEchoInPart
+ );
+
+ @WebResult(name = "echoOut2", targetNamespace = "http://example.org/echo", partName = "wsaEchoOutPart")
+ @WebMethod
+ public java.lang.String echo2(
+ @WebParam(partName = "wsaEchoInPart", name = "echoIn2", targetNamespace = "http://example.org/echo")
+ java.lang.String wsaEchoInPart
+ );
+}
Added: stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1190/WsaTestPortType1192Impl.java
===================================================================
--- stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1190/WsaTestPortType1192Impl.java (rev 0)
+++ stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1190/WsaTestPortType1192Impl.java 2012-09-21 07:34:27 UTC (rev 16750)
@@ -0,0 +1,49 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, 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.test.ws.jaxws.bp12.wsa.test1190;
+
+(a)javax.jws.WebService(
+ serviceName = "wsaTestService",
+ portName = "wsaTestPort",
+ targetNamespace = "http://example.org/wsaTestService",
+ wsdlLocation = "WEB-INF/wsdl/Test1192.wsdl",
+ endpointInterface = "org.jboss.test.ws.jaxws.bp12.wsa.test1190.WsaTestPortType")
+
+public class WsaTestPortType1192Impl implements WsaTestPortType
+{
+ /* (non-Javadoc)
+ * @see org.jboss.test.ws.jaxws.bp12.wsa.test1190.WsaTestPortType#echo1(java.lang.String wsaEchoInPart )*
+ */
+ public String echo1(String wsaEchoInPart)
+ {
+ return wsaEchoInPart;
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.test.ws.jaxws.bp12.wsa.test1190.WsaTestPortType#echo2(java.lang.String wsaEchoInPart )*
+ */
+ public String echo2(String wsaEchoInPart)
+ {
+ return wsaEchoInPart;
+ }
+
+}
Added: stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1190/WsaTestPortTypeImpl.java
===================================================================
--- stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1190/WsaTestPortTypeImpl.java (rev 0)
+++ stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1190/WsaTestPortTypeImpl.java 2012-09-21 07:34:27 UTC (rev 16750)
@@ -0,0 +1,49 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, 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.test.ws.jaxws.bp12.wsa.test1190;
+
+(a)javax.jws.WebService(
+ serviceName = "wsaTestService",
+ portName = "wsaTestPort",
+ targetNamespace = "http://example.org/wsaTestService",
+ wsdlLocation = "WEB-INF/wsdl/Test1190.wsdl",
+ endpointInterface = "org.jboss.test.ws.jaxws.bp12.wsa.test1190.WsaTestPortType")
+
+public class WsaTestPortTypeImpl implements WsaTestPortType
+{
+ /* (non-Javadoc)
+ * @see org.jboss.test.ws.jaxws.bp12.wsa.test1190.WsaTestPortType#echo1(java.lang.String wsaEchoInPart )*
+ */
+ public String echo1(String wsaEchoInPart)
+ {
+ return wsaEchoInPart;
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.test.ws.jaxws.bp12.wsa.test1190.WsaTestPortType#echo2(java.lang.String wsaEchoInPart )*
+ */
+ public String echo2(String wsaEchoInPart)
+ {
+ return wsaEchoInPart;
+ }
+
+}
Added: stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1190/wsa-faultto-mustunderstand.xml
===================================================================
--- stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1190/wsa-faultto-mustunderstand.xml (rev 0)
+++ stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1190/wsa-faultto-mustunderstand.xml 2012-09-21 07:34:27 UTC (rev 16750)
@@ -0,0 +1,16 @@
+<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
+ <soap:Header>
+ <Action xmlns="http://www.w3.org/2005/08/addressing">http://example.org/wsaTestService/wsaTestPortType/echo1Request
+ </Action>
+ <MessageID xmlns="http://www.w3.org/2005/08/addressing">urn:uuid:6388dfec-a8d3-47a3-ae8f-be5b643e5a60</MessageID>
+ <FaultTo xmlns="http://www.w3.org/2005/08/addressing" soap:mustUnderstand="1">http://www.example.com/</FaultTo>
+ <To xmlns="http://www.w3.org/2005/08/addressing">http://localhost:$PORT/jaxws-bp12test1192/Test1192
+ </To>
+ <ReplyTo xmlns="http://www.w3.org/2005/08/addressing">
+ <Address>http://www.w3.org/2005/08/addressing/anonymous</Address>
+ </ReplyTo>
+ </soap:Header>
+ <soap:Body>
+ <echoIn1 xmlns="http://example.org/echo">input string</echoIn1>
+ </soap:Body>
+</soap:Envelope>
\ No newline at end of file
Added: stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1190/wsa-msgid-mustunderstand.xml
===================================================================
--- stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1190/wsa-msgid-mustunderstand.xml (rev 0)
+++ stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1190/wsa-msgid-mustunderstand.xml 2012-09-21 07:34:27 UTC (rev 16750)
@@ -0,0 +1,16 @@
+<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
+ <soap:Header>
+ <Action xmlns="http://www.w3.org/2005/08/addressing">http://example.org/wsaTestService/wsaTestPortType/echo1Request
+ </Action>
+ <MessageID xmlns="http://www.w3.org/2005/08/addressing" soap:mustUnderstand="1">urn:uuid:6388dfec-a8d3-47a3-ae8f-be5b643e5a60</MessageID>
+ <FaultTo xmlns="http://www.w3.org/2005/08/addressing">http://www.example.com/</FaultTo>
+ <To xmlns="http://www.w3.org/2005/08/addressing">http://localhost:$PORT/jaxws-bp12test1192/Test1192
+ </To>
+ <ReplyTo xmlns="http://www.w3.org/2005/08/addressing">
+ <Address>http://www.w3.org/2005/08/addressing/anonymous</Address>
+ </ReplyTo>
+ </soap:Header>
+ <soap:Body>
+ <echoIn1 xmlns="http://example.org/echo">input string</echoIn1>
+ </soap:Body>
+</soap:Envelope>
\ No newline at end of file
Added: stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1190/wsa-replyto-mustunderstand.xml
===================================================================
--- stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1190/wsa-replyto-mustunderstand.xml (rev 0)
+++ stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1190/wsa-replyto-mustunderstand.xml 2012-09-21 07:34:27 UTC (rev 16750)
@@ -0,0 +1,16 @@
+<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
+ <soap:Header>
+ <Action xmlns="http://www.w3.org/2005/08/addressing">http://example.org/wsaTestService/wsaTestPortType/echo1Request
+ </Action>
+ <MessageID xmlns="http://www.w3.org/2005/08/addressing">urn:uuid:6388dfec-a8d3-47a3-ae8f-be5b643e5a60</MessageID>
+ <FaultTo xmlns="http://www.w3.org/2005/08/addressing">http://www.example.com/</FaultTo>
+ <To xmlns="http://www.w3.org/2005/08/addressing">http://localhost:$PORT/jaxws-bp12test1192/Test1192
+ </To>
+ <ReplyTo xmlns="http://www.w3.org/2005/08/addressing" soap:mustUnderstand="1">
+ <Address>http://www.w3.org/2005/08/addressing/anonymous</Address>
+ </ReplyTo>
+ </soap:Header>
+ <soap:Body>
+ <echoIn1 xmlns="http://example.org/echo">input string</echoIn1>
+ </soap:Body>
+</soap:Envelope>
\ No newline at end of file
Added: stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1190/wsa-to-mustunderstand.xml
===================================================================
--- stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1190/wsa-to-mustunderstand.xml (rev 0)
+++ stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1190/wsa-to-mustunderstand.xml 2012-09-21 07:34:27 UTC (rev 16750)
@@ -0,0 +1,16 @@
+<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
+ <soap:Header>
+ <Action xmlns="http://www.w3.org/2005/08/addressing">http://example.org/wsaTestService/wsaTestPortType/echo1Request
+ </Action>
+ <MessageID xmlns="http://www.w3.org/2005/08/addressing">urn:uuid:6388dfec-a8d3-47a3-ae8f-be5b643e5a60</MessageID>
+ <To xmlns="http://www.w3.org/2005/08/addressing"
+ soap:mustUnderstand="1">http://localhost:$PORT/jaxws-bp12test1190/Test1190
+ </To>
+ <ReplyTo xmlns="http://www.w3.org/2005/08/addressing">
+ <Address>http://www.w3.org/2005/08/addressing/anonymous</Address>
+ </ReplyTo>
+ </soap:Header>
+ <soap:Body>
+ <echoIn1 xmlns="http://example.org/echo">input string</echoIn1>
+ </soap:Body>
+</soap:Envelope>
\ No newline at end of file
Added: stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1190/wsa-without-messageid.xml
===================================================================
--- stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1190/wsa-without-messageid.xml (rev 0)
+++ stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1190/wsa-without-messageid.xml 2012-09-21 07:34:27 UTC (rev 16750)
@@ -0,0 +1,13 @@
+<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
+ <soap:Header>
+ <Action xmlns="http://www.w3.org/2005/08/addressing">http://example.org/wsaTestService/wsaTestPortType/echo1Request
+ </Action>
+ <To xmlns="http://www.w3.org/2005/08/addressing">http://localhost:$PORT/jaxws-bp12test1190/Test1190</To>
+ <ReplyTo xmlns="http://www.w3.org/2005/08/addressing">
+ <Address>http://www.w3.org/2005/08/addressing/anonymous</Address>
+ </ReplyTo>
+ </soap:Header>
+ <soap:Body>
+ <echoIn1 xmlns="http://example.org/echo">input string</echoIn1>
+ </soap:Body>
+</soap:Envelope>
\ No newline at end of file
Added: stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/src/test/resources/jaxws/bp12/wsa/test1190/WEB-INF/web.xml
===================================================================
--- stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/src/test/resources/jaxws/bp12/wsa/test1190/WEB-INF/web.xml (rev 0)
+++ stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/src/test/resources/jaxws/bp12/wsa/test1190/WEB-INF/web.xml 2012-09-21 07:34:27 UTC (rev 16750)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd">
+ <servlet>
+ <servlet-name>Test1190</servlet-name>
+ <servlet-class>org.jboss.test.ws.jaxws.bp12.wsa.test1190.WsaTestPortTypeImpl</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>Test1192</servlet-name>
+ <servlet-class>org.jboss.test.ws.jaxws.bp12.wsa.test1190.WsaTestPortType1192Impl</servlet-class>
+ </servlet>
+
+
+ <servlet-mapping>
+ <servlet-name>Test1192</servlet-name>
+ <url-pattern>/Test1192</url-pattern>
+ </servlet-mapping>
+
+
+ <servlet-mapping>
+ <servlet-name>Test1190</servlet-name>
+ <url-pattern>/Test1190</url-pattern>
+ </servlet-mapping>
+</web-app>
\ No newline at end of file
Added: stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/src/test/resources/jaxws/bp12/wsa/test1190/WEB-INF/wsdl/Test1190.wsdl
===================================================================
--- stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/src/test/resources/jaxws/bp12/wsa/test1190/WEB-INF/wsdl/Test1190.wsdl (rev 0)
+++ stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/src/test/resources/jaxws/bp12/wsa/test1190/WEB-INF/wsdl/Test1190.wsdl 2012-09-21 07:34:27 UTC (rev 16750)
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="utf-8"?>
+<definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:s1="http://example.org/echo"
+ xmlns:service="http://example.org/wsaTestService"
+ xmlns:soap11="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:wsp="http://www.w3.org/ns/ws-policy"
+ xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utilit..."
+ xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata"
+ targetNamespace="http://example.org/wsaTestService">
+
+ <wsp:Policy wsu:Id="wsaTestSoap11Binding_Policy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <wsam:Addressing>
+ <wsp:Policy/>
+ </wsam:Addressing>
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+
+ <types>
+ <xs:schema targetNamespace="http://example.org/echo"
+ elementFormDefault="qualified" attributeFormDefault="unqualified">
+ <xs:element name='echoIn1' type='xs:string'/>
+ <xs:element name='echoOut1' type='xs:string'/>
+ <xs:element name='echoIn2' type='xs:string'/>
+ <xs:element name='echoOut2' type='xs:string'/>
+ </xs:schema>
+ </types>
+ <message name="wsaEchoInMessage1">
+ <part name="wsaEchoInPart" element="s1:echoIn1"/>
+ </message>
+
+ <message name="wsaEchoOutMessage1">
+ <part name="wsaEchoOutPart" element="s1:echoOut1"/>
+ </message>
+ <message name="wsaEchoInMessage2">
+ <part name="wsaEchoInPart" element="s1:echoIn2"/>
+ </message>
+
+ <message name="wsaEchoOutMessage2">
+ <part name="wsaEchoOutPart" element="s1:echoOut2"/>
+ </message>
+
+ <portType name="wsaTestPortType">
+ <operation name="echo1">
+ <input message="service:wsaEchoInMessage1"/>
+ <output message="service:wsaEchoOutMessage1"/>
+ </operation>
+
+ <operation name="echo2">
+ <input message="service:wsaEchoInMessage2"/>
+ <output message="service:wsaEchoOutMessage2"/>
+ </operation>
+
+ </portType>
+
+ <binding name="wsaTestSoap11Binding" type="service:wsaTestPortType">
+ <wsp:PolicyReference URI="#wsaTestSoap11Binding_Policy"/>
+ <soap11:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="echo1">
+ <soap11:operation style="document" soapAction=""/>
+ <input>
+ <soap11:body use="literal"/>
+ </input>
+ <output>
+ <soap11:body use="literal"/>
+ </output>
+ </operation>
+
+ <operation name="echo2">
+ <soap11:operation style="document"/>
+ <input>
+ <soap11:body use="literal"/>
+ </input>
+ <output>
+ <soap11:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+
+ <service name="wsaTestService">
+ <port name="wsaTestPort" binding="service:wsaTestSoap11Binding">
+ <soap11:address location="http://example.org/node/B"/>
+ </port>
+ </service>
+</definitions>
Added: stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/src/test/resources/jaxws/bp12/wsa/test1190/WEB-INF/wsdl/Test1192.wsdl
===================================================================
--- stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/src/test/resources/jaxws/bp12/wsa/test1190/WEB-INF/wsdl/Test1192.wsdl (rev 0)
+++ stack/cxf/branches/jbossws-cxf-bp-test/modules/testsuite/bp12-tests/src/test/resources/jaxws/bp12/wsa/test1190/WEB-INF/wsdl/Test1192.wsdl 2012-09-21 07:34:27 UTC (rev 16750)
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="utf-8"?>
+<definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:s1="http://example.org/echo"
+ xmlns:service="http://example.org/wsaTestService"
+ xmlns:soap11="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:wsp="http://www.w3.org/ns/ws-policy"
+ xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utilit..."
+ xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata"
+ targetNamespace="http://example.org/wsaTestService">
+
+ <types>
+ <xs:schema targetNamespace="http://example.org/echo"
+ elementFormDefault="qualified" attributeFormDefault="unqualified">
+ <xs:element name='echoIn1' type='xs:string'/>
+ <xs:element name='echoOut1' type='xs:string'/>
+ <xs:element name='echoIn2' type='xs:string'/>
+ <xs:element name='echoOut2' type='xs:string'/>
+ </xs:schema>
+ </types>
+ <message name="wsaEchoInMessage1">
+ <part name="wsaEchoInPart" element="s1:echoIn1"/>
+ </message>
+
+ <message name="wsaEchoOutMessage1">
+ <part name="wsaEchoOutPart" element="s1:echoOut1"/>
+ </message>
+ <message name="wsaEchoInMessage2">
+ <part name="wsaEchoInPart" element="s1:echoIn2"/>
+ </message>
+
+ <message name="wsaEchoOutMessage2">
+ <part name="wsaEchoOutPart" element="s1:echoOut2"/>
+ </message>
+
+ <portType name="wsaTestPortType">
+ <operation name="echo1">
+ <input message="service:wsaEchoInMessage1"/>
+ <output message="service:wsaEchoOutMessage1"/>
+ </operation>
+
+ <operation name="echo2">
+ <input message="service:wsaEchoInMessage2"/>
+ <output message="service:wsaEchoOutMessage2"/>
+ </operation>
+
+ </portType>
+
+ <binding name="wsaTestSoap11Binding" type="service:wsaTestPortType">
+ <soap11:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="echo1">
+ <soap11:operation style="document" soapAction=""/>
+ <input>
+ <soap11:body use="literal"/>
+ </input>
+ <output>
+ <soap11:body use="literal"/>
+ </output>
+ </operation>
+
+ <operation name="echo2">
+ <soap11:operation style="document"/>
+ <input>
+ <soap11:body use="literal"/>
+ </input>
+ <output>
+ <soap11:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+
+ <service name="wsaTestService">
+ <port name="wsaTestPort" binding="service:wsaTestSoap11Binding">
+ <soap11:address location="http://example.org/node/B"/>
+ </port>
+ </service>
+</definitions>
12 years, 4 months
JBossWS SVN: r16749 - stack/cxf/branches/ropalka_JBWS-3550/modules/server/src/test/java/org/jboss/wsf/stack/cxf.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2012-09-20 06:04:59 -0400 (Thu, 20 Sep 2012)
New Revision: 16749
Added:
stack/cxf/branches/ropalka_JBWS-3550/modules/server/src/test/java/org/jboss/wsf/stack/cxf/JBossWSInvokerTest.java
Log:
[JBWS-3550] resuscitate test
Added: stack/cxf/branches/ropalka_JBWS-3550/modules/server/src/test/java/org/jboss/wsf/stack/cxf/JBossWSInvokerTest.java
===================================================================
--- stack/cxf/branches/ropalka_JBWS-3550/modules/server/src/test/java/org/jboss/wsf/stack/cxf/JBossWSInvokerTest.java (rev 0)
+++ stack/cxf/branches/ropalka_JBWS-3550/modules/server/src/test/java/org/jboss/wsf/stack/cxf/JBossWSInvokerTest.java 2012-09-20 10:04:59 UTC (rev 16749)
@@ -0,0 +1,104 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, 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.wsf.stack.cxf;
+
+import java.lang.reflect.Method;
+import java.util.List;
+
+import javax.xml.ws.WebServiceContext;
+import junit.framework.TestCase;
+import org.apache.cxf.jaxws.context.WebServiceContextImpl;
+import org.apache.cxf.endpoint.Endpoint;
+import org.apache.cxf.message.Exchange;
+import org.apache.cxf.message.ExchangeImpl;
+import org.apache.cxf.message.Message;
+import org.apache.cxf.message.MessageImpl;
+import org.apache.cxf.service.Service;
+import org.apache.cxf.service.ServiceImpl;
+import org.apache.cxf.service.invoker.MethodDispatcher;
+import org.apache.cxf.service.model.BindingOperationInfo;
+import org.apache.cxf.service.model.OperationInfo;
+
+
+/**
+ * A test case for CXF Invoker integration
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 20-Jun-2012
+ *
+ */
+public class JBossWSInvokerTest extends TestCase
+{
+ /**
+ * The JBossWSInvoker internals rely on the Apache CXF side of the Invoker abstraction to properly
+ * set the generated WrappedMessageContext into the WebServiceContextImpl's threadlocal. As a consequence,
+ * the JBossWSInvoker::performInvocation method can build up the JBoss integration WebServiceContext without
+ * needing to pass in a MessageContext, as the properly created one is automatically retrieved internally
+ * using the Apache CXF thread local. This all however assumes the Invoker inheritance tree is not erroneously
+ * changed or the integration is not inadvertently broken in some way.
+ * This test hence verifies the MessageContext instance is available inside the performInvocation method.
+ */
+ public void testMessageContextThreadLocal()
+ {
+ TestInvoker invoker = new TestInvoker();
+ Exchange exchange = getTestExchange();
+ Object obj = invoker.invoke(exchange, null);
+ String res = obj instanceof List<?> ? ((List<?>)obj).get(0).toString() : obj.toString();
+ assertEquals("OK", res);
+ }
+
+ private static class TestInvoker extends JBossWSInvoker
+ {
+ @Override
+ protected Object performInvocation(Exchange exchange, final Object serviceObject, Method m, Object[] paramArray)
+ throws Exception
+ {
+ WebServiceContext wsCtx = new WebServiceContextImpl(null);
+ return wsCtx.getMessageContext() != null ? "OK" : "FAIL";
+ }
+ }
+
+ //build up a fake exchange instance, the minimum required to let the flow proceed till the JBossWSInvoker
+ private Exchange getTestExchange() {
+ Exchange exchange = new ExchangeImpl();
+ Message message = new MessageImpl();
+ message.setExchange(exchange);
+ exchange.setInMessage(message);
+ Service service = new ServiceImpl();
+ MethodDispatcher md = new MethodDispatcher() {
+ @Override
+ public Method getMethod(BindingOperationInfo op) {
+ return this.getClass().getMethods()[0];
+ }
+ @Override
+ public BindingOperationInfo getBindingOperation(Method m, Endpoint endpoint) {
+ return null;
+ }
+ @Override
+ public void bind(OperationInfo o, Method... methods) {
+ }
+ };
+ service.put(MethodDispatcher.class.getName(), md);
+ exchange.put(Service.class, service);
+ return exchange;
+ }
+}
12 years, 4 months
JBossWS SVN: r16748 - in stack/cxf/branches/ropalka_JBWS-3550: modules/dist and 6 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2012-09-20 05:38:09 -0400 (Thu, 20 Sep 2012)
New Revision: 16748
Removed:
stack/cxf/branches/ropalka_JBWS-3550/modules/server/src/main/java/org/jboss/wsf/stack/cxf/WebServiceContextFactoryImpl.java
stack/cxf/branches/ropalka_JBWS-3550/modules/server/src/test/java/org/jboss/wsf/stack/cxf/JBossWSInvokerTest.java
Modified:
stack/cxf/branches/ropalka_JBWS-3550/modules/dist/pom.xml
stack/cxf/branches/ropalka_JBWS-3550/modules/dist/src/main/distro/build-deploy.xml
stack/cxf/branches/ropalka_JBWS-3550/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml
stack/cxf/branches/ropalka_JBWS-3550/modules/server/src/main/java/org/jboss/wsf/stack/cxf/CXFServletExt.java
stack/cxf/branches/ropalka_JBWS-3550/modules/server/src/main/java/org/jboss/wsf/stack/cxf/JBossWSInvoker.java
stack/cxf/branches/ropalka_JBWS-3550/modules/server/src/main/java/org/jboss/wsf/stack/cxf/transport/ServletHelper.java
stack/cxf/branches/ropalka_JBWS-3550/modules/testsuite/cxf-tests/scripts/cxf-samples-jars-jaxws.xml
stack/cxf/branches/ropalka_JBWS-3550/pom.xml
Log:
[JBWS-3550] switch to new JAXWS POJO invocation process
Modified: stack/cxf/branches/ropalka_JBWS-3550/modules/dist/pom.xml
===================================================================
--- stack/cxf/branches/ropalka_JBWS-3550/modules/dist/pom.xml 2012-09-20 09:02:57 UTC (rev 16747)
+++ stack/cxf/branches/ropalka_JBWS-3550/modules/dist/pom.xml 2012-09-20 09:38:09 UTC (rev 16748)
@@ -146,6 +146,10 @@
<artifactId>jbossws-jboss712-server-integration</artifactId>
<scope>provided</scope>
</dependency>
+ <dependency>
+ <groupId>org.jboss</groupId>
+ <artifactId>jandex</artifactId>
+ </dependency>
<!--junit-->
<dependency>
<groupId>junit</groupId>
Modified: stack/cxf/branches/ropalka_JBWS-3550/modules/dist/src/main/distro/build-deploy.xml
===================================================================
--- stack/cxf/branches/ropalka_JBWS-3550/modules/dist/src/main/distro/build-deploy.xml 2012-09-20 09:02:57 UTC (rev 16747)
+++ stack/cxf/branches/ropalka_JBWS-3550/modules/dist/src/main/distro/build-deploy.xml 2012-09-20 09:38:09 UTC (rev 16748)
@@ -31,13 +31,20 @@
<target name="deploy-structure-jboss71x" depends="prepare-deploy">
<delete dir="${deploy.structure}"/>
- <path id="jbossws-common.path">
+ <path id="jboss.ant.tasks.classpath">
<fileset dir="${deploy.artifacts.dir}">
<include name="**/jbossws-common-tools.jar"/>
+ <include name="**/jandex.jar"/>
</fileset>
</path>
- <taskdef name="installModules" classname="org.jboss.ws.tools.ant.InstallModulesTask" classpathref="jbossws-common.path"/>
+ <taskdef name="installModules" classname="org.jboss.ws.tools.ant.InstallModulesTask" classpathref="jboss.ant.tasks.classpath"/>
+ <taskdef name="jandex" classname="org.jboss.jandex.JandexAntTask" classpathref="jboss.ant.tasks.classpath"/>
+ <jandex run="true" verbose="false" newJar="true">
+ <fileset dir="${deploy.artifacts.dir}/lib">
+ <include name="cxf*security.jar"/>
+ </fileset>
+ </jandex>
<antcall target="deploy-jbossws-cxf-modules" inheritall="false">
<param name="installserver" value="${deploy.structure}"/>
<param name="thirdpartydir" value="${deploy.artifacts.dir}"/>
@@ -140,13 +147,20 @@
<target name="deploy-structure-jboss72x" depends="prepare-deploy">
<delete dir="${deploy.structure}"/>
- <path id="jbossws-common.path">
+ <path id="jboss.ant.tasks.classpath">
<fileset dir="${deploy.artifacts.dir}">
<include name="**/jbossws-common-tools.jar"/>
+ <include name="**/jandex.jar"/>
</fileset>
</path>
- <taskdef name="installModules" classname="org.jboss.ws.tools.ant.InstallModulesTask" classpathref="jbossws-common.path"/>
+ <taskdef name="installModules" classname="org.jboss.ws.tools.ant.InstallModulesTask" classpathref="jboss.ant.tasks.classpath"/>
+ <taskdef name="jandex" classname="org.jboss.jandex.JandexAntTask" classpathref="jboss.ant.tasks.classpath"/>
+ <jandex run="true" verbose="false" newJar="true">
+ <fileset dir="${deploy.artifacts.dir}/lib">
+ <include name="cxf*security.jar"/>
+ </fileset>
+ </jandex>
<antcall target="deploy-jbossws-cxf-modules" inheritall="false">
<param name="installserver" value="${deploy.structure}"/>
<param name="thirdpartydir" value="${deploy.artifacts.dir}"/>
Modified: stack/cxf/branches/ropalka_JBWS-3550/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml
===================================================================
--- stack/cxf/branches/ropalka_JBWS-3550/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml 2012-09-20 09:02:57 UTC (rev 16747)
+++ stack/cxf/branches/ropalka_JBWS-3550/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml 2012-09-20 09:38:09 UTC (rev 16748)
@@ -42,6 +42,7 @@
<include>org.apache.cxf.xjcplugins:cxf-*</include>
<include>com.sun.xml.bind:jaxb-impl:jar</include>
<include>com.sun.xml.bind:jaxb-xjc:jar</include>
+ <include>org.jboss:jandex:jar</include>
<include>org.jboss.ws:jbossws-api:jar</include>
<include>org.jboss.ws:jbossws-common:jar</include>
<include>org.jboss.ws:jbossws-spi:jar</include>
Modified: stack/cxf/branches/ropalka_JBWS-3550/modules/server/src/main/java/org/jboss/wsf/stack/cxf/CXFServletExt.java
===================================================================
--- stack/cxf/branches/ropalka_JBWS-3550/modules/server/src/main/java/org/jboss/wsf/stack/cxf/CXFServletExt.java 2012-09-20 09:02:57 UTC (rev 16747)
+++ stack/cxf/branches/ropalka_JBWS-3550/modules/server/src/main/java/org/jboss/wsf/stack/cxf/CXFServletExt.java 2012-09-20 09:38:09 UTC (rev 16748)
@@ -91,12 +91,6 @@
}
@Override
- public void destroy()
- {
- ServletHelper.callPreDestroy(endpoint);
- }
-
- @Override
public void doHead(HttpServletRequest request, HttpServletResponse response, ServletContext context)
throws ServletException, IOException
{
Modified: stack/cxf/branches/ropalka_JBWS-3550/modules/server/src/main/java/org/jboss/wsf/stack/cxf/JBossWSInvoker.java
===================================================================
--- stack/cxf/branches/ropalka_JBWS-3550/modules/server/src/main/java/org/jboss/wsf/stack/cxf/JBossWSInvoker.java 2012-09-20 09:02:57 UTC (rev 16747)
+++ stack/cxf/branches/ropalka_JBWS-3550/modules/server/src/main/java/org/jboss/wsf/stack/cxf/JBossWSInvoker.java 2012-09-20 09:38:09 UTC (rev 16748)
@@ -43,12 +43,12 @@
import java.util.List;
import javax.xml.ws.WebServiceContext;
-import javax.xml.ws.handler.MessageContext;
import org.apache.cxf.Bus;
import org.apache.cxf.BusFactory;
import org.apache.cxf.helpers.CastUtils;
import org.apache.cxf.jaxws.JAXWSMethodInvoker;
+import org.apache.cxf.jaxws.context.WebServiceContextImpl;
import org.apache.cxf.message.Exchange;
import org.apache.cxf.message.MessageContentsList;
import org.apache.cxf.service.Service;
@@ -57,15 +57,12 @@
import org.apache.cxf.service.invoker.MethodDispatcher;
import org.apache.cxf.service.model.BindingOperationInfo;
import org.jboss.ws.api.util.ServiceLoader;
-import org.jboss.wsf.spi.SPIProvider;
-import org.jboss.wsf.spi.SPIProviderResolver;
import org.jboss.wsf.spi.classloading.ClassLoaderProvider;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.invocation.Invocation;
import org.jboss.wsf.spi.invocation.InvocationContext;
import org.jboss.wsf.spi.invocation.InvocationHandler;
import org.jboss.wsf.spi.invocation.NamespaceContextSelectorWrapperFactory;
-import org.jboss.wsf.spi.invocation.WebServiceContextFactory;
/**
* A JBossWS extension of the Apache CXF JAXWSMethodInvoker invoker.
@@ -101,7 +98,6 @@
public class JBossWSInvoker extends JAXWSMethodInvoker implements Invoker
{
private Object targetBean;
- private WebServiceContextFactory contextFactory;
private NamespaceContextSelectorWrapperFactory nsCtxSelectorFactory;
public JBossWSInvoker() {
@@ -155,9 +151,6 @@
} finally {
//make sure the right bus is restored after coming back from the endpoint method
BusFactory.setThreadDefaultBus(threadBus);
- if (ep.getAttachment(Object.class) == null) { //JBWS-2486
- ep.addAttachment(Object.class, inv.getInvocationContext().getTargetBean());
- }
clearNamespaceContextSelector(exchange);
}
}
@@ -165,20 +158,14 @@
private Invocation createInvocation(InvocationHandler invHandler, Endpoint ep, Method m, Object[] paramArray) {
Invocation inv = invHandler.createInvocation();
InvocationContext invContext = inv.getInvocationContext();
- WebServiceContext wsCtx = getWebServiceContext(null);
+ WebServiceContext wsCtx = new WebServiceContextImpl(null);
invContext.addAttachment(WebServiceContext.class, wsCtx);
- invContext.addAttachment(MessageContext.class, wsCtx.getMessageContext());
- invContext.setTargetBean(targetBean != null ? targetBean : ep.getAttachment(Object.class)); //JBWS-2486 - JBWS-3002
+ invContext.setTargetBean(targetBean);
inv.setJavaMethod(m);
inv.setArgs(paramArray);
return inv;
}
- protected WebServiceContext getWebServiceContext(MessageContext msgCtx)
- {
- return getWebServiceContextFactory().newWebServiceContext(msgCtx);
- }
-
protected void setNamespaceContextSelector(Exchange exchange)
{
if (exchange.isOneWay() && nsCtxSelectorFactory != null)
@@ -194,15 +181,4 @@
nsCtxSelectorFactory.getWrapper().clearCurrentThreadSelector(exchange);
}
}
-
- protected synchronized WebServiceContextFactory getWebServiceContextFactory()
- {
- if (contextFactory == null)
- {
- ClassLoader cl = ClassLoaderProvider.getDefaultProvider().getServerIntegrationClassLoader();
- SPIProvider spiProvider = SPIProviderResolver.getInstance(cl).getProvider();
- contextFactory = spiProvider.getSPI(WebServiceContextFactory.class, cl);
- }
- return contextFactory;
- }
}
Deleted: stack/cxf/branches/ropalka_JBWS-3550/modules/server/src/main/java/org/jboss/wsf/stack/cxf/WebServiceContextFactoryImpl.java
===================================================================
--- stack/cxf/branches/ropalka_JBWS-3550/modules/server/src/main/java/org/jboss/wsf/stack/cxf/WebServiceContextFactoryImpl.java 2012-09-20 09:02:57 UTC (rev 16747)
+++ stack/cxf/branches/ropalka_JBWS-3550/modules/server/src/main/java/org/jboss/wsf/stack/cxf/WebServiceContextFactoryImpl.java 2012-09-20 09:38:09 UTC (rev 16748)
@@ -1,44 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2012, 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.wsf.stack.cxf;
-
-import javax.xml.ws.handler.MessageContext;
-
-import org.apache.cxf.jaxws.context.WebServiceContextImpl;
-import org.jboss.wsf.spi.invocation.ExtensibleWebServiceContext;
-import org.jboss.wsf.spi.invocation.WebServiceContextDelegate;
-import org.jboss.wsf.spi.invocation.WebServiceContextFactory;
-
-/**
- * WebServiceContext factory for CXF integration.
- *
- * @author alessio.soldano(a)jboss.com
- * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
- */
-public class WebServiceContextFactoryImpl extends WebServiceContextFactory
-{
- @Override
- public ExtensibleWebServiceContext newWebServiceContext(MessageContext messageContext)
- {
- return new WebServiceContextDelegate(new WebServiceContextImpl(messageContext));
- }
-}
Modified: stack/cxf/branches/ropalka_JBWS-3550/modules/server/src/main/java/org/jboss/wsf/stack/cxf/transport/ServletHelper.java
===================================================================
--- stack/cxf/branches/ropalka_JBWS-3550/modules/server/src/main/java/org/jboss/wsf/stack/cxf/transport/ServletHelper.java 2012-09-20 09:02:57 UTC (rev 16747)
+++ stack/cxf/branches/ropalka_JBWS-3550/modules/server/src/main/java/org/jboss/wsf/stack/cxf/transport/ServletHelper.java 2012-09-20 09:38:09 UTC (rev 16748)
@@ -21,8 +21,6 @@
*/
package org.jboss.wsf.stack.cxf.transport;
-import static org.jboss.ws.common.integration.WSHelper.isJaxwsJseEndpoint;
-
import java.io.IOException;
import java.util.List;
import java.util.ResourceBundle;
@@ -47,7 +45,6 @@
import org.apache.cxf.management.interceptor.ResponseTimeMessageOutInterceptor;
import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.ObjectNameFactory;
-import org.jboss.ws.common.injection.InjectionHelper;
import org.jboss.wsf.spi.SPIProvider;
import org.jboss.wsf.spi.SPIProviderResolver;
import org.jboss.wsf.spi.classloading.ClassLoaderProvider;
@@ -118,8 +115,6 @@
private static void injectServiceAndHandlerResources(Endpoint endpoint)
{
ServerFactoryBean factory = endpoint.getAttachment(ServerFactoryBean.class);
- // ping endpoint to force injection
- endpoint.getInstanceProvider().getInstance(endpoint.getTargetBeanName());
if (factory != null)
{
List<Handler> chain = ((JaxWsEndpointImpl) factory.getServer().getEndpoint()).getJaxwsBinding()
@@ -129,30 +124,11 @@
for (Handler handler : chain)
{
final Reference handlerReference = endpoint.getInstanceProvider().getInstance(handler.getClass().getName());
- if (!handlerReference.isInitialized()) {
- final Object handlerInstance = handlerReference.getValue();
- InjectionHelper.callPostConstructMethod(handlerInstance);
- handlerReference.setInitialized();
- }
}
}
}
}
- public static void callPreDestroy(Endpoint endpoint)
- {
- ServerFactoryBean factory = endpoint.getAttachment(ServerFactoryBean.class);
- if (factory != null)
- {
- if (isJaxwsJseEndpoint(endpoint) && factory.getServiceBean() != null)
- {
- final Reference epReference = endpoint.getInstanceProvider().getInstance(factory.getServiceBean().getClass().getName());
- final Object epInstance = epReference.getValue();
- InjectionHelper.callPreDestroyMethod(epInstance);
- }
- }
- }
-
public static void callRequestHandler(HttpServletRequest req, HttpServletResponse res, ServletContext ctx, Bus bus,
Endpoint endpoint) throws ServletException
{
Deleted: stack/cxf/branches/ropalka_JBWS-3550/modules/server/src/test/java/org/jboss/wsf/stack/cxf/JBossWSInvokerTest.java
===================================================================
--- stack/cxf/branches/ropalka_JBWS-3550/modules/server/src/test/java/org/jboss/wsf/stack/cxf/JBossWSInvokerTest.java 2012-09-20 09:02:57 UTC (rev 16747)
+++ stack/cxf/branches/ropalka_JBWS-3550/modules/server/src/test/java/org/jboss/wsf/stack/cxf/JBossWSInvokerTest.java 2012-09-20 09:38:09 UTC (rev 16748)
@@ -1,105 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2012, 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.wsf.stack.cxf;
-
-import java.lang.reflect.Method;
-import java.util.List;
-
-import javax.xml.ws.WebServiceContext;
-
-import junit.framework.TestCase;
-
-import org.apache.cxf.endpoint.Endpoint;
-import org.apache.cxf.message.Exchange;
-import org.apache.cxf.message.ExchangeImpl;
-import org.apache.cxf.message.Message;
-import org.apache.cxf.message.MessageImpl;
-import org.apache.cxf.service.Service;
-import org.apache.cxf.service.ServiceImpl;
-import org.apache.cxf.service.invoker.MethodDispatcher;
-import org.apache.cxf.service.model.BindingOperationInfo;
-import org.apache.cxf.service.model.OperationInfo;
-
-
-/**
- * A test case for CXF Invoker integration
- *
- * @author alessio.soldano(a)jboss.com
- * @since 20-Jun-2012
- *
- */
-public class JBossWSInvokerTest extends TestCase
-{
- /**
- * The JBossWSInvoker internals rely on the Apache CXF side of the Invoker abstraction to properly
- * set the generated WrappedMessageContext into the WebServiceContextImpl's threadlocal. As a consequence,
- * the JBossWSInvoker::performInvocation method can build up the JBoss integration WebServiceContext without
- * needing to pass in a MessageContext, as the properly created one is automatically retrieved internally
- * using the Apache CXF thread local. This all however assumes the Invoker inheritance tree is not erroneously
- * changed or the integration is not inadvertently broken in some way.
- * This test hence verifies the MessageContext instance is available inside the performInvocation method.
- */
- public void testMessageContextThreadLocal()
- {
- TestInvoker invoker = new TestInvoker();
- Exchange exchange = getTestExchange();
- Object obj = invoker.invoke(exchange, null);
- String res = obj instanceof List<?> ? ((List<?>)obj).get(0).toString() : obj.toString();
- assertEquals("OK", res);
- }
-
- private static class TestInvoker extends JBossWSInvoker
- {
- @Override
- protected Object performInvocation(Exchange exchange, final Object serviceObject, Method m, Object[] paramArray)
- throws Exception
- {
- WebServiceContext wsCtx = getWebServiceContext(null);
- return wsCtx.getMessageContext() != null ? "OK" : "FAIL";
- }
- }
-
- //build up a fake exchange instance, the minimum required to let the flow proceed till the JBossWSInvoker
- private Exchange getTestExchange() {
- Exchange exchange = new ExchangeImpl();
- Message message = new MessageImpl();
- message.setExchange(exchange);
- exchange.setInMessage(message);
- Service service = new ServiceImpl();
- MethodDispatcher md = new MethodDispatcher() {
- @Override
- public Method getMethod(BindingOperationInfo op) {
- return this.getClass().getMethods()[0];
- }
- @Override
- public BindingOperationInfo getBindingOperation(Method m, Endpoint endpoint) {
- return null;
- }
- @Override
- public void bind(OperationInfo o, Method... methods) {
- }
- };
- service.put(MethodDispatcher.class.getName(), md);
- exchange.put(Service.class, service);
- return exchange;
- }
-}
Modified: stack/cxf/branches/ropalka_JBWS-3550/modules/testsuite/cxf-tests/scripts/cxf-samples-jars-jaxws.xml
===================================================================
--- stack/cxf/branches/ropalka_JBWS-3550/modules/testsuite/cxf-tests/scripts/cxf-samples-jars-jaxws.xml 2012-09-20 09:02:57 UTC (rev 16747)
+++ stack/cxf/branches/ropalka_JBWS-3550/modules/testsuite/cxf-tests/scripts/cxf-samples-jars-jaxws.xml 2012-09-20 09:38:09 UTC (rev 16748)
@@ -394,7 +394,7 @@
<include name="stsKeystore.properties" />
</zipfileset>
<manifest>
- <attribute name="Dependencies" value="org.apache.ws.security,org.apache.cxf.impl"/> <!-- cxf impl required to extend STS impl -->
+ <attribute name="Dependencies" value="org.apache.ws.security,org.apache.cxf.impl annotations"/> <!-- cxf impl required to extend STS impl -->
</manifest>
</war>
Modified: stack/cxf/branches/ropalka_JBWS-3550/pom.xml
===================================================================
--- stack/cxf/branches/ropalka_JBWS-3550/pom.xml 2012-09-20 09:02:57 UTC (rev 16747)
+++ stack/cxf/branches/ropalka_JBWS-3550/pom.xml 2012-09-20 09:38:09 UTC (rev 16748)
@@ -67,7 +67,7 @@
<jbossws.jboss710.version>4.1.0-SNAPSHOT</jbossws.jboss710.version>
<jbossws.jboss711.version>4.1.0-SNAPSHOT</jbossws.jboss711.version>
<jbossws.jboss712.version>4.1.0-SNAPSHOT</jbossws.jboss712.version>
- <jbossws.native.version>4.1.0.Beta2</jbossws.native.version>
+ <jbossws.native.version>4.1.0-SNAPSHOT</jbossws.native.version>
<jboss710.version>7.1.0.Final</jboss710.version>
<jboss711.version>7.1.1.Final</jboss711.version>
<jboss712.version>7.1.2.Final</jboss712.version>
@@ -78,6 +78,7 @@
<cxf.xjcplugins.version>2.6.0</cxf.xjcplugins.version>
<fastinfoset.api.version>1.2.9</fastinfoset.api.version>
<jboss.common.core.version>2.2.17.GA</jboss.common.core.version>
+ <jboss.jandex.version>1.0.3.Final</jboss.jandex.version>
<jboss.logging.version>3.1.0.GA</jboss.logging.version>
<jboss.xb.version>2.0.3.GA</jboss.xb.version>
<picketbox.version>4.0.9.Final</picketbox.version>
@@ -1217,6 +1218,11 @@
<version>${commons.logging.version}</version>
</dependency>
<dependency>
+ <groupId>org.jboss</groupId>
+ <artifactId>jandex</artifactId>
+ <version>${jboss.jandex.version}</version>
+ </dependency>
+ <dependency>
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging</artifactId>
<version>${jboss.logging.version}</version>
12 years, 4 months
JBossWS SVN: r16747 - in stack/native/branches/ropalka_JBWS-3550: modules/core/src/main/java/org/jboss/ws/core/server and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2012-09-20 05:02:57 -0400 (Thu, 20 Sep 2012)
New Revision: 16747
Added:
stack/native/branches/ropalka_JBWS-3550/modules/core/src/main/java/org/jboss/wsf/stack/jbws/AbstractEndpointServlet.java
Modified:
stack/native/branches/ropalka_JBWS-3550/modules/core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java
stack/native/branches/ropalka_JBWS-3550/modules/core/src/main/java/org/jboss/wsf/stack/jbws/EndpointServlet.java
stack/native/branches/ropalka_JBWS-3550/modules/core/src/main/java/org/jboss/wsf/stack/jbws/Message.properties
stack/native/branches/ropalka_JBWS-3550/pom.xml
Log:
[JBWS-3550] removing useless classes
Modified: stack/native/branches/ropalka_JBWS-3550/modules/core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java
===================================================================
--- stack/native/branches/ropalka_JBWS-3550/modules/core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java 2012-09-20 08:37:08 UTC (rev 16746)
+++ stack/native/branches/ropalka_JBWS-3550/modules/core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java 2012-09-20 09:02:57 UTC (rev 16747)
@@ -282,23 +282,15 @@
{
synchronized(endpoint)
{
- Object endpointImpl = endpoint.getAttachment(Object.class);
- if (endpointImpl == null)
- {
- try
- {
- // create endpoint instance
- final Class<?> endpointImplClass = endpoint.getTargetBeanClass();
- endpointImpl = endpoint.getInstanceProvider().getInstance(endpointImplClass.getName()).getValue();
- endpoint.addAttachment(Object.class, endpointImpl);
- }
- catch (Exception ex)
- {
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "CANNOT_CREATE_ENDPOINT_INSTANCE"), ex);
- }
- }
-
- return endpointImpl;
+ try
+ {
+ final String endpointClassName = endpoint.getTargetBeanName();
+ return endpoint.getInstanceProvider().getInstance(endpointClassName).getValue();
+ }
+ catch (Exception ex)
+ {
+ throw new IllegalStateException(BundleUtils.getMessage(bundle, "CANNOT_CREATE_ENDPOINT_INSTANCE"), ex);
+ }
}
}
Added: stack/native/branches/ropalka_JBWS-3550/modules/core/src/main/java/org/jboss/wsf/stack/jbws/AbstractEndpointServlet.java
===================================================================
--- stack/native/branches/ropalka_JBWS-3550/modules/core/src/main/java/org/jboss/wsf/stack/jbws/AbstractEndpointServlet.java (rev 0)
+++ stack/native/branches/ropalka_JBWS-3550/modules/core/src/main/java/org/jboss/wsf/stack/jbws/AbstractEndpointServlet.java 2012-09-20 09:02:57 UTC (rev 16747)
@@ -0,0 +1,197 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.wsf.stack.jbws;
+
+import static org.jboss.ws.common.integration.WSHelper.isJseDeployment;
+
+import java.io.IOException;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.util.ResourceBundle;
+
+import javax.management.ObjectName;
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.jboss.ws.WSException;
+import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.common.ObjectNameFactory;
+import org.jboss.wsf.spi.SPIProvider;
+import org.jboss.wsf.spi.SPIProviderResolver;
+import org.jboss.wsf.spi.classloading.ClassLoaderProvider;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.invocation.EndpointAssociation;
+import org.jboss.wsf.spi.invocation.RequestHandler;
+import org.jboss.wsf.spi.management.EndpointRegistry;
+import org.jboss.wsf.spi.management.EndpointRegistryFactory;
+import org.jboss.wsf.spi.management.EndpointResolver;
+
+/**
+ * A cross stack webservice endpoint servlet.
+ * @author thomas.diesler(a)jboss.org
+ * @author heiko.braun(a)jboss.com
+ * @author richard.opalka(a)jboss.com
+ */
+public abstract class AbstractEndpointServlet extends HttpServlet
+{
+ private static final ResourceBundle bundle = BundleUtils.getBundle(AbstractEndpointServlet.class);
+
+ protected Endpoint endpoint;
+ private EndpointRegistry epRegistry;
+
+ /**
+ * Constructor
+ */
+ protected AbstractEndpointServlet() {}
+
+ /**
+ * Servlet lifecycle init method
+ * @param servletConfig servlet configuration
+ */
+ public final void init(ServletConfig servletConfig) throws ServletException
+ {
+ super.init(servletConfig);
+ this.initRegistry();
+ this.initServiceEndpoint(servletConfig);
+ }
+
+ /**
+ * Serves the requests
+ */
+ public final void service(HttpServletRequest req, HttpServletResponse res)
+ throws ServletException, IOException
+ {
+ try
+ {
+ EndpointAssociation.setEndpoint(endpoint);
+ RequestHandler requestHandler = endpoint.getRequestHandler();
+ requestHandler.handleHttpRequest(endpoint, req, res, getServletContext());
+ }
+ finally
+ {
+ this.postService();
+ EndpointAssociation.removeEndpoint();
+ }
+ }
+
+ /**
+ * Template method
+ */
+ protected void postService()
+ {
+ // does nothing (because of BC)
+ }
+
+ /**
+ * Template method
+ * @param cfg servlet config
+ */
+ protected void postInit(ServletConfig cfg)
+ {
+ // does nothing (because of BC)
+ }
+
+ /**
+ * Abstract method that must be overriden by each stack servlet endpoint
+ * @param servletContext servlet context
+ * @param servletName servlet name
+ * @return new stack specific endpoint resolver
+ */
+ protected abstract EndpointResolver newEndpointResolver(String servletContext, String servletName);
+
+ /**
+ * Initialize the service endpoint
+ */
+ private void initServiceEndpoint(ServletConfig servletConfig)
+ {
+ this.initEndpoint(servletConfig.getServletContext().getContextPath(), getServletName());
+ this.setRuntimeLoader();
+ this.postInit(servletConfig);
+ }
+
+ /**
+ * Initializes endpoint registry
+ */
+ private void initRegistry()
+ {
+ ClassLoader cl = ClassLoaderProvider.getDefaultProvider().getServerIntegrationClassLoader();
+ SPIProvider spiProvider = SPIProviderResolver.getInstance(cl).getProvider();
+ epRegistry = spiProvider.getSPI(EndpointRegistryFactory.class, cl).getEndpointRegistry();
+ }
+
+ /**
+ * Initialize the service endpoint
+ * @param contextPath context path
+ * @param servletName servlet name
+ */
+ private void initEndpoint(String contextPath, String servletName)
+ {
+ final EndpointResolver resolver = newEndpointResolver(contextPath, servletName);
+ this.endpoint = epRegistry.resolve(resolver);
+
+ if (this.endpoint == null)
+ {
+ ObjectName oname = ObjectNameFactory.create(Endpoint.SEPID_DOMAIN + ":" +
+ Endpoint.SEPID_PROPERTY_CONTEXT + "=" + contextPath + "," +
+ Endpoint.SEPID_PROPERTY_ENDPOINT + "=" + servletName
+ );
+ throw new WSException(BundleUtils.getMessage(bundle, "CANNOT_OBTAIN_ENDPOINT_FOR", oname));
+ }
+ }
+
+ /**
+ * Sets runtime classloader for JSE endpoints
+ */
+ private void setRuntimeLoader()
+ {
+ final Deployment dep = endpoint.getService().getDeployment();
+
+ if (isJseDeployment(dep))
+ {
+ ClassLoader classLoader = getContextClassLoader();
+ dep.setRuntimeClassLoader(classLoader);
+ }
+ }
+
+ private static ClassLoader getContextClassLoader()
+ {
+ SecurityManager sm = System.getSecurityManager();
+ if (sm == null)
+ {
+ return Thread.currentThread().getContextClassLoader();
+ }
+ else
+ {
+ return AccessController.doPrivileged(new PrivilegedAction<ClassLoader>() {
+ public ClassLoader run()
+ {
+ return Thread.currentThread().getContextClassLoader();
+ }
+ });
+ }
+ }
+
+}
Modified: stack/native/branches/ropalka_JBWS-3550/modules/core/src/main/java/org/jboss/wsf/stack/jbws/EndpointServlet.java
===================================================================
--- stack/native/branches/ropalka_JBWS-3550/modules/core/src/main/java/org/jboss/wsf/stack/jbws/EndpointServlet.java 2012-09-20 08:37:08 UTC (rev 16746)
+++ stack/native/branches/ropalka_JBWS-3550/modules/core/src/main/java/org/jboss/wsf/stack/jbws/EndpointServlet.java 2012-09-20 09:02:57 UTC (rev 16747)
@@ -31,9 +31,6 @@
import javax.servlet.http.HttpServletResponse;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.injection.InjectionHelper;
-import org.jboss.ws.common.injection.PreDestroyHolder;
-import org.jboss.ws.common.servlet.AbstractEndpointServlet;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.deployment.ServletDelegate;
import org.jboss.wsf.spi.management.EndpointResolver;
@@ -46,8 +43,6 @@
*/
public final class EndpointServlet extends AbstractEndpointServlet implements ServletDelegate
{
- private List<PreDestroyHolder> preDestroyRegistry = new LinkedList<PreDestroyHolder>();
- private final Object lock = new Object();
/**
* Provides Native specific endpoint resolver
@@ -62,50 +57,6 @@
}
@Override
- protected final void postService()
- {
- registerForPreDestroy(endpoint);
- }
-
- @Override
- public final void destroy()
- {
- synchronized(this.lock)
- {
- for (final PreDestroyHolder holder : this.preDestroyRegistry)
- {
- try
- {
- final Object targetBean = holder.getObject();
- InjectionHelper.callPreDestroyMethod(targetBean);
- }
- catch (Exception exception)
- {
- Logger.getLogger(EndpointServlet.class).error(exception.getLocalizedMessage(), exception);
- }
- }
- this.preDestroyRegistry.clear();
- }
- super.destroy();
- }
-
- private void registerForPreDestroy(Endpoint ep)
- {
- PreDestroyHolder holder = (PreDestroyHolder)ep.getAttachment(PreDestroyHolder.class);
- if (holder != null)
- {
- synchronized(this.lock)
- {
- if (!this.preDestroyRegistry.contains(holder))
- {
- this.preDestroyRegistry.add(holder);
- }
- }
- ep.removeAttachment(PreDestroyHolder.class);
- }
- }
-
- @Override
public void doHead(HttpServletRequest request, HttpServletResponse response, ServletContext context)
throws ServletException, IOException
{
Modified: stack/native/branches/ropalka_JBWS-3550/modules/core/src/main/java/org/jboss/wsf/stack/jbws/Message.properties
===================================================================
--- stack/native/branches/ropalka_JBWS-3550/modules/core/src/main/java/org/jboss/wsf/stack/jbws/Message.properties 2012-09-20 08:37:08 UTC (rev 16746)
+++ stack/native/branches/ropalka_JBWS-3550/modules/core/src/main/java/org/jboss/wsf/stack/jbws/Message.properties 2012-09-20 09:02:57 UTC (rev 16747)
@@ -26,3 +26,4 @@
ERROR_PROCESSING_WEB_SERVICE_REQUEST=Error processing web service request
CANNOT_LOAD_CLASS=Cannot load class: {0}
+CANNOT_OBTAIN_ENDPOINT_FOR=Cannot obtain endpoint for: {0}
\ No newline at end of file
Modified: stack/native/branches/ropalka_JBWS-3550/pom.xml
===================================================================
--- stack/native/branches/ropalka_JBWS-3550/pom.xml 2012-09-20 08:37:08 UTC (rev 16746)
+++ stack/native/branches/ropalka_JBWS-3550/pom.xml 2012-09-20 09:02:57 UTC (rev 16747)
@@ -57,10 +57,10 @@
<!-- Properties -->
<properties>
<jbossws.api.version>1.0.1.Beta3</jbossws.api.version>
- <jbossws.spi.version>2.1.0.Beta3</jbossws.spi.version>
- <jbossws.common.version>2.1.0.Beta3</jbossws.common.version>
+ <jbossws.spi.version>2.1.0-SNAPSHOT</jbossws.spi.version>
+ <jbossws.common.version>2.1.0-SNAPSHOT</jbossws.common.version>
<jbossws.common.tools.version>1.0.1.GA</jbossws.common.tools.version>
- <jbossws.shared.testsuite.version>4.1.0.Beta2</jbossws.shared.testsuite.version>
+ <jbossws.shared.testsuite.version>4.1.0-SNAPSHOT</jbossws.shared.testsuite.version>
<jbossws.jboss712.version>4.1.0-SNAPSHOT</jbossws.jboss712.version>
<jboss712.version>7.1.2.Final</jboss712.version>
<jboss720.version>7.2.0.Alpha1-SNAPSHOT</jboss720.version>
12 years, 4 months
JBossWS SVN: r16746 - stack/cxf/branches.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2012-09-20 04:37:08 -0400 (Thu, 20 Sep 2012)
New Revision: 16746
Added:
stack/cxf/branches/ropalka_JBWS-3550/
Log:
creating user branch
12 years, 4 months
JBossWS SVN: r16745 - stack/native/branches.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2012-09-20 04:36:46 -0400 (Thu, 20 Sep 2012)
New Revision: 16745
Added:
stack/native/branches/ropalka_JBWS-3550/
Log:
creating user branch
12 years, 4 months
JBossWS SVN: r16744 - in common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common: deployment and 4 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2012-09-20 04:17:56 -0400 (Thu, 20 Sep 2012)
New Revision: 16744
Removed:
common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/injection/PreDestroyHolder.java
common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/injection/finders/AbstractPostConstructPreDestroyAnnotatedMethodFinder.java
common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/injection/finders/PostConstructMethodFinder.java
common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/injection/finders/PreDestroyMethodFinder.java
common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/invocation/DefaultResourceInjectorFactory.java
common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/invocation/WebServiceContextAdapter.java
common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/invocation/WebServiceContextInjector.java
common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/servlet/
Modified:
common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/deployment/AbstractDefaultEndpoint.java
common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/injection/InjectionHelper.java
common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/invocation/InvocationHandlerJAXWS.java
common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/spi/DefaultSPIProvider.java
Log:
[JBWS-3550] removin useless classes
Modified: common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/deployment/AbstractDefaultEndpoint.java
===================================================================
--- common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/deployment/AbstractDefaultEndpoint.java 2012-09-20 08:04:37 UTC (rev 16743)
+++ common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/deployment/AbstractDefaultEndpoint.java 2012-09-20 08:17:56 UTC (rev 16744)
@@ -33,7 +33,6 @@
import org.jboss.ws.api.monitoring.RecordFilter;
import org.jboss.ws.api.monitoring.RecordProcessor;
import org.jboss.ws.api.util.BundleUtils;
-import org.jboss.ws.common.injection.PreDestroyHolder;
import org.jboss.wsf.spi.deployment.AbstractExtensible;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.deployment.EndpointState;
@@ -218,26 +217,14 @@
@Override
public <T> T addAttachment(Class<T> clazz, Object obj)
{
- boolean isPreDestroyHolderClass = clazz.equals(PreDestroyHolder.class); // JBWS-2268 hack
- boolean isObjectClass = clazz.equals(Object.class); // JBWS-2486 hack
-
- if (!isPreDestroyHolderClass && !isObjectClass)
- {
- assertEndpointSetterAccess();
- }
+ assertEndpointSetterAccess();
return super.addAttachment(clazz, obj);
}
@Override
public <T> T removeAttachment(Class<T> key)
{
- boolean isPreDestroyHolderClass = key.equals(PreDestroyHolder.class); // JBWS-2268 hack
- boolean isObjectClass = key.equals(Object.class); // JBWS-2486 hack
-
- if (!isPreDestroyHolderClass && !isObjectClass)
- {
- assertEndpointSetterAccess();
- }
+ assertEndpointSetterAccess();
return super.removeAttachment(key);
}
Modified: common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/injection/InjectionHelper.java
===================================================================
--- common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/injection/InjectionHelper.java 2012-09-20 08:04:37 UTC (rev 16743)
+++ common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/injection/InjectionHelper.java 2012-09-20 08:17:56 UTC (rev 16744)
@@ -24,14 +24,9 @@
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.Collection;
-import java.util.ResourceBundle;
import javax.xml.ws.WebServiceContext;
-import org.jboss.logging.Logger;
-import org.jboss.ws.api.util.BundleUtils;
-import org.jboss.ws.common.injection.finders.PostConstructMethodFinder;
-import org.jboss.ws.common.injection.finders.PreDestroyMethodFinder;
import org.jboss.ws.common.injection.finders.ResourceFieldFinder;
import org.jboss.ws.common.injection.finders.ResourceMethodFinder;
import org.jboss.ws.common.reflection.ClassProcessor;
@@ -43,22 +38,13 @@
*/
public final class InjectionHelper
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(InjectionHelper.class);
-
- private static final Logger LOG = Logger.getLogger(InjectionHelper.class);
-
- private static final ClassProcessor<Method> POST_CONSTRUCT_METHOD_FINDER = new PostConstructMethodFinder();
- private static final ClassProcessor<Method> PRE_DESTROY_METHOD_FINDER = new PreDestroyMethodFinder();
private static final ClassProcessor<Method> WEB_SERVICE_CONTEXT_METHOD_FINDER = new ResourceMethodFinder(WebServiceContext.class, true);
private static final ClassProcessor<Field> WEB_SERVICE_CONTEXT_FIELD_FINDER = new ResourceFieldFinder(WebServiceContext.class, true);
/**
* Forbidden constructor.
*/
- private InjectionHelper()
- {
- super();
- }
+ private InjectionHelper() {}
/**
* Injects @Resource annotated accessible objects referencing WebServiceContext.
@@ -102,68 +88,6 @@
}
/**
- * Calls @PostConstruct annotated method if exists.
- *
- * @param instance to invoke @PostConstruct annotated method on
- * @see org.jboss.ws.common.injection.finders.PostConstructMethodFinder
- * @see javax.annotation.PostConstruct
- */
- public static void callPostConstructMethod(final Object instance)
- {
- if (instance == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "OBJECT_INSTANCE_CANNOT_BE_NULL"));
-
- final Collection<Method> methods = POST_CONSTRUCT_METHOD_FINDER.process(instance.getClass());
-
- if (methods.size() > 0)
- {
- final Method method = methods.iterator().next();
- if (LOG.isTraceEnabled())
- LOG.trace("Calling @PostConstruct annotated method: " + method);
- try
- {
- invokeMethod(instance, method, null);
- }
- catch (Exception e)
- {
- final String message = "Calling of @PostConstruct annotated method failed: " + method;
- InjectionException.rethrow(message, e);
- }
- }
- }
-
- /**
- * Calls @PreDestroy annotated method if exists.
- *
- * @param instance to invoke @PreDestroy annotated method on
- * @see org.jboss.ws.common.injection.finders.PreDestroyMethodFinder
- * @see javax.annotation.PreDestroy
- */
- public static void callPreDestroyMethod(final Object instance)
- {
- if (instance == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "OBJECT_INSTANCE_CANNOT_BE_NULL"));
-
- final Collection<Method> methods = PRE_DESTROY_METHOD_FINDER.process(instance.getClass());
-
- if (methods.size() > 0)
- {
- final Method method = methods.iterator().next();
- if (LOG.isTraceEnabled())
- LOG.trace("Calling @PreDestroy annotated method: " + method);
- try
- {
- invokeMethod(instance, method, null);
- }
- catch (Exception e)
- {
- final String message = "Calling of @PreDestroy annotated method failed: " + method;
- InjectionException.rethrow(message, e);
- }
- }
- }
-
- /**
* Invokes method on object with specified arguments.
*
* @param instance to invoke method on
Deleted: common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/injection/PreDestroyHolder.java
===================================================================
--- common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/injection/PreDestroyHolder.java 2012-09-20 08:04:37 UTC (rev 16743)
+++ common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/injection/PreDestroyHolder.java 2012-09-20 08:17:56 UTC (rev 16744)
@@ -1,62 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, 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.ws.common.injection;
-
-/**
- * Utility class for pre destroy registration.
- *
- * @author <a href="mailto:richard.opalka@jboss.org">Richard Opalka</a>
- */
-public final class PreDestroyHolder
-{
-
- private final Object object;
- private final int hashCode;
-
- public PreDestroyHolder(Object object)
- {
- super();
- this.hashCode = System.identityHashCode(object);
- this.object = object;
- }
-
- public final Object getObject()
- {
- return this.object;
- }
-
- public final boolean equals(Object o)
- {
- if (o instanceof PreDestroyHolder)
- {
- return ((PreDestroyHolder)o).hashCode == this.hashCode;
- }
-
- return false;
- }
-
- public final int hashCode()
- {
- return this.hashCode;
- }
-
-}
\ No newline at end of file
Deleted: common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/injection/finders/AbstractPostConstructPreDestroyAnnotatedMethodFinder.java
===================================================================
--- common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/injection/finders/AbstractPostConstructPreDestroyAnnotatedMethodFinder.java 2012-09-20 08:04:37 UTC (rev 16743)
+++ common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/injection/finders/AbstractPostConstructPreDestroyAnnotatedMethodFinder.java 2012-09-20 08:17:56 UTC (rev 16744)
@@ -1,71 +0,0 @@
-/*
- * 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.ws.common.injection.finders;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Method;
-import java.util.Collection;
-
-import org.jboss.ws.common.reflection.AnnotatedMethodFinder;
-
-/**
- * Abstract @PostConstruct and @PreDestroy annotations method finder.
- *
- * @author <a href="mailto:richard.opalka@jboss.org">Richard Opalka</a>
- */
-abstract class AbstractPostConstructPreDestroyAnnotatedMethodFinder<A extends Annotation>
-extends AnnotatedMethodFinder<A>
-{
-
- /**
- * Constructor.
- *
- * @param annotationClass annotation.
- */
- AbstractPostConstructPreDestroyAnnotatedMethodFinder(final Class<A> annotationClass)
- {
- super(annotationClass);
- }
-
- @Override
- public void validate(final Collection<Method> methods)
- {
- super.validate(methods);
-
- // Ensure all methods preconditions
- ReflectionUtils.assertOnlyOneMethod(methods, getAnnotation());
- }
-
- @Override
- public void validate(final Method method)
- {
- super.validate(method);
-
- // Ensure all method preconditions
- Class<A> annotation = getAnnotation();
- ReflectionUtils.assertNoParameters(method, annotation);
- ReflectionUtils.assertVoidReturnType(method, annotation);
- ReflectionUtils.assertNoCheckedExceptionsAreThrown(method, annotation);
- ReflectionUtils.assertNotStatic(method, annotation);
- }
-
-}
Deleted: common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/injection/finders/PostConstructMethodFinder.java
===================================================================
--- common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/injection/finders/PostConstructMethodFinder.java 2012-09-20 08:04:37 UTC (rev 16743)
+++ common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/injection/finders/PostConstructMethodFinder.java 2012-09-20 08:17:56 UTC (rev 16744)
@@ -1,58 +0,0 @@
-/*
- * 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.ws.common.injection.finders;
-
-import javax.annotation.PostConstruct;
-
-/**
- * @PostConstruct method finder.
- *
- * The PostConstruct annotation is used on a method that needs to be executed after dependency injection is done
- * to perform any initialization. This method MUST be invoked before the class is put into service. This annotation
- * MUST be supported on all classes that support dependency injection. The method annotated with PostConstruct MUST
- * be invoked even if the class does not request any resources to be injected. Only one method can be annotated with
- * this annotation. The method on which the PostConstruct annotation is applied MUST fulfill all of the following criteria:
- * <ul>
- * <li>The method MUST NOT have any parameters.
- * <li>The return type of the method MUST be void.
- * <li>The method MUST NOT throw a checked exception.
- * <li>The method on which PostConstruct is applied MAY be public, protected, package private or private.
- * <li>The method MUST NOT be static.
- * <li>The method MAY be final.
- * <li>If the method throws an unchecked exception the class MUST NOT be put into service.
- * </ul>
- *
- * @author <a href="mailto:richard.opalka@jboss.org">Richard Opalka</a>
- */
-public final class PostConstructMethodFinder
-extends AbstractPostConstructPreDestroyAnnotatedMethodFinder<PostConstruct>
-{
-
- /**
- * Constructor.
- */
- public PostConstructMethodFinder()
- {
- super(PostConstruct.class);
- }
-
-}
Deleted: common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/injection/finders/PreDestroyMethodFinder.java
===================================================================
--- common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/injection/finders/PreDestroyMethodFinder.java 2012-09-20 08:04:37 UTC (rev 16743)
+++ common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/injection/finders/PreDestroyMethodFinder.java 2012-09-20 08:17:56 UTC (rev 16744)
@@ -1,58 +0,0 @@
-/*
- * 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.ws.common.injection.finders;
-
-import javax.annotation.PreDestroy;
-
-/**
- * @PreDestroy method finder.
- *
- * The PreDestroy annotation is used on methods as a callback notification to signal that the instance
- * is in the process of being removed by the container. The method annotated with PreDestroy is typically
- * used to release resources that it has been holding. This annotation MUST be supported by all container
- * managed objects that support PostConstruct except the application client container in Java EE 5.
- * The method on which the PreDestroy annotation is applied MUST fulfill all of the following criteria:
- * <ul>
- * <li>The method MUST NOT have any parameters.
- * <li>The return type of the method MUST be void.
- * <li>The method MUST NOT throw a checked exception.
- * <li>The method on which PreDestroy is applied MAY be public, protected, package private or private.
- * <li>The method MUST NOT be static.
- * <li>The method MAY be final.
- * <li>If the method throws an unchecked exception it is ignored.
- * </ul>
- *
- * @author <a href="mailto:richard.opalka@jboss.org">Richard Opalka</a>
- */
-public final class PreDestroyMethodFinder
-extends AbstractPostConstructPreDestroyAnnotatedMethodFinder<PreDestroy>
-{
-
- /**
- * Constructor.
- */
- public PreDestroyMethodFinder()
- {
- super(PreDestroy.class);
- }
-
-}
Deleted: common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/invocation/DefaultResourceInjectorFactory.java
===================================================================
--- common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/invocation/DefaultResourceInjectorFactory.java 2012-09-20 08:04:37 UTC (rev 16743)
+++ common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/invocation/DefaultResourceInjectorFactory.java 2012-09-20 08:17:56 UTC (rev 16744)
@@ -1,37 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, 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.ws.common.invocation;
-
-import org.jboss.wsf.spi.invocation.ResourceInjectorFactory;
-import org.jboss.wsf.spi.invocation.ResourceInjector;
-
-/**
- * @author Heiko.Braun(a)jboss.com
- * Created: Jul 19, 2007
- */
-public class DefaultResourceInjectorFactory extends ResourceInjectorFactory
-{
- public ResourceInjector newResourceInjector()
- {
- return new WebServiceContextInjector();
- }
-}
Modified: common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/invocation/InvocationHandlerJAXWS.java
===================================================================
--- common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/invocation/InvocationHandlerJAXWS.java 2012-09-20 08:04:37 UTC (rev 16743)
+++ common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/invocation/InvocationHandlerJAXWS.java 2012-09-20 08:17:56 UTC (rev 16744)
@@ -24,7 +24,6 @@
import javax.xml.ws.WebServiceContext;
import org.jboss.ws.common.injection.InjectionHelper;
-import org.jboss.ws.common.injection.PreDestroyHolder;
import org.jboss.ws.common.injection.ThreadLocalAwareWebServiceContext;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.deployment.Reference;
@@ -56,15 +55,6 @@
final Object targetBean = reference.getValue();
InjectionHelper.injectWebServiceContext(targetBean, ThreadLocalAwareWebServiceContext.getInstance());
-
- if (!reference.isInitialized())
- {
- this.log.debug("Calling postConstruct method on JAXWS JSE endpoint: " + targetBean);
- InjectionHelper.callPostConstructMethod(targetBean);
- reference.setInitialized();
- }
-
- endpoint.addAttachment(PreDestroyHolder.class, new PreDestroyHolder(targetBean));
}
/**
Deleted: common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/invocation/WebServiceContextAdapter.java
===================================================================
--- common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/invocation/WebServiceContextAdapter.java 2012-09-20 08:04:37 UTC (rev 16743)
+++ common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/invocation/WebServiceContextAdapter.java 2012-09-20 08:17:56 UTC (rev 16744)
@@ -1,61 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2010, 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.ws.common.invocation;
-
-import java.security.Principal;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.xml.ws.WebServiceContext;
-import javax.xml.ws.handler.MessageContext;
-
-import org.jboss.wsf.spi.invocation.WebServiceContextDelegate;
-
-/**
- * Web service context which security related methods delegate to servlet container.
- *
- * @author alessio.soldano(a)jboss.com
- * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
- */
-public final class WebServiceContextAdapter extends WebServiceContextDelegate
-{
-
- private final HttpServletRequest httpRequest;
-
- public WebServiceContextAdapter(final WebServiceContext ctx)
- {
- super(ctx);
- httpRequest = (HttpServletRequest)ctx.getMessageContext().get(MessageContext.SERVLET_REQUEST);
- }
-
- @Override
- public Principal getUserPrincipal()
- {
- return httpRequest.getUserPrincipal();
- }
-
- @Override
- public boolean isUserInRole(String role)
- {
- return httpRequest.isUserInRole(role);
- }
-
-}
Deleted: common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/invocation/WebServiceContextInjector.java
===================================================================
--- common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/invocation/WebServiceContextInjector.java 2012-09-20 08:04:37 UTC (rev 16743)
+++ common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/invocation/WebServiceContextInjector.java 2012-09-20 08:17:56 UTC (rev 16744)
@@ -1,41 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, 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.ws.common.invocation;
-
-import javax.xml.ws.WebServiceContext;
-
-import org.jboss.ws.common.injection.InjectionHelper;
-import org.jboss.wsf.spi.invocation.ResourceInjector;
-
-/**
- * Inject the JAXWS WebServiceContext
- *
- * @author Thomas.Diesler(a)jboss.org
- * @author ropalka(a)redhat.com
- */
-public class WebServiceContextInjector extends ResourceInjector
-{
- public void inject(Object instance, WebServiceContext context)
- {
- InjectionHelper.injectWebServiceContext(instance, context);
- }
-}
Modified: common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/spi/DefaultSPIProvider.java
===================================================================
--- common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/spi/DefaultSPIProvider.java 2012-09-20 08:04:37 UTC (rev 16743)
+++ common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/spi/DefaultSPIProvider.java 2012-09-20 08:17:56 UTC (rev 16744)
@@ -27,7 +27,6 @@
import org.jboss.ws.api.util.ServiceLoader;
import org.jboss.ws.common.deployment.DefaultDeploymentModelFactory;
import org.jboss.ws.common.deployment.DefaultLifecycleHandlerFactory;
-import org.jboss.ws.common.invocation.DefaultResourceInjectorFactory;
import org.jboss.ws.common.management.DefaultEndpointMetricsFactory;
import org.jboss.ws.common.management.DefaultEndpointRegistryFactory;
import org.jboss.ws.common.management.DefaultJMSEndpointResolver;
@@ -37,7 +36,6 @@
import org.jboss.wsf.spi.WSFException;
import org.jboss.wsf.spi.deployment.DeploymentModelFactory;
import org.jboss.wsf.spi.deployment.LifecycleHandlerFactory;
-import org.jboss.wsf.spi.invocation.ResourceInjectorFactory;
import org.jboss.wsf.spi.invocation.SecurityAdaptorFactory;
import org.jboss.wsf.spi.management.EndpointMetricsFactory;
import org.jboss.wsf.spi.management.EndpointRegistryFactory;
@@ -72,10 +70,6 @@
{
returnType = loadService(spiType, DefaultLifecycleHandlerFactory.class, loader);
}
- else if (ResourceInjectorFactory.class.equals(spiType))
- {
- returnType = loadService(spiType, DefaultResourceInjectorFactory.class, loader);
- }
else if (ServiceRefHandlerFactory.class.equals(spiType))
{
returnType = loadService(spiType, DefaultServiceRefHandlerFactory.class, loader);
12 years, 4 months
JBossWS SVN: r16743 - common/branches.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2012-09-20 04:04:37 -0400 (Thu, 20 Sep 2012)
New Revision: 16743
Added:
common/branches/ropalka_JBWS-3550/
Log:
creating user branch
12 years, 4 months