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