001 /** 002 * Copyright 2005-2011 The Kuali Foundation 003 * 004 * Licensed under the Educational Community License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.opensource.org/licenses/ecl2.php 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016 package org.kuali.rice.kew.test; 017 018 import org.kuali.rice.core.api.lifecycle.BaseLifecycle; 019 import org.kuali.rice.core.api.resourceloader.GlobalResourceLoader; 020 021 public class TestSpringLifecycle extends BaseLifecycle { 022 023 private String altAppContextFile; 024 private String altOjbFile; 025 026 public TestSpringLifecycle(String altAppContextFile, String altOjbFile) { 027 this.altAppContextFile = altAppContextFile; 028 this.altOjbFile = altOjbFile; 029 } 030 031 public void start() throws Exception { 032 //this starts Spring 033 // SpringLoader.getInstance().setToTestMode(altAppContextFile, altOjbFile); 034 // if (!GlobalResourceLoader.isInitialized()) { 035 // GlobalResourceLoader.addResourceLoader(new BaseResourceLoader(ResourceLoader.ROOT_RESOURCE_LOADER_NAME, SpringLoader.getInstance())); 036 // GlobalResourceLoader.addResourceLoader(new RemoteResourceServiceLocatorImpl()); 037 // GlobalResourceLoader.start(); 038 // } 039 // TransactionManager transactionManager = SpringServiceLocator.getTransactionManager(); 040 // if (transactionManager instanceof Current) { 041 // ((Current)transactionManager).setDefaultTimeout(3600); 042 // } 043 // super.start(); 044 throw new UnsupportedOperationException("I'm broken from the test refactoring. Have a nice day"); 045 } 046 047 public void stop() throws Exception { 048 GlobalResourceLoader.stop(); 049 super.stop(); 050 } 051 052 public String getAltAppContextFile() { 053 return altAppContextFile; 054 } 055 056 public String getAltOjbFile() { 057 return altOjbFile; 058 } 059 060 }