Author: heiko.braun(a)jboss.com
Date: 2007-10-23 07:39:27 -0400 (Tue, 23 Oct 2007)
New Revision: 4862
Modified:
stack/metro/branches/hbraun/src/main/java/org/jboss/wsf/stack/sunri/injection/JBossResourceInjector.java
stack/metro/branches/hbraun/src/main/java/org/jboss/wsf/stack/sunri/metadata/RuntimeModelDeploymentAspect.java
stack/metro/branches/hbraun/src/main/java/org/jboss/wsf/stack/sunri/metadata/VFSResourceLoader.java
Log:
Use jboss logging where appropriate
Modified:
stack/metro/branches/hbraun/src/main/java/org/jboss/wsf/stack/sunri/injection/JBossResourceInjector.java
===================================================================
---
stack/metro/branches/hbraun/src/main/java/org/jboss/wsf/stack/sunri/injection/JBossResourceInjector.java 2007-10-23
11:33:35 UTC (rev 4861)
+++
stack/metro/branches/hbraun/src/main/java/org/jboss/wsf/stack/sunri/injection/JBossResourceInjector.java 2007-10-23
11:39:27 UTC (rev 4862)
@@ -24,9 +24,8 @@
import com.sun.istack.NotNull;
import com.sun.xml.ws.api.server.ResourceInjector;
import com.sun.xml.ws.api.server.WSWebServiceContext;
+import org.jboss.logging.Logger;
-import javax.xml.ws.WebServiceContext;
-
/**
* Default {@link ResourceInjector}.
*
@@ -35,6 +34,8 @@
*/
public final class JBossResourceInjector extends ResourceInjector {
+ private static final org.jboss.logging.Logger log =
Logger.getLogger(JBossResourceInjector.class);
+
public void inject(@NotNull WSWebServiceContext context, @NotNull Object instance) {
// AbstractInstanceResolver.buildInjectionPlan(
// instance.getClass(),
@@ -42,6 +43,6 @@
// false
// ).inject(instance,context);
- System.out.println("!!! inject " + context+ " into " +
instance);
+ log.warn("Context injection not implemeted, failed to inject " + context+
" into " + instance);
}
}
Modified:
stack/metro/branches/hbraun/src/main/java/org/jboss/wsf/stack/sunri/metadata/RuntimeModelDeploymentAspect.java
===================================================================
---
stack/metro/branches/hbraun/src/main/java/org/jboss/wsf/stack/sunri/metadata/RuntimeModelDeploymentAspect.java 2007-10-23
11:33:35 UTC (rev 4861)
+++
stack/metro/branches/hbraun/src/main/java/org/jboss/wsf/stack/sunri/metadata/RuntimeModelDeploymentAspect.java 2007-10-23
11:39:27 UTC (rev 4862)
@@ -26,11 +26,11 @@
import com.sun.xml.ws.api.server.Container;
import com.sun.xml.ws.api.server.Module;
import com.sun.xml.ws.api.server.ResourceInjector;
-import com.sun.xml.ws.resources.WsservletMessages;
import com.sun.xml.ws.transport.http.DeploymentDescriptorParser;
import com.sun.xml.ws.transport.http.ResourceLoader;
import com.sun.xml.ws.transport.http.servlet.ServletAdapter;
import com.sun.xml.ws.transport.http.servlet.ServletAdapterList;
+import org.jboss.logging.Logger;
import org.jboss.wsf.common.ResourceLoaderAdapter;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.DeploymentAspect;
@@ -44,10 +44,8 @@
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
-import java.util.List;
import java.util.HashMap;
-import java.util.logging.Level;
-import java.util.logging.Logger;
+import java.util.List;
/**
* Creates a METRO runtime model and associates it with the deployment.
@@ -60,10 +58,10 @@
public class RuntimeModelDeploymentAspect extends DeploymentAspect
{
+ private static final org.jboss.logging.Logger log =
Logger.getLogger(RuntimeModelDeploymentAspect.class);
+
protected static final String JAXWS_RI_RUNTIME = "/WEB-INF/sun-jaxws.xml";
- private static final Logger logger =
Logger.getLogger(com.sun.xml.ws.util.Constants.LoggingDomain +
".jboss.metadata");
-
public void create(Deployment deployment)
{
ClassLoader runtimeLoader = deployment.getRuntimeClassLoader();
@@ -109,9 +107,8 @@
}
catch (Throwable e)
- {
- logger.log(Level.SEVERE, WsservletMessages.LISTENER_PARSING_FAILED(e), e);
- throw new WebServiceException("listener.parsingFailed", e);
+ {
+ throw new WebServiceException("Failed to build METRO runtime model",
e);
}
finally{
Thread.currentThread().setContextClassLoader(origClassLoader);
@@ -184,7 +181,7 @@
return (T)ResourceInjector.STANDALONE;
}
- logger.log(Level.WARNING, "Unable to resolve SPI for type: " +
spiType);
+ log.warn("Unable to resolve SPI for type: " + spiType);
return null;
}
}
Modified:
stack/metro/branches/hbraun/src/main/java/org/jboss/wsf/stack/sunri/metadata/VFSResourceLoader.java
===================================================================
---
stack/metro/branches/hbraun/src/main/java/org/jboss/wsf/stack/sunri/metadata/VFSResourceLoader.java 2007-10-23
11:33:35 UTC (rev 4861)
+++
stack/metro/branches/hbraun/src/main/java/org/jboss/wsf/stack/sunri/metadata/VFSResourceLoader.java 2007-10-23
11:39:27 UTC (rev 4862)
@@ -23,6 +23,7 @@
import com.sun.xml.ws.transport.http.ResourceLoader;
import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
+import org.jboss.logging.Logger;
import java.io.File;
import java.io.IOException;
@@ -37,9 +38,11 @@
*/
public class VFSResourceLoader implements ResourceLoader
{
+
+ private static final Logger log = Logger.getLogger(VFSResourceLoader.class);
+
UnifiedVirtualFile vfs;
-
public VFSResourceLoader(UnifiedVirtualFile vfs)
{
this.vfs = vfs;
@@ -101,7 +104,7 @@
}
catch (Exception e)
{
- System.out.println("!!! WARN: Failed to read resource path: " +
e.getMessage());
+ log.error("Failed to read resource paths", e);
}
return resources;
Show replies by date