<?xml version="1.0" encoding="UTF-8"?>
<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:bpm="http://jboss.com/products/seam/bpm"
            xmlns:security="http://jboss.com/products/seam/security"
            xmlns:mail="http://jboss.com/products/seam/mail"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:schemaLocation=
                "http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.0.xsd 
                 http://jboss.com/products/seam/persistence http://jboss.com/products/seam/persistence-2.0.xsd 
                 http://jboss.com/products/seam/drools http://jboss.com/products/seam/drools-2.0.xsd
                 http://jboss.com/products/seam/bpm http://jboss.com/products/seam/bpm-2.0.xsd
                 http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.0.xsd
                 http://jboss.com/products/seam/mail http://jboss.com/products/seam/mail-2.0.xsd
                 http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.0.xsd">

   <core:init debug="true" jndi-pattern="@jndiPattern@"/>
     
   <core:manager concurrent-request-timeout="500" 
                 conversation-timeout="120000" 
                 conversation-id-parameter="cid"/>
    
  
<drools:rule-base name="securityRules">
       <drools:rule-files>
           <value>/security.drl</value>
       </drools:rule-files>
   </drools:rule-base>

   <security:identity security-rules="#{securityRules}" 
   authenticate-method="#{authenticator.authenticate()}" remember-me="true"/>

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