Author: alessio.soldano(a)jboss.com
Date: 2012-09-25 13:02:14 -0400 (Tue, 25 Sep 2012)
New Revision: 16762
Added:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/NativeLoggers.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/NativeMessages.java
Modified:
stack/native/trunk/modules/core/pom.xml
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/SOAPFaultHelperJAXRPC.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/handler/HandlerDelegateJAXRPC.java
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/Message.properties
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/WSDLFilePublisher.java
stack/native/trunk/pom.xml
Log:
[JBWS-3509] Moving to latest jboss-logging of some of the most used logs...
Modified: stack/native/trunk/modules/core/pom.xml
===================================================================
--- stack/native/trunk/modules/core/pom.xml 2012-09-25 16:50:32 UTC (rev 16761)
+++ stack/native/trunk/modules/core/pom.xml 2012-09-25 17:02:14 UTC (rev 16762)
@@ -60,6 +60,11 @@
<artifactId>jboss-logging</artifactId>
</dependency>
<dependency>
+ <groupId>org.jboss.logging</groupId>
+ <artifactId>jboss-logging-processor</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
</dependency>
@@ -97,6 +102,15 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <showDeprecation>false</showDeprecation>
+ <compilerArguments>
+
<AgeneratedTranslationFilesPath>${project.basedir}/target/generated-translation-files</AgeneratedTranslationFilesPath>
+ </compilerArguments>
+ </configuration>
+ </plugin>
</plugins>
</build>
Added: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/NativeLoggers.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/NativeLoggers.java
(rev 0)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/NativeLoggers.java 2012-09-25
17:02:14 UTC (rev 16762)
@@ -0,0 +1,75 @@
+/*
+ * 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;
+
+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.xml.namespace.QName;
+import javax.xml.rpc.handler.HandlerInfo;
+
+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;
+
+/**
+ * JBossWS-CXF log messages
+ *
+ * @author alessio.soldano(a)jboss.com
+ */
+@MessageLogger(projectCode = "JBWS")
+public interface NativeLoggers extends BasicLogger
+{
+ NativeLoggers ROOT_LOGGER =
org.jboss.logging.Logger.getMessageLogger(NativeLoggers.class,
"org.jboss.ws.native");
+
+ @LogMessage(level = ERROR)
+ @Message(id = 25006, value = "Cannot process metrics")
+ void cannotProcessMetrics(@Cause Throwable cause);
+
+ @LogMessage(level = ERROR)
+ @Message(id = 25009, value = "Error processing web service request")
+ void errorProcessingWebServiceRequest(@Cause Throwable cause);
+
+ @LogMessage(level = INFO)
+ @Message(id = 25010, value = "WSDL published to: %s")
+ void wsdlFilePublished(URL url);
+
+ @LogMessage(level = WARN)
+ @Message(id = 25015, value = "Cannot get wsdl publish location for null wsdl
location")
+ void cannotGetWsdlPublishLocation();
+
+ @LogMessage(level = DEBUG)
+ @Message(id = 25016, value = "Adding server side handler to service
'%s': %s")
+ void addingServerSideHandler(QName serviceName, HandlerInfo handlerInfo);
+
+ @LogMessage(level = ERROR)
+ @Message(id = 25017, value = "SOAP request exception")
+ void soapRequestException(@Cause Throwable cause);
+
+}
Added: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/NativeMessages.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/NativeMessages.java
(rev 0)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/NativeMessages.java 2012-09-25
17:02:14 UTC (rev 16762)
@@ -0,0 +1,82 @@
+/*
+ * 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;
+
+import java.io.File;
+
+import javax.management.ObjectName;
+import javax.xml.namespace.QName;
+import javax.xml.soap.SOAPException;
+
+import org.jboss.logging.Cause;
+import org.jboss.logging.Message;
+import org.jboss.logging.MessageBundle;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.Endpoint;
+
+/**
+ * JBossWS-CXF exception messages
+ *
+ * @author alessio.soldano(a)jboss.com
+ */
+@MessageBundle(projectCode = "JBWS")
+public interface NativeMessages {
+
+ NativeMessages MESSAGES =
org.jboss.logging.Messages.getBundle(NativeMessages.class);
+
+ @Message(id = 25000, value = "server config cannot be null")
+ IllegalArgumentException serverConfigCannotBeNull();
+
+ @Message(id = 25001, value = "Unsupported method: %s")
+ WSException unsupportedMethod(String method);
+
+ @Message(id = 25002, value = "Deployment has no classloader associated:
%s")
+ IllegalStateException deploymentHasNoClassLoaderAssociated(Deployment dep);
+
+ @Message(id = 25003, value = "Cannot obtain endpoint meta data for endpoint
%s")
+ IllegalStateException cannotObtainEndpointMetaData(ObjectName epName);
+
+ @Message(id = 25004, value = "Cannot obtain SOAPPart from response
message")
+ SOAPException cannotObtainSoapPart();
+
+ @Message(id = 25005, value = "Cannot obtain ServiceEndpointInvoker for endpoint
%s")
+ IllegalStateException cannotObtainServiceEndpointInvoker(ObjectName epName);
+
+ @Message(id = 25007, value = "Failed to post process response message")
+ String failedToPostProcessResponseMessage();
+
+ @Message(id = 25008, value = "Invalid endpoint address: %s")
+ IllegalArgumentException invalidEndpointAddress(String epAddress);
+
+ @Message(id = 25011, value = "WSDL 2.0 not supported")
+ UnsupportedOperationException wsdl20NotSupported();
+
+ @Message(id = 25012, value = "Cannot publish wsdl to: %s")
+ WSException cannotPublishWSDLTo(File file, @Cause Throwable cause);
+
+ @Message(id = 25013, value = "Invalid publish location: %s")
+ IllegalArgumentException invalidPublishLocation(String publishLocation, @Cause
Throwable cause);
+
+ @Message(id = 25014, value = "Invalid wsdlFile %s, expected in: %s")
+ RuntimeException invalidWsdlFile(String wsdlLocation, String expLocation);
+
+}
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/SOAPFaultHelperJAXRPC.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/SOAPFaultHelperJAXRPC.java 2012-09-25
16:50:32 UTC (rev 16761)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/SOAPFaultHelperJAXRPC.java 2012-09-25
17:02:14 UTC (rev 16762)
@@ -47,6 +47,7 @@
import javax.xml.transform.dom.DOMSource;
import org.jboss.logging.Logger;
+import org.jboss.ws.NativeLoggers;
import org.jboss.ws.WSException;
import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.Constants;
@@ -212,7 +213,7 @@
}
Throwable faultCause = faultEx.getCause();
- log.error(BundleUtils.getMessage(bundle, "SOAP_REQUEST_EXCEPTION"),
faultCause != null ? faultCause : faultEx);
+ NativeLoggers.ROOT_LOGGER.soapRequestException(faultCause != null ? faultCause :
faultEx);
try
{
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/handler/HandlerDelegateJAXRPC.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/handler/HandlerDelegateJAXRPC.java 2012-09-25
16:50:32 UTC (rev 16761)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/handler/HandlerDelegateJAXRPC.java 2012-09-25
17:02:14 UTC (rev 16762)
@@ -32,7 +32,7 @@
import javax.xml.rpc.handler.HandlerChain;
import javax.xml.rpc.handler.HandlerInfo;
-import org.jboss.logging.Logger;
+import org.jboss.ws.NativeLoggers;
import org.jboss.ws.core.RoleSource;
import org.jboss.ws.core.server.ServerHandlerDelegate;
import org.jboss.ws.core.soap.utils.MessageContextAssociation;
@@ -49,9 +49,6 @@
*/
public class HandlerDelegateJAXRPC extends ServerHandlerDelegate implements RoleSource
{
- // provide logging
- private static Logger log = Logger.getLogger(HandlerDelegateJAXRPC.class);
-
// This endpoints handler chain
private ServerHandlerChain preHandlerChain;
// This endpoints handler chain
@@ -173,8 +170,7 @@
hConfig.put(HandlerType.class.getName(), jaxrpcMetaData.getHandlerType());
HandlerInfo info = new HandlerInfo(hClass, hConfig, headerArr);
- if (log.isDebugEnabled())
- log.debug("Adding server side handler to service '" +
sepMetaData.getPortName() + "': " + info);
+ NativeLoggers.ROOT_LOGGER.addingServerSideHandler(sepMetaData.getPortName(),
info);
hInfos.add(info);
}
@@ -183,9 +179,6 @@
private void initHandlerChain(ServerEndpointMetaData sepMetaData,
List<HandlerInfo> hInfos, Set<String> handlerRoles, HandlerType type)
{
- if (log.isDebugEnabled())
- log.debug("Init handler chain with [" + hInfos.size() + "]
handlers");
-
ServerHandlerChain handlerChain = new ServerHandlerChain(hInfos, handlerRoles,
type);
if (type == HandlerType.PRE)
preHandlerChain = handlerChain;
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/Message.properties
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/Message.properties 2012-09-25
16:50:32 UTC (rev 16761)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/Message.properties 2012-09-25
17:02:14 UTC (rev 16762)
@@ -7,22 +7,5 @@
CANNOT_OBTAIN_UNIFIEDMD=Cannot obtain unified meta data
NULL_RUNTIME_CLASSLOADER=Runtime classloader may not be null
-NOT_SUPPORTED_WSDL20=WSDL2.0 is not supported
-CANNOT_PUBLISH_WSDL=Cannot publish wsdl to: {0}
-CANNOT_GET_WSDL_PUBLISH_LOCATION=Cannot get wsdl publish location for null wsdl
location!
-INVALID_PUBLISH_LOCATION=Invalid publish location: {0}
-INVALID_WSDLFILE=Invalid wsdlFile {0}, expected in: {1}
-
CANNOT_GET_EPR=Cannot get epr when using the XML/HTTP binding
-
-SERVER_CONFIG_CANNOT_BE_NULL=server config cannot be null
-UNSUPPORTED_METHOD=Unsupported method: {0}
-NO_CLASSLOADER_ASSOCIATED=Deployment has no classloader associated
-CANNOT_OBTAIN_ENDPOINTMD=Cannot obtain endpoint meta data
-CANNOT_OBTAIN_SOAPPART=Cannot obtain SOAPPart from response message
-CANNOT_OBTAIN_SEINVOKER=Cannot obtain ServiceEndpointInvoker
-CANNOT_PROCESS_METRICS=Cannot process metrics
-INVALID_ENDPOINT_ADDRESS=Invalid endpoint address: {0}
-ERROR_PROCESSING_WEB_SERVICE_REQUEST=Error processing web service request
-
CANNOT_LOAD_CLASS=Cannot load class: {0}
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java 2012-09-25
16:50:32 UTC (rev 16761)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java 2012-09-25
17:02:14 UTC (rev 16762)
@@ -21,6 +21,9 @@
*/
package org.jboss.wsf.stack.jbws;
+import static org.jboss.ws.NativeMessages.MESSAGES;
+import static org.jboss.ws.NativeLoggers.ROOT_LOGGER;
+
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
@@ -28,7 +31,6 @@
import java.io.Writer;
import java.net.MalformedURLException;
import java.net.URL;
-import java.util.ResourceBundle;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
@@ -44,9 +46,7 @@
import javax.xml.soap.SOAPMessage;
import javax.xml.soap.SOAPPart;
-import org.jboss.logging.Logger;
import org.jboss.ws.WSException;
-import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.Constants;
import org.jboss.ws.common.DOMWriter;
import org.jboss.ws.common.IOUtils;
@@ -87,10 +87,6 @@
*/
public class RequestHandlerImpl implements RequestHandler
{
- private static final ResourceBundle bundle =
BundleUtils.getBundle(RequestHandlerImpl.class);
- // provide logging
- private static final Logger log = Logger.getLogger(RequestHandlerImpl.class);
-
protected ServerConfig serverConfig;
protected MessageFactoryImpl msgFactory;
@@ -105,7 +101,7 @@
public RequestHandlerImpl(final ServerConfig serverConfig)
{
if (serverConfig == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle,
"SERVER_CONFIG_CANNOT_BE_NULL"));
+ throw MESSAGES.serverConfigCannotBeNull();
this.init(serverConfig);
}
@@ -129,7 +125,7 @@
}
else
{
- throw new WSException(BundleUtils.getMessage(bundle,
"UNSUPPORTED_METHOD", method));
+ throw MESSAGES.unsupportedMethod(method);
}
}
@@ -157,13 +153,13 @@
}
catch (IOException ioex)
{
- if (log.isTraceEnabled() == true)
+ if (ROOT_LOGGER.isTraceEnabled() == true)
{
- log.trace("Cannot close output stream", ioex);
+ ROOT_LOGGER.trace("Cannot close output stream", ioex);
}
else
{
- log.debug("Cannot close output stream");
+ ROOT_LOGGER.debug("Cannot close output stream");
}
}
}
@@ -180,15 +176,15 @@
private void doPost(Endpoint endpoint, HttpServletRequest req, HttpServletResponse
res, ServletContext context) throws ServletException, IOException
{
- if (log.isDebugEnabled())
- log.debug("doPost: " + req.getRequestURI());
+ if (ROOT_LOGGER.isTraceEnabled())
+ ROOT_LOGGER.trace("doPost: " + req.getRequestURI());
ServletInputStream in = req.getInputStream();
ServletOutputStream out = res.getOutputStream();
ClassLoader classLoader =
endpoint.getService().getDeployment().getRuntimeClassLoader();
if (classLoader == null)
- throw new IllegalStateException(BundleUtils.getMessage(bundle,
"NO_CLASSLOADER_ASSOCIATED"));
+ throw
MESSAGES.deploymentHasNoClassLoaderAssociated(endpoint.getService().getDeployment());
// Set the thread context class loader
ClassLoader ctxClassLoader = SecurityActions.getContextClassLoader();
@@ -213,13 +209,13 @@
}
catch (IOException ioex)
{
- if (log.isTraceEnabled() == true)
+ if (ROOT_LOGGER.isTraceEnabled() == true)
{
- log.trace("Cannot close output stream", ioex);
+ ROOT_LOGGER.trace("Cannot close output stream", ioex);
}
else
{
- log.debug("Cannot close output stream");
+ ROOT_LOGGER.debug("Cannot close output stream");
}
}
}
@@ -228,12 +224,12 @@
@SuppressWarnings("unchecked")
public void handleRequest(Endpoint endpoint, InputStream inStream, OutputStream
outStream, InvocationContext invContext)
{
- if (log.isDebugEnabled())
- log.debug("handleRequest: " + endpoint.getName());
+ if (ROOT_LOGGER.isTraceEnabled())
+ ROOT_LOGGER.trace("handleRequest: " + endpoint.getName());
ServerEndpointMetaData sepMetaData =
endpoint.getAttachment(ServerEndpointMetaData.class);
if (sepMetaData == null)
- throw new IllegalStateException(BundleUtils.getMessage(bundle,
"CANNOT_OBTAIN_ENDPOINTMD"));
+ throw MESSAGES.cannotObtainEndpointMetaData(endpoint.getName());
// Build the message context
CommonMessageContext msgContext = new SOAPMessageContextJAXRPC();
@@ -267,7 +263,7 @@
boolean isFault = false;
SOAPPart part = ((SOAPMessage)resMessage).getSOAPPart();
if (part == null)
- throw new SOAPException(BundleUtils.getMessage(bundle,
"CANNOT_OBTAIN_SOAPPART"));
+ throw MESSAGES.cannotObtainSoapPart();
// R1126 An INSTANCE MUST return a "500 Internal Server Error" HTTP
status code
// if the response envelope is a Fault.
@@ -312,7 +308,7 @@
if (resMessage == null)
{
- log.debug("Null response message");
+ ROOT_LOGGER.debug("Null response message");
return;
}
@@ -328,10 +324,10 @@
ServerEndpointMetaData sepMetaData =
ep.getAttachment(ServerEndpointMetaData.class);
if (sepMetaData == null)
- throw new IllegalStateException(BundleUtils.getMessage(bundle,
"CANNOT_OBTAIN_ENDPOINTMD"));
+ throw MESSAGES.cannotObtainEndpointMetaData(ep.getName());
long beginProcessing = 0;
- boolean debugEnabled = log.isDebugEnabled();
+ boolean traceEnabled = ROOT_LOGGER.isTraceEnabled();
try
{
EndpointState state = ep.getState();
@@ -342,8 +338,8 @@
throw new CommonSOAPFaultException(faultCode, faultString);
}
- if (debugEnabled)
- log.debug("BEGIN handleRequest: " + ep.getName());
+ if (traceEnabled)
+ ROOT_LOGGER.trace("BEGIN handleRequest: " + ep.getName());
beginProcessing = initRequestMetrics(ep);
MimeHeaders headers = (headerSource != null ? headerSource.getMimeHeaders() :
null);
@@ -362,7 +358,7 @@
// Get the Invoker
ServiceEndpointInvoker epInvoker =
ep.getAttachment(ServiceEndpointInvoker.class);
if (epInvoker == null)
- throw new IllegalStateException(BundleUtils.getMessage(bundle,
"CANNOT_OBTAIN_SEINVOKER"));
+ throw MESSAGES.cannotObtainServiceEndpointInvoker(ep.getName());
// Invoke the service endpoint
epInvoker.invoke(reqContext);
@@ -414,11 +410,11 @@
}
catch (Exception ex)
{
- log.error(BundleUtils.getMessage(bundle, "CANNOT_PROCESS_METRICS"),
ex);
+ ROOT_LOGGER.cannotProcessMetrics(ex);
}
- if (debugEnabled)
- log.debug("END handleRequest: " + ep.getName());
+ if (traceEnabled)
+ ROOT_LOGGER.trace("END handleRequest: " + ep.getName());
}
}
@@ -465,14 +461,14 @@
}
catch (Exception ex)
{
- WSException.rethrow("Faild to post process response message", ex);
+ WSException.rethrow(MESSAGES.failedToPostProcessResponseMessage(), ex);
}
}
public void handleWSDLRequest(Endpoint endpoint, OutputStream outStream,
InvocationContext context)
{
- if (log.isDebugEnabled())
- log.debug("handleWSDLRequest: " + endpoint.getName());
+ if (ROOT_LOGGER.isTraceEnabled())
+ ROOT_LOGGER.trace("handleWSDLRequest: " + endpoint.getName());
try
{
@@ -486,7 +482,7 @@
{
final String epAddress = endpoint.getAddress();
if (epAddress == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle,
"INVALID_ENDPOINT_ADDRESS", epAddress));
+ throw MESSAGES.invalidEndpointAddress(epAddress);
final URL wsdlUrl = new URL(epAddress + "?wsdl");
IOUtils.copyStream(outStream, wsdlUrl.openStream());
@@ -554,7 +550,7 @@
{
ServerEndpointMetaData epMetaData =
endpoint.getAttachment(ServerEndpointMetaData.class);
if (epMetaData == null)
- throw new IllegalStateException(BundleUtils.getMessage(bundle,
"CANNOT_OBTAIN_ENDPOINTMD"));
+ throw MESSAGES.cannotObtainEndpointMetaData(endpoint.getName());
//The WSDLFilePublisher should set the location to an URL
URL wsdlLocation = epMetaData.getServiceMetaData().getWsdlLocation();
@@ -569,7 +565,7 @@
private void handleException(Exception ex) throws ServletException
{
- log.error(BundleUtils.getMessage(bundle,
"ERROR_PROCESSING_WEB_SERVICE_REQUEST"), ex);
+ ROOT_LOGGER.errorProcessingWebServiceRequest(ex);
if (ex instanceof JAXRPCException)
throw (JAXRPCException)ex;
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/WSDLFilePublisher.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/WSDLFilePublisher.java 2012-09-25
16:50:32 UTC (rev 16761)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/WSDLFilePublisher.java 2012-09-25
17:02:14 UTC (rev 16762)
@@ -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.wsf.stack.jbws;
+import static org.jboss.ws.NativeLoggers.ROOT_LOGGER;
+import static org.jboss.ws.NativeMessages.MESSAGES;
+
import java.io.File;
import java.io.IOException;
import java.io.Writer;
@@ -28,13 +31,9 @@
import java.net.URL;
import java.util.LinkedList;
import java.util.List;
-import java.util.ResourceBundle;
import javax.wsdl.Definition;
-import org.jboss.logging.Logger;
-import org.jboss.ws.WSException;
-import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.Constants;
import org.jboss.ws.common.IOUtils;
import org.jboss.ws.common.utils.AbstractWSDLFilePublisher;
@@ -53,10 +52,6 @@
*/
public class WSDLFilePublisher extends AbstractWSDLFilePublisher
{
- private static final ResourceBundle bundle =
BundleUtils.getBundle(WSDLFilePublisher.class);
- // provide logging
- private static final Logger log = Logger.getLogger(WSDLFilePublisher.class);
-
public WSDLFilePublisher(ArchiveDeployment dep)
{
super(dep);
@@ -88,7 +83,7 @@
new WSDLWriter(wsdlDefinitions).write(fWriter,
Constants.DEFAULT_XML_CHARSET);
URL wsdlPublishURL = wsdlFile.toURI().toURL();
- log.info("WSDL published to: " + wsdlPublishURL);
+ ROOT_LOGGER.wsdlFilePublished(wsdlPublishURL);
// udpate the wsdl file location
serviceMD.setWsdlLocation(wsdlPublishURL);
@@ -106,7 +101,7 @@
}
else
{
- throw new UnsupportedOperationException(BundleUtils.getMessage(bundle,
"NOT_SUPPORTED_WSDL20"));
+ throw MESSAGES.wsdl20NotSupported();
}
}
catch (RuntimeException rte)
@@ -115,7 +110,7 @@
}
catch (Exception e)
{
- throw new WSException(BundleUtils.getMessage(bundle,
"CANNOT_PUBLISH_WSDL", wsdlFile), e);
+ throw MESSAGES.cannotPublishWSDLTo(wsdlFile, e);
}
finally
{
@@ -142,13 +137,10 @@
{
if (wsdlLocation == null)
{
- log.warn(BundleUtils.getMessage(bundle,
"CANNOT_GET_WSDL_PUBLISH_LOCATION"));
+ ROOT_LOGGER.cannotGetWsdlPublishLocation();
return null;
}
- if (log.isTraceEnabled())
- log.trace("Publishing WSDL file: " + wsdlLocation);
-
// Only file URLs are supported in <wsdl-publish-location>
String publishLocation = wsdlPublishLocation;
boolean predefinedLocation = publishLocation != null &&
publishLocation.startsWith("file:");
@@ -171,7 +163,7 @@
}
catch (MalformedURLException e)
{
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle,
"INVALID_PUBLISH_LOCATION", e.getMessage()));
+ throw MESSAGES.invalidPublishLocation(publishLocation, e);
}
}
@@ -190,7 +182,7 @@
}
else
{
- throw new RuntimeException(BundleUtils.getMessage(bundle,
"INVALID_WSDLFILE_", new Object[]{ wsdlLocation , expLocation}));
+ throw MESSAGES.invalidWsdlFile(wsdlLocation, expLocation);
}
return result;
Modified: stack/native/trunk/pom.xml
===================================================================
--- stack/native/trunk/pom.xml 2012-09-25 16:50:32 UTC (rev 16761)
+++ stack/native/trunk/pom.xml 2012-09-25 17:02:14 UTC (rev 16762)
@@ -70,7 +70,8 @@
<servlet.api.version>1.0.1.Final</servlet.api.version>
<saaj.api.version>1.0.1.Final</saaj.api.version>
<jboss.common.core.version>2.2.16.GA</jboss.common.core.version>
- <jboss.logging.version>3.1.0.GA</jboss.logging.version>
+ <jboss.logging.version>3.1.2.GA</jboss.logging.version>
+
<jboss-logging-processor.version>1.0.3.Final</jboss-logging-processor.version>
<netty.version>3.4.5.Final</netty.version>
<wsdl4j.version>1.6.2</wsdl4j.version>
<xerces.version>2.9.1</xerces.version>
@@ -177,6 +178,11 @@
<version>${jboss.logging.version}</version>
</dependency>
<dependency>
+ <groupId>org.jboss.logging</groupId>
+ <artifactId>jboss-logging-processor</artifactId>
+ <version>${jboss-logging-processor.version}</version>
+ </dependency>
+ <dependency>
<groupId>wsdl4j</groupId>
<artifactId>wsdl4j</artifactId>
<version>${wsdl4j.version}</version>