1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.seasar.teeda.core.webapp; |
17 | |
|
18 | |
import java.util.Iterator; |
19 | |
|
20 | |
import javax.faces.FactoryFinder; |
21 | |
|
22 | |
import org.seasar.framework.container.servlet.S2ContainerServlet; |
23 | |
import org.seasar.framework.log.Logger; |
24 | |
import org.seasar.teeda.core.EnvironmentInfo; |
25 | |
import org.seasar.teeda.core.ProductInfo; |
26 | |
|
27 | |
|
28 | |
|
29 | |
|
30 | |
public class TeedaServlet extends S2ContainerServlet { |
31 | |
|
32 | |
private static final long serialVersionUID = 1L; |
33 | |
|
34 | 0 | private static Logger logger = Logger.getLogger(TeedaServlet.class); |
35 | |
|
36 | |
public TeedaServlet() { |
37 | 0 | super(); |
38 | 0 | } |
39 | |
|
40 | |
public void init() { |
41 | 0 | super.init(); |
42 | 0 | printProductInfo(); |
43 | 0 | printEnvironmentInfo(); |
44 | 0 | TeedaInitializer initializer = new TeedaInitializer(); |
45 | 0 | initializer.setServletContext(getServletContext()); |
46 | 0 | initializer.initializeFaces(); |
47 | 0 | } |
48 | |
|
49 | |
public void destroy() { |
50 | 0 | super.destroy(); |
51 | 0 | FactoryFinder.releaseFactories(); |
52 | 0 | } |
53 | |
|
54 | |
protected void printProductInfo() { |
55 | 0 | logger.debug(ProductInfo.getProductName() + " : " |
56 | |
+ ProductInfo.getVersion()); |
57 | 0 | } |
58 | |
|
59 | |
protected void printEnvironmentInfo() { |
60 | 0 | for (Iterator itr = EnvironmentInfo.getEnvironmentInfo().iterator(); itr |
61 | 0 | .hasNext();) { |
62 | 0 | logger.debug(itr.next()); |
63 | |
} |
64 | |
|
65 | 0 | } |
66 | |
|
67 | |
} |