<?xml version="1.0" encoding="ISO-8859-1"?>
<configuration>
  
  <component>
    <key>org.exoplatform.services.log.LogConfigurationInitializer</key>
    <type>org.exoplatform.services.log.LogConfigurationInitializer</type>
    <init-params>
      <value-param>
        <name>logger</name>
        <value>org.exoplatform.services.log.impl.BufferedLog4JLogger</value>
      </value-param>
      <value-param>
        <name>configurator</name>
        <value>org.exoplatform.services.log.impl.Log4JConfigurator</value>
      </value-param>
      <properties-param>
        <name>properties</name>
        <description>Log4J properties</description>
        <property name="log4j.rootLogger" value="INFO, stdout, file"/>
        
        <property name="log4j.appender.stdout" value="org.apache.log4j.ConsoleAppender"/>
        <property name="log4j.appender.stdout.threshold" value="INFO"/>
        
        <property name="log4j.appender.stdout.layout" value="org.apache.log4j.PatternLayout"/>
        <property name="log4j.appender.stdout.layout.ConversionPattern" value="%d{dd.MM.yyyy HH:mm:ss} *%-5p* [%t] %c{1}: %m (%F, line %L) %n"/>
        
        <property name="log4j.appender.file" value="org.apache.log4j.FileAppender"/>
        <property name="log4j.appender.file.File" value="../logs/jcr.log"/>
        
        <property name="log4j.appender.file.layout" value="org.apache.log4j.PatternLayout"/>
        <property name="log4j.appender.file.layout.ConversionPattern" value="%d{dd.MM.yyyy HH:mm:ss} *%-5p* [%t] %c{1}: %m (%F, line %L) %n"/>
        
        <!-- property name="log4j.category.jcr.DBInitializer" value="DEBUG"/ -->
        
      </properties-param>
    </init-params>
  </component>
  
  <component>
    <key>org.exoplatform.services.jcr.rmi.api.server.JCRServer</key>
    <type>org.exoplatform.services.jcr.rmi.impl.server.JCRServerImpl</type>
    <init-params>
      <value-param>
        <!-- values of rmiPort that are less than 1 mean default value of 1099 -->
        <name>rmiPort</name>
        <value>9999</value>
      </value-param>
      <value-param>
        <name>autoBind</name>
        <value>false</value>
      </value-param>
    </init-params>
  </component>
  
  <component>
    <key>org.exoplatform.services.jcr.config.RepositoryServiceConfiguration</key>
    <type>org.exoplatform.services.jcr.impl.config.RepositoryServiceConfigurationImpl</type>
    <init-params>
      <value-param>
        <name>conf-path</name>
        <description>JCR configuration file</description>
        <value>exo-jcr-config.xml</value>
      </value-param>
    </init-params>
  </component>
  
  <component>
    <type>org.exoplatform.services.organization.impl.mock.DummyOrganizationService</type>
  </component>
  
  <component>
    <key>org.exoplatform.services.security.Authenticator</key>
    <type>org.exoplatform.services.organization.auth.OrganizationAuthenticatorImpl</type>
  </component>
  
  <external-component-plugins>
    <target-component>org.exoplatform.services.command.impl.CommandService</target-component>
    <component-plugin>
      <name>config.catalog</name>
      <set-method>addPlugin</set-method>
      <type>org.exoplatform.services.command.impl.CommonsXMLConfigurationPlugin</type>
      <init-params>
        <value-param>
          <name>config-file</name>
          <value>conf/test-commands1.xml</value>
        </value-param>
      </init-params>
    </component-plugin>
    <component-plugin>
      <name>config.catalog</name>
      <set-method>addPlugin</set-method>
      <type>org.exoplatform.services.command.impl.CommonsXMLConfigurationPlugin</type>
      <init-params>
        <value-param>
          <name>config-file</name>
          <value>conf/jcr-client-commands.xml</value>
        </value-param>
      </init-params>
    </component-plugin>
  </external-component-plugins>
  
  <external-component-plugins>
    <target-component>org.exoplatform.services.naming.InitialContextInitializer</target-component>
    <component-plugin>
      <name>bind.datasource</name>
      <set-method>addPlugin</set-method>
      <type>org.exoplatform.services.naming.BindReferencePlugin</type>
      <init-params>
        <value-param>
          <name>bind-name</name>
          <value>jdbcjcr</value>
        </value-param>
        <value-param>
          <name>class-name</name>
          <value>javax.sql.DataSource</value>
        </value-param>
        <value-param>
          <name>factory</name>
          <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
        </value-param>
        <properties-param>
          <name>ref-addresses</name>
          <description>ref-addresses</description>
          <property name="driverClassName" value="org.hsqldb.jdbcDriver"/>
          <property name="url" value="jdbc:hsqldb:file:target/temp/data/portal"/>
          <property name="username" value="sa"/>
          <property name="password" value=""/>
        </properties-param>
      </init-params>
    </component-plugin>
    <component-plugin>
      <name>bind.jcr</name>
      <set-method>addPlugin</set-method>
      <type>org.exoplatform.services.naming.BindReferencePlugin</type>
      <init-params>
        <value-param>
          <name>bind-name</name>
          <value>repository</value>
        </value-param>
        <value-param>
          <name>class-name</name>
          <value>javax.jcr.Repository</value>
        </value-param>
        <value-param>
          <name>factory</name>
          <value>org.exoplatform.services.jcr.impl.jndi.BindableRepositoryFactory</value>
        </value-param>
        <properties-param>
          <name>ref-addresses</name>
          <description>ref-addresses</description>
          <property name="repositoryName" value="repository"/>
          <!-- property name="containerConfig" value="exo-configuration.xml"/ -->
        </properties-param>
      </init-params>
    </component-plugin>
    <component-plugin>
      <name>rmi.jcr</name>
      <set-method>addPlugin</set-method>
      <type>org.exoplatform.services.naming.BindReferencePlugin</type>
      <init-params>
        <value-param>
          <name>bind-name</name>
          <value>rmirepository</value>
        </value-param>
        <value-param>
          <name>class-name</name>
          <value>javax.jcr.Repository</value>
        </value-param>
        <value-param>
          <name>factory</name>
          <value>org.exoplatform.services.jcr.rmi.api.client.ClientRepositoryFactory</value>
        </value-param>
        <properties-param>
          <name>ref-addresses</name>
          <description>ref-addresses</description>
          <property name="url" value="//localhost:9999/repository"/>
        </properties-param>
      </init-params>
    </component-plugin>
  </external-component-plugins>
  
  <remove-configuration>org.exoplatform.services.scheduler.JobSchedulerService</remove-configuration>
  
</configuration>
