01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one
03: * or more contributor license agreements. See the NOTICE file
04: * distributed with this work for additional information
05: * regarding copyright ownership. The ASF licenses this file
06: * to you under the Apache License, Version 2.0 (the
07: * "License"); you may not use this file except in compliance
08: * with the License. You may obtain a copy of the License at
09: *
10: * http://www.apache.org/licenses/LICENSE-2.0
11: *
12: * Unless required by applicable law or agreed to in writing,
13: * software distributed under the License is distributed on an
14: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15: * KIND, either express or implied. See the License for the
16: * specific language governing permissions and limitations
17: * under the License.
18: */
19:
20: package org.apache.geronimo.myfaces;
21:
22: import org.apache.myfaces.config.annotation.LifecycleProviderFactory;
23: import org.apache.geronimo.gbean.GBeanInfo;
24: import org.apache.geronimo.gbean.GBeanInfoBuilder;
25: import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
26:
27: /**
28: * @version $Rev: 518635 $ $Date: 2007-03-15 07:15:53 -0700 (Thu, 15 Mar 2007) $
29: */
30: public class LifecycleProviderFactoryGBean implements
31: LifecycleProviderFactorySource {
32:
33: private final ApplicationIndexedLifecycleProviderFactory factory;
34:
35: public LifecycleProviderFactoryGBean() {
36: factory = new ApplicationIndexedLifecycleProviderFactory();
37: LifecycleProviderFactory.setLifecycleProviderFactory(factory);
38: }
39:
40: public ApplicationIndexedLifecycleProviderFactory getLifecycleProviderFactory() {
41: return factory;
42: }
43:
44: public static final GBeanInfo GBEAN_INFO;
45:
46: static {
47: GBeanInfoBuilder infoBuilder = GBeanInfoBuilder.createStatic(
48: LifecycleProviderFactoryGBean.class,
49: NameFactory.GERONIMO_SERVICE);
50:
51: GBEAN_INFO = infoBuilder.getBeanInfo();
52: }
53:
54: public static GBeanInfo getGBeanInfo() {
55: return GBEAN_INFO;
56: }
57:
58: }
|