Persisting the process data
This section will explain how you can persist the process data to the data store. We are using MySQL as the data store for storing the processed data in this use case.
We will assume that you have MySQL installed on your CentOS machine, or you can follow the blog at http://www.rackspace.com/knowledge_center/article/installing-mysql-server-on-centos to install MySQL on a CentOS machine. Let's perform the following steps to persist records to MySQL:
- Add the following dependency to the
pom.xmlfile of the
<dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>5.1.6</version> </dependency>
- We will create a
MySQLConnectionclass in the