<commit_before><?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright (c) 2010. Axon Framework
  ~
  ~ Licensed 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.
  -->

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:context="http://www.springframework.org/schema/context"
       xmlns:axon="http://www.axonframework.org/schema/core"
       xsi:schemaLocation="http://www.axonframework.org/schema/core http://www.axonframework.org/schema/axon-core-1.0.xsd
       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
       http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">

    <axon:annotation-config command-bus="commandBus-embedded-ref" executor="taskExecutor"/>

    <axon:command-bus id="commandBus-embedded-ref">
        <axon:interceptors>
            <ref local="commandbus-interceptor"/>
        </axon:interceptors>
    </axon:command-bus>

    <axon:command-bus id="commandBus-embedded-interceptor-bean">
        <axon:interceptors>
            <bean class="org.axonframework.commandhandling.interceptors.SpringTransactionalInterceptor"/>
        </axon:interceptors>
    </axon:command-bus>

    <axon:command-bus id="commandBus-interceptor-attribute">
        <axon:interceptors>
            <ref bean="commandbus-interceptor"/>
        </axon:interceptors>
    </axon:command-bus>

    <axon:event-bus id="eventBus"/>

    <axon:event-store id="eventStore" type="JPA"
                      event-serializer="eventSerializer" entity-manager="entityManager"/>

    <axon:event-store id="fileEventStore" type="FILE"
                      base-dir="/tmp" event-serializer="eventSerializer"/>

    <bean id="eventSerializer" class="org.axonframework.eventstore.XStreamEventSerializer"/>

    <bean id="commandbus-interceptor"
          class="org.axonframework.commandhandling.interceptors.SpringTransactionalInterceptor">
    </bean>

    <axon:event-sourcing-repository id="testRepository" locking-strategy="PESSIMISTIC"
                                    aggregate-type="org.axonframework.contextsupport.spring.RepositoryBeanDefinitionParserTest$EventSourcedAggregateRootMock"
                                    event-bus="eventBus" event-store="eventStore" conflict-resolver="conflictResolver">
        <axon:snapshot-trigger id="snapshotTrigger" event-count-threshold="50" snapshotter-ref="snapshotter"/>
        <axon:event-processors>
            <bean class="org.axonframework.testutils.MockitoMockFactoryBean">
                <property name="mockType" value="org.axonframework.eventsourcing.EventProcessor"/>
            </bean>
        </axon:event-processors>
    </axon:event-sourcing-repository>

    <axon:event-sourcing-repository id="testCacheRepository" cache-ref="mockCache"
                                    aggregate-type="org.axonframework.contextsupport.spring.RepositoryBeanDefinitionParserTest$EventSourcedAggregateRootMock"
                                    event-bus="eventBus" event-store="eventStore" conflict-resolver="conflictResolver">
        <axon:snapshot-trigger event-count-threshold="50" snapshotter-ref="snapshotter"/>
    </axon:event-sourcing-repository>

    <bean id="mockCache" class="org.axonframework.testutils.MockitoMockFactoryBean">
        <property name="mockType" value="net.sf.jsr107cache.Cache"/>
    </bean>

    <axon:event-sourcing-repository id="defaultStrategyRepository"
                                    aggregate-type="org.axonframework.contextsupport.spring.RepositoryBeanDefinitionParserTest$EventSourcedAggregateRootMock"
                                    event-bus="eventBus" event-store="eventStore" conflict-resolver="conflictResolver"/>

    <bean id="taskExecutor"
          class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor">
        <property name="corePoolSize" value="2"/>
        <property name="maxPoolSize" value="5"/>
        <property name="waitForTasksToCompleteOnShutdown" value="true"/>
    </bean>

    <bean id="conflictResolver" class="org.axonframework.eventsourcing.conflictresolvers.AcceptAllConflictResolver"/>

    <bean id="snapshotter"
          class="org.axonframework.eventsourcing.SpringAggregateSnapshotter">
        <property name="eventStore" ref="eventStore"/>
        <property name="executor" ref="taskExecutor"/>
    </bean>

    <bean id="entityManager"
          class="org.axonframework.contextsupport.spring.EntityManagerMock"/>

