Author: thomas.diesler(a)jboss.com
Date: 2007-07-27 02:31:03 -0400 (Fri, 27 Jul 2007)
New Revision: 4018
Modified:
trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java
trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/WSDLFilePublisher.java
trunk/integration/spi/src/main/java/org/jboss/wsf/common/IOUtils.java
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/EndpointAddressDeploymentAspect.java
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/WebAppGeneratorDeploymentAspect.java
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/management/ServerConfigFactoryImpl.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/management/ServerConfigFactory.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceReferenceable.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/spi/EndpointImpl.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/wsdl/xsd/SchemaUtils.java
trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/jbws1190/TestEndpointImpl.java
trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/jbws1205/TestEndpointImpl.java
trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/endpoint/EndpointTestCase.java
trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1190/TestEndpointImpl.java
Log:
Refactor ServerConfigFactory
Modified:
trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java
===================================================================
---
trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java 2007-07-27
06:12:20 UTC (rev 4017)
+++
trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java 2007-07-27
06:31:03 UTC (rev 4018)
@@ -527,7 +527,7 @@
wsdlHost += ":" + reqURL.getPort();
SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- ServerConfig config =
spiProvider.getSPI(ServerConfigFactory.class).createServerConfig();
+ ServerConfig config =
spiProvider.getSPI(ServerConfigFactory.class).getServerConfig();
if (ServerConfig.UNDEFINED_HOSTNAME.equals(config.getWebServiceHost()) ==
false)
wsdlHost = config.getWebServiceHost();
Modified:
trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/WSDLFilePublisher.java
===================================================================
---
trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/WSDLFilePublisher.java 2007-07-27
06:12:20 UTC (rev 4017)
+++
trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/WSDLFilePublisher.java 2007-07-27
06:31:03 UTC (rev 4018)
@@ -242,7 +242,7 @@
{
String deploymentDir = (dep.getParent() != null ? dep.getParent().getSimpleName() :
dep.getSimpleName());
SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- ServerConfig config =
spiProvider.getSPI(ServerConfigFactory.class).createServerConfig();
+ ServerConfig config =
spiProvider.getSPI(ServerConfigFactory.class).getServerConfig();
File serviceDir = new File(config.getServerDataDir().getCanonicalPath() +
"/wsdl/" + deploymentDir);
deleteWsdlPublishDirectory(serviceDir);
}
@@ -297,7 +297,7 @@
if (predefinedLocation == false)
{
SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- ServerConfig config =
spiProvider.getSPI(ServerConfigFactory.class).createServerConfig();
+ ServerConfig config =
spiProvider.getSPI(ServerConfigFactory.class).getServerConfig();
locationFile = new File(config.getServerDataDir().getCanonicalPath() +
"/wsdl/" + archiveName);
}
else
Modified: trunk/integration/spi/src/main/java/org/jboss/wsf/common/IOUtils.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/common/IOUtils.java 2007-07-27
06:12:20 UTC (rev 4017)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/common/IOUtils.java 2007-07-27
06:31:03 UTC (rev 4018)
@@ -128,7 +128,7 @@
// TODO: recursive dependency, ohoh
SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- ServerConfig config =
spiProvider.getSPI(ServerConfigFactory.class).createServerConfig();
+ ServerConfig config =
spiProvider.getSPI(ServerConfigFactory.class).getServerConfig();
tmpdir = new File(config.getServerTempDir().getCanonicalPath() +
"/jbossws");
tmpdir.mkdirs();
}
Modified:
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/EndpointAddressDeploymentAspect.java
===================================================================
---
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/EndpointAddressDeploymentAspect.java 2007-07-27
06:12:20 UTC (rev 4017)
+++
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/EndpointAddressDeploymentAspect.java 2007-07-27
06:31:03 UTC (rev 4018)
@@ -48,7 +48,7 @@
SPIProvider provider = SPIProviderResolver.getInstance().getProvider();
ServerConfigFactory spi = provider.getSPI(ServerConfigFactory.class);
- ServerConfig serverConfig = spi.createServerConfig();
+ ServerConfig serverConfig = spi.getServerConfig();
String host = serverConfig.getWebServiceHost();
int port = serverConfig.getWebServicePort();
Modified:
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/WebAppGeneratorDeploymentAspect.java
===================================================================
---
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/WebAppGeneratorDeploymentAspect.java 2007-07-27
06:12:20 UTC (rev 4017)
+++
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/WebAppGeneratorDeploymentAspect.java 2007-07-27
06:31:03 UTC (rev 4018)
@@ -95,7 +95,7 @@
{
// TODO: recursive dependency, ohoh
SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- ServerConfig config =
spiProvider.getSPI(ServerConfigFactory.class).createServerConfig();
+ ServerConfig config =
spiProvider.getSPI(ServerConfigFactory.class).getServerConfig();
File tmpdir = new File(config.getServerTempDir().getCanonicalPath() +
"/deploy");
String deploymentName = dep.getCanonicalName().replace('/',
'-');
Modified:
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/management/ServerConfigFactoryImpl.java
===================================================================
---
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/management/ServerConfigFactoryImpl.java 2007-07-27
06:12:20 UTC (rev 4017)
+++
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/management/ServerConfigFactoryImpl.java 2007-07-27
06:31:03 UTC (rev 4018)
@@ -31,7 +31,7 @@
*/
public class ServerConfigFactoryImpl extends ServerConfigFactory
{
- public ServerConfig createServerConfig()
+ public ServerConfig getServerConfig()
{
return new KernelAwareSPIFactory().getKernelProvidedSPI(
ServerConfig.BEAN_NAME, ServerConfig.class
Modified:
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/management/ServerConfigFactory.java
===================================================================
---
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/management/ServerConfigFactory.java 2007-07-27
06:12:20 UTC (rev 4017)
+++
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/management/ServerConfigFactory.java 2007-07-27
06:31:03 UTC (rev 4018)
@@ -33,5 +33,5 @@
*/
public abstract class ServerConfigFactory implements SPIView
{
- public abstract ServerConfig createServerConfig();
+ public abstract ServerConfig getServerConfig();
}
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceReferenceable.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceReferenceable.java 2007-07-27
06:12:20 UTC (rev 4017)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceReferenceable.java 2007-07-27
06:31:03 UTC (rev 4018)
@@ -105,7 +105,7 @@
try
{
SPIProvider spiProvider =
SPIProviderResolver.getInstance().getProvider();
- ServerConfig config =
spiProvider.getSPI(ServerConfigFactory.class).createServerConfig();
+ ServerConfig config =
spiProvider.getSPI(ServerConfigFactory.class).getServerConfig();
String host = config.getWebServiceHost();
int port = config.getWebServicePort();
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/spi/EndpointImpl.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/spi/EndpointImpl.java 2007-07-27
06:12:20 UTC (rev 4017)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/spi/EndpointImpl.java 2007-07-27
06:31:03 UTC (rev 4018)
@@ -30,7 +30,6 @@
import java.util.Map;
import java.util.StringTokenizer;
import java.util.concurrent.Executor;
-import java.io.File;
import javax.xml.transform.Source;
import javax.xml.ws.Binding;
@@ -44,10 +43,10 @@
import org.jboss.ws.core.jaxws.binding.BindingProviderImpl;
import org.jboss.ws.core.server.HttpContext;
import org.jboss.ws.core.server.HttpServer;
-import org.jboss.wsf.spi.management.ServerConfigFactory;
-import org.jboss.wsf.spi.management.ServerConfig;
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;
import org.w3c.dom.Element;
/**
@@ -156,7 +155,7 @@
try
{
SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- ServerConfig serverConfig =
spiProvider.getSPI(ServerConfigFactory.class).createServerConfig();File tmpDir =
serverConfig.getServerTempDir();
+ ServerConfig serverConfig =
spiProvider.getSPI(ServerConfigFactory.class).getServerConfig();
isStandalone = false;
}
catch (Exception ex)
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java 2007-07-27
06:12:20 UTC (rev 4017)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java 2007-07-27
06:31:03 UTC (rev 4018)
@@ -240,7 +240,7 @@
uriScheme = "http";
SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- ServerConfig config =
spiProvider.getSPI(ServerConfigFactory.class).createServerConfig();
+ ServerConfig config =
spiProvider.getSPI(ServerConfigFactory.class).getServerConfig();
String host = config.getWebServiceHost();
int port = config.getWebServicePort();
@@ -322,7 +322,7 @@
String serviceEndpointURL = getServiceEndpointAddress(uriScheme,
servicePath);
SPIProvider spiProvider =
SPIProviderResolver.getInstance().getProvider();
- ServerConfig config =
spiProvider.getSPI(ServerConfigFactory.class).createServerConfig();
+ ServerConfig config =
spiProvider.getSPI(ServerConfigFactory.class).getServerConfig();
boolean alwaysModify = config.isModifySOAPAddress();
if (alwaysModify || uriScheme == null ||
orgAddress.indexOf("REPLACE_WITH_ACTUAL_URL") >= 0)
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/wsdl/xsd/SchemaUtils.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/wsdl/xsd/SchemaUtils.java 2007-07-27
06:12:20 UTC (rev 4017)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/wsdl/xsd/SchemaUtils.java 2007-07-27
06:31:03 UTC (rev 4018)
@@ -521,7 +521,7 @@
try
{
SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- ServerConfig serverConfig =
spiProvider.getSPI(ServerConfigFactory.class).createServerConfig();File tmpDir =
serverConfig.getServerTempDir();
+ ServerConfig serverConfig =
spiProvider.getSPI(ServerConfigFactory.class).getServerConfig();File tmpDir =
serverConfig.getServerTempDir();
tmpdir = serverConfig.getServerTempDir();
tmpdir = new File(tmpdir.getCanonicalPath() + "/jbossws");
tmpdir.mkdirs();
Modified:
trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/jbws1190/TestEndpointImpl.java
===================================================================
---
trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/jbws1190/TestEndpointImpl.java 2007-07-27
06:12:20 UTC (rev 4017)
+++
trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/jbws1190/TestEndpointImpl.java 2007-07-27
06:31:03 UTC (rev 4018)
@@ -45,7 +45,7 @@
public void testAddress(final String archive, final String service, final String
scheme, final String port)
{
SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- ServerConfig serverConfig =
spiProvider.getSPI(ServerConfigFactory.class).createServerConfig();
+ ServerConfig serverConfig =
spiProvider.getSPI(ServerConfigFactory.class).getServerConfig();
File dataDir = serverConfig.getServerDataDir();
File wsdlDir = new File(dataDir.getAbsolutePath() + File.separator +
"wsdl" + File.separator + archive);
Modified:
trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/jbws1205/TestEndpointImpl.java
===================================================================
---
trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/jbws1205/TestEndpointImpl.java 2007-07-27
06:12:20 UTC (rev 4017)
+++
trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/jbws1205/TestEndpointImpl.java 2007-07-27
06:31:03 UTC (rev 4018)
@@ -49,7 +49,7 @@
try
{
SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- ServerConfig serverConfig =
spiProvider.getSPI(ServerConfigFactory.class).createServerConfig();File tmpDir =
serverConfig.getServerTempDir();
+ ServerConfig serverConfig =
spiProvider.getSPI(ServerConfigFactory.class).getServerConfig();File tmpDir =
serverConfig.getServerTempDir();
tmpDir = new File(tmpDir.getCanonicalPath() + "/jbossws");
baseFiles = getXsdTempFiles(tmpDir);
Modified:
trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/endpoint/EndpointTestCase.java
===================================================================
---
trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/endpoint/EndpointTestCase.java 2007-07-27
06:12:20 UTC (rev 4017)
+++
trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/endpoint/EndpointTestCase.java 2007-07-27
06:31:03 UTC (rev 4018)
@@ -62,7 +62,7 @@
{
MBeanServerConnection server = JBossWSTestHelper.getServer();
useJBossWebLoader = (Boolean)server.getAttribute(new
ObjectName("jboss.web:service=WebServer"), "UseJBossWebLoader");
- server.setAttribute(new ObjectName("jboss.web:service=WebServer"),
new Attribute("UseJBossWebLoader", new Boolean(true)));
+ server.setAttribute(new ObjectName("jboss.web:service=WebServer"),
new Attribute("UseJBossWebLoader", Boolean.TRUE));
super.setUp();
}
Modified:
trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1190/TestEndpointImpl.java
===================================================================
---
trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1190/TestEndpointImpl.java 2007-07-27
06:12:20 UTC (rev 4017)
+++
trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1190/TestEndpointImpl.java 2007-07-27
06:31:03 UTC (rev 4018)
@@ -51,7 +51,7 @@
public void testAddress(final String archive, final String service, final String
scheme, final String port)
{
SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- ServerConfig serverConfig =
spiProvider.getSPI(ServerConfigFactory.class).createServerConfig();File tmpDir =
serverConfig.getServerTempDir();
+ ServerConfig serverConfig =
spiProvider.getSPI(ServerConfigFactory.class).getServerConfig();File tmpDir =
serverConfig.getServerTempDir();
File dataDir = serverConfig.getServerDataDir();
File wsdlDir = new File(dataDir.getAbsolutePath() + File.separator +
"wsdl" + File.separator + archive);