01: /**
02: * Copyright 2003-2007 Luck Consulting Pty Ltd
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
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: */package net.sf.ehcache.loader;
16:
17: import net.sf.jsr107cache.CacheException;
18:
19: import org.apache.commons.logging.Log;
20: import org.apache.commons.logging.LogFactory;
21:
22: /**
23: * Written for Dead-lock poc
24: * @author <a href="mailto:gluck@gregluck.com">Greg Luck</a>
25: * @version $Id: ComponentBLoader.java 561 2007-11-17 00:38:31Z gregluck $
26: */
27: public class ComponentBLoader extends BaseComponentLoader {
28: private static final Log LOG = LogFactory
29: .getLog(ComponentBLoader.class);
30:
31: /**
32: *
33: * @return
34: */
35: public String getName() {
36: return "LoaderB";
37: }
38:
39: /**
40: *
41: * @param arg0
42: * @return
43: * @throws CacheException
44: */
45: public Object load(Object arg0) throws CacheException {
46: LOG.info("Loading Component B...");
47: String key = (String) arg0;
48: return new ComponentB(key);
49: }
50:
51: }
|