Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't enable Mysql in EventStoreProvider #33

Open
xxRockOnxx opened this issue May 8, 2019 · 1 comment
Open

Can't enable Mysql in EventStoreProvider #33

xxRockOnxx opened this issue May 8, 2019 · 1 comment

Comments

@xxRockOnxx
Copy link

I tried setting FOR_MYSQL to true and FOR_LEVELDB to false but the test would not proceed because of null exception.

If you trace these lines:

The instance is not initialized.

I tried putting mysqlJdbcEventStore before followStoreEventDispatcher in applicationContext-collaboration.xml so that the mysql is initialized first but it's not working also.

I am not a java guy so I dont actually know what's happening.

I would like to try MySQL instead of LevelDB.

@xxRockOnxx
Copy link
Author

I managed to find a solution but again however, I am not a java guy. In the applicationContext-collaboration.xml, I added an attribute to some beans:

<bean id="forumRepository" class="com.saasovation.collaboration.port.adapter.persistence.repository.EventStoreForumRepository" depends-on="mysqlJdbcEventStore" />

<bean id="mysqlJdbcEventStore" class="com.saasovation.common.port.adapter.persistence.eventsourcing.mysql.MySQLJDBCEventStore" depends-on="collaborationDataSource" >

Good thing the Spring used here is v3 which is when the depends-on attribute becomes available according to: https://stackoverflow.com/a/7868418/10975709

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant