Jdbc Event store configuration example

214 views
Skip to first unread message

Anand Kadhi

unread,
Jun 21, 2015, 3:11:59 PM6/21/15
to axonfr...@googlegroups.com
Hello,

I am new to axon and been searching for persisting events to the database instead of file. I have used FileSystemEventStore and its working fine, now i am thinking to use JDBCEventStore but i am unable to find any in axon-quickstart. I wanted to know how to tell axon to store the events data to a particular table , and how to configure it. Does anyone have any good example. 

Anand Kadhi

unread,
Jun 24, 2015, 11:05:43 PM6/24/15
to axonfr...@googlegroups.com
I found it in the Axon-quickstart please ignore the question,

         DbOperations dbOperations=new DbOperations(); // Datasource

JdbcEventStore jdbcEventStore=new JdbcEventStore(dbOperations); //EventStore

and the insertion logic is Hard-coded in
 public class GenericEventSqlSchema<T> implements EventSqlSchema<T>  Class

 final String sql = "INSERT INTO " + tableName
                + " (eventIdentifier, type, aggregateIdentifier, sequenceNumber, timeStamp, payloadType, "
                + "payloadRevision, payload, metaData) VALUES (?,?,?,?,?,?,?,?,?)";
Reply all
Reply to author
Forward
0 new messages