<commit_before><?xml version="1.0"?>

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	     xmlns:jaxws="http://cxf.apache.org/jaxws"
       xsi:schemaLocation="http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
                           http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">

  <import resource="classpath:META-INF/cxf/cxf.xml"/>


  <!-- Handling report web service -->


  <jaxws:endpoint id="jax-ws.http" implementor="#handlingReportService" address="/RegisterEvent"/>

  <bean id="handlingReportService" class="se.citerus.dddsample.interfaces.handling.ws.HandlingReportServiceImpl">
    <property name="applicationEvents" ref="applicationEvents"/>
  </bean>


  <!-- File upload directory scanner -->


  <!--bean id="scheduledTask" class="org.springframework.scheduling.timer.ScheduledTimerTask">
    <property name="period" value="5000"/>
    <property name="delay" value="5000"/>
    <property name="timerTask" ref="uploadDirectoryScanner"/>
  </bean-->

  <bean id="uploadDirectoryScanner" class="se.citerus.dddsample.interfaces.handling.file.UploadDirectoryScanner">
    <property name="uploadDirectory" value="/tmp/upload"/>
    <property name="parseFailureDirectory" value="/tmp/failed"/>
    <property name="applicationEvents" ref="applicationEvents"/>
  </bean>

  <bean id="handlingReportConsumptionSupport" class="se.citerus.dddsample.interfaces.handling.HandlingReportParser"/>

  <!--bean id="timerFactory" class="org.springframework.scheduling.timer.TimerFactoryBean">
    <property name="scheduledTimerTasks">
      <list>
        <ref bean="scheduledTask"/>
      </list>
    </property>
  </bean-->


  <!-- RMI exposed booking service facade, which operates in an open Hibernate session -->


  <bean id="hibernateInterceptor" class="org.springframework.orm.hibernate3.HibernateInterceptor">
    <property name="sessionFactory" ref="sessionFactory"/>
  </bean>

  <bean id="bookingServiceFacade" class="org.springframework.aop.framework.ProxyFactoryBean">
    <property name="target" ref="bookingServiceFacadeTarget"/>
    <property name="interceptorNames">
      <list>
        <value>hibernateInterceptor</value>
      </list>
    </property>
  </bean>

  <bean id="bookingServiceFacadeTarget" class="se.citerus.dddsample.interfaces.booking.facade.internal.BookingServiceFacadeImpl">
    <property name="bookingService" ref="bookingService"/>
    <property name="cargoRepository" ref="cargoRepository"/>
    <property name="locationRepository" ref="locationRepository"/>
    <property name="voyageRepository" ref="voyageRepository"/>
  </bean>
  
  <bean class="org.springframework.remoting.rmi.RmiServiceExporter">
    <property name="serviceInterface" value="se.citerus.dddsample.interfaces.booking.facade.BookingServiceFacade"/>
    <property name="service" ref="bookingServiceFacade"/>
    <property name="serviceName" value="BookingService"/>
  </bean>


  <!-- Tracking web application support -->


  <bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
    <property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/>
    <property name="prefix" value="/WEB-INF/jsp/pub/"/>
    <property name="suffix" value=".jsp"/>
    <property name="requestContextAttribute" value="rc"/>
    <property name="cache" value="false"/>
  </bean>

  <bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource">
    <property name="basename" value="messages"/>
  </bean>

  <bean id="localeResolver" class="org.springframework.web.servlet.i18n.FixedLocaleResolver">
    <property name="defaultLocale" value="en"/>
  </bean>

  <bean id="openSessionInViewInterceptor" class="org.springframework.orm.hibernate3.support.OpenSessionInViewInterceptor">
    <property name="sessionFactory" ref="sessionFactory"/>
  </bean>

