Author: alessio.soldano(a)jboss.com
Date: 2013-05-31 13:33:47 -0400 (Fri, 31 May 2013)
New Revision: 17638
Modified:
common/trunk/src/main/java/org/jboss/ws/common/IOUtils.java
common/trunk/src/main/java/org/jboss/ws/common/configuration/ConfigHelper.java
common/trunk/src/main/java/org/jboss/ws/common/deployment/EndpointHandlerDeploymentAspect.java
common/trunk/src/main/java/org/jboss/ws/common/deployment/EndpointMetricsDeploymentAspect.java
common/trunk/src/main/java/org/jboss/ws/common/deployment/EndpointRegistryDeploymentAspect.java
common/trunk/src/main/java/org/jboss/ws/common/management/AbstractServerConfig.java
Log:
[JBWS-3644] Using new method
Modified: common/trunk/src/main/java/org/jboss/ws/common/IOUtils.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/IOUtils.java 2013-05-31 17:32:51 UTC
(rev 17637)
+++ common/trunk/src/main/java/org/jboss/ws/common/IOUtils.java 2013-05-31 17:33:47 UTC
(rev 17638)
@@ -21,7 +21,6 @@
*/
package org.jboss.ws.common;
-import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileOutputStream;
@@ -35,7 +34,6 @@
import javax.activation.DataHandler;
import org.jboss.wsf.spi.SPIProvider;
-import org.jboss.wsf.spi.SPIProviderResolver;
import org.jboss.wsf.spi.management.ServerConfig;
import org.jboss.wsf.spi.management.ServerConfigFactory;
@@ -125,8 +123,7 @@
{
// TODO: recursive dependency, ohoh
- SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- ServerConfig config =
spiProvider.getSPI(ServerConfigFactory.class).getServerConfig();
+ ServerConfig config =
SPIProvider.getInstance().getSPI(ServerConfigFactory.class).getServerConfig();
tmpdir = new File(config.getServerTempDir().getCanonicalPath() +
"/jbossws");
if (!tmpdir.mkdirs()) {
tmpdir = null;
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 2013-05-31
17:32:51 UTC (rev 17637)
+++
common/trunk/src/main/java/org/jboss/ws/common/configuration/ConfigHelper.java 2013-05-31
17:33:47 UTC (rev 17638)
@@ -42,7 +42,6 @@
import org.jboss.ws.api.configuration.ClientConfigurer;
import org.jboss.ws.common.utils.DelegateClassLoader;
import org.jboss.wsf.spi.SPIProvider;
-import org.jboss.wsf.spi.SPIProviderResolver;
import org.jboss.wsf.spi.classloading.ClassLoaderProvider;
import org.jboss.wsf.spi.management.ServerConfig;
import org.jboss.wsf.spi.management.ServerConfigFactory;
@@ -232,8 +231,7 @@
private static ServerConfig getServerConfig()
{
final ClassLoader cl =
ClassLoaderProvider.getDefaultProvider().getServerIntegrationClassLoader();
- SPIProvider spiProvider = SPIProviderResolver.getInstance(cl).getProvider();
- ServerConfigFactory scf = spiProvider.getSPI(ServerConfigFactory.class, cl);
+ final ServerConfigFactory scf =
SPIProvider.getInstance().getSPI(ServerConfigFactory.class, cl);
return scf != null ? scf.getServerConfig() : null;
}
}
Modified:
common/trunk/src/main/java/org/jboss/ws/common/deployment/EndpointHandlerDeploymentAspect.java
===================================================================
---
common/trunk/src/main/java/org/jboss/ws/common/deployment/EndpointHandlerDeploymentAspect.java 2013-05-31
17:32:51 UTC (rev 17637)
+++
common/trunk/src/main/java/org/jboss/ws/common/deployment/EndpointHandlerDeploymentAspect.java 2013-05-31
17:33:47 UTC (rev 17638)
@@ -23,7 +23,6 @@
import org.jboss.ws.common.integration.AbstractDeploymentAspect;
import org.jboss.wsf.spi.SPIProvider;
-import org.jboss.wsf.spi.SPIProviderResolver;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.deployment.LifecycleHandler;
@@ -46,7 +45,7 @@
public EndpointHandlerDeploymentAspect()
{
- spiProvider = SPIProviderResolver.getInstance().getProvider();
+ spiProvider = SPIProvider.getInstance();
}
@Override
Modified:
common/trunk/src/main/java/org/jboss/ws/common/deployment/EndpointMetricsDeploymentAspect.java
===================================================================
---
common/trunk/src/main/java/org/jboss/ws/common/deployment/EndpointMetricsDeploymentAspect.java 2013-05-31
17:32:51 UTC (rev 17637)
+++
common/trunk/src/main/java/org/jboss/ws/common/deployment/EndpointMetricsDeploymentAspect.java 2013-05-31
17:33:47 UTC (rev 17638)
@@ -23,7 +23,6 @@
import org.jboss.ws.common.integration.AbstractDeploymentAspect;
import org.jboss.wsf.spi.SPIProvider;
-import org.jboss.wsf.spi.SPIProviderResolver;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.management.EndpointMetrics;
@@ -40,8 +39,7 @@
@Override
public void start(Deployment dep)
{
- SPIProvider provider = SPIProviderResolver.getInstance().getProvider();
- EndpointMetricsFactory factory = provider.getSPI(EndpointMetricsFactory.class);
+ EndpointMetricsFactory factory =
SPIProvider.getInstance().getSPI(EndpointMetricsFactory.class);
for (Endpoint ep : dep.getService().getEndpoints())
{
EndpointMetrics metrics = factory.newEndpointMetrics();
Modified:
common/trunk/src/main/java/org/jboss/ws/common/deployment/EndpointRegistryDeploymentAspect.java
===================================================================
---
common/trunk/src/main/java/org/jboss/ws/common/deployment/EndpointRegistryDeploymentAspect.java 2013-05-31
17:32:51 UTC (rev 17637)
+++
common/trunk/src/main/java/org/jboss/ws/common/deployment/EndpointRegistryDeploymentAspect.java 2013-05-31
17:33:47 UTC (rev 17638)
@@ -23,7 +23,6 @@
import org.jboss.ws.common.integration.AbstractDeploymentAspect;
import org.jboss.wsf.spi.SPIProvider;
-import org.jboss.wsf.spi.SPIProviderResolver;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.management.EndpointRegistry;
@@ -41,8 +40,7 @@
public void start(Deployment dep)
{
if (factory == null) {
- SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- factory = spiProvider.getSPI(EndpointRegistryFactory.class);
+ factory = SPIProvider.getInstance().getSPI(EndpointRegistryFactory.class);
}
EndpointRegistry registry = factory.getEndpointRegistry();
for (Endpoint ep : dep.getService().getEndpoints())
@@ -54,8 +52,7 @@
public void stop(Deployment dep)
{
if (factory == null) {
- SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- factory = spiProvider.getSPI(EndpointRegistryFactory.class);
+ factory = SPIProvider.getInstance().getSPI(EndpointRegistryFactory.class);
}
EndpointRegistry registry = factory.getEndpointRegistry();
for (Endpoint ep : dep.getService().getEndpoints())
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 2013-05-31
17:32:51 UTC (rev 17637)
+++
common/trunk/src/main/java/org/jboss/ws/common/management/AbstractServerConfig.java 2013-05-31
17:33:47 UTC (rev 17638)
@@ -34,7 +34,6 @@
import org.jboss.ws.common.ObjectNameFactory;
import org.jboss.wsf.spi.SPIProvider;
-import org.jboss.wsf.spi.SPIProviderResolver;
import org.jboss.wsf.spi.WSFException;
import org.jboss.wsf.spi.classloading.ClassLoaderProvider;
import org.jboss.wsf.spi.management.ServerConfig;
@@ -181,12 +180,11 @@
}
private int getConnectorPort(boolean secure) {
- ClassLoader cl =
ClassLoaderProvider.getDefaultProvider().getServerIntegrationClassLoader();
- SPIProvider spiProvider = SPIProviderResolver.getInstance(cl).getProvider();
+ final ClassLoader cl =
ClassLoaderProvider.getDefaultProvider().getServerIntegrationClassLoader();
int port = 0;
try
{
- WebServerInfo webServerInfo = spiProvider.getSPI(WebServerInfoFactory.class,
cl).newWebServerInfo();
+ WebServerInfo webServerInfo =
SPIProvider.getInstance().getSPI(WebServerInfoFactory.class, cl).newWebServerInfo();
port = webServerInfo.getPort("HTTP/1.1", secure);
}
catch (WSFException e)
@@ -199,9 +197,8 @@
public void create() throws Exception
{
//Retrieve the stackConfig using SPIProvider
- ClassLoader cl =
ClassLoaderProvider.getDefaultProvider().getServerIntegrationClassLoader();
- SPIProvider spiProvider = SPIProviderResolver.getInstance(cl).getProvider();
- this.stackConfig = spiProvider.getSPI(StackConfigFactory.class,
cl).getStackConfig();
+ final ClassLoader cl =
ClassLoaderProvider.getDefaultProvider().getServerIntegrationClassLoader();
+ this.stackConfig = SPIProvider.getInstance().getSPI(StackConfigFactory.class,
cl).getStackConfig();
MANAGEMENT_LOGGER.startingWSServerConfig(getImplementationTitle(),
getImplementationVersion());
MBeanServer mbeanServer = getMbeanServer();
@@ -223,8 +220,7 @@
if (serverConfig == null)
{
final ClassLoader cl =
ClassLoaderProvider.getDefaultProvider().getServerIntegrationClassLoader();
- SPIProvider spiProvider = SPIProviderResolver.getInstance(cl).getProvider();
- serverConfig = spiProvider.getSPI(ServerConfigFactory.class,
cl).getServerConfig();
+ serverConfig = SPIProvider.getInstance().getSPI(ServerConfigFactory.class,
cl).getServerConfig();
}
return serverConfig;
}
Show replies by date