Integrated Spring v3 snapshot CI-477

- Fixes SPR-6411 and SPR-6412
- Removes dependency on Hibernate v3.3

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@17664 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Dave Ward
2009-11-30 09:36:40 +00:00
parent bf7da50140
commit be0482f06e
20 changed files with 37 additions and 40 deletions

View File

@@ -29,7 +29,6 @@ import java.util.List;
import java.util.Set; import java.util.Set;
import java.util.StringTokenizer; import java.util.StringTokenizer;
import org.alfresco.config.FixedClassPathXmlApplicationContext;
import org.alfresco.error.AlfrescoRuntimeException; import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.service.cmr.email.EmailMessageException; import org.alfresco.service.cmr.email.EmailMessageException;
import org.alfresco.service.cmr.email.EmailService; import org.alfresco.service.cmr.email.EmailService;
@@ -38,6 +37,7 @@ import org.alfresco.util.PropertyCheck;
import org.springframework.beans.BeansException; import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationEvent; import org.springframework.context.ApplicationEvent;
import org.springframework.context.support.AbstractApplicationContext; import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
/** /**
* Base implementation of an email server. * Base implementation of an email server.
@@ -260,7 +260,7 @@ public abstract class EmailServer extends AbstractLifecycleBean
AbstractApplicationContext context = null; AbstractApplicationContext context = null;
try try
{ {
context = new FixedClassPathXmlApplicationContext(args); context = new ClassPathXmlApplicationContext(args);
} catch (BeansException e) } catch (BeansException e)
{ {
System.err.println("Erro create context: " + e); System.err.println("Erro create context: " + e);

View File

@@ -30,7 +30,6 @@ import java.net.SocketException;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.List; import java.util.List;
import org.alfresco.config.FixedClassPathXmlApplicationContext;
import org.alfresco.error.AlfrescoRuntimeException; import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.jlan.netbios.server.NetBIOSNameServer; import org.alfresco.jlan.netbios.server.NetBIOSNameServer;
import org.alfresco.jlan.server.NetworkServer; import org.alfresco.jlan.server.NetworkServer;
@@ -43,6 +42,7 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationEvent; import org.springframework.context.ApplicationEvent;
import org.springframework.context.support.ClassPathXmlApplicationContext;
/** /**
* CIFS Server Class * CIFS Server Class
@@ -213,7 +213,7 @@ public class CIFSServerBean extends AbstractLifecycleBean
{ {
// Create the configuration service in the same way that Spring creates it // 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 // Get the CIFS server bean

View File

@@ -28,7 +28,6 @@ import java.io.IOException;
import java.io.PrintStream; import java.io.PrintStream;
import java.net.SocketException; import java.net.SocketException;
import org.alfresco.config.FixedClassPathXmlApplicationContext;
import org.alfresco.error.AlfrescoRuntimeException; import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.jlan.ftp.FTPConfigSection; import org.alfresco.jlan.ftp.FTPConfigSection;
import org.alfresco.jlan.ftp.FTPServer; import org.alfresco.jlan.ftp.FTPServer;
@@ -39,6 +38,7 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationEvent; import org.springframework.context.ApplicationEvent;
import org.springframework.context.support.ClassPathXmlApplicationContext;
/** /**
* FTP Server Class * FTP Server Class
@@ -174,7 +174,7 @@ public class FTPServerBean extends AbstractLifecycleBean
{ {
// Create the configuration service in the same way that Spring creates it // 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 // Get the FTP server bean

View File

@@ -28,7 +28,6 @@ import java.io.PrintStream;
import java.net.SocketException; import java.net.SocketException;
import java.util.Vector; import java.util.Vector;
import org.alfresco.config.FixedClassPathXmlApplicationContext;
import org.alfresco.error.AlfrescoRuntimeException; import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.jlan.oncrpc.mount.MountServer; import org.alfresco.jlan.oncrpc.mount.MountServer;
import org.alfresco.jlan.oncrpc.nfs.NFSConfigSection; 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.apache.commons.logging.LogFactory;
import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationEvent; import org.springframework.context.ApplicationEvent;
import org.springframework.context.support.ClassPathXmlApplicationContext;
/** /**
* NFS Server Class * NFS Server Class
@@ -203,7 +203,7 @@ public class NFSServerBean extends AbstractLifecycleBean
{ {
// Create the configuration service in the same way that Spring creates it // 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 // Get the NFS server bean

View File

@@ -28,12 +28,12 @@ import javax.jcr.Repository;
import junit.framework.TestCase; import junit.framework.TestCase;
import org.alfresco.config.FixedClassPathXmlApplicationContext;
import org.alfresco.jcr.repository.RepositoryFactory; import org.alfresco.jcr.repository.RepositoryFactory;
import org.alfresco.jcr.repository.RepositoryImpl; import org.alfresco.jcr.repository.RepositoryImpl;
import org.alfresco.repo.security.authentication.AuthenticationUtil; import org.alfresco.repo.security.authentication.AuthenticationUtil;
import org.alfresco.service.cmr.repository.StoreRef; import org.alfresco.service.cmr.repository.StoreRef;
import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
/** /**
* Base JCR Test * Base JCR Test
@@ -47,7 +47,7 @@ public class BaseJCRTest extends TestCase
protected StoreRef storeRef; protected StoreRef storeRef;
protected String adminUserName; 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() protected String getWorkspace()
{ {

View File

@@ -28,7 +28,6 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Properties; import java.util.Properties;
import org.alfresco.config.FixedClassPathXmlApplicationContext;
import org.alfresco.repo.importer.ImporterBootstrap; import org.alfresco.repo.importer.ImporterBootstrap;
import org.alfresco.repo.security.authentication.AuthenticationContext; import org.alfresco.repo.security.authentication.AuthenticationContext;
import org.alfresco.repo.security.authentication.MutableAuthenticationDao; 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.namespace.NamespaceService;
import org.alfresco.service.transaction.TransactionService; import org.alfresco.service.transaction.TransactionService;
import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
@@ -56,7 +56,7 @@ public class TestData
*/ */
public static void main(String[] args) 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); generateTestData(context, TEST_WORKSPACE);
System.out.println("Generated TCK test data to workspace: " + TEST_WORKSPACE); System.out.println("Generated TCK test data to workspace: " + TEST_WORKSPACE);
System.exit(0); System.exit(0);

