KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > myfaces > application > ApplicationFactoryImpl


1 /*
2  * Copyright 2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache 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.apache.org/licenses/LICENSE-2.0
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.apache.myfaces.application;
17
18 import org.apache.commons.logging.Log;
19 import org.apache.commons.logging.LogFactory;
20
21 import javax.faces.application.Application;
22 import javax.faces.application.ApplicationFactory;
23
24 /**
25  * @author Manfred Geiler (latest modification by $Author: matze $)
26  * @author Thomas Spiegl
27  * @version $Revision: 1.9 $ $Date: 2004/10/13 11:50:59 $
28  * $Log: ApplicationFactoryImpl.java,v $
29  * Revision 1.9 2004/10/13 11:50:59 matze
30  * renamed packages to org.apache
31  *
32  * Revision 1.8 2004/07/01 22:05:13 mwessendorf
33  * ASF switch
34  *
35  * Revision 1.7 2004/04/28 08:12:45 manolito
36  * comments
37  *
38  */

39 public class ApplicationFactoryImpl
40     extends ApplicationFactory
41 {
42     private static final Log log = LogFactory.getLog(ApplicationFactory.class);
43
44     //Application is thread-safe (see Application javadoc)
45
//"Application represents a per-web-application singleton object..."
46
//FactoryFinder has a ClassLoader-Factory Map. Since each webapp has it's
47
//own ClassLoader, each webapp will have it's own private factory instances.
48
private Application _application;
49
50     public ApplicationFactoryImpl()
51     {
52         _application = new ApplicationImpl();
53         if (log.isTraceEnabled()) log.trace("New ApplicationFactory instance created");
54     }
55
56     public Application getApplication()
57     {
58         return _application;
59     }
60
61     public void setApplication(Application application)
62     {
63         _application = application;
64     }
65
66 }
67
Popular Tags