Index: lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/RepositoryProxy.java =================================================================== RCS file: /usr/local/cvsroot/lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/Attic/RepositoryProxy.java,v diff -u -r1.2 -r1.3 --- lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/RepositoryProxy.java 21 Feb 2005 06:12:46 -0000 1.2 +++ lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/RepositoryProxy.java 8 Apr 2005 00:09:59 -0000 1.3 @@ -47,4 +47,20 @@ return repository; } + /** Get a version of the repository service suitable for using in JUNIT tests. + * It has been placed here (as well as similar logic existing in the BaseTestCase) + * so that other projects can access the appropriate Spring configuration. + * This configuration uses a local datasource and does not use the cache. + * @return Repository service built using a local datasource + */ + public static IRepository getLocalRepositoryService() { + + ApplicationContext context = new ClassPathXmlApplicationContext(IRepository.LOCAL_CONTEXT_PATH); + if ( context == null ) + throw new RepositoryRuntimeException("Unable to access application context. Cannot create repository object."); + + IRepository repository =(IRepository)context.getBean(IRepository.REPOSITORY_SERVICE_ID); + return repository; + } + } Index: lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/contentRepositoryLocalApplicationContext.xml =================================================================== RCS file: /usr/local/cvsroot/lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/Attic/contentRepositoryLocalApplicationContext.xml,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/contentRepositoryLocalApplicationContext.xml 8 Apr 2005 00:09:33 -0000 1.1 @@ -0,0 +1,185 @@ + + + + + + + + + + + + + + + + + /org/lamsfoundation/lams/contentrepository/dbConnection.properties + + + + + messages + + + + + + + + com.mysql.jdbc.Driver + jdbc:mysql://localhost/lams?characterEncoding=utf8 + lams + lamsdemo + + + + + + + + org/lamsfoundation/lams/contentrepository/CrCredential.hbm.xml + org/lamsfoundation/lams/contentrepository/CrNode.hbm.xml + org/lamsfoundation/lams/contentrepository/CrNodeVersion.hbm.xml + org/lamsfoundation/lams/contentrepository/CrNodeVersionProperty.hbm.xml + org/lamsfoundation/lams/contentrepository/CrWorkspace.hbm.xml + org/lamsfoundation/lams/contentrepository/CrWorkspaceCredential.hbm.xml + + + + + ${hibernate.dialect} + ${hibernate.show_sql} + ${hibernate.c3p0.minPoolSize} + ${hibernate.c3p0.maxPoolSize} + ${hibernate.c3p0.timeout} + ${hibernate.c3p0.max_statement} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + PROPAGATION_SUPPORTS,readOnly,-RepositoryCheckedException,-RepositoryRuntimeException + PROPAGATION_REQUIRED,-RepositoryCheckedException,-RepositoryRuntimeException + PROPAGATION_REQUIRED,-RepositoryCheckedException,-RepositoryRuntimeException + PROPAGATION_REQUIRED,-RepositoryCheckedException,-RepositoryRuntimeException + PROPAGATION_REQUIRED,-RepositoryCheckedException,-RepositoryRuntimeException + PROPAGATION_REQUIRED,-RepositoryCheckedException,-RepositoryRuntimeException + PROPAGATION_REQUIRED,-RepositoryCheckedException,-RepositoryRuntimeException + PROPAGATION_REQUIRED,-RepositoryCheckedException,-RepositoryRuntimeException + PROPAGATION_REQUIRED,-RepositoryCheckedException,-RepositoryRuntimeException + PROPAGATION_REQUIRED,-RepositoryCheckedException,-RepositoryRuntimeException + PROPAGATION_REQUIRED,-RepositoryCheckedException,-RepositoryRuntimeException + PROPAGATION_SUPPORTS,-RepositoryCheckedException,-RepositoryRuntimeException + + PROPAGATION_REQUIRED,readOnly,-RepositoryCheckedException,-RepositoryRuntimeException + PROPAGATION_REQUIRED,readOnly,-RepositoryCheckedException,-RepositoryRuntimeException + PROPAGATION_REQUIRED,readOnly,-RepositoryCheckedException,-RepositoryRuntimeException + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + D:\repository + + + Fisheye: Tag 1.3 refers to a dead (removed) revision in file `lams_contentrepository/test/java/org/lamsfoundation/lams/contentrepository/testContentRepositoryApplicationContext.xml'. Fisheye: No comparison available. Pass `N' to diff?