View File

@@ -26,10 +26,10 @@ package org.alfresco.repo.admin;
import junit.framework.TestCase; import junit.framework.TestCase;
import org.alfresco.config.FixedClassPathXmlApplicationContext;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
/** /**
* @see Log4JHierarchyInit * @see Log4JHierarchyInit
@@ -39,7 +39,7 @@ import org.springframework.context.ApplicationContext;
*/ */
public class Log4JHierarchyInitTest extends TestCase 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"} new String[] {"classpath:log4j/log4j-test-context.xml"}
); );

View File

@@ -33,7 +33,6 @@ import javax.transaction.UserTransaction;
import junit.framework.TestCase; import junit.framework.TestCase;
import net.sf.ehcache.CacheManager; import net.sf.ehcache.CacheManager;
import org.alfresco.config.FixedClassPathXmlApplicationContext;
import org.alfresco.repo.cache.TransactionalCache.NullValueMarker; import org.alfresco.repo.cache.TransactionalCache.NullValueMarker;
import org.alfresco.repo.transaction.AlfrescoTransactionSupport; import org.alfresco.repo.transaction.AlfrescoTransactionSupport;
import org.alfresco.repo.transaction.RetryingTransactionHelper; import org.alfresco.repo.transaction.RetryingTransactionHelper;
@@ -43,6 +42,7 @@ import org.alfresco.service.ServiceRegistry;
import org.alfresco.service.transaction.TransactionService; import org.alfresco.service.transaction.TransactionService;
import org.alfresco.util.ApplicationContextHelper; import org.alfresco.util.ApplicationContextHelper;
import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
/** /**
* @see org.alfresco.repo.cache.EhCacheAdapter * @see org.alfresco.repo.cache.EhCacheAdapter
@@ -51,7 +51,7 @@ import org.springframework.context.ApplicationContext;
*/ */
public class CacheTest extends TestCase 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]} new String[] {"classpath:cache-test-context.xml", ApplicationContextHelper.CONFIG_LOCATIONS[0]}
); );

