Commit c6c4154bcc3a9751c70f3e84d85b9954ca42313d
Exists in
master
Merge branch '2.3' of git@github.com:demoiselle/framework.git into 2.3
Showing
4 changed files
with
67 additions
and
24 deletions
Show diff stats
archetype/jsf-jpa/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml
@@ -10,6 +10,13 @@ | @@ -10,6 +10,13 @@ | ||
10 | </listener> | 10 | </listener> |
11 | --> | 11 | --> |
12 | 12 | ||
13 | + <!-- If you are using servlet 2.5 then uncomment this listener --> | ||
14 | + <!-- | ||
15 | + <listener> | ||
16 | + <listener-class>br.gov.frameworkdemoiselle.util.ServletContextListener</listener-class> | ||
17 | + </listener> | ||
18 | + --> | ||
19 | + | ||
13 | <servlet> | 20 | <servlet> |
14 | <servlet-name>Faces Servlet</servlet-name> | 21 | <servlet-name>Faces Servlet</servlet-name> |
15 | <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> | 22 | <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> |
@@ -29,5 +36,5 @@ | @@ -29,5 +36,5 @@ | ||
29 | </web-resource-collection> | 36 | </web-resource-collection> |
30 | <auth-constraint /> | 37 | <auth-constraint /> |
31 | </security-constraint> | 38 | </security-constraint> |
32 | - | 39 | + |
33 | </web-app> | 40 | </web-app> |
impl/extension/jsf/src/main/java/br/gov/frameworkdemoiselle/util/DemoiselleServletContextListener.java
@@ -1,20 +0,0 @@ | @@ -1,20 +0,0 @@ | ||
1 | -package br.gov.frameworkdemoiselle.util; | ||
2 | - | ||
3 | -import javax.servlet.ServletContextEvent; | ||
4 | -import javax.servlet.ServletContextListener; | ||
5 | - | ||
6 | -import br.gov.frameworkdemoiselle.internal.bootstrap.ShutdownBootstrap; | ||
7 | -import br.gov.frameworkdemoiselle.internal.bootstrap.StartupBootstrap; | ||
8 | - | ||
9 | -public class DemoiselleServletContextListener implements ServletContextListener { | ||
10 | - | ||
11 | - @Override | ||
12 | - public void contextInitialized(ServletContextEvent event) { | ||
13 | - StartupBootstrap.startup(); | ||
14 | - } | ||
15 | - | ||
16 | - @Override | ||
17 | - public void contextDestroyed(ServletContextEvent event) { | ||
18 | - ShutdownBootstrap.shutdown(); | ||
19 | - } | ||
20 | -} |
impl/extension/jsf/src/main/java/br/gov/frameworkdemoiselle/util/ServletContextListener.java
0 → 100644
@@ -0,0 +1,19 @@ | @@ -0,0 +1,19 @@ | ||
1 | +package br.gov.frameworkdemoiselle.util; | ||
2 | + | ||
3 | +import javax.servlet.ServletContextEvent; | ||
4 | + | ||
5 | +import br.gov.frameworkdemoiselle.internal.bootstrap.ShutdownBootstrap; | ||
6 | +import br.gov.frameworkdemoiselle.internal.bootstrap.StartupBootstrap; | ||
7 | + | ||
8 | +public class ServletContextListener implements javax.servlet.ServletContextListener { | ||
9 | + | ||
10 | + @Override | ||
11 | + public void contextInitialized(ServletContextEvent event) { | ||
12 | + StartupBootstrap.startup(); | ||
13 | + } | ||
14 | + | ||
15 | + @Override | ||
16 | + public void contextDestroyed(ServletContextEvent event) { | ||
17 | + ShutdownBootstrap.shutdown(); | ||
18 | + } | ||
19 | +} |
impl/extension/jsf/src/main/resources/META-INF/web-fragment.xml
1 | -<web-fragment> | 1 | +<!-- |
2 | + Demoiselle Framework | ||
3 | + Copyright (C) 2010 SERPRO | ||
4 | + ============================================================================ | ||
5 | + This file is part of Demoiselle Framework. | ||
6 | + | ||
7 | + Demoiselle Framework is free software; you can redistribute it and/or | ||
8 | + modify it under the terms of the GNU Lesser General Public License version 3 | ||
9 | + as published by the Free Software Foundation. | ||
10 | + | ||
11 | + This program is distributed in the hope that it will be useful, | ||
12 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | + GNU General Public License for more details. | ||
15 | + | ||
16 | + You should have received a copy of the GNU Lesser General Public License version 3 | ||
17 | + along with this program; if not, see <http://www.gnu.org/licenses/> | ||
18 | + or write to the Free Software Foundation, Inc., 51 Franklin Street, | ||
19 | + Fifth Floor, Boston, MA 02110-1301, USA. | ||
20 | + ============================================================================ | ||
21 | + Este arquivo é parte do Framework Demoiselle. | ||
22 | + | ||
23 | + O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou | ||
24 | + modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação | ||
25 | + do Software Livre (FSF). | ||
26 | + | ||
27 | + Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA | ||
28 | + GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou | ||
29 | + APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português | ||
30 | + para maiores detalhes. | ||
31 | + | ||
32 | + Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título | ||
33 | + "LICENCA.txt", junto com esse programa. Se não, acesse <http://www.gnu.org/licenses/> | ||
34 | + ou escreva para a Fundação do Software Livre (FSF) Inc., | ||
35 | + 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA. | ||
36 | +--> | ||
37 | +<web-fragment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" | ||
38 | + xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-fragment_3_0.xsd" version="3.0"> | ||
2 | 39 | ||
3 | <listener> | 40 | <listener> |
4 | - <listener-class>br.gov.frameworkdemoiselle.util.DemoiselleServletContextListener</listener-class> | 41 | + <listener-class>br.gov.frameworkdemoiselle.util.ServletContextListener</listener-class> |
5 | </listener> | 42 | </listener> |
6 | 43 | ||
7 | -</web-fragment> | ||
8 | \ No newline at end of file | 44 | \ No newline at end of file |
45 | +</web-fragment> |