event store in file system for AddressBook Sample 1.1.1 source code location

Hi:
  I like to check out event store in file system ( aContact folder
being placed in the temporary folder) by running war file downloaded
from ( "https://github.com/downloads/AxonFramework/AxonFramework/axon-
addressbook-flexui-war-1.1.1.war).

The war file is deployed on Jetty which created a folder under c:
\temp1
such as Jetty_0_0_0_0_9090_axon.addressbook.flexui.war.
1.1.1.war__axon.addressbook.flexui.war.1.1.1__.q00ti3

Web browser can open http://localhost:9090/axon-addressbook-flexui-war-1.1.1/
and add a new contact is working also.

  I could not find aContact folder.

In side of message-push-content.xml, there are below lines

<flex:message-destination id="event-bus"/>

    <bean id="defaultMessageTemplate"
class="org.springframework.flex.messaging.MessageTemplate">
        <property name="defaultDestination" value="event-bus"/>
    </bean>

Should I change 'event-bus" to event-store" in order to have event
store's aContact folder?

Where is source codes for AddressBook Sample 1.1.1 ?

git://github.com/AxonFramework/Addressbook-Sample.git only has
master

When I tried to compile master AddressBook-Sample.

below are errors

[ERROR]BUILD FAILURE

Hi,

the sample application uses a JPAEventStore with an in-memory database. The source code is still located in the old
Google Code repository (code.google.com/p/axonframework). I still need to migrate that. You'll need to change the JPAEventStore to a FileSystemEventStore in one of the application context files.

And de sample has not been refactored yet to meet the changes made in Axon 2.0. That's why it doesn't compile. If you change the version in the Axon dependencies in the poms to 1.2.1, it will probably work.

I'll try to migrate the sources as soon as possible. Sorry for the inconvenience.

Cheers,

Allard

I’ve updated the sample to match the axon 2.0 (snapshot) code base. It now builds properly.

Shortly, I will migrate the sample sources for 1.x as well.

Cheers,

Allard

Get zipped source codes of Addressbook-sample for version 2.0-snapshot
from https://github.com/AxonFramework/Addressbook-Sample/downloads

To build project, if using maven 2.2.1, I added mave-plug in in top
pom.xml with below snippet code

     <build>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.5</source>
                    <target>1.5</target>
                </configuration>
            </plugin>
        </plugins>
    </build>

if using maven 3.0.*, project will be built successfully

Hi Ming,

thanks for the pointer. I added the plugin to the pom.

Cheers,

Allard

To switch event store into file system in version Addressbook-sample
2.0-snapshot, in Axon Address Book Sample-Application Core module,
src/main/resources/META-INF/Spring/application-context.xml,
replacing <axon:jpa-event-store id="eventStore"/> with
<axon:filesystem-event-store id="eventStore" base-dir="c:\\temp2"/>

After war being deployed, a folder with name "Contact" will be
created to host a few files with extension ".events "

below lists contents in one of xxxxx.events files

   <domain-event>
    <payloadType>org.axonframework.sample.app.api.ContactCreatedEvent</

    <identifier>2bea7704-af1e-45c3-8956-5111f5add8e3</identifier>
    <timestamp>2012-01-21T13:26:37.870-08:00</timestamp>
    <payload class =
"org.axonframework.sample.app.api.ContactCreatedEvent">
        <contactId>90d4f6e0-e9be-46b0-b185-212b50efa3cc</contactId>
        <name>Jettro</name>
    </payload>
    <metaData/>
    <aggregateIdentifier class = "string">90d4f6e0-e9be-46b0-
b185-212b50efa3cc</aggregateIdentifier>
    <sequenceNumber>0</sequenceNumber>
</domain-event>
<domain-event>
    <payloadType>org.axonframework.sample.app.api.AddressAddedEvent</

    <identifier>0eb71d3b-9731-41e4-9ad8-07feac34fb44</identifier>
    <timestamp>2012-01-21T13:26:38.147-08:00</timestamp>
    <payload class =
"org.axonframework.sample.app.api.AddressAddedEvent">
        <contactId>90d4f6e0-e9be-46b0-b185-212b50efa3cc</contactId>
        <type>PRIVATE</type>
        <address>
            <streetAndNumber>Feyenoordlaan 010</streetAndNumber>
            <zipCode>3000AA</zipCode>
            <city>Rotterdam</city>
        </address>
    </payload>
    <metaData/>
    <aggregateIdentifier class = "string">90d4f6e0-e9be-46b0-
b185-212b50efa3cc</aggregateIdentifier>
    <sequenceNumber>1</sequenceNumber>
</domain-event>