diff --git a/source/java/org/alfresco/email/server/EmailServer.java b/source/java/org/alfresco/email/server/EmailServer.java index fa0c087620..40331c155d 100644 --- a/source/java/org/alfresco/email/server/EmailServer.java +++ b/source/java/org/alfresco/email/server/EmailServer.java @@ -29,7 +29,6 @@ import java.util.List; import java.util.Set; import java.util.StringTokenizer; -import org.alfresco.config.FixedClassPathXmlApplicationContext; import org.alfresco.error.AlfrescoRuntimeException; import org.alfresco.service.cmr.email.EmailMessageException; import org.alfresco.service.cmr.email.EmailService; @@ -38,6 +37,7 @@ import org.alfresco.util.PropertyCheck; import org.springframework.beans.BeansException; import org.springframework.context.ApplicationEvent; import org.springframework.context.support.AbstractApplicationContext; +import org.springframework.context.support.ClassPathXmlApplicationContext; /** * Base implementation of an email server. @@ -260,7 +260,7 @@ public abstract class EmailServer extends AbstractLifecycleBean AbstractApplicationContext context = null; try { - context = new FixedClassPathXmlApplicationContext(args); + context = new ClassPathXmlApplicationContext(args); } catch (BeansException e) { System.err.println("Erro create context: " + e); diff --git a/source/java/org/alfresco/filesys/CIFSServerBean.java b/source/java/org/alfresco/filesys/CIFSServerBean.java index 35f6d046ee..5fdf747c50 100644 --- a/source/java/org/alfresco/filesys/CIFSServerBean.java +++ b/source/java/org/alfresco/filesys/CIFSServerBean.java @@ -30,7 +30,6 @@ import java.net.SocketException; import java.util.LinkedList; import java.util.List; -import org.alfresco.config.FixedClassPathXmlApplicationContext; import org.alfresco.error.AlfrescoRuntimeException; import org.alfresco.jlan.netbios.server.NetBIOSNameServer; import org.alfresco.jlan.server.NetworkServer; @@ -43,6 +42,7 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationEvent; +import org.springframework.context.support.ClassPathXmlApplicationContext; /** * CIFS Server Class @@ -213,7 +213,7 @@ public class CIFSServerBean extends AbstractLifecycleBean { // Create the configuration service in the same way that Spring creates it - ApplicationContext ctx = new FixedClassPathXmlApplicationContext("alfresco/application-context.xml"); + ApplicationContext ctx = new ClassPathXmlApplicationContext("alfresco/application-context.xml"); // Get the CIFS server bean diff --git a/source/java/org/alfresco/filesys/FTPServerBean.java b/source/java/org/alfresco/filesys/FTPServerBean.java index 00754f5ab0..734fc3b24d 100644 --- a/source/java/org/alfresco/filesys/FTPServerBean.java +++ b/source/java/org/alfresco/filesys/FTPServerBean.java @@ -28,7 +28,6 @@ import java.io.IOException; import java.io.PrintStream; import java.net.SocketException; -import org.alfresco.config.FixedClassPathXmlApplicationContext; import org.alfresco.error.AlfrescoRuntimeException; import org.alfresco.jlan.ftp.FTPConfigSection; import org.alfresco.jlan.ftp.FTPServer; @@ -39,6 +38,7 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationEvent; +import org.springframework.context.support.ClassPathXmlApplicationContext; /** * FTP Server Class @@ -174,7 +174,7 @@ public class FTPServerBean extends AbstractLifecycleBean { // Create the configuration service in the same way that Spring creates it - ApplicationContext ctx = new FixedClassPathXmlApplicationContext("alfresco/application-context.xml"); + ApplicationContext ctx = new ClassPathXmlApplicationContext("alfresco/application-context.xml"); // Get the FTP server bean diff --git a/source/java/org/alfresco/filesys/NFSServerBean.java b/source/java/org/alfresco/filesys/NFSServerBean.java index 12d86a3dda..8835218004 100644 --- a/source/java/org/alfresco/filesys/NFSServerBean.java +++ b/source/java/org/alfresco/filesys/NFSServerBean.java @@ -28,7 +28,6 @@ import java.io.PrintStream; import java.net.SocketException; import java.util.Vector; -import org.alfresco.config.FixedClassPathXmlApplicationContext; import org.alfresco.error.AlfrescoRuntimeException; import org.alfresco.jlan.oncrpc.mount.MountServer; import org.alfresco.jlan.oncrpc.nfs.NFSConfigSection; @@ -41,6 +40,7 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationEvent; +import org.springframework.context.support.ClassPathXmlApplicationContext; /** * NFS Server Class @@ -203,7 +203,7 @@ public class NFSServerBean extends AbstractLifecycleBean { // Create the configuration service in the same way that Spring creates it - ApplicationContext ctx = new FixedClassPathXmlApplicationContext("alfresco/application-context.xml"); + ApplicationContext ctx = new ClassPathXmlApplicationContext("alfresco/application-context.xml"); // Get the NFS server bean diff --git a/source/java/org/alfresco/jcr/test/BaseJCRTest.java b/source/java/org/alfresco/jcr/test/BaseJCRTest.java index f3457ffe71..de5c75f111 100644 --- a/source/java/org/alfresco/jcr/test/BaseJCRTest.java +++ b/source/java/org/alfresco/jcr/test/BaseJCRTest.java @@ -28,12 +28,12 @@ import javax.jcr.Repository; import junit.framework.TestCase; -import org.alfresco.config.FixedClassPathXmlApplicationContext; import org.alfresco.jcr.repository.RepositoryFactory; import org.alfresco.jcr.repository.RepositoryImpl; import org.alfresco.repo.security.authentication.AuthenticationUtil; import org.alfresco.service.cmr.repository.StoreRef; import org.springframework.context.ApplicationContext; +import org.springframework.context.support.ClassPathXmlApplicationContext; /** * Base JCR Test @@ -47,7 +47,7 @@ public class BaseJCRTest extends TestCase protected StoreRef storeRef; protected String adminUserName; - protected static ApplicationContext applicationContext = new FixedClassPathXmlApplicationContext("classpath:org/alfresco/jcr/test/test-context.xml"); + protected static ApplicationContext applicationContext = new ClassPathXmlApplicationContext("classpath:org/alfresco/jcr/test/test-context.xml"); protected String getWorkspace() { diff --git a/source/java/org/alfresco/jcr/test/TestData.java b/source/java/org/alfresco/jcr/test/TestData.java index 31fdfa05a4..65e071819c 100644 --- a/source/java/org/alfresco/jcr/test/TestData.java +++ b/source/java/org/alfresco/jcr/test/TestData.java @@ -28,7 +28,6 @@ import java.util.ArrayList; import java.util.List; import java.util.Properties; -import org.alfresco.config.FixedClassPathXmlApplicationContext; import org.alfresco.repo.importer.ImporterBootstrap; import org.alfresco.repo.security.authentication.AuthenticationContext; import org.alfresco.repo.security.authentication.MutableAuthenticationDao; @@ -42,6 +41,7 @@ import org.alfresco.service.cmr.view.ImporterService; import org.alfresco.service.namespace.NamespaceService; import org.alfresco.service.transaction.TransactionService; import org.springframework.context.ApplicationContext; +import org.springframework.context.support.ClassPathXmlApplicationContext; @@ -56,7 +56,7 @@ public class TestData */ public static void main(String[] args) { - ApplicationContext context = new FixedClassPathXmlApplicationContext("org/alfresco/jcr/test/test-context.xml"); + ApplicationContext context = new ClassPathXmlApplicationContext("org/alfresco/jcr/test/test-context.xml"); generateTestData(context, TEST_WORKSPACE); System.out.println("Generated TCK test data to workspace: " + TEST_WORKSPACE); System.exit(0); diff --git a/source/java/org/alfresco/repo/admin/Log4JHierarchyInitTest.java b/source/java/org/alfresco/repo/admin/Log4JHierarchyInitTest.java index 835afda4ae..81fb31620c 100644 --- a/source/java/org/alfresco/repo/admin/Log4JHierarchyInitTest.java +++ b/source/java/org/alfresco/repo/admin/Log4JHierarchyInitTest.java @@ -26,10 +26,10 @@ package org.alfresco.repo.admin; import junit.framework.TestCase; -import org.alfresco.config.FixedClassPathXmlApplicationContext; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.context.ApplicationContext; +import org.springframework.context.support.ClassPathXmlApplicationContext; /** * @see Log4JHierarchyInit @@ -39,7 +39,7 @@ import org.springframework.context.ApplicationContext; */ public class Log4JHierarchyInitTest extends TestCase { - private static ApplicationContext ctx = new FixedClassPathXmlApplicationContext( + private static ApplicationContext ctx = new ClassPathXmlApplicationContext( new String[] {"classpath:log4j/log4j-test-context.xml"} ); diff --git a/source/java/org/alfresco/repo/cache/CacheTest.java b/source/java/org/alfresco/repo/cache/CacheTest.java index 95daabff13..70ed1bf488 100644 --- a/source/java/org/alfresco/repo/cache/CacheTest.java +++ b/source/java/org/alfresco/repo/cache/CacheTest.java @@ -33,7 +33,6 @@ import javax.transaction.UserTransaction; import junit.framework.TestCase; import net.sf.ehcache.CacheManager; -import org.alfresco.config.FixedClassPathXmlApplicationContext; import org.alfresco.repo.cache.TransactionalCache.NullValueMarker; import org.alfresco.repo.transaction.AlfrescoTransactionSupport; import org.alfresco.repo.transaction.RetryingTransactionHelper; @@ -43,6 +42,7 @@ import org.alfresco.service.ServiceRegistry; import org.alfresco.service.transaction.TransactionService; import org.alfresco.util.ApplicationContextHelper; import org.springframework.context.ApplicationContext; +import org.springframework.context.support.ClassPathXmlApplicationContext; /** * @see org.alfresco.repo.cache.EhCacheAdapter @@ -51,7 +51,7 @@ import org.springframework.context.ApplicationContext; */ public class CacheTest extends TestCase { - private static ApplicationContext ctx =new FixedClassPathXmlApplicationContext( + private static ApplicationContext ctx =new ClassPathXmlApplicationContext( new String[] {"classpath:cache-test-context.xml", ApplicationContextHelper.CONFIG_LOCATIONS[0]} ); diff --git a/source/java/org/alfresco/repo/clt/CltBase.java b/source/java/org/alfresco/repo/clt/CltBase.java index 140867b792..769de0a0c1 100644 --- a/source/java/org/alfresco/repo/clt/CltBase.java +++ b/source/java/org/alfresco/repo/clt/CltBase.java @@ -11,7 +11,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.alfresco.config.FixedClassPathXmlApplicationContext; import org.alfresco.repo.remote.ClientTicketHolder; import org.alfresco.service.cmr.avmsync.AVMSyncService; import org.alfresco.service.cmr.remote.AVMRemote; @@ -19,6 +18,7 @@ import org.alfresco.service.cmr.remote.RepoRemote; import org.alfresco.service.cmr.security.AuthenticationService; import org.alfresco.util.Pair; import org.springframework.context.ConfigurableApplicationContext; +import org.springframework.context.support.ClassPathXmlApplicationContext; /** * This is the base class for AVM clts. @@ -64,7 +64,7 @@ public abstract class CltBase */ protected CltBase() { - fContext = new FixedClassPathXmlApplicationContext("clt-context.xml"); + fContext = new ClassPathXmlApplicationContext("clt-context.xml"); fAVMRemote = (AVMRemote)fContext.getBean("avmRemote"); fAVMSyncService = (AVMSyncService)fContext.getBean("avmSyncService"); fRepoRemote = (RepoRemote)fContext.getBean("repoRemote"); diff --git a/source/java/org/alfresco/repo/content/metadata/xml/XmlMetadataExtracterTest.java b/source/java/org/alfresco/repo/content/metadata/xml/XmlMetadataExtracterTest.java index 6b186bbb17..df15f84d03 100644 --- a/source/java/org/alfresco/repo/content/metadata/xml/XmlMetadataExtracterTest.java +++ b/source/java/org/alfresco/repo/content/metadata/xml/XmlMetadataExtracterTest.java @@ -30,7 +30,6 @@ import java.net.URL; import junit.framework.TestCase; -import org.alfresco.config.FixedClassPathXmlApplicationContext; import org.alfresco.model.ContentModel; import org.alfresco.repo.action.ActionImpl; import org.alfresco.repo.action.executer.ActionExecuter; @@ -55,6 +54,7 @@ import org.alfresco.service.namespace.QName; import org.alfresco.util.GUID; import org.alfresco.util.PropertyMap; import org.springframework.context.ApplicationContext; +import org.springframework.context.support.ClassPathXmlApplicationContext; /** * Tests various aspects of XML metadata extraction. @@ -71,7 +71,7 @@ public class XmlMetadataExtracterTest extends TestCase private static final String FILE_MALFORMED = "xml-metadata/malformed-sample.xml"; private static final String CTX_LOCATION = "classpath:xml-metadata/xml-metadata-test-context.xml"; - private static final ApplicationContext ctx = new FixedClassPathXmlApplicationContext(CTX_LOCATION); + private static final ApplicationContext ctx = new ClassPathXmlApplicationContext(CTX_LOCATION); private ServiceRegistry serviceRegistry; private AuthenticationComponent authenticationComponent; diff --git a/source/java/org/alfresco/repo/management/subsystems/ChildApplicationContextFactory.java b/source/java/org/alfresco/repo/management/subsystems/ChildApplicationContextFactory.java index 8782d29a08..7a1240aff6 100644 --- a/source/java/org/alfresco/repo/management/subsystems/ChildApplicationContextFactory.java +++ b/source/java/org/alfresco/repo/management/subsystems/ChildApplicationContextFactory.java @@ -36,7 +36,6 @@ import java.util.StringTokenizer; import java.util.TreeMap; import java.util.TreeSet; -import org.alfresco.config.FixedClassPathXmlApplicationContext; import org.alfresco.config.JBossEnabledResourcePatternResolver; import org.alfresco.config.JndiPropertiesFactoryBean; import org.alfresco.util.config.RepositoryPathConfigBean; @@ -351,7 +350,7 @@ public class ChildApplicationContextFactory extends AbstractPropertyBackedBean i * * @author dward */ - private class ChildApplicationContext extends FixedClassPathXmlApplicationContext + private class ChildApplicationContext extends ClassPathXmlApplicationContext { /** The composite property values. */ diff --git a/source/java/org/alfresco/repo/module/ComponentsTest.java b/source/java/org/alfresco/repo/module/ComponentsTest.java index 568aa4438c..b448fe7d57 100644 --- a/source/java/org/alfresco/repo/module/ComponentsTest.java +++ b/source/java/org/alfresco/repo/module/ComponentsTest.java @@ -30,7 +30,6 @@ import javax.transaction.UserTransaction; import junit.framework.TestCase; -import org.alfresco.config.FixedClassPathXmlApplicationContext; import org.alfresco.model.ContentModel; import org.alfresco.repo.security.authentication.AuthenticationComponent; import org.alfresco.service.ServiceRegistry; @@ -41,6 +40,7 @@ import org.alfresco.service.cmr.repository.StoreRef; import org.alfresco.service.cmr.search.CategoryService; import org.alfresco.service.transaction.TransactionService; import org.springframework.context.ApplicationContext; +import org.springframework.context.support.ClassPathXmlApplicationContext; /** * Tests various module components. @@ -52,7 +52,7 @@ import org.springframework.context.ApplicationContext; */ public class ComponentsTest extends TestCase { - private static ApplicationContext ctx = new FixedClassPathXmlApplicationContext("module/module-component-test-beans.xml"); + private static ApplicationContext ctx = new ClassPathXmlApplicationContext("module/module-component-test-beans.xml"); private ServiceRegistry serviceRegistry; private AuthenticationComponent authenticationComponent; diff --git a/source/java/org/alfresco/repo/search/impl/lucene/fts/FullTextSearchIndexerImpl.java b/source/java/org/alfresco/repo/search/impl/lucene/fts/FullTextSearchIndexerImpl.java index b9e46c5efd..76a844f037 100644 --- a/source/java/org/alfresco/repo/search/impl/lucene/fts/FullTextSearchIndexerImpl.java +++ b/source/java/org/alfresco/repo/search/impl/lucene/fts/FullTextSearchIndexerImpl.java @@ -28,7 +28,6 @@ import java.util.HashSet; import java.util.LinkedHashSet; import java.util.Set; -import org.alfresco.config.FixedClassPathXmlApplicationContext; import org.alfresco.repo.search.BackgroundIndexerAware; import org.alfresco.repo.search.Indexer; import org.alfresco.repo.search.IndexerAndSearcher; @@ -38,6 +37,7 @@ import org.springframework.beans.BeansException; import org.springframework.beans.factory.BeanFactory; import org.springframework.beans.factory.ListableBeanFactory; import org.springframework.context.ApplicationContext; +import org.springframework.context.support.ClassPathXmlApplicationContext; /** * Background index update scheduler @@ -241,7 +241,7 @@ public class FullTextSearchIndexerImpl implements FTSIndexerAware, FullTextSearc public static void main(String[] args) throws InterruptedException { @SuppressWarnings("unused") - ApplicationContext ctx = new FixedClassPathXmlApplicationContext("classpath:alfresco/application-context.xml"); + ApplicationContext ctx = new ClassPathXmlApplicationContext("classpath:alfresco/application-context.xml"); } diff --git a/source/java/org/alfresco/repo/security/sync/ChainingUserRegistrySynchronizerTest.java b/source/java/org/alfresco/repo/security/sync/ChainingUserRegistrySynchronizerTest.java index c469027755..73b97e286d 100644 --- a/source/java/org/alfresco/repo/security/sync/ChainingUserRegistrySynchronizerTest.java +++ b/source/java/org/alfresco/repo/security/sync/ChainingUserRegistrySynchronizerTest.java @@ -39,7 +39,6 @@ import java.util.Set; import junit.framework.TestCase; -import org.alfresco.config.FixedClassPathXmlApplicationContext; import org.alfresco.model.ContentModel; import org.alfresco.repo.management.subsystems.ChildApplicationContextManager; import org.alfresco.repo.security.authentication.AuthenticationContext; @@ -53,6 +52,7 @@ import org.alfresco.service.cmr.security.PersonService; import org.alfresco.util.GUID; import org.alfresco.util.PropertyMap; import org.springframework.context.ApplicationContext; +import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.context.support.StaticApplicationContext; /** @@ -70,7 +70,7 @@ public class ChainingUserRegistrySynchronizerTest extends TestCase }; /** The Spring application context. */ - private static ApplicationContext context = new FixedClassPathXmlApplicationContext( + private static ApplicationContext context = new ClassPathXmlApplicationContext( ChainingUserRegistrySynchronizerTest.CONFIG_LOCATIONS); /** The synchronizer we are testing. */ diff --git a/source/java/org/alfresco/repo/service/StoreRedirectorProxyFactoryTest.java b/source/java/org/alfresco/repo/service/StoreRedirectorProxyFactoryTest.java index 6f9281dc35..fab98f42f7 100644 --- a/source/java/org/alfresco/repo/service/StoreRedirectorProxyFactoryTest.java +++ b/source/java/org/alfresco/repo/service/StoreRedirectorProxyFactoryTest.java @@ -26,10 +26,10 @@ package org.alfresco.repo.service; import junit.framework.TestCase; -import org.alfresco.config.FixedClassPathXmlApplicationContext; import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.service.cmr.repository.StoreRef; import org.springframework.context.ApplicationContext; +import org.springframework.context.support.ClassPathXmlApplicationContext; public class StoreRedirectorProxyFactoryTest extends TestCase { @@ -38,7 +38,7 @@ public class StoreRedirectorProxyFactoryTest extends TestCase public void setUp() { - factory = new FixedClassPathXmlApplicationContext("org/alfresco/repo/service/testredirector.xml"); + factory = new ClassPathXmlApplicationContext("org/alfresco/repo/service/testredirector.xml"); } public void testRedirect() diff --git a/source/java/org/alfresco/repo/tenant/MultiTDemoTest.java b/source/java/org/alfresco/repo/tenant/MultiTDemoTest.java index 59f01fe6ef..3c40e7e6d2 100644 --- a/source/java/org/alfresco/repo/tenant/MultiTDemoTest.java +++ b/source/java/org/alfresco/repo/tenant/MultiTDemoTest.java @@ -37,7 +37,6 @@ import java.util.Set; import junit.framework.TestCase; -import org.alfresco.config.FixedClassPathXmlApplicationContext; import org.alfresco.error.AlfrescoRuntimeException; import org.alfresco.model.ApplicationModel; import org.alfresco.model.ContentModel; @@ -71,12 +70,13 @@ import org.alfresco.util.ApplicationContextHelper; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.context.ApplicationContext; +import org.springframework.context.support.ClassPathXmlApplicationContext; public class MultiTDemoTest extends TestCase { private static Log logger = LogFactory.getLog(MultiTDemoTest.class); - private static ApplicationContext ctx =new FixedClassPathXmlApplicationContext( + private static ApplicationContext ctx =new ClassPathXmlApplicationContext( new String[] {ApplicationContextHelper.CONFIG_LOCATIONS[0], "classpath:tenant/mt-*context.xml"} ); diff --git a/source/java/org/alfresco/util/ApplicationContextHelper.java b/source/java/org/alfresco/util/ApplicationContextHelper.java index d9f71eb191..4aded2c80d 100644 --- a/source/java/org/alfresco/util/ApplicationContextHelper.java +++ b/source/java/org/alfresco/util/ApplicationContextHelper.java @@ -26,7 +26,6 @@ package org.alfresco.util; import java.util.Arrays; -import org.alfresco.config.FixedClassPathXmlApplicationContext; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; @@ -81,7 +80,7 @@ public class ApplicationContextHelper // The config has changed so close the current context (if any) closeApplicationContext(); - instance = new FixedClassPathXmlApplicationContext(configLocations); + instance = new ClassPathXmlApplicationContext(configLocations); usedConfiguration = configLocations; return instance; diff --git a/source/java/org/alfresco/util/BaseSpringTest.java b/source/java/org/alfresco/util/BaseSpringTest.java index e5b3abbf47..5a1f7a54dc 100644 --- a/source/java/org/alfresco/util/BaseSpringTest.java +++ b/source/java/org/alfresco/util/BaseSpringTest.java @@ -24,10 +24,10 @@ */ package org.alfresco.util; -import org.alfresco.config.FixedClassPathXmlApplicationContext; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.springframework.context.ConfigurableApplicationContext; +import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.orm.hibernate3.SessionFactoryUtils; import org.springframework.test.AbstractTransactionalDataSourceSpringContextTests; @@ -120,7 +120,7 @@ public abstract class BaseSpringTest extends AbstractTransactionalDataSourceSpri else { String[] configLocations = (String[]) key; - return new FixedClassPathXmlApplicationContext(configLocations); + return new ClassPathXmlApplicationContext(configLocations); } } } diff --git a/source/java/org/alfresco/util/schemadump/Main.java b/source/java/org/alfresco/util/schemadump/Main.java index bd2eb93538..881661ad22 100644 --- a/source/java/org/alfresco/util/schemadump/Main.java +++ b/source/java/org/alfresco/util/schemadump/Main.java @@ -47,7 +47,6 @@ import javax.xml.transform.sax.SAXTransformerFactory; import javax.xml.transform.sax.TransformerHandler; import javax.xml.transform.stream.StreamResult; -import org.alfresco.config.FixedClassPathXmlApplicationContext; import org.hibernate.dialect.Dialect; import org.hibernate.dialect.Oracle8iDialect; import org.hibernate.dialect.TypeNames; @@ -102,7 +101,7 @@ public class Main @SuppressWarnings("unchecked") public Main(final String contextPath) throws Exception { - final ClassPathXmlApplicationContext context = new FixedClassPathXmlApplicationContext(new String[] + final ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(new String[] { "file:" + contextPath }); diff --git a/source/java/org/alfresco/wcm/AbstractWCMServiceImplTest.java b/source/java/org/alfresco/wcm/AbstractWCMServiceImplTest.java index d723dd61f2..af10a05d04 100644 --- a/source/java/org/alfresco/wcm/AbstractWCMServiceImplTest.java +++ b/source/java/org/alfresco/wcm/AbstractWCMServiceImplTest.java @@ -28,7 +28,6 @@ import java.util.List; import junit.framework.TestCase; -import org.alfresco.config.FixedClassPathXmlApplicationContext; import org.alfresco.error.AlfrescoRuntimeException; import org.alfresco.model.ContentModel; import org.alfresco.repo.security.authentication.AuthenticationUtil; @@ -46,6 +45,7 @@ import org.alfresco.wcm.webproject.WebProjectService; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.context.ApplicationContext; +import org.springframework.context.support.ClassPathXmlApplicationContext; /** * Abstract WCM Service implementation unit test @@ -65,7 +65,7 @@ public class AbstractWCMServiceImplTest extends TestCase protected static final int POLL_MAX_ATTEMPTS = 10; // note: all tests share same context (when run via WCMTestSuite) - protected static ApplicationContext ctx = new FixedClassPathXmlApplicationContext(new String[] {ApplicationContextHelper.CONFIG_LOCATIONS[0], SUBMIT_CONFIG_LOCATION, PREVIEW_CONFIG_LOCATION});; + protected static ApplicationContext ctx = new ClassPathXmlApplicationContext(new String[] {ApplicationContextHelper.CONFIG_LOCATIONS[0], SUBMIT_CONFIG_LOCATION, PREVIEW_CONFIG_LOCATION});; // // test data