</beans><commit_msg>Updated task scheduler to Spring 4.<commit_after><?xml version="1.0"?>

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:task="http://www.springframework.org/schema/task"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:jaxws="http://cxf.apache.org/jaxws"
       xsi:schemaLocation="http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
                           http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
                           http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task.xsd">

    <import resource="classpath:META-INF/cxf/cxf.xml"/>


    <!-- Handling report web service -->

    <jaxws:endpoint id="jax-ws.http" implementor="#handlingReportService" address="/RegisterEvent"/>

    <bean id="handlingReportService" class="se.citerus.dddsample.interfaces.handling.ws.HandlingReportServiceImpl">
        <property name="applicationEvents" ref="applicationEvents"/>
    </bean>


    <!-- File upload directory scanner -->

    <task:scheduled-tasks scheduler="myScheduler">
        <task:scheduled ref="uploadDirectoryScanner" method="run" fixed-delay="5000"/>
    </task:scheduled-tasks>

    <task:scheduler id="myScheduler" pool-size="10"/>

    <bean id="uploadDirectoryScanner" class="se.citerus.dddsample.interfaces.handling.file.UploadDirectoryScanner">
        <property name="uploadDirectory" value="/tmp/upload"/>
        <property name="parseFailureDirectory" value="/tmp/failed"/>
        <property name="applicationEvents" ref="applicationEvents"/>
    </bean>

    <bean id="handlingReportConsumptionSupport" class="se.citerus.dddsample.interfaces.handling.HandlingReportParser"/>

    <!-- RMI exposed booking service facade, which operates in an open Hibernate session -->


    <bean id="hibernateInterceptor" class="org.springframework.orm.hibernate3.HibernateInterceptor">
        <property name="sessionFactory" ref="sessionFactory"/>
    </bean>

    <bean id="bookingServiceFacade" class="org.springframework.aop.framework.ProxyFactoryBean">
        <property name="target" ref="bookingServiceFacadeTarget"/>
        <property name="interceptorNames">
            <list>
                <value>hibernateInterceptor</value>
            </list>
        </property>
    </bean>

    <bean id="bookingServiceFacadeTarget"
          class="se.citerus.dddsample.interfaces.booking.facade.internal.BookingServiceFacadeImpl">
        <property name="bookingService" ref="bookingService"/>
        <property name="cargoRepository" ref="cargoRepository"/>
        <property name="locationRepository" ref="locationRepository"/>
        <property name="voyageRepository" ref="voyageRepository"/>
    </bean>

    <bean class="org.springframework.remoting.rmi.RmiServiceExporter">
        <property name="serviceInterface" value="se.citerus.dddsample.interfaces.booking.facade.BookingServiceFacade"/>
        <property name="service" ref="bookingServiceFacade"/>
        <property name="serviceName" value="BookingService"/>
    </bean>


    <!-- Tracking web application support -->


    <bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
        <property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/>
        <property name="prefix" value="/WEB-INF/jsp/pub/"/>
        <property name="suffix" value=".jsp"/>
        <property name="requestContextAttribute" value="rc"/>
        <property name="cache" value="false"/>
    </bean>

    <bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource">
        <property name="basename" value="messages"/>
    </bean>

    <bean id="localeResolver" class="org.springframework.web.servlet.i18n.FixedLocaleResolver">
        <property name="defaultLocale" value="en"/>
    </bean>

    <bean id="openSessionInViewInterceptor"
          class="org.springframework.orm.hibernate3.support.OpenSessionInViewInterceptor">
        <property name="sessionFactory" ref="sessionFactory"/>
    </bean>

</beans>
{'fraction_non_alphanumeric': 0.15077713866111858, 'fraction_numerical': 0.004772977603720475, 'mean_word_length': 4.258687258687258, 'pattern_counts': {'":': 0, '<': 133, '<?xml version=': 2, '>': 133, 'https://': 0, 'lorem ipsum': 0, 'www.': 11, 'xml': 11}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2966947', 'n_tokens_mistral': 2409, 'n_tokens_neox': 2284, 'n_words': 345}