Author: dkulp Date: Fri Jun 8 18:35:16 2012 New Revision: 1348179 URL: http://svn.apache.org/viewvc?rev=1348179&view=rev Log: Merged revisions 1348174 via svn merge from https://svn.apache.org/repos/asf/cxf/branches/2.5.x-fixes
........ r1348174 | dkulp | 2012-06-08 14:21:22 -0400 (Fri, 08 Jun 2012) | 10 lines Merged revisions 1347723 via git cherry-pick from https://svn.apache.org/repos/asf/cxf/trunk ........ r1347723 | dkulp | 2012-06-07 13:33:28 -0400 (Thu, 07 Jun 2012) | 3 lines [CXF-4366] Make sure the token/replay stores are cleaned up when endpoints and bus's are stopped. ........ ........ Added: cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/cache/CacheCleanupListener.java - copied unchanged from r1348174, cxf/branches/2.5.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/cache/CacheCleanupListener.java Modified: cxf/branches/2.4.x-fixes/ (props changed) cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/cache/EHCacheManagerHolder.java cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/cache/EHCacheReplayCache.java cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/cache/EHCacheReplayCacheFactory.java cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/WSSecurityPolicyLoader.java cxf/branches/2.4.x-fixes/rt/ws/security/src/main/resources/META-INF/cxf/bus-extensions.txt cxf/branches/2.4.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/FaultTest.java cxf/branches/2.4.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/security/WSSecurityClientTest.java cxf/branches/2.4.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssc/WSSCTest.java cxf/branches/2.4.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssc/server/Server.java cxf/branches/2.4.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssec10/server/Server.java cxf/branches/2.4.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/x509/server/Server.java Propchange: cxf/branches/2.4.x-fixes/ ------------------------------------------------------------------------------ Binary property 'svnmerge-integrated' - no diff available. Modified: cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/cache/EHCacheManagerHolder.java URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/cache/EHCacheManagerHolder.java?rev=1348179&r1=1348178&r2=1348179&view=diff ============================================================================== --- cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/cache/EHCacheManagerHolder.java (original) +++ cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/cache/EHCacheManagerHolder.java Fri Jun 8 18:35:16 2012 @@ -19,11 +19,19 @@ package org.apache.cxf.ws.security.cache; +import java.io.IOException; import java.net.URL; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.atomic.AtomicInteger; import net.sf.ehcache.CacheManager; +import net.sf.ehcache.config.CacheConfiguration; +import net.sf.ehcache.config.Configuration; +import net.sf.ehcache.config.ConfigurationFactory; + +import org.apache.cxf.Bus; +import org.apache.cxf.common.classloader.ClassLoaderUtils; +import org.apache.cxf.resource.ResourceManager; /** * We need to reference count the EHCacheManager things @@ -36,25 +44,99 @@ public final class EHCacheManagerHolder //utility } - public static CacheManager getCacheManager(URL configFileURL) { - CacheManager cacheManager; - if (configFileURL == null) { - cacheManager = CacheManager.create(); + + public static CacheConfiguration getCacheConfiguration(String key, + CacheManager cacheManager) { + CacheConfiguration cc = cacheManager.getConfiguration().getCacheConfigurations().get(key); + if (cc == null && key.contains("-")) { + cc = cacheManager.getConfiguration().getCacheConfigurations().get(key.substring(0, key.indexOf('-'))); + } + if (cc == null) { + cc = cacheManager.getConfiguration().getDefaultCacheConfiguration(); + } + if (cc == null) { + cc = new CacheConfiguration(); } else { - cacheManager = CacheManager.create(configFileURL); + cc = (CacheConfiguration)cc.clone(); + } + cc.setName(key); + return cc; + } + + public static CacheManager getCacheManager(Bus bus, URL configFileURL) { + CacheManager cacheManager = null; + if (configFileURL == null) { + //using the default + cacheManager = findDefaultCacheManager(bus); + } + if (cacheManager == null) { + if (configFileURL == null) { + cacheManager = CacheManager.create(); + } else { + cacheManager = CacheManager.create(configFileURL); + } } AtomicInteger a = COUNTS.get(cacheManager.getName()); if (a == null) { COUNTS.putIfAbsent(cacheManager.getName(), new AtomicInteger()); a = COUNTS.get(cacheManager.getName()); } - a.incrementAndGet(); + if (a.incrementAndGet() == 1) { + //System.out.println("Create!! " + cacheManager.getName()); + } return cacheManager; } + private static CacheManager findDefaultCacheManager(Bus bus) { + + String defaultConfigFile = "cxf-ehcache.xml"; + URL configFileURL = null; + if (bus != null) { + ResourceManager rm = bus.getExtension(ResourceManager.class); + configFileURL = rm.resolveResource(defaultConfigFile, URL.class); + } + try { + if (configFileURL == null) { + configFileURL = + ClassLoaderUtils.getResource(defaultConfigFile, EHCacheReplayCacheFactory.class); + } + if (configFileURL == null) { + configFileURL = new URL(defaultConfigFile); + } + } catch (IOException e) { + // Do nothing + } + try { + Configuration conf = ConfigurationFactory.parseConfiguration(configFileURL); + /* + String perBus = (String)bus.getProperty("ws-security.cachemanager.per.bus"); + if (perBus == null) { + perBus = "true"; + } + if (Boolean.parseBoolean(perBus)) { + conf.setName(bus.getId()); + if ("java.io.tmpdir".equals(conf.getDiskStoreConfiguration().getOriginalPath())) { + + String path = conf.getDiskStoreConfiguration().getPath() + File.separator + + bus.getId(); + conf.getDiskStoreConfiguration().setPath(path); + } + } + */ + return CacheManager.create(conf); + } catch (Throwable t) { + return null; + } + } + + public static void releaseCacheManger(CacheManager cacheManager) { AtomicInteger a = COUNTS.get(cacheManager.getName()); + if (a == null) { + return; + } if (a.decrementAndGet() == 0) { + //System.out.println("Shutdown!! " + cacheManager.getName()); cacheManager.shutdown(); } } Modified: cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/cache/EHCacheReplayCache.java URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/cache/EHCacheReplayCache.java?rev=1348179&r1=1348178&r2=1348179&view=diff ============================================================================== --- cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/cache/EHCacheReplayCache.java (original) +++ cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/cache/EHCacheReplayCache.java Fri Jun 8 18:35:16 2012 @@ -20,7 +20,6 @@ package org.apache.cxf.ws.security.cache; import java.io.Closeable; -import java.io.IOException; import java.net.URL; import net.sf.ehcache.Cache; @@ -28,22 +27,30 @@ import net.sf.ehcache.CacheManager; import net.sf.ehcache.Ehcache; import net.sf.ehcache.Element; +import org.apache.cxf.Bus; +import org.apache.cxf.buslifecycle.BusLifeCycleListener; +import org.apache.cxf.buslifecycle.BusLifeCycleManager; import org.apache.ws.security.cache.ReplayCache; /** * An in-memory EHCache implementation of the ReplayCache interface. The default TTL is 60 minutes and the * max TTL is 12 hours. */ -public class EHCacheReplayCache implements ReplayCache, Closeable { +public class EHCacheReplayCache implements ReplayCache, Closeable, BusLifeCycleListener { public static final long DEFAULT_TTL = 3600L; public static final long MAX_TTL = DEFAULT_TTL * 12L; private Ehcache cache; private CacheManager cacheManager; + private Bus bus; private long ttl = DEFAULT_TTL; - public EHCacheReplayCache(String key, URL configFileURL) { - cacheManager = EHCacheManagerHolder.getCacheManager(configFileURL); + public EHCacheReplayCache(String key, Bus b, URL configFileURL) { + bus = b; + if (bus != null) { + bus.getExtension(BusLifeCycleManager.class).registerLifeCycleListener(this); + } + cacheManager = EHCacheManagerHolder.getCacheManager(bus, configFileURL); Ehcache newCache = new Cache(key, 50000, true, false, DEFAULT_TTL, DEFAULT_TTL); cache = cacheManager.addCacheIfAbsent(newCache); @@ -112,12 +119,25 @@ public class EHCacheReplayCache implemen return false; } - public void close() throws IOException { + public synchronized void close() { if (cacheManager != null) { EHCacheManagerHolder.releaseCacheManger(cacheManager); cacheManager = null; cache = null; + if (bus != null) { + bus.getExtension(BusLifeCycleManager.class).unregisterLifeCycleListener(this); + } } + + } + + public void initComplete() { + } + public void preShutdown() { + close(); + } + public void postShutdown() { + close(); } } Modified: cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/cache/EHCacheReplayCacheFactory.java URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/cache/EHCacheReplayCacheFactory.java?rev=1348179&r1=1348178&r2=1348179&view=diff ============================================================================== --- cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/cache/EHCacheReplayCacheFactory.java (original) +++ cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/cache/EHCacheReplayCacheFactory.java Fri Jun 8 18:35:16 2012 @@ -19,14 +19,9 @@ package org.apache.cxf.ws.security.cache; -import java.io.IOException; import java.net.URL; -import org.apache.cxf.Bus; -import org.apache.cxf.common.classloader.ClassLoaderUtils; import org.apache.cxf.message.Message; -import org.apache.cxf.resource.ResourceManager; -import org.apache.cxf.ws.security.SecurityConstants; import org.apache.ws.security.cache.ReplayCache; /** @@ -36,26 +31,7 @@ public class EHCacheReplayCacheFactory e public ReplayCache newReplayCache(String key, Message message) { URL configFileURL = getConfigFileURL(message); - if (configFileURL == null) { - String defaultConfigFile = "cxf-ehcache.xml"; - ResourceManager rm = message.getExchange().get(Bus.class).getExtension(ResourceManager.class); - configFileURL = rm.resolveResource(defaultConfigFile, URL.class); - try { - if (configFileURL == null) { - configFileURL = - ClassLoaderUtils.getResource(defaultConfigFile, EHCacheReplayCacheFactory.class); - } - if (configFileURL == null) { - configFileURL = new URL(defaultConfigFile); - } - } catch (IOException e) { - // Do nothing - } - } - if (configFileURL != null) { - message.setContextualProperty(SecurityConstants.CACHE_CONFIG_FILE, configFileURL); - } - return new EHCacheReplayCache(key, configFileURL); + return new EHCacheReplayCache(key, message.getExchange().getBus(), configFileURL); } } Modified: cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/WSSecurityPolicyLoader.java URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/WSSecurityPolicyLoader.java?rev=1348179&r1=1348178&r2=1348179&view=diff ============================================================================== --- cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/WSSecurityPolicyLoader.java (original) +++ cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/WSSecurityPolicyLoader.java Fri Jun 8 18:35:16 2012 @@ -19,8 +19,6 @@ package org.apache.cxf.ws.security.policy; -import java.io.Closeable; -import java.io.IOException; import java.util.Arrays; import java.util.List; @@ -28,20 +26,12 @@ import javax.xml.namespace.QName; import org.apache.cxf.Bus; import org.apache.cxf.common.injection.NoJSR250Annotations; -import org.apache.cxf.endpoint.Client; -import org.apache.cxf.endpoint.ClientLifeCycleListener; -import org.apache.cxf.endpoint.ClientLifeCycleManager; -import org.apache.cxf.endpoint.Server; -import org.apache.cxf.endpoint.ServerLifeCycleListener; -import org.apache.cxf.endpoint.ServerLifeCycleManager; -import org.apache.cxf.service.model.EndpointInfo; import org.apache.cxf.ws.policy.AssertionBuilderLoader; import org.apache.cxf.ws.policy.AssertionBuilderRegistry; import org.apache.cxf.ws.policy.PolicyBuilder; import org.apache.cxf.ws.policy.PolicyInterceptorProviderLoader; import org.apache.cxf.ws.policy.PolicyInterceptorProviderRegistry; import org.apache.cxf.ws.policy.builder.primitive.PrimitiveAssertionBuilder; -import org.apache.cxf.ws.security.SecurityConstants; import org.apache.cxf.ws.security.policy.builders.AlgorithmSuiteBuilder; import org.apache.cxf.ws.security.policy.builders.AsymmetricBindingBuilder; import org.apache.cxf.ws.security.policy.builders.ContentEncryptedElementsBuilder; @@ -86,7 +76,6 @@ import org.apache.cxf.ws.security.policy import org.apache.cxf.ws.security.policy.interceptors.UsernameTokenInterceptorProvider; import org.apache.cxf.ws.security.policy.interceptors.WSSecurityInterceptorProvider; import org.apache.cxf.ws.security.policy.interceptors.WSSecurityPolicyInterceptorProvider; -import org.apache.ws.security.cache.ReplayCache; @NoJSR250Annotations public final class WSSecurityPolicyLoader implements PolicyInterceptorProviderLoader, AssertionBuilderLoader { @@ -103,45 +92,8 @@ public final class WSSecurityPolicyLoade //and error out at that point. If nothing uses ws-securitypolicy //no warnings/errors will display } - ServerLifeCycleManager m = b.getExtension(ServerLifeCycleManager.class); - if (m != null) { - m.registerListener(new ServerLifeCycleListener() { - public void startServer(Server server) { - } - public void stopServer(Server server) { - shutdownResources(server.getEndpoint().getEndpointInfo()); - } - }); - } - ClientLifeCycleManager cm = b.getExtension(ClientLifeCycleManager.class); - if (cm != null) { - cm.registerListener(new ClientLifeCycleListener() { - public void clientCreated(Client client) { - } - public void clientDestroyed(Client client) { - shutdownResources(client.getEndpoint().getEndpointInfo()); - } - }); - } - } - protected void shutdownResources(EndpointInfo info) { - ReplayCache rc = (ReplayCache)info.getProperty(SecurityConstants.NONCE_CACHE_INSTANCE); - if (rc instanceof Closeable) { - close((Closeable)rc); - } - rc = (ReplayCache)info.getProperty(SecurityConstants.TIMESTAMP_CACHE_INSTANCE); - if (rc instanceof Closeable) { - close((Closeable)rc); - } } - private void close(Closeable ts) { - try { - ts.close(); - } catch (IOException ex) { - //ignore, we're shutting down and nothing we can do - } - } public void registerBuilders() { AssertionBuilderRegistry reg = bus.getExtension(AssertionBuilderRegistry.class); if (reg == null) { Modified: cxf/branches/2.4.x-fixes/rt/ws/security/src/main/resources/META-INF/cxf/bus-extensions.txt URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/ws/security/src/main/resources/META-INF/cxf/bus-extensions.txt?rev=1348179&r1=1348178&r2=1348179&view=diff ============================================================================== --- cxf/branches/2.4.x-fixes/rt/ws/security/src/main/resources/META-INF/cxf/bus-extensions.txt (original) +++ cxf/branches/2.4.x-fixes/rt/ws/security/src/main/resources/META-INF/cxf/bus-extensions.txt Fri Jun 8 18:35:16 2012 @@ -1 +1,2 @@ -org.apache.cxf.ws.security.policy.WSSecurityPolicyLoader::true +org.apache.cxf.ws.security.policy.WSSecurityPolicyLoader::true:true +org.apache.cxf.ws.security.cache.CacheCleanupListener::true:true Modified: cxf/branches/2.4.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/FaultTest.java URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/FaultTest.java?rev=1348179&r1=1348178&r2=1348179&view=diff ============================================================================== --- cxf/branches/2.4.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/FaultTest.java (original) +++ cxf/branches/2.4.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/FaultTest.java Fri Jun 8 18:35:16 2012 @@ -33,6 +33,7 @@ import org.w3c.dom.Document; import org.w3c.dom.Element; import org.apache.cxf.Bus; +import org.apache.cxf.BusFactory; import org.apache.cxf.bus.spring.SpringBusFactory; import org.apache.cxf.endpoint.Client; import org.apache.cxf.jaxws.DispatchImpl; @@ -96,13 +97,12 @@ public class FaultTest extends AbstractB } catch (Exception ex) { assertTrue(ex.getMessage().contains("This is a fault")); } - + ((java.io.Closeable)utPort).close(); bus.shutdown(true); } @org.junit.Test public void testSoap12() throws Exception { - SpringBusFactory bf = new SpringBusFactory(); URL busFile = FaultTest.class.getResource("client/client.xml"); @@ -130,13 +130,14 @@ public class FaultTest extends AbstractB } catch (Exception ex) { assertTrue(ex.getMessage().contains("This is a fault")); } - + ((java.io.Closeable)utPort).close(); bus.shutdown(true); } @org.junit.Test public void testSoap12Dispatch() throws Exception { - + createBus(); + BusFactory.setDefaultBus(getBus()); URL wsdl = FaultTest.class.getResource("DoubleItFault.wsdl"); Service service = Service.create(wsdl, SERVICE_QNAME); QName portQName = new QName(NAMESPACE, "DoubleItSoap12DispatchPort"); @@ -184,6 +185,8 @@ public class FaultTest extends AbstractB } catch (Exception ex) { assertTrue(ex.getMessage().contains("This is a fault")); } + + client.destroy(); } Modified: cxf/branches/2.4.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/security/WSSecurityClientTest.java URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/security/WSSecurityClientTest.java?rev=1348179&r1=1348178&r2=1348179&view=diff ============================================================================== --- cxf/branches/2.4.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/security/WSSecurityClientTest.java (original) +++ cxf/branches/2.4.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/security/WSSecurityClientTest.java Fri Jun 8 18:35:16 2012 @@ -42,6 +42,7 @@ import javax.xml.ws.soap.AddressingFeatu import javax.xml.ws.soap.SOAPBinding; import javax.xml.ws.soap.SOAPFaultException; +import org.apache.cxf.Bus; import org.apache.cxf.BusFactory; import org.apache.cxf.bus.spring.SpringBusFactory; import org.apache.cxf.endpoint.Client; @@ -101,6 +102,7 @@ public class WSSecurityClientTest extend // set this to false to fork launchServer(Server.class, true) ); + createStaticBus(); } @Test @@ -137,15 +139,15 @@ public class WSSecurityClientTest extend } catch (Exception ex) { //expected } + + ((java.io.Closeable)greeter).close(); } @Test public void testTimestampSignEncrypt() throws Exception { - BusFactory.setDefaultBus( - new SpringBusFactory().createBus( - "org/apache/cxf/systest/ws/security/client.xml" - ) - ); + Bus b = new SpringBusFactory() + .createBus("org/apache/cxf/systest/ws/security/client.xml"); + BusFactory.setDefaultBus(b); final javax.xml.ws.Service svc = javax.xml.ws.Service.create( WSDL_LOC, GREETER_SERVICE_QNAME @@ -171,7 +173,10 @@ public class WSSecurityClientTest extend assertTrue("expected Handler.handleMessage() to be called", handler.handleMessageCalledOutbound); assertFalse("expected Handler.handleFault() not to be called", - handler.handleFaultCalledOutbound); + handler.handleFaultCalledOutbound); + ((java.io.Closeable)greeter).close(); + b.shutdown(true); + BusFactory.setDefaultBus(getStaticBus()); } @Test Modified: cxf/branches/2.4.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssc/WSSCTest.java URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssc/WSSCTest.java?rev=1348179&r1=1348178&r2=1348179&view=diff ============================================================================== --- cxf/branches/2.4.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssc/WSSCTest.java (original) +++ cxf/branches/2.4.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssc/WSSCTest.java Fri Jun 8 18:35:16 2012 @@ -208,6 +208,7 @@ public class WSSCTest extends AbstractBu } catch (Exception ex) { throw new Exception("Error doing " + portPrefix, ex); } + ((java.io.Closeable)port).close(); } } Modified: cxf/branches/2.4.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssc/server/Server.java URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssc/server/Server.java?rev=1348179&r1=1348178&r2=1348179&view=diff ============================================================================== --- cxf/branches/2.4.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssc/server/Server.java (original) +++ cxf/branches/2.4.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssc/server/Server.java Fri Jun 8 18:35:16 2012 @@ -85,11 +85,11 @@ public class Server extends AbstractBusT protected void run() { try { - new Server("http://localhost:" + PORT + "/"); Bus busLocal = new SpringBusFactory().createBus( - "org/apache/cxf/systest/ws/wssc/server/server.xml"); + "org/apache/cxf/systest/ws/wssc/server/server.xml"); BusFactory.setDefaultBus(busLocal); setBus(busLocal); + new Server("http://localhost:" + PORT + "/"); } catch (Exception e) { e.printStackTrace(); } Modified: cxf/branches/2.4.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssec10/server/Server.java URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssec10/server/Server.java?rev=1348179&r1=1348178&r2=1348179&view=diff ============================================================================== --- cxf/branches/2.4.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssec10/server/Server.java (original) +++ cxf/branches/2.4.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssec10/server/Server.java Fri Jun 8 18:35:16 2012 @@ -51,8 +51,7 @@ public class Server extends AbstractBusT } public static void main(String args[]) throws Exception { - new Server(); - new SpringBusFactory().createBus(configFileName); + new Server().run(); System.out.println("Server ready..."); Thread.sleep(60 * 60 * 1000); Modified: cxf/branches/2.4.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/x509/server/Server.java URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/x509/server/Server.java?rev=1348179&r1=1348178&r2=1348179&view=diff ============================================================================== --- cxf/branches/2.4.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/x509/server/Server.java (original) +++ cxf/branches/2.4.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/x509/server/Server.java Fri Jun 8 18:35:16 2012 @@ -37,11 +37,5 @@ public class Server extends AbstractBusT Bus busLocal = new SpringBusFactory().createBus(busFile); BusFactory.setDefaultBus(busLocal); setBus(busLocal); - - try { - new Server(); - } catch (Exception e) { - e.printStackTrace(); - } } }