</beans><commit_msg>Version number no longer required when referencing axon-core.xsd from Spring Application Contexts<commit_after><?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright (c) 2010. Axon Framework
  ~
  ~ Licensed 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.
  -->

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:context="http://www.springframework.org/schema/context"
       xmlns:axon="http://www.axonframework.org/schema/core"
       xsi:schemaLocation="http://www.axonframework.org/schema/core http://www.axonframework.org/schema/axon-core.xsd
       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
       http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">

    <axon:annotation-config command-bus="commandBus-embedded-ref" executor="taskExecutor"/>

    <axon:command-bus id="commandBus-embedded-ref">
        <axon:interceptors>
            <ref local="commandbus-interceptor"/>
        </axon:interceptors>
    </axon:command-bus>

    <axon:command-bus id="commandBus-embedded-interceptor-bean">
        <axon:interceptors>
            <bean class="org.axonframework.commandhandling.interceptors.SpringTransactionalInterceptor"/>
        </axon:interceptors>
    </axon:command-bus>

    <axon:command-bus id="commandBus-interceptor-attribute">
        <axon:interceptors>
            <ref bean="commandbus-interceptor"/>
        </axon:interceptors>
    </axon:command-bus>

    <axon:event-bus id="eventBus"/>

    <axon:event-store id="eventStore" type="JPA"
                      event-serializer="eventSerializer" entity-manager="entityManager"/>

    <axon:event-store id="fileEventStore" type="FILE"
                      base-dir="/tmp" event-serializer="eventSerializer"/>

    <bean id="eventSerializer" class="org.axonframework.eventstore.XStreamEventSerializer"/>

    <bean id="commandbus-interceptor"
          class="org.axonframework.commandhandling.interceptors.SpringTransactionalInterceptor">
    </bean>

    <axon:event-sourcing-repository id="testRepository" locking-strategy="PESSIMISTIC"
                                    aggregate-type="org.axonframework.contextsupport.spring.RepositoryBeanDefinitionParserTest$EventSourcedAggregateRootMock"
                                    event-bus="eventBus" event-store="eventStore" conflict-resolver="conflictResolver">
        <axon:snapshot-trigger id="snapshotTrigger" event-count-threshold="50" snapshotter-ref="snapshotter"/>
        <axon:event-processors>
            <bean class="org.axonframework.testutils.MockitoMockFactoryBean">
                <property name="mockType" value="org.axonframework.eventsourcing.EventProcessor"/>
            </bean>
        </axon:event-processors>
    </axon:event-sourcing-repository>

    <axon:event-sourcing-repository id="testCacheRepository" cache-ref="mockCache"
                                    aggregate-type="org.axonframework.contextsupport.spring.RepositoryBeanDefinitionParserTest$EventSourcedAggregateRootMock"
                                    event-bus="eventBus" event-store="eventStore" conflict-resolver="conflictResolver">
        <axon:snapshot-trigger event-count-threshold="50" snapshotter-ref="snapshotter"/>
    </axon:event-sourcing-repository>

    <bean id="mockCache" class="org.axonframework.testutils.MockitoMockFactoryBean">
        <property name="mockType" value="net.sf.jsr107cache.Cache"/>
    </bean>

    <axon:event-sourcing-repository id="defaultStrategyRepository"
                                    aggregate-type="org.axonframework.contextsupport.spring.RepositoryBeanDefinitionParserTest$EventSourcedAggregateRootMock"
                                    event-bus="eventBus" event-store="eventStore" conflict-resolver="conflictResolver"/>

    <bean id="taskExecutor"
          class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor">
        <property name="corePoolSize" value="2"/>
        <property name="maxPoolSize" value="5"/>
        <property name="waitForTasksToCompleteOnShutdown" value="true"/>
    </bean>

    <bean id="conflictResolver" class="org.axonframework.eventsourcing.conflictresolvers.AcceptAllConflictResolver"/>

    <bean id="snapshotter"
          class="org.axonframework.eventsourcing.SpringAggregateSnapshotter">
        <property name="eventStore" ref="eventStore"/>
        <property name="executor" ref="taskExecutor"/>
    </bean>

    <bean id="entityManager"
          class="org.axonframework.contextsupport.spring.EntityManagerMock"/>

</beans>
{'fraction_non_alphanumeric': 0.12218833396873809, 'fraction_numerical': 0.004956157072054899, 'mean_word_length': 3.118131868131868, 'pattern_counts': {'":': 0, '<': 107, '<?xml version=': 2, '>': 107, 'https://': 0, 'lorem ipsum': 0, 'www.': 22, 'xml': 10}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '678976', 'n_tokens_mistral': 3035, 'n_tokens_neox': 2733, 'n_words': 438}