<?xml version="1.0" encoding="UTF-8"?>
<!-- * Copyright 2010 IHE International (http://www.ihe.net) * * Licensed 
	under the Apache License, Version 2.0 (the "License"); * you may not use 
	this file except in compliance with the License. * You may obtain a copy 
	of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless 
	required by applicable law or agreed to in writing, software * distributed 
	under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES 
	OR CONDITIONS OF ANY KIND, either express or implied. * See the License for 
	the specific language governing permissions and * limitations under the License. -->
<!-- File : components.xml This file is a template file, used to generate 
	components.xml @author Anne-Gaelle BERGE / INRIA Rennes IHE development Project 
	@see > Aberge@irisa.fr - http://www.ihe-europe.org -->
<components xmlns="http://jboss.com/products/seam/components"
	xmlns:core="http://jboss.com/products/seam/core" xmlns:persistence="http://jboss.com/products/seam/persistence"
	xmlns:drools="http://jboss.com/products/seam/drools" xmlns:async="http://jboss.com/products/seam/async"
	xmlns:bpm="http://jboss.com/products/seam/bpm" xmlns:security="http://jboss.com/products/seam/security"
	xmlns:pdf="http://jboss.com/products/seam/pdf" xmlns:document="http://jboss.com/products/seam/document"
	xmlns:excel="http://jboss.com/products/seam/excel" xmlns:mail="http://jboss.com/products/seam/mail"
	xmlns:web="http://jboss.com/products/seam/web" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.2.xsd
	http://jboss.com/products/seam/persistence http://jboss.com/products/seam/persistence-2.2.xsd
	http://jboss.com/products/seam/drools http://jboss.com/products/seam/drools-2.2.xsd
	http://jboss.com/products/seam/bpm http://jboss.com/products/seam/bpm-2.2.xsd
	http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.2.xsd
	http://jboss.com/products/seam/async http://jboss.com/products/seam/async-2.2.xsd
	http://jboss.com/products/seam/mail http://jboss.com/products/seam/mail-2.2.xsd
	http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.2.xsd
	http://jboss.com/products/seam/pdf http://jboss.com/products/seam/pdf-2.2.xsd
	http://jboss.com/products/seam/pageflow http://jboss.com/products/seam/pageflow-2.2.xsd
	http://jboss.com/products/seam/document http://jboss.com/products/seam/document-2.2.xsd
	http://jboss.com/products/seam/document http://jboss.com/products/seam/web-2.2.xsd
	http://jboss.com/products/seam/excel http://jboss.com/products/seam/excel-2.2.xsd">


	<component name="org.jboss.seam.core.init">
		<property name="debug">${seam.debug}</property>
		<property name="jndi-pattern">EVSClient/#{ejbName}/local</property>
	</component>


	<security:rule-based-permission-resolver
		security-rules="#{securityRules}" />


	<!-- drools for security -->
	<drools:rule-base name="securityRules">
		<drools:rule-files>
			<value>/security.drl</value>
		</drools:rule-files>
	</drools:rule-base>

	<!-- Drools for TFDependencies -->
	<drools:rule-base name="TFDependenciesRules">
		<drools:rule-files>
			<value>/TFDependenciesRulesWithObjects.drl</value>
		</drools:rule-files>
	</drools:rule-base>
	<drools:managed-working-memory name="tfDependenciesWorkingMemory"
		auto-create="true" scope="session" rule-base="#{TFDependenciesRules}" />


	<security:permission-manager
		permission-store="#{jpaPermissionStore}" />

	<core:init debug="true" jndi-pattern="EVSClient/#{ejbName}/local" />

	<core:manager concurrent-request-timeout="500"
		conversation-timeout="120000" conversation-id-parameter="cid" />

	<!-- Make sure this URL pattern is the same as that used by the Faces Servlet -->
	<web:hot-deploy-filter url-pattern="*.seam" />


	<persistence:managed-persistence-context
		auto-create="true" name="entityManager" persistence-unit-jndi-name="java:/EVSClient-EntityManagerFactory"  />

	<async:quartz-dispatcher />


	<event type="org.jboss.seam.security.notLoggedIn">
		<action execute="#{redirect.captureCurrentView}" />
	</event>
	<event type="org.jboss.seam.security.loginSuccessful">
		<action execute="#{redirect.returnToCapturedView}" />
	</event>

	<mail:mail-session host="localhost" port="25" />

	<security:remember-me enabled="true" />
	
	<web:multipart-filter create-temp-files="true"
		max-request-size="1000000" url-pattern="*.seam" />


</components>
