Working with the Persister_jdbc_mysql Project
The Persister_jdbc_mysql project contains several processes that show how to use TIBCO ActiveMatrix BusinessWorks Plug-in for ActiveSpaces to persist data in a MySQL database.
The Action.bwp process waits for the PersisterReceiver activity in the Process.bwp process to initialize, and then stores and queries tuples in the space. The process is designed with the following activities:
The following table describes the activities in this process:
The Process.bwp process receives requests from different actions of the PersisterReceiver activity and calls the corresponding subprocesses to process these requests. The process is designed with the following activities:
The following table describes the activities in this process:
The subprocesses are called based on the different actions types being used:
- OpenAction.bwp Process
- The
OpenAction.bwp process is called when the action type for the persister event listener is
OpenAction. This subprocess connects to a MySQL database. The subprocess is designed with the following activities:
The following table describes the activities in this subprocess:
- LoadAction.bwp Process
- The
LoadAction.bwp process is called when the action type for the persister event listener is
LoadAction. This subprocess queries all the tuples stored in the database. Additionally, this subprocess puts existing tuples in the database into the space of TIBCO ActiveSpaces. The subprocess is designed with the following activities:
The following table describes the activities in this subprocess:
- ReadAction.bwp Process
- The
ReadAction.bwp process is called when the action type for the persister event listener is
ReadAction. This subprocess queries whether the same tuples exist in the database. The subprocess is designed with the following activities:
The following table describes the activities in this subprocess:
- WriteAction.bwp Process
- The
WriteAction.bwp process is called when the action type for the persister event listener is WriteAction. This subprocess stores, updates, and deletes the tuples in the database. The subprocess is designed with the following activities:
The following table describes the activities in this subprocess:
Activity Description Start Starts the process. JDBCQuery Queries whether a tuple exists in the database. JDBC-Update Updates the tuple if the tuple being queried exists in the database. JDBC-Insert Inserts a tuple into the database if the tuple being queried does not exist in the database. JDBC-Delete Deletes a tuple if the tuple exists in the database. End Ends the process.
- AlterAction.bwp Process
- The
AlterAction.bwp process is called when the action type for the persister event listener is
AlterAction. This subprocess writes a message in the
persister_alter.log file. The subprocess is designed with the following activities:
The following table describes the activities in this subprocess:
- CloseAction.bwp Process
- The
CloseAction.bwp process is called when the action type for the persister event listener is
CloseAction. This subprocess writes a message in the
persister_close.log file. The subprocess is designed with the following activities:
The following table describes the activities in this subprocess:
- Running the Persister_jdbc_mysql Project
You can run the processes in the Persister_jdbc_mysql project to see how to persist data in the MySQL database.