View File

@@ -11,7 +11,6 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import org.alfresco.config.FixedClassPathXmlApplicationContext;
import org.alfresco.repo.remote.ClientTicketHolder; import org.alfresco.repo.remote.ClientTicketHolder;
import org.alfresco.service.cmr.avmsync.AVMSyncService; import org.alfresco.service.cmr.avmsync.AVMSyncService;
import org.alfresco.service.cmr.remote.AVMRemote; 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.service.cmr.security.AuthenticationService;
import org.alfresco.util.Pair; import org.alfresco.util.Pair;
import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
/** /**
* This is the base class for AVM clts. * This is the base class for AVM clts.
@@ -64,7 +64,7 @@ public abstract class CltBase
*/ */
protected CltBase() protected CltBase()
{ {
fContext = new FixedClassPathXmlApplicationContext("clt-context.xml"); fContext = new ClassPathXmlApplicationContext("clt-context.xml");
fAVMRemote = (AVMRemote)fContext.getBean("avmRemote"); fAVMRemote = (AVMRemote)fContext.getBean("avmRemote");
fAVMSyncService = (AVMSyncService)fContext.getBean("avmSyncService"); fAVMSyncService = (AVMSyncService)fContext.getBean("avmSyncService");
fRepoRemote = (RepoRemote)fContext.getBean("repoRemote"); fRepoRemote = (RepoRemote)fContext.getBean("repoRemote");

View File

@@ -30,7 +30,6 @@ import java.net.URL;
import junit.framework.TestCase; import junit.framework.TestCase;
import org.alfresco.config.FixedClassPathXmlApplicationContext;
import org.alfresco.model.ContentModel; import org.alfresco.model.ContentModel;
import org.alfresco.repo.action.ActionImpl; import org.alfresco.repo.action.ActionImpl;
import org.alfresco.repo.action.executer.ActionExecuter; 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.GUID;
import org.alfresco.util.PropertyMap; import org.alfresco.util.PropertyMap;
import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
/** /**
* Tests various aspects of XML metadata extraction. * 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 FILE_MALFORMED = "xml-metadata/malformed-sample.xml";
private static final String CTX_LOCATION = "classpath:xml-metadata/xml-metadata-test-context.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 ServiceRegistry serviceRegistry;
private AuthenticationComponent authenticationComponent; private AuthenticationComponent authenticationComponent;

View File

@@ -36,7 +36,6 @@ import java.util.StringTokenizer;
import java.util.TreeMap; import java.util.TreeMap;
import java.util.TreeSet; import java.util.TreeSet;
import org.alfresco.config.FixedClassPathXmlApplicationContext;
import org.alfresco.config.JBossEnabledResourcePatternResolver; import org.alfresco.config.JBossEnabledResourcePatternResolver;
import org.alfresco.config.JndiPropertiesFactoryBean; import org.alfresco.config.JndiPropertiesFactoryBean;
import org.alfresco.util.config.RepositoryPathConfigBean; import org.alfresco.util.config.RepositoryPathConfigBean;
@@ -351,7 +350,7 @@ public class ChildApplicationContextFactory extends AbstractPropertyBackedBean i
* *
* @author dward * @author dward
*/ */
private class ChildApplicationContext extends FixedClassPathXmlApplicationContext private class ChildApplicationContext extends ClassPathXmlApplicationContext
{ {
/** The composite property values. */ /** The composite property values. */

View File

@@ -30,7 +30,6 @@ import javax.transaction.UserTransaction;
import junit.framework.TestCase; import junit.framework.TestCase;
import org.alfresco.config.FixedClassPathXmlApplicationContext;
import org.alfresco.model.ContentModel; import org.alfresco.model.ContentModel;
import org.alfresco.repo.security.authentication.AuthenticationComponent; import org.alfresco.repo.security.authentication.AuthenticationComponent;
import org.alfresco.service.ServiceRegistry; 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.cmr.search.CategoryService;
import org.alfresco.service.transaction.TransactionService; import org.alfresco.service.transaction.TransactionService;
import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
/** /**
* Tests various module components. * Tests various module components.
@@ -52,7 +52,7 @@ import org.springframework.context.ApplicationContext;
*/ */
public class ComponentsTest extends TestCase 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 ServiceRegistry serviceRegistry;
private AuthenticationComponent authenticationComponent; private AuthenticationComponent authenticationComponent;

View File

@@ -28,7 +28,6 @@ import java.util.HashSet;
import java.util.LinkedHashSet; import java.util.LinkedHashSet;
import java.util.Set; import java.util.Set;
import org.alfresco.config.FixedClassPathXmlApplicationContext;
import org.alfresco.repo.search.BackgroundIndexerAware; import org.alfresco.repo.search.BackgroundIndexerAware;
import org.alfresco.repo.search.Indexer; import org.alfresco.repo.search.Indexer;
import org.alfresco.repo.search.IndexerAndSearcher; 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.BeanFactory;
import org.springframework.beans.factory.ListableBeanFactory; import org.springframework.beans.factory.ListableBeanFactory;
import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
/** /**
* Background index update scheduler * Background index update scheduler
@@ -241,7 +241,7 @@ public class FullTextSearchIndexerImpl implements FTSIndexerAware, FullTextSearc
public static void main(String[] args) throws InterruptedException public static void main(String[] args) throws InterruptedException
{ {
@SuppressWarnings("unused") @SuppressWarnings("unused")
ApplicationContext ctx = new FixedClassPathXmlApplicationContext("classpath:alfresco/application-context.xml"); ApplicationContext ctx = new ClassPathXmlApplicationContext("classpath:alfresco/application-context.xml");
} }

View File

@@ -39,7 +39,6 @@ import java.util.Set;
import junit.framework.TestCase; import junit.framework.TestCase;
import org.alfresco.config.FixedClassPathXmlApplicationContext;
import org.alfresco.model.ContentModel; import org.alfresco.model.ContentModel;
import org.alfresco.repo.management.subsystems.ChildApplicationContextManager; import org.alfresco.repo.management.subsystems.ChildApplicationContextManager;
import org.alfresco.repo.security.authentication.AuthenticationContext; 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.GUID;
import org.alfresco.util.PropertyMap; import org.alfresco.util.PropertyMap;
import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.context.support.StaticApplicationContext; import org.springframework.context.support.StaticApplicationContext;
/** /**
@@ -70,7 +70,7 @@ public class ChainingUserRegistrySynchronizerTest extends TestCase
}; };
/** The Spring application context. */ /** The Spring application context. */
private static ApplicationContext context = new FixedClassPathXmlApplicationContext( private static ApplicationContext context = new ClassPathXmlApplicationContext(
ChainingUserRegistrySynchronizerTest.CONFIG_LOCATIONS); ChainingUserRegistrySynchronizerTest.CONFIG_LOCATIONS);
/** The synchronizer we are testing. */ /** The synchronizer we are testing. */

View File

@@ -26,10 +26,10 @@ package org.alfresco.repo.service;
import junit.framework.TestCase; import junit.framework.TestCase;
import org.alfresco.config.FixedClassPathXmlApplicationContext;
import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.StoreRef; import org.alfresco.service.cmr.repository.StoreRef;
import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
public class StoreRedirectorProxyFactoryTest extends TestCase public class StoreRedirectorProxyFactoryTest extends TestCase
{ {
@@ -38,7 +38,7 @@ public class StoreRedirectorProxyFactoryTest extends TestCase
public void setUp() public void setUp()
{ {
factory = new FixedClassPathXmlApplicationContext("org/alfresco/repo/service/testredirector.xml"); factory = new ClassPathXmlApplicationContext("org/alfresco/repo/service/testredirector.xml");
} }
public void testRedirect() public void testRedirect()

View File

@@ -37,7 +37,6 @@ import java.util.Set;
import junit.framework.TestCase; import junit.framework.TestCase;
import org.alfresco.config.FixedClassPathXmlApplicationContext;
import org.alfresco.error.AlfrescoRuntimeException; import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.model.ApplicationModel; import org.alfresco.model.ApplicationModel;
import org.alfresco.model.ContentModel; 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.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
public class MultiTDemoTest extends TestCase public class MultiTDemoTest extends TestCase
{ {
private static Log logger = LogFactory.getLog(MultiTDemoTest.class); 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"} new String[] {ApplicationContextHelper.CONFIG_LOCATIONS[0], "classpath:tenant/mt-*context.xml"}
); );

View File

@@ -26,7 +26,6 @@ package org.alfresco.util;
import java.util.Arrays; import java.util.Arrays;
import org.alfresco.config.FixedClassPathXmlApplicationContext;
import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext;
@@ -81,7 +80,7 @@ public class ApplicationContextHelper
// The config has changed so close the current context (if any) // The config has changed so close the current context (if any)
closeApplicationContext(); closeApplicationContext();
instance = new FixedClassPathXmlApplicationContext(configLocations); instance = new ClassPathXmlApplicationContext(configLocations);
usedConfiguration = configLocations; usedConfiguration = configLocations;
return instance; return instance;

View File

@@ -24,10 +24,10 @@
*/ */
package org.alfresco.util; package org.alfresco.util;
import org.alfresco.config.FixedClassPathXmlApplicationContext;
import org.hibernate.Session; import org.hibernate.Session;
import org.hibernate.SessionFactory; import org.hibernate.SessionFactory;
import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.orm.hibernate3.SessionFactoryUtils; import org.springframework.orm.hibernate3.SessionFactoryUtils;
import org.springframework.test.AbstractTransactionalDataSourceSpringContextTests; import org.springframework.test.AbstractTransactionalDataSourceSpringContextTests;
@@ -120,7 +120,7 @@ public abstract class BaseSpringTest extends AbstractTransactionalDataSourceSpri
else else
{ {
String[] configLocations = (String[]) key; String[] configLocations = (String[]) key;
return new FixedClassPathXmlApplicationContext(configLocations); return new ClassPathXmlApplicationContext(configLocations);
} }
} }
} }

View File

@@ -47,7 +47,6 @@ import javax.xml.transform.sax.SAXTransformerFactory;
import javax.xml.transform.sax.TransformerHandler; import javax.xml.transform.sax.TransformerHandler;
import javax.xml.transform.stream.StreamResult; import javax.xml.transform.stream.StreamResult;
import org.alfresco.config.FixedClassPathXmlApplicationContext;
import org.hibernate.dialect.Dialect; import org.hibernate.dialect.Dialect;
import org.hibernate.dialect.Oracle8iDialect; import org.hibernate.dialect.Oracle8iDialect;
import org.hibernate.dialect.TypeNames; import org.hibernate.dialect.TypeNames;
@@ -102,7 +101,7 @@ public class Main
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public Main(final String contextPath) throws Exception public Main(final String contextPath) throws Exception
{ {
final ClassPathXmlApplicationContext context = new FixedClassPathXmlApplicationContext(new String[] final ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(new String[]
{ {
"file:" + contextPath "file:" + contextPath
}); });

View File

@@ -28,7 +28,6 @@ import java.util.List;
import junit.framework.TestCase; import junit.framework.TestCase;
import org.alfresco.config.FixedClassPathXmlApplicationContext;
import org.alfresco.error.AlfrescoRuntimeException; import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.model.ContentModel; import org.alfresco.model.ContentModel;
import org.alfresco.repo.security.authentication.AuthenticationUtil; 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.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
/** /**
* Abstract WCM Service implementation unit test * Abstract WCM Service implementation unit test
@@ -65,7 +65,7 @@ public class AbstractWCMServiceImplTest extends TestCase
protected static final int POLL_MAX_ATTEMPTS = 10; protected static final int POLL_MAX_ATTEMPTS = 10;
// note: all tests share same context (when run via WCMTestSuite) // 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 // test data