[Spring - HttpInvokerServiceExporter] Nao estou conseguindo fazer o bean (servico) singleton

Pessoal,

Tudo bem? Não estou conseguindo configurar corretamente um servico pelo HttpInvokerServiceExporter para que fique singleton. Primeiramente, deixe-me relatar o cenário: Tenho um sistema que possui um controle de acesso externo, ou seja, rodando em outra aplicação (outra contexto). Este controle de acesso expõe alguns serviços utilizando RMI (org.springframework.remoting.rmi.RmiServiceExporter) atualmente. Dentro de meu sistema tenho vários módulos que rodam em contextos diferentes (aplicações diferentes). Para que estes módulos comuniquem-se entre si, tenho um módulo Portal que expõe um serviço, via RMI também, que auxilia estas aplicações no compartilhamente de informações por uma “sessão”.

| | autentica e autoriza | | | compartilha informações relacionadas ao sistema | ,<...>

Utilizando RMI está funcionando perfeitamente. Mas, tenho um problema de sincronia entre as aplicações ao subir o tomcat. Atualmente estão todos em um mesmo Tomcat, então preciso subir, primeiramente, o controle de acesso. Posteriormente, tenho que subir o módulo Portal e só então subir os demais módulos aleatoriamente. Mesmo colocando lazy-init=“true”, o spring teima em tentar estabelecer a conexão durante o deploy.

Depois de tanto sofrer com servidor caindo e o sistema não subindo sozinho devido a sincronia necessária entre as aplicações (esta arquitetura já estava pronta quando cheguei ao projeto), decide pesquisar e mudar para invocação via HTTP (org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter).

Após configurar os arquivos necessários e o sistema subir, verifiquei que o serviço que está sendo exposto pelo módulo Portal está sendo criada para cada aplicação que o utiliza, fazendo com que as informações que deveriam estar nele para compartilhamente não existam, impossibilitando, por exemplo, que eu navegue do Portal para um módulo qualquer. Mesmo colocando singleton em tudo quanto é declaração do bean, não consegui ainda fazer funcionar como o RMI.

Os arquivos de configuração utilizados para o org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter são:

No controle de acesso:

web.xml

