<?xml version="1.0" encoding="UTF-8"?>
<!--
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
    this work for additional information regarding copyright ownership.
    The ASF licenses this file to You 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.
-->

<!-- $Rev$ $Date$ -->

<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web/tomcat-1.2">

    <environment>
        <hidden-classes>
            <filter>antlr</filter>
            <filter>org.apache.commons.digester</filter>
            <filter>commons-beanutils</filter>
            <filter>commons-digester</filter>
            <filter>commons-collections</filter>
            <filter>commons-lang</filter>
            <!--<filter>jdom</filter>-->
            <filter>org.apache.openjpa</filter> 
            <filter>org.springframework</filter>
            <filter>META-INF/spring</filter>   
        </hidden-classes>
    </environment>

    <context-root>/roller</context-root>

    <resource-ref>
        <ref-name>mail/Session</ref-name>
        <resource-link>mail/MailSession</resource-link>
    </resource-ref>
<!--
    <gbean name="roller" class="org.apache.geronimo.security.realm.GenericSecurityRealm"
           xsi:type="dep:gbeanType"
           xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <attribute name="realmName">roller</attribute>
        <reference name="ServerInfo">
            <name>ServerInfo</name>
        </reference>
        <xml-reference name="LoginModuleConfiguration">
            <log:login-config xmlns:log="http://geronimo.apache.org/xml/ns/loginconfig-2.0">
                <log:login-module control-flag="REQUIRED" wrap-principals="false">
                    <log:login-domain-name>roller</log:login-domain-name>
                    <log:login-module-class>org.apache.geronimo.security.realm.providers.SQLLoginModule
                    </log:login-module-class>
                    <log:option name="userSelect">SELECT username, passphrase FROM rolleruser WHERE username=?
                    </log:option>
                    <log:option name="dataSourceApplication">null</log:option>
                    <log:option name="groupSelect">SELECT username, rolename FROM userrole WHERE username=?</log:option>
                    <log:option name="dataSourceName">jdbc/rollerdb</log:option>
                </log:login-module>
            </log:login-config>
        </xml-reference>
    </gbean>
-->

    <persistence xmlns="http://java.sun.com/xml/ns/persistence" version="1.0">

        <persistence-unit name="RollerPU">
            <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
            <jta-data-source>jdbc/rollerdb</jta-data-source>
            <non-jta-data-source>jdbc/NoTxrollerdb</non-jta-data-source>
            <properties>
                <!--<property name="openjpa.jdbc.DBDictionary" value="org.apache.openjpa.jdbc.sql.DerbyDictionary"/>-->
                <!--<property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)"/>-->
                <property name="openjpa.jdbc.SynchronizeMappings" value=""/>
                <!-- JIRA #OPENJPA-256 workaround not completely sure its needed and it is probably a performance killer-->
                <property name="openjpa.QueryCompilationCache" value="false"/>
                <!--<property name="openjpa.Sequence" value="table(Table=OPENJPASEQ, Increment=100)"/>-->
            </properties>
        </persistence-unit>

    </persistence>
    
</web-app>
