01: /*
02: * Copyright 2005-2007 The Kuali Foundation.
03: *
04: *
05: * Licensed under the Educational Community License, Version 1.0 (the "License");
06: * you may not use this file except in compliance with the License.
07: * You may obtain a copy of the License at
08: *
09: * http://www.opensource.org/licenses/ecl1.php
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17: package edu.iu.uis.eden.test;
18:
19: import org.kuali.rice.lifecycle.BaseLifecycle;
20: import org.kuali.rice.resourceloader.GlobalResourceLoader;
21:
22: public class TestSpringLifecycle extends BaseLifecycle {
23:
24: private String altAppContextFile;
25: private String altOjbFile;
26:
27: public TestSpringLifecycle(String altAppContextFile,
28: String altOjbFile) {
29: this .altAppContextFile = altAppContextFile;
30: this .altOjbFile = altOjbFile;
31: }
32:
33: public void start() throws Exception {
34: //this starts Spring
35: // SpringLoader.getInstance().setToTestMode(altAppContextFile, altOjbFile);
36: // if (!GlobalResourceLoader.isInitialized()) {
37: // GlobalResourceLoader.addResourceLoader(new BaseResourceLoader(ResourceLoader.ROOT_RESOURCE_LOADER_NAME, SpringLoader.getInstance()));
38: // GlobalResourceLoader.addResourceLoader(new RemoteResourceServiceLocatorImpl());
39: // GlobalResourceLoader.start();
40: // }
41: // TransactionManager transactionManager = SpringServiceLocator.getTransactionManager();
42: // if (transactionManager instanceof Current) {
43: // ((Current)transactionManager).setDefaultTimeout(3600);
44: // }
45: // super.start();
46: throw new UnsupportedOperationException(
47: "I'm broken from the test refactoring. Have a nice day");
48: }
49:
50: public void stop() throws Exception {
51: GlobalResourceLoader.stop();
52: super .stop();
53: }
54:
55: public String getAltAppContextFile() {
56: return altAppContextFile;
57: }
58:
59: public String getAltOjbFile() {
60: return altOjbFile;
61: }
62:
63: }
|