<?xml version="1.0"?>
<web-app id="WebApp_ID" version="2.4"
	xmlns="http://java.sun.com/xml/ns/j2ee"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

	<!-- Arquivos de configuração do Spring -->
	<context-param>
		<param-name>contextConfigLocation</param-name>
		<param-value>
			/WEB-INF/classes/spring/configurator.xml,
			/WEB-INF/classes/spring/entities.xml,
			/WEB-INF/classes/spring/dao.xml,
			/WEB-INF/classes/spring/handlers.xml,
			/WEB-INF/classes/spring/session.xml,
			/WEB-INF/classes/spring/context.xml,
			/WEB-INF/classes/spring/bus.xml,
			/WEB-INF/remotingFrecace-servlet.xml,
			/WEB-INF/classes/spring/layout.xml,
			/WEB-INF/classes/spring/hibernate.xml,
			/WEB-INF/classes/spring/inicializacao/inicializadores.xml
		</param-value>
	</context-param>

	<!-- Arquivos de configuração do JSF -->
	<context-param>
		<param-name>javax.faces.CONFIG_FILES</param-name>
		<param-value>
			/WEB-INF/faces-config/faces-config.xml,
			/WEB-INF/faces-config/controllers.xml,
			/WEB-INF/faces-config/navigation.xml
		</param-value>
	</context-param>
	
	<!-- log4j -->
	<context-param>
		<param-name>log4jConfigLocation</param-name>
		<param-value>file:C:/sig/logs/frecace.log4j.properties</param-value>
	</context-param>	
	
	<!-- Listener utilitaria para configurar o Log4j -->
	<listener>
		<listener-class>
			org.springframework.web.util.Log4jConfigListener
		</listener-class>
	</listener>
	
	<!-- Listener que gerencia a ligação entre o contexto atual e o ServletContext -->
	<listener>
		<listener-class>
			br.com.xxx.frecace.servlet.holder.ApplicationContextListener
		</listener-class>
	</listener>

	<!-- Spring Web application context -->
	<listener>
		<listener-class>
			org.springframework.web.context.ContextLoaderListener
		</listener-class>
	</listener>

	<!-- Listener, that does all the startup work (configuration, init). -->
	<listener>
		<listener-class>
			org.apache.myfaces.webapp.StartupServletContextListener
		</listener-class>
	</listener>

	<!-- Listener que gerencia a ligação entre transação atual e request -->
	<listener>
		<listener-class>
			br.com.xxx.framework.servlet.holder.RequestContextListener
		</listener-class>
	</listener>
	
	<!-- Listener criado manipulação dos dados da em nível de aplicação -->	
	<listener>
		<listener-class>
			br.com.xxx.frecace.servlet.SessionAttributeListener
		</listener-class>
	</listener>

	<!-- Servlet gerencia o login de usuarios -->
	<servlet>
		<servlet-name>FrecaceServlet</servlet-name>
		<servlet-class>
			br.com.xxx.frecace.servlet.FrecaceServlet
		</servlet-class>
		<init-param>
			<param-name>defaultStartURL</param-name>
			<param-value>cadastroPerfil.jsf</param-value>
		</init-param>
		<init-param>
			<param-name>changePasswordURL</param-name>
			<param-value>senha.jsf</param-value>
		</init-param>
	</servlet>

	<servlet-mapping>
		<servlet-name>FrecaceServlet</servlet-name>
		<url-pattern>/FrecaceServlet</url-pattern>
	</servlet-mapping>

	<!-- Servlet que finaliza a sessão http -->
	<servlet>
		<servlet-name>SessionFinalizeServlet</servlet-name>
		<servlet-class>
			br.com.xxx.frecace.servlet.SessionFinalizeServlet
		</servlet-class>
	</servlet>

	<servlet-mapping>
		<servlet-name>SessionFinalizeServlet</servlet-name>
		<url-pattern>/SessionFinalizeServlet</url-pattern>
	</servlet-mapping>

	<!-- Front controller para Action Handlers -->
	<servlet>
		<servlet-name>ActionServlet</servlet-name>
		<servlet-class>
			br.com.xxx.framework.servlet.action.ActionServlet
		</servlet-class>
		<init-param>
			<param-name>actionPackage</param-name>
			<param-value>
				br.com.xxx.frecace.servlet.action.handlers
			</param-value>
		</init-param>
		<load-on-startup>1</load-on-startup>
	</servlet>

	<servlet-mapping>
		<servlet-name>ActionServlet</servlet-name>
		<url-pattern>*.Action</url-pattern>
	</servlet-mapping>

	<!-- ButtonActionHandler -->
	<servlet>
		<servlet-name>ButtonActionHandler</servlet-name>
		<servlet-class>
			br.com.xxx.framework.servlet.ButtonActionHandlerServlet
		</servlet-class>
		<load-on-startup>1</load-on-startup>
	</servlet>

	<servlet-mapping>
		<servlet-name>ButtonActionHandler</servlet-name>
		<url-pattern>/buttonHandler.jsf</url-pattern>
	</servlet-mapping>

	<!-- ListEntitySelector -->
	<servlet>
		<servlet-name>ListEntitySelector</servlet-name>
		<servlet-class>
			br.com.xxx.framework.servlet.EntityListServlet
		</servlet-class>
		<load-on-startup>1</load-on-startup>
	</servlet>

	<servlet-mapping>
		<servlet-name>ListEntitySelector</servlet-name>
		<url-pattern>/list.jsf</url-pattern>
	</servlet-mapping>

	<!-- EntitySelector -->
	<servlet>
		<servlet-name>KeyEntitySelector</servlet-name>
		<servlet-class>
			br.com.xxx.framework.servlet.EntityKeyServlet
		</servlet-class>
		<load-on-startup>1</load-on-startup>
	</servlet>

	<servlet-mapping>
		<servlet-name>KeyEntitySelector</servlet-name>
		<url-pattern>/key.jsf</url-pattern>
	</servlet-mapping>

	<!-- ControllerPropertyCleaner -->
	<servlet>
		<servlet-name>ControllerPropertyCleaner</servlet-name>
		<servlet-class>
			br.com.xxx.framework.servlet.ControllerPropertyCleanerServlet
		</servlet-class>
		<load-on-startup>1</load-on-startup>
	</servlet>

	<servlet-mapping>
		<servlet-name>ControllerPropertyCleaner</servlet-name>
		<url-pattern>/cleaner.jsf</url-pattern>
	</servlet-mapping>

	<!-- Front controller do MyFaces -->
	<servlet>
		<servlet-name>Faces Servlet</servlet-name>
		<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
		<load-on-startup>1</load-on-startup>
	</servlet>

	<servlet-mapping>
		<servlet-name>Faces Servlet</servlet-name>
		<url-pattern>*.jsf</url-pattern>
	</servlet-mapping>

	<!-- ViewStateManagerServlet -->
	<servlet>
		<servlet-name>ViewStateManagerServlet</servlet-name>
		<servlet-class>
			br.com.xxx.framework.servlet.viewState.ViewStateManagerServlet
		</servlet-class>
		<load-on-startup>1</load-on-startup>
	</servlet>

	<servlet-mapping>
		<servlet-name>ViewStateManagerServlet</servlet-name>
		<url-pattern>/ViewStateManagerServlet</url-pattern>
	</servlet-mapping>
	
	<!-- ResourceServlet -->
	<servlet>
		<servlet-name>ResourceServlet</servlet-name>
		<servlet-class>
			br.com.xxx.framework.servlet.ResourceServlet
		</servlet-class>
		 
		<load-on-startup>1</load-on-startup>
	</servlet>
	
	<servlet-mapping>
		<servlet-name>ResourceServlet</servlet-name>
		<url-pattern>/ResourceServlet</url-pattern>
	</servlet-mapping>
	
	<!-- SchemaServlet -->
	<servlet>
		<servlet-name>SchemaServlet</servlet-name>
		<servlet-class>
			br.com.xxx.framework.servlet.schema.SchemaServlet
		</servlet-class>
		<load-on-startup>0</load-on-startup>
	</servlet>

	<servlet-mapping>
		<servlet-name>SchemaServlet</servlet-name>
		<url-pattern>/SchemaServlet</url-pattern>
	</servlet-mapping>


	<!-- EntitySelector -->
	<servlet>
		<servlet-name>EntitySelector</servlet-name>
		<servlet-class>
			br.com.xxx.framework.servlet.EntitySelectorServlet
		</servlet-class>
		<init-param>
			<param-name>nomes</param-name>
			<param-value>nome,descricao,pessoa.nome,logradouro</param-value>
		</init-param>
		<load-on-startup>1</load-on-startup>
	</servlet>

	<servlet-mapping>
		<servlet-name>EntitySelector</servlet-name>
		<url-pattern>/entity.jsf</url-pattern>
	</servlet-mapping>
	
	<!-- -->
	<servlet>
		<servlet-name>remotingFrecace</servlet-name>
		<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
		<load-on-startup>1</load-on-startup>
	</servlet>
	
	<servlet-mapping>
		<servlet-name>remotingFrecace</servlet-name>
		<url-pattern>/remotingFrecace/*</url-pattern>
	</servlet-mapping>


	<!-- Filtro que gerencia as sessões do hibernate -->
	<filter>
		<filter-name>hibernateFilter</filter-name>
		<filter-class>
			org.springframework.orm.hibernate3.support.OpenSessionInViewFilter
		</filter-class>
	</filter>

	<filter-mapping>
		<filter-name>hibernateFilter</filter-name>
		<url-pattern>*.jsp</url-pattern>
	</filter-mapping>

	<filter-mapping>
		<filter-name>hibernateFilter</filter-name>
		<url-pattern>*.Action</url-pattern>
	</filter-mapping>

	<filter-mapping>
		<filter-name>hibernateFilter</filter-name>
		<url-pattern>*.jsf</url-pattern>
	</filter-mapping>
	
	<!-- SessionCleanerFilter - limpar objetos da sessão -->
	<filter>
		<filter-name>SessionCleanerFilter</filter-name>
		<filter-class>
			br.com.xxx.framework.servlet.session.SessionCleanerFilter
		</filter-class>
	</filter>

	<filter-mapping>
		<filter-name>SessionCleanerFilter</filter-name>
		<url-pattern>*.jsf</url-pattern>
	</filter-mapping>
	

	<!-- Servlet receptor do módulo -->
	<servlet>
		<servlet-name>SessionHandler</servlet-name>
		<servlet-class>
			br.com.xxx.frecace.servlet.SessionHandlerServlet
		</servlet-class>
		<init-param>
			<param-name>defaultDestUrl</param-name>
			<param-value>cadastroUsuarioNovo.jsf</param-value>
		</init-param>
	</servlet>

	<servlet-mapping>
		<servlet-name>SessionHandler</servlet-name>
		<url-pattern>/SessionHandler</url-pattern>
	</servlet-mapping>
	
	<!-- DadosIniciaisServlet -->
	<servlet>
		<servlet-name>DadosIniciaisServlet</servlet-name>
		<servlet-class>
			br.com.xxx.frecace.servlet.DadosIniciaisServlet
		</servlet-class>
		<load-on-startup>0</load-on-startup>
	</servlet>

	<servlet-mapping>
		<servlet-name>DadosIniciaisServlet</servlet-name>
		<url-pattern>/DadosIniciaisServlet</url-pattern>
	</servlet-mapping>	
	
	<servlet>
		<servlet-name>UserMenuServlet</servlet-name>
		<servlet-class>br.com.xxx.frecace.servlet.UserMenuServlet</servlet-class>
		<load-on-startup>1</load-on-startup>
	</servlet>
	
	<servlet-mapping>
		<servlet-name>UserMenuServlet</servlet-name>
		<url-pattern>/menu.jsf</url-pattern>
	</servlet-mapping>

	<!-- Filtro que gerencia o controle de acesso -->
	<filter>
		<filter-name>AcessoRecursoFilter</filter-name>
		<filter-class>
			br.com.xxx.frecace.servlet.filter.AcessoRecursoFilter
		</filter-class>
		<init-param>
			<param-name>module</param-name>
			<param-value>acesso</param-value>
		</init-param>
	</filter>

	<filter-mapping>
		<filter-name>AcessoRecursoFilter</filter-name>
		<url-pattern>*.jsf</url-pattern>
	</filter-mapping>


	<!-- Filtro de arquivos do MyFaces -->
	<filter>
		<filter-name>extensionsFilter</filter-name>
		<filter-class>
			org.apache.myfaces.webapp.filter.ExtensionsFilter
		</filter-class>
		<init-param>
			<param-name>uploadMaxFileSize</param-name>
			<param-value>100m</param-value>
		</init-param>
		<init-param>
			<param-name>uploadThresholdSize</param-name>
			<param-value>100k</param-value>
		</init-param>
	</filter>

	<filter-mapping>
		<filter-name>extensionsFilter</filter-name>
		<url-pattern>*.jsf</url-pattern>
	</filter-mapping>
	
	<!-- ViewStateFilter -->
	<filter>
		<filter-name>ViewStateFilter</filter-name>
		<filter-class>
			br.com.xxx.framework.servlet.viewState.ViewStateFilter
		</filter-class>
	</filter>

	<filter-mapping>
		<filter-name>ViewStateFilter</filter-name>
		<url-pattern>*.jsf</url-pattern>
	</filter-mapping>
	
	<filter-mapping>
		<filter-name>ViewStateFilter</filter-name>
		<url-pattern>*.jsp</url-pattern>
	</filter-mapping>

	<filter-mapping>
		<filter-name>ViewStateFilter</filter-name>
		<url-pattern>/FrecaceServlet</url-pattern>
	</filter-mapping>

	<!-- Filtro que gerencia a limpeza nas sessões http -->
	<filter>
		<filter-name>sessionCleanerListener</filter-name>
		<filter-class>
			br.com.xxx.framework.servlet.session.SessionCleanerFilter
		</filter-class>
	</filter>

	<filter-mapping>
		<filter-name>sessionCleanerListener</filter-name>
		<url-pattern>*.jsp</url-pattern>
	</filter-mapping>

	<filter-mapping>
		<filter-name>sessionCleanerListener</filter-name>
		<url-pattern>*.jsf</url-pattern>
	</filter-mapping>

	<filter-mapping>
		<filter-name>sessionCleanerListener</filter-name>
		<url-pattern>*.Action</url-pattern>
	</filter-mapping>

	<!-- Welcome files -->
	<welcome-file-list>
		<welcome-file>login.jsp</welcome-file>
	</welcome-file-list>
	
	<!-- Usuário não possui autorização para acessar página -->
	 <error-page>
    	<error-code>401</error-code>
    	<location>/error401.htm</location>
    </error-page>
    
     <!-- Usuário bloqueado -->
     <error-page>
    	<error-code>406</error-code>
    	<location>/error406.htm</location>
    </error-page>
    
     <!-- Página não encontrada -->
     <error-page>
    	<error-code>404</error-code>
    	<location>/error404.htm</location>
    </error-page>
    
    <!-- Erro -->
     <error-page>
    	<error-code>500</error-code>
    	<location>/error500.htm</location>
    </error-page>
	
</web-app>

remotingFrecace-servlet.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">

<beans>
	<bean id="servicoUsuario" class="br.com.xxx.frecace.servico.ServicoUsuario" singleton="true">
		<property name="baseDAO">
			<ref bean="baseDAO" />
		</property>
		
		<property name="usuarioDAO">
			<ref bean="usuarioFrecaceDAO" />
		</property>
		
		<property name="servicoSessaoExterna">
			<ref bean="servicoSessaoExterna" />
		</property>
		<property name="sessaoUnica">
			<value>false</value>
		</property>
	</bean>
	
	<bean id="servicoAcessoRecurso" class="br.com.xxx.frecace.servico.ServicoAcessoRecurso" singleton="true" parent="baseBUS">
		<property name="acessoRecursoDAO">
			<ref bean="acessoRecursoDAO" />
		</property>
	</bean>
	
	<bean id="servicoModulo" class="br.com.xxx.frecace.servico.ServicoModulo" singleton="true">
		<property name="moduloDAO">
			<ref bean="moduloDAO" />
		</property>
	</bean>
	
	<bean id="servicoSessaoExterna" class="br.com.xxx.frecace.servico.ServicoSessaoExterna" singleton="true">
		<property name="baseDAO">
			<ref bean="baseDAO" />
		</property>
	</bean>
	
	<bean name="/ServicoAcessoRecurso" class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
	  <property name="service" ref="servicoAcessoRecurso"/>
	  <property name="serviceInterface" value="br.com.xxx.frecace.servico.ServicoAcessoRecursoI"/>
	</bean>
	
	<bean name="/ServicoSessaoExterna" class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
	  <property name="service" ref="servicoSessaoExterna"/>
	  <property name="serviceInterface" value="br.com.xxx.frecace.servico.ServicoSessaoExternaI"/>
	</bean>
	
	<bean name="/ServicoUsuario" class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
	  <property name="service" ref="servicoUsuario"/>
	  <property name="serviceInterface" value="br.com.xxx.frecace.servico.ServicoUsuarioI"/>
	</bean>
	
	<bean name="/ServicoModulo" class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
	  <property name="service" ref="servicoModulo"/>
	  <property name="serviceInterface" value="br.com.xxx.frecace.servico.ServicoModuloI"/>
	</bean>

</beans>

Módulo Portal:

web.xml

<?xml version="1.0"?>

<web-app id="WebApp_ID" version="2.4"
	xmlns="http://java.sun.com/xml/ns/j2ee"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

	<!-- o configurator necessita ser o primeiro da lista pois carrega o placeHolder -->
	<context-param>
		<param-name>contextConfigLocation</param-name>
		<param-value>
			classpath:br/com/xxx/sig/configuracao/spring/configurator.xml,
			classpath:br/com/xxx/sig/configuracao/spring/entities.xml,
			classpath:br/com/xxx/sig/configuracao/spring/advisors.xml,
			classpath:br/com/xxx/sig/configuracao/spring/hibernate.xml,
			classpath:br/com/xxx/sig/configuracao/spring/servicosFrecace.xml,
			classpath:br/com/xxx/sig/configuracao/spring/context.xml,
			classpath:br/com/xxx/sig/configuracao/spring/inicializadores.xml,
			classpath:br/com/xxx/sig/configuracao/spring/bus.xml,
			classpath:br/com/xxx/sig/configuracao/spring/dao.xml,
			classpath:br/com/xxx/sig/configuracao/spring/validator.xml,
			classpath:br/com/xxx/sig/configuracao/spring/session.xml,
			classpath:br/com/xxx/sig/configuracao/portal/spring/inicializadoresPortal.xml,
			classpath:br/com/xxx/sig/configuracao/portal/spring/daoPortal.xml,
			classpath:br/com/xxx/sig/configuracao/portal/spring/busPortal.xml,
			classpath:br/com/xxx/sig/configuracao/portal/spring/messages.xml,
			/WEB-INF/remoting-servlet.xml,			
			classpath:br/com/xxx/sig/configuracao/spring/converters.xml			
		</param-value>
	</context-param>
	
	<!-- nome do modulo corrente -->
	<context-param>
		<param-name>modulo</param-name>
		<param-value>portal</param-value>
	</context-param>	

	<!-- Arquivos de configuração do JSF -->
	<context-param>
		<param-name>javax.faces.CONFIG_FILES</param-name>
		<param-value>
			/WEB-INF/faces-config/faces-config.xml,			
			/WEB-INF/faces-config/navigation.xml,
			/WEB-INF/faces-config/controllers-portal.xml
		</param-value>
		<!-- 
			Comma separated list of URIs of (additional) faces config
			files. (e.g. /WEB-INF/my-config.xml) See JSF 1.0 PRD2,
			10.3.2
		-->
	</context-param>	

	<context-param>
		<param-name>log4jConfigLocation</param-name>
		<param-value>file:C:/sig/logs/sig.log4j.properties</param-value>
	</context-param>	

	<!-- Listener utilitaria para configurar o Log4j -->
	<listener>
		<listener-class>
			org.springframework.web.util.Log4jConfigListener
		</listener-class>
	</listener>

	<context-param>
		<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
		<param-value>server</param-value>
		<!--
			State saving method: "client" or "server" (= default) See
			JSF Specification 2.5.2
		-->
	</context-param>

	<context-param>
		<param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
		<param-value>true</param-value>
		<!--
			This parameter tells MyFaces if javascript code should be
			allowed in the rendered HTML output. If javascript is
			allowed, command_link anchors will have javascript code that
			submits the corresponding form. If javascript is not
			allowed, the state saving info and nested parameters will be
			added as url parameters. Default: "true"
		-->
	</context-param>

	<context-param>
		<param-name>org.apache.myfaces.PRETTY_HTML</param-name>
		<param-value>true</param-value>
		<!--
			If true, rendered HTML code will be formatted, so that it is
			"human readable". i.e. additional line separators and
			whitespace will be written, that do not influence the HTML
			code. Default: "true"
		-->
	</context-param>

	<context-param>
		<param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
		<param-value>false</param-value>
	</context-param>

	<context-param>
		<param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
		<param-value>true</param-value>
		<!--
			If true, a javascript function will be rendered that is able
			to restore the former vertical scroll on every request.
			Convenient feature if you have pages with long lists and you
			do not want the browser page to always jump to the top if
			you trigger a link or button action that stays on the same
			page. Default: "false"
		-->
	</context-param>

	<!-- Filtro que compacta os dados transferidos quando o navegador aceita compactacao -->
	<filter>
		<filter-name>GZipFilter</filter-name>
		<filter-class>
			br.com.xxx.framework.util.gzip.GZipFilter
		</filter-class>
	</filter>
	<filter-mapping>
		<filter-name>GZipFilter</filter-name>
		<url-pattern>/*</url-pattern>
	</filter-mapping>
	
	<!-- Filtro que gerencia o controle de acesso -->
	<filter>
		<filter-name>AcessoRecursoFilter</filter-name>
		<filter-class>
			br.com.xxx.frecace.servlet.filter.AcessoRecursoFilter
		</filter-class>
		<init-param>
			<param-name>module</param-name>
			<param-value>sig</param-value>
		</init-param>
	</filter>
	
	<filter-mapping>
		<filter-name>AcessoRecursoFilter</filter-name>
		<url-pattern>*.jsf</url-pattern>
	</filter-mapping> 
	
	<filter-mapping>
		<filter-name>AcessoRecursoFilter</filter-name>
		<url-pattern>*.jsp</url-pattern>
	</filter-mapping> 
	
	<!-- Filtro que gerencia as sessões do hibernate -->
	<filter>
		<filter-name>hibernateFilter</filter-name>
		<filter-class>
			org.springframework.orm.hibernate3.support.OpenSessionInViewFilter
		</filter-class>
	</filter>

	<filter-mapping>
		<filter-name>hibernateFilter</filter-name>
		<url-pattern>*.jsf</url-pattern>
	</filter-mapping>
	
	<!-- ViewStateFilter -->
	<filter>
		<filter-name>ViewStateFilter</filter-name>
		<filter-class>
			br.com.xxx.framework.servlet.viewState.ViewStateFilter
		</filter-class>
	</filter>

	<filter-mapping>
		<filter-name>ViewStateFilter</filter-name>
		<url-pattern>*.jsf</url-pattern>
	</filter-mapping>
	
	<!-- SessionCleanerFilter - limpar objetos da sessão -->
	<filter>
		<filter-name>SessionCleanerFilter</filter-name>
		<filter-class>
			br.com.xxx.framework.servlet.session.SessionCleanerFilter
		</filter-class>
	</filter>

	<filter-mapping>
		<filter-name>SessionCleanerFilter</filter-name>
		<url-pattern>*.jsf</url-pattern>
	</filter-mapping>
	
	<!-- SessionLoginFilter - verificar objetos para login -->
	<filter>
		<filter-name>SessionLoginFilter</filter-name>
		<filter-class>
			br.com.xxx.sig.filter.SessionLoginFilter
		</filter-class>
		<init-param>
			<param-name>portalURL</param-name>
			<param-value>/portal/portal.jsf</param-value>
		</init-param>
		<init-param>
			<param-name>alterarSenha</param-name>
			<param-value>/portal/alterarSenha.jsf</param-value>
		</init-param>
		<init-param>
			<param-name>freeViews</param-name>
			<param-value>portal,alterarSenha</param-value>
		</init-param>
	</filter>

	<filter-mapping>
		<filter-name>SessionLoginFilter</filter-name>
		<url-pattern>*.jsf</url-pattern>
	</filter-mapping>
	
	<!-- extensionsFilter -->
	<filter>
		<filter-name>extensionsFilter</filter-name>
		<filter-class>
			org.apache.myfaces.webapp.filter.ExtensionsFilter
		</filter-class>
		<init-param>
			<param-name>uploadMaxFileSize</param-name>
			<param-value>100m</param-value>
		</init-param>
		<init-param>
			<param-name>uploadThresholdSize</param-name>
			<param-value>100k</param-value>
		</init-param>
		<!--        
			<init-param>
			<param-name>uploadRepositoryPath</param-name>
			<param-value>/temp</param-value>
			<description>Set the path where the intermediary files will be stored.</description>
			</init-param>
		-->
	</filter>

	<filter-mapping>
		<filter-name>extensionsFilter</filter-name>
		<url-pattern>*.jsf</url-pattern>
	</filter-mapping>

	<!-- Listener, that does all the startup work (configuration, init). -->
	<listener>
		<listener-class>
			org.apache.myfaces.webapp.StartupServletContextListener
		</listener-class>
	</listener>


	<!-- Faces Servlet -->
	<servlet>
		<servlet-name>Faces Servlet</servlet-name>
		<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
		<load-on-startup>1</load-on-startup>
	</servlet>

	<servlet-mapping>
		<servlet-name>Faces Servlet</servlet-name>
		<url-pattern>*.jsf</url-pattern>
	</servlet-mapping>

	<!-- EntitySelector -->
	<servlet>
		<servlet-name>EntitySelector</servlet-name>
		<servlet-class>
			br.com.xxx.framework.servlet.EntitySelectorServlet
		</servlet-class>
		<init-param>
			<param-name>nomes</param-name>
			<param-value>nome,descricao,pessoa.nome,logradouro,pessoaJuridica.nome, razaoSocial</param-value>
		</init-param>
		<load-on-startup>1</load-on-startup>
	</servlet>

	<servlet-mapping>
		<servlet-name>EntitySelector</servlet-name>
		<url-pattern>/entity.jsf</url-pattern>
	</servlet-mapping>

	<!-- ButtonActionHandler -->
	<servlet>
		<servlet-name>ButtonActionHandler</servlet-name>
		<servlet-class>
			br.com.xxx.framework.servlet.ButtonActionHandlerServlet
		</servlet-class>
		<load-on-startup>1</load-on-startup>
	</servlet>

	<servlet-mapping>
		<servlet-name>ButtonActionHandler</servlet-name>
		<url-pattern>/buttonHandler.jsf</url-pattern>
	</servlet-mapping>

	<!-- ListEntitySelector -->
	<servlet>
		<servlet-name>ListEntitySelector</servlet-name>
		<servlet-class>
			br.com.xxx.framework.servlet.EntityListServlet
		</servlet-class>
		<load-on-startup>1</load-on-startup>
	</servlet>

	<servlet-mapping>
		<servlet-name>ListEntitySelector</servlet-name>
		<url-pattern>/list.jsf</url-pattern>
	</servlet-mapping>

	<!-- EntitySelector -->
	<servlet>
		<servlet-name>KeyEntitySelector</servlet-name>
		<servlet-class>
			br.com.xxx.framework.servlet.EntityKeyServlet
		</servlet-class>
		<load-on-startup>1</load-on-startup>
	</servlet>

	<servlet-mapping>
		<servlet-name>KeyEntitySelector</servlet-name>
		<url-pattern>/key.jsf</url-pattern>
	</servlet-mapping>

	<!-- ControllerPropertyCleaner -->
	<servlet>
		<servlet-name>ControllerPropertyCleaner</servlet-name>
		<servlet-class>
			br.com.xxx.framework.servlet.ControllerPropertyCleanerServlet
		</servlet-class>
		<load-on-startup>1</load-on-startup>
	</servlet>

	<servlet-mapping>
		<servlet-name>ControllerPropertyCleaner</servlet-name>
		<url-pattern>/cleaner.jsf</url-pattern>
	</servlet-mapping>

	<!-- ControllerMethodInvokerServlet -->
	<servlet>
		<servlet-name>ControllerMethodInvokerServlet</servlet-name>
		<servlet-class>
			br.com.xxx.framework.servlet.ControllerMethodInvokerServlet
		</servlet-class>
		<load-on-startup>1</load-on-startup>
	</servlet>

	<servlet-mapping>
		<servlet-name>ControllerMethodInvokerServlet</servlet-name>
		<url-pattern>/invoker.jsf</url-pattern>
	</servlet-mapping>
	
	<!-- ViewStateManagerServlet -->
	<servlet>
		<servlet-name>ViewStateManagerServlet</servlet-name>
		<servlet-class>br.com.xxx.framework.servlet.viewState.ViewStateManagerServlet</servlet-class>
		<init-param>
			<param-name>layoutDir</param-name>
			<param-value>/WEB-INF/classes/layout</param-value>
		</init-param>
		<load-on-startup>1</load-on-startup>
	</servlet>

	<servlet-mapping>
		<servlet-name>ViewStateManagerServlet</servlet-name>
		<url-pattern>/ViewStateManagerServlet</url-pattern>
	</servlet-mapping>

	
	<!-- ResourceServlet -->
	<servlet>
		<servlet-name>ResourceServlet</servlet-name>
		<servlet-class>
			br.com.xxx.framework.servlet.ResourceServlet
		</servlet-class> 
		<load-on-startup>1</load-on-startup>
	</servlet>

	<servlet-mapping>
		<servlet-name>ResourceServlet</servlet-name>
		<url-pattern>/ResourceServlet</url-pattern>
	</servlet-mapping>
	
	<!-- ResourceServlet -->
	<servlet>
		<servlet-name>SchemaServlet</servlet-name>
		<servlet-class>
			br.com.xxx.framework.servlet.schema.SchemaServlet
		</servlet-class>
		<load-on-startup>0</load-on-startup>
	</servlet>

	<servlet-mapping>
		<servlet-name>SchemaServlet</servlet-name>
		<url-pattern>/SchemaServlet</url-pattern>
	</servlet-mapping>
	
	<!-- -->
	<servlet>
		<servlet-name>remoting</servlet-name>
		<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
		<load-on-startup>1</load-on-startup>
	</servlet>
	
	<servlet-mapping>
		<servlet-name>remoting</servlet-name>
		<url-pattern>/remoting/*</url-pattern>
	</servlet-mapping>
	
	<!-- Spring Web application context -->
	<listener>
		<listener-class>
			org.springframework.web.context.ContextLoaderListener
		</listener-class>
	</listener>

	<listener>
		<listener-class>
			br.com.xxx.framework.servlet.holder.RequestContextListener
		</listener-class>
	</listener>
	
	<!-- Listener criado manipulação dos dados da em nível de aplicação -->	
	<listener>
		<listener-class>
			br.com.xxx.frecace.servlet.SessionAttributeListener
		</listener-class>
	</listener>
	
	<!-- <listener>
		<listener-class>
			br.com.xxx.framework.servlet.internApp.InternAppContextListener
		</listener-class>
	</listener>	
	--> 

	<listener>
		<listener-class>
			org.springframework.web.util.Log4jConfigListener
		</listener-class>
	</listener>	

	<session-config>
		<session-timeout>20</session-timeout>
	</session-config>

	<!-- Welcome files -->
	<welcome-file-list>
		<welcome-file>indexPortal.jsp</welcome-file>
	</welcome-file-list>
	
	<!-- Usuário não possui autorização para acessar página -->
	 <error-page>
    	<error-code>401</error-code>
    	<location>/error401.htm</location>
    </error-page>
    
     <!-- Usuário bloqueado -->
     <error-page>
    	<error-code>406</error-code>
    	<location>/error406.htm</location>
    </error-page>
    
     <!-- Página não encontrada -->
     <error-page>
    	<error-code>404</error-code>
    	<location>/error404.htm</location>
    </error-page>
    
    <!-- Erro -->
     <error-page>
    	<error-code>500</error-code>
    	<location>/error500.htm</location>
    </error-page>
    
    <!-- 
    <security-constraint> 
		<web-resource-collection> 
			<web-resource-name>HTTPS portal</web-resource-name> 
			<description>Permite acesso só via HTTPS</description> 
			<url-pattern>/*</url-pattern> 
			<http-method>POST</http-method> 
			<http-method>GET</http-method>
		</web-resource-collection> 
		
		<user-data-constraint> 
			<description>Usar SSL</description> 
			<transport-guarantee>CONFIDENTIAL</transport-guarantee> 
		</user-data-constraint> 
	</security-constraint> 
     -->
	
</web-app>

servicosFrecace.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
	<bean id="servicoUsuario" class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean" lazy-init="true" singleton="true">
		<property name="serviceUrl">
			<value>http://localhost:9090/frecace/remotingFrecace/ServicoUsuario</value>
		</property>
		<property name="serviceInterface" value="br.com.xxx.frecace.servico.ServicoUsuarioI"/>
	</bean>
	
	<bean id="servicoSessaoExterna" class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean" lazy-init="true" singleton="true">
		<property name="serviceUrl">
			<value>http://localhost:9090/frecace/remotingFrecace/ServicoSessaoExterna</value>
		</property>
		<property name="serviceInterface" value="br.com.xxx.frecace.servico.ServicoSessaoExternaI"/>
	</bean>
	
	<bean id="servicoAcessoRecurso" class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean" lazy-init="true" singleton="true">
		<property name="serviceUrl">
			<value>http://localhost:9090/frecace/remotingFrecace/ServicoAcessoRecurso</value>
		</property>
		<property name="serviceInterface" value="br.com.xxx.frecace.servico.ServicoAcessoRecursoI"/>
	</bean>
	
	<bean id="servicoModulo" class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean" lazy-init="true" singleton="true">
		<property name="serviceUrl">
			<value>http://localhost:9090/frecace/remotingFrecace/ServicoModulo</value>
		</property>
		<property name="serviceInterface" value="br.com.xxx.frecace.servico.ServicoModuloI"/>
	</bean>
</beans>

remoting-servlet.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>	
	<bean id="servicoSessionScopeExterna" class="br.com.xxx.framework.servico.ServicoSessionScope" singleton="true"/>
	
	<bean name="/ServicoPortal" class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter" singleton="true">
	  <property name="service" ref="servicoSessionScopeExterna"/>
	  <property name="serviceInterface" value="br.com.xxx.framework.servico.ServicoSessionScopeI"/>
	</bean>
	
</beans>

Módulo financeiro (por exemplo):

web.xml

<?xml version="1.0"?>

<web-app id="WebApp_ID" version="2.4"
	xmlns="http://java.sun.com/xml/ns/j2ee"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
	
	<!-- o configurator necessita ser o primeiro da lista pois carrega o placeHolder -->
	<context-param>
		<param-name>contextConfigLocation</param-name>
		<param-value>			
			classpath:br/com/xxx/sig/configuracao/spring/configurator.xml,
			classpath:br/com/xxx/sig/configuracao/spring/entities.xml,
			classpath:br/com/xxx/sig/configuracao/spring/advisors.xml,
			classpath:br/com/xxx/sig/configuracao/spring/hibernate.xml,
			classpath:br/com/xxx/sig/configuracao/spring/servicosFrecace.xml,
			classpath:br/com/xxx/sig/configuracao/spring/servicoPortal.xml,
			classpath:br/com/xxx/sig/configuracao/spring/context.xml,
			classpath:br/com/xxx/sig/configuracao/spring/inicializadores.xml,
			classpath:br/com/xxx/sig/configuracao/spring/bus.xml,
			classpath:br/com/xxx/sig/configuracao/spring/dao.xml,
			classpath:br/com/xxx/sig/configuracao/spring/validator.xml,
			classpath:br/com/xxx/sig/configuracao/spring/session.xml,
			classpath:br/com/xxx/sig/configuracao/financeiro/spring/inicializadoresFinanceiro.xml,
			classpath:br/com/xxx/sig/configuracao/financeiro/spring/daoFinanceiro.xml,
			classpath:br/com/xxx/sig/configuracao/financeiro/spring/messages.xml,
			classpath:br/com/xxx/sig/configuracao/financeiro/spring/busFinanceiro.xml,			
			classpath:br/com/xxx/sig/configuracao/spring/converters.xml
		</param-value>
	</context-param>
	
	<!-- nome do modulo corrente -->
	<context-param>
		<param-name>modulo</param-name>
		<param-value>financeiro</param-value>
	</context-param>
	
	<!-- Arquivos de configuração do JSF -->
	<context-param>
		<param-name>javax.faces.CONFIG_FILES</param-name>
		<param-value>
			/WEB-INF/faces-config/faces-config.xml,			
			/WEB-INF/faces-config/navigation.xml,
			/WEB-INF/faces-config/controllers-financeiro.xml
		</param-value>
		<!-- 
			Comma separated list of URIs of (additional) faces config
			files. (e.g. /WEB-INF/my-config.xml) See JSF 1.0 PRD2,
			10.3.2
		-->
	</context-param>

	<context-param>
		<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
		<param-value>server</param-value>
		<!--
			State saving method: "client" or "server" (= default) See
			JSF Specification 2.5.2
		-->
	</context-param>

	<context-param>
		<param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
		<param-value>true</param-value>
		<!--
			This parameter tells MyFaces if javascript code should be
			allowed in the rendered HTML output. If javascript is
			allowed, command_link anchors will have javascript code that
			submits the corresponding form. If javascript is not
			allowed, the state saving info and nested parameters will be
			added as url parameters. Default: "true"
		-->
	</context-param>

	<context-param>
		<param-name>org.apache.myfaces.PRETTY_HTML</param-name>
		<param-value>true</param-value>
		<!--
			If true, rendered HTML code will be formatted, so that it is
			"human readable". i.e. additional line separators and
			whitespace will be written, that do not influence the HTML
			code. Default: "true"
		-->
	</context-param>

	<context-param>
		<param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
		<param-value>false</param-value>
	</context-param>

	<context-param>
		<param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
		<param-value>true</param-value>
		<!--
			If true, a javascript function will be rendered that is able
			to restore the former vertical scroll on every request.
			Convenient feature if you have pages with long lists and you
			do not want the browser page to always jump to the top if
			you trigger a link or button action that stays on the same
			page. Default: "false"
		-->
	</context-param>
	
	<!-- Parametro que cuja função é mapear o arquivo de configuração para as chamadas de métodos. -->
	<context-param>
		<param-name>onload-config</param-name>
		<param-value>/WEB-INF/faces-config/onload-config.xml</param-value>
	</context-param>

	<!-- Filtro que compacta os dados transferidos quando o navegador aceita compactacao -->
	<filter>
		<filter-name>GZipFilter</filter-name>
		<filter-class>
			br.com.xxx.framework.util.gzip.GZipFilter
		</filter-class>
	</filter>
	<filter-mapping>
		<filter-name>GZipFilter</filter-name>
		<url-pattern>/*</url-pattern>
	</filter-mapping>
	
	<!-- Filtro que gerencia o controle de acesso -->
	<filter>
		<filter-name>AcessoRecursoFilter</filter-name>
		<filter-class>
			br.com.xxx.frecace.servlet.filter.AcessoRecursoFilter
		</filter-class>
		<init-param>
			<param-name>module</param-name>
			<param-value>sig</param-value>
		</init-param>
	</filter>
	
	<filter-mapping>
		<filter-name>AcessoRecursoFilter</filter-name>
		<url-pattern>*.jsf</url-pattern>
	</filter-mapping> 
	
	<filter-mapping>
		<filter-name>AcessoRecursoFilter</filter-name>
		<url-pattern>*.jsp</url-pattern>
	</filter-mapping> 

	<!-- Filtro que gerencia as sessões do hibernate -->
	<filter>
		<filter-name>hibernateFilter</filter-name>
		<filter-class>
			org.springframework.orm.hibernate3.support.OpenSessionInViewFilter
		</filter-class>
	</filter>

	<filter-mapping>
		<filter-name>hibernateFilter</filter-name>
		<url-pattern>*.jsf</url-pattern>
	</filter-mapping>
	
	<!-- ViewStateFilter -->
	<filter>
		<filter-name>ViewStateFilter</filter-name>
		<filter-class>
			br.com.xxx.framework.servlet.viewState.ViewStateFilter
		</filter-class>
	</filter>

	<filter-mapping>
		<filter-name>ViewStateFilter</filter-name>
		<url-pattern>*.jsf</url-pattern>
	</filter-mapping>
	
	<!-- SessionCleanerFilter - limpar objetos da sessão -->
	<filter>
		<filter-name>SessionCleanerFilter</filter-name>
		<filter-class>
			br.com.xxx.framework.servlet.session.SessionCleanerFilter
		</filter-class>
	</filter>

	<filter-mapping>
		<filter-name>SessionCleanerFilter</filter-name>
		<url-pattern>*.jsf</url-pattern>
	</filter-mapping>
	
	<!-- SessionLoginFilter - verificar objetos para login -->
	<filter>
		<filter-name>SessionLoginFilter</filter-name>
		<filter-class>
			br.com.xxx.sig.filter.SessionLoginFilter
		</filter-class>
		<init-param>
			<param-name>portalURL</param-name>
			<param-value>/portal/portal.jsf</param-value>
		</init-param>
		<init-param>
			<param-name>alterarSenha</param-name>
			<param-value>/portal/alterarSenha.jsf</param-value>
		</init-param>
		<init-param>
			<param-name>freeViews</param-name>
			<param-value>portal,alterarSenha</param-value>
		</init-param>
	</filter>

	<filter-mapping>
		<filter-name>SessionLoginFilter</filter-name>
		<url-pattern>*.jsf</url-pattern>
	</filter-mapping>
	
	<!-- ExtensionsFilter -->
	<filter>
		<filter-name>ExtensionsFilter</filter-name>
		<filter-class>
			org.apache.myfaces.webapp.filter.ExtensionsFilter
		</filter-class>
		<init-param>
			<param-name>uploadMaxFileSize</param-name>
			<param-value>100m</param-value>
		</init-param>
		<init-param>
			<param-name>uploadThresholdSize</param-name>
			<param-value>100k</param-value>
		</init-param>
		<init-param>
			<param-name>uploadRepositoryPath</param-name>
			<param-value>/temp</param-value>
		</init-param>
	</filter>

	<filter-mapping>
		<filter-name>ExtensionsFilter</filter-name>
		<url-pattern>*.jsf</url-pattern>
	</filter-mapping>

	<!-- Listener, that does all the startup work (configuration, init). -->
	<listener>
		<listener-class>
			org.apache.myfaces.webapp.StartupServletContextListener
		</listener-class>
	</listener>

	<!-- Frecace Servlet -->
	<servlet>
		<servlet-name>UserMenuServlet</servlet-name>
		<servlet-class>br.com.xxx.frecace.servlet.UserMenuServlet</servlet-class>
		<load-on-startup>1</load-on-startup>
	</servlet>
	
	<servlet-mapping>
		<servlet-name>UserMenuServlet</servlet-name>
		<url-pattern>/menu.jsf</url-pattern>
	</servlet-mapping>	
	
	<!-- Faces Servlet -->
	<servlet>
		<servlet-name>Faces Servlet</servlet-name>
		<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
		<load-on-startup>1</load-on-startup>
	</servlet>

	<servlet-mapping>
		<servlet-name>Faces Servlet</servlet-name>
		<url-pattern>*.jsf</url-pattern>
	</servlet-mapping>

	<!-- EntitySelector -->
	<servlet>
		<servlet-name>EntitySelector</servlet-name>
		<servlet-class>
			br.com.xxx.framework.servlet.EntitySelectorServlet
		</servlet-class>
		<init-param>
			<param-name>nomes</param-name>
			<param-value>nome,descricao,centroCusto.descricao,pessoa.nome,logradouro,pessoaJuridica.nome,contaDescricao.descricao,codigoReduzido</param-value>
		</init-param>
		<load-on-startup>1</load-on-startup>
	</servlet>

	<servlet-mapping>
		<servlet-name>EntitySelector</servlet-name>
		<url-pattern>/entity.jsf</url-pattern>
	</servlet-mapping>

	<!-- ButtonActionHandler -->
	<servlet>
		<servlet-name>ButtonActionHandler</servlet-name>
		<servlet-class>
			br.com.xxx.framework.servlet.ButtonActionHandlerServlet
		</servlet-class>
		<load-on-startup>1</load-on-startup>
	</servlet>

	<servlet-mapping>
		<servlet-name>ButtonActionHandler</servlet-name>
		<url-pattern>/buttonHandler.jsf</url-pattern>
	</servlet-mapping>

	<!-- ListEntitySelector -->
	<servlet>
		<servlet-name>ListEntitySelector</servlet-name>
		<servlet-class>
			br.com.xxx.framework.servlet.EntityListServlet
		</servlet-class>
		<load-on-startup>1</load-on-startup>
	</servlet>

	<servlet-mapping>
		<servlet-name>ListEntitySelector</servlet-name>
		<url-pattern>/list.jsf</url-pattern>
	</servlet-mapping>

	<!-- EntitySelector -->
	<servlet>
		<servlet-name>KeyEntitySelector</servlet-name>
		<servlet-class>
			br.com.xxx.framework.servlet.EntityKeyServlet
		</servlet-class>
		<load-on-startup>1</load-on-startup>
	</servlet>

	<servlet-mapping>
		<servlet-name>KeyEntitySelector</servlet-name>
		<url-pattern>/key.jsf</url-pattern>
	</servlet-mapping>

	<!-- ControllerPropertyCleaner -->
	<servlet>
		<servlet-name>ControllerPropertyCleaner</servlet-name>
		<servlet-class>
			br.com.xxx.framework.servlet.ControllerPropertyCleanerServlet
		</servlet-class>
		<load-on-startup>1</load-on-startup>
	</servlet>

	<servlet-mapping>
		<servlet-name>ControllerPropertyCleaner</servlet-name>
		<url-pattern>/cleaner.jsf</url-pattern>
	</servlet-mapping>

	<!-- Relatorio -->
	<servlet>
		<servlet-name>Report</servlet-name>
		<servlet-class>
			br.com.xxx.framework.servlet.ReportServlet
		</servlet-class>
		<load-on-startup>1</load-on-startup>
	</servlet>

	<servlet-mapping>
		<servlet-name>Report</servlet-name>
		<url-pattern>/reportServlet</url-pattern>
	</servlet-mapping>

	<!-- ControllerMethodInvokerServlet -->
	<servlet>
		<servlet-name>ControllerMethodInvokerServlet</servlet-name>
		<servlet-class>
			br.com.xxx.framework.servlet.ControllerMethodInvokerServlet
		</servlet-class>
		<load-on-startup>1</load-on-startup>
	</servlet>

	<servlet-mapping>
		<servlet-name>ControllerMethodInvokerServlet</servlet-name>
		<url-pattern>/invoker.jsf</url-pattern>
	</servlet-mapping>
	
	<!-- ViewStateManagerServlet -->
	<servlet>
		<servlet-name>ViewStateManagerServlet</servlet-name>
		<servlet-class>br.com.xxx.framework.servlet.viewState.ViewStateManagerServlet</servlet-class>
		<init-param>
			<param-name>layoutDir</param-name>
			<param-value>/WEB-INF/classes/layout</param-value>
		</init-param>
		<load-on-startup>1</load-on-startup>
	</servlet>

	<servlet-mapping>
		<servlet-name>ViewStateManagerServlet</servlet-name>
		<url-pattern>/ViewStateManagerServlet</url-pattern>
	</servlet-mapping>

	
	<!-- ResourceServlet -->
	<servlet>
		<servlet-name>ResourceServlet</servlet-name>
		<servlet-class>
			br.com.xxx.framework.servlet.ResourceServlet
		</servlet-class>
		<load-on-startup>1</load-on-startup>
	</servlet>

	<servlet-mapping>
		<servlet-name>ResourceServlet</servlet-name>
		<url-pattern>/ResourceServlet</url-pattern>
	</servlet-mapping>
	
	<!-- ResourceServlet -->
	<servlet>
		<servlet-name>SchemaServlet</servlet-name>
		<servlet-class>
			br.com.xxx.framework.servlet.schema.SchemaServlet
		</servlet-class>
		<load-on-startup>0</load-on-startup>
	</servlet>

	<servlet-mapping>
		<servlet-name>SchemaServlet</servlet-name>
		<url-pattern>/SchemaServlet</url-pattern>
	</servlet-mapping>

	<!-- Spring Web application context -->
	<listener>
		<listener-class>
			org.springframework.web.context.ContextLoaderListener
		</listener-class>
	</listener>

	<listener>
		<listener-class>
			br.com.xxx.framework.servlet.holder.RequestContextListener
		</listener-class>
	</listener>
	
	<!-- Listener criado manipulação dos dados da em nível de aplicação -->	
	<listener>
		<listener-class>
			br.com.xxx.frecace.servlet.SessionAttributeListener
		</listener-class>
	</listener>	
	
	<!-- <listener>
		<listener-class>
			br.com.xxx.framework.servlet.internApp.InternAppContextListener
		</listener-class>
	</listener> -->
	
	<session-config>
		<session-timeout>20</session-timeout>
	</session-config>

	<!-- Welcome files -->
	<welcome-file-list>
		<welcome-file>indexFinanceiro.jsp</welcome-file>
	</welcome-file-list>
	    
    <!-- Usuário não possui autorização para acessar página -->
	 <error-page>
    	<error-code>401</error-code>
    	<location>/error401.htm</location>
    </error-page>
    
    <!-- Usuário bloqueado -->
     <error-page>
    	<error-code>406</error-code>
    	<location>/error406.htm</location>
    </error-page>
    
     <!-- Página não encontrada -->
     <error-page>
    	<error-code>404</error-code>
    	<location>/error404.htm</location>
    </error-page>
    
    <!-- Erro -->
     <error-page>
    	<error-code>500</error-code>
    	<location>/error500.htm</location>
    </error-page>
    
    <!-- 
    <security-constraint> 
		<web-resource-collection> 
			<web-resource-name>HTTPS orcamento</web-resource-name> 
			<description>Permite acesso só via HTTPS</description> 
			<url-pattern>/*</url-pattern> 
			<http-method>POST</http-method> 
			<http-method>GET</http-method>
		</web-resource-collection> 
		
		<user-data-constraint> 
			<description>Usar SSL</description> 
			<transport-guarantee>CONFIDENTIAL</transport-guarantee> 
		</user-data-constraint> 
	</security-constraint>
     -->
</web-app>

servicoPortal.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
	<bean id="servicoSessionScopeExterna" class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean" lazy-init="true" singleton="true">
		<property name="serviceUrl">
			<value>http://localhost:8080/portal/remoting/ServicoPortal</value>
		</property>
		<property name="serviceInterface" value="br.com.xxx.framework.servico.ServicoSessionScopeI"/>
	</bean>
</beans>

Se alguém tiver alguma solução melhor ou souber o que pode estar errado. Por favor me responda. Obrigado. :smiley: