<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">

	<!--This is an example file to configure a remote server.  It should be renamed to pipelineConfig.xml and placed in /configs where you LabKey Server is installed-->
    <bean id="activeMqConnectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory">
		<!--Change this to match your server-->
        <constructor-arg value="tcp://nbfredsci2.agr.gc.ca:61616"/>
        <!--<property name="userName" value="username" />-->
        <!--<property name="password" value="password" />-->
        <property name="redeliveryPolicy" ref="redeliveryPolicy"/>
    </bean>

    <bean id="redeliveryPolicy" class="org.apache.activemq.RedeliveryPolicy">
        <property name="maximumRedeliveries" value="-1"/>
    </bean>

    <bean id="pipelineJobService" class="org.labkey.pipeline.api.PipelineJobServiceImpl">
        <property name="appProperties">
            <bean class="org.labkey.pipeline.api.properties.ApplicationPropertiesImpl">
                <property name="toolsDirectory" value="C:\Program Files (x86)\LabKey Server\bin" />

                <property name="networkDriveLetter" value="T" />
                <property name="networkDrivePath" value="\\nbfredseq\LabkeyRemoteDir" />
                <!-- Map the network drive manually in dev mode, or supply a user and password -->
                <!-- <property name="networkDriveUser" value="laguem" /> -->
                <!-- <property name="networkDrivePassword" value="" /> -->
            </bean>
        </property>
        <property name="remoteServerProperties">
            <bean class="org.labkey.pipeline.api.properties.RemoteServerPropertiesImpl">
		<!--This is an arbitrary name assigned to this remote location.  This needs to match the location name used in sequenceanalysisConfig.xml-->
                <property name="location" value="sequenceAnalysis"/>
			
		<!--This file is optional.  There is an example in SVN.  You can override this to change the maximum concurrent jobs running per server, among other things-->
                <!--<property name="muleConfig" value="/usr/local/labkey/configs/remoteMuleConfig.xml"/>-->
            </bean>
        </property>
        <property name="configProperties">
            <bean class="org.labkey.pipeline.api.properties.ConfigPropertiesImpl">
                <property name="softwarePackages">
                    <map>
                        <!--If the sequence tools are not in the standard pipeline tools dir, this is required.  If not supplied, toolsDirectory will be used-->
                        <entry key="SEQUENCEANALYSIS_TOOLS" value="/usr/local/labkey/bin"/>

                        <!--The number of threads to use, where supported by external tools-->
                        <entry key="SEQUENCEANALYSIS_MAX_THREADS" value="60"/>

                        <!--optional, can be used to shift tmp dir from the system disk to another disk-->
                        <!--<entry key="JAVA_TMP_DIR" value="/tmp"/>-->

                        <!--a whitespace separated list of arguments passed directly to java when running picard tools and GATK-->
                        <entry key="JAVA_MEMORY" value="-Xmx8g"/>
                    </map>
                </property>
            </bean>
        </property>
        <!-- <property name="statusWriter">
            <bean class="org.labkey.pipeline.mule.JMSStatusWriter"/>
        </property>
	-->
	<!--
        <property name="jobStore">
            <bean class="org.labkey.pipeline.api.PipelineJobMarshaller"/>
        </property>
	-->
        <property name="workDirFactory">
            <bean class="org.labkey.pipeline.api.WorkDirectoryRemote$Factory">
				<!--Can be changed to match your server.  Should have ample space-->
                <property name="cleanupOnStartup" value="true" />
                <property name="tempDirectory" value="E:/LabkeyRemoteDir/RemoteTempDirectory" />
                <!--<property name="tempDirectory" value="/pipeline"/>-->
                <!--<property name="cleanupOnStartup" value="true" />-->
                <!--<property name="outputPermissions" value="0664"/>-->
            </bean>
        </property>
        <property name="largeWorkDirFactory">
            <bean class="org.labkey.pipeline.api.WorkDirectoryLocal$Factory">
                <property name="outputPermissions" value="0664"/>
            </bean>
        </property>
        <property name="pathMapper">
            <bean class="org.labkey.api.pipeline.file.PathMapperImpl">
                <property name="localIgnoreCase" value="false"/>
                <property name="remoteIgnoreCase" value="true"/>
				<!--This is used to map paths between the webserver and remote server.  The remote server requires access to the webserver file root.-->
				<!--If this is mounted in an alternate location, update this-->
				<!--
                <property name="pathMap">
                    <map>
                        <entry key="file:/usr/local/labkey/files/" value="file:/labkey_files/"/>
                    </map>
                </property>
				-->
            </bean>
        </property>
    </bean>
</beans>    
