<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Embedded Jopr Project
  ~ Copyright (C) 2006-2009 Red Hat, Inc.
  ~ All rights reserved.
  ~
  ~ This program is free software; you can redistribute it and/or modify
  ~ it under the terms of the GNU Lesser General Public License as
  ~ published by the Free Software Foundation; either version 2.1 of
  ~ the License, or (at your option) any later version.
  ~
  ~ This program is distributed in the hope that it will be useful,
  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  ~ Lesser General Public License for more details.
  ~
  ~ You should have received a copy of the GNU Lesser General Public
  ~ License along with this program; if not, write to the Free Software
  ~ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  -->
<components xmlns="http://jboss.com/products/seam/components"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xmlns:security="http://jboss.com/products/seam/security"
            xsi:schemaLocation=
                    "http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.0.xsd
               http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.0.xsd">

    <component name="org.jboss.seam.core.init">
        <property name="debug">false</property>
        <!-- enable only when needed -->
        <property name="transactionManagementEnabled">false</property>
    </component>

    <component name="navigationAction">
        <property name="openDepth">4</property>
    </component>

    <component name="discoveryAction">
        <property name="scanPeriod">60000</property>
    </component>

    <!-- security stuff -->
    <security:identity authenticate-method="#{authenticator.authenticate}"
                       jaas-config-name="jmx-console"/>

    <!-- remember what page the user was on before the login redirect -->
    <event type="org.jboss.seam.notLoggedIn">
        <action execute="#{redirect.captureCurrentView}"/>
    </event>

    <event type="org.jboss.seam.postAuthenticate">
        <action execute="#{redirect.returnToCapturedView}"/>
    </event>

</components>
