Technical Blog Post
How do you change the messaging engine's file store to a data store?
You may have been assigned the task to change your messaging engine message store configuration so that it uses a data store instead of a file store. There are several steps you need to follow in order to ensure the process goes smoothly. There is a lot of documentation out there that talks about creating the data store, but what are the steps to replace your existing messaging engine configuration if you are already using one type of store and want to modify it?
You cannot directly modify the messaging engine configuration to use a different type of store. The correct way to do this is to remove and readd the bus members.
I have outlined the steps to achieve this type of change. Before proceeding, you will need your database/schema name created that will host the messaging engine tables, and you will also need your data source provider and jdbc data source jndi names that you defin within the WebSphere console. Additionally, you will need to define your authentication alias in the WebSphere console as well. You can reference the following document for more information on what is needed to prepare the data store.
Now that we have a data source provider, a data source and authentication alias, and an empty database/schema, we are ready to make the changes.
1. The first step is to navigate to your bus that hosts the messaging engine you want to modify, for example, intjmsbus
2. Click on Destinations. Delete all manually defined destinations (for example: cqinbd, cqinbderr, sqinbd and sqoutbd) You will not be able to delete destinations that WebSphere defined automatically so they can be ignored.
3. Save and synchronize your nodes.
4. The next step is to navigate to your bus members.
5. Remove your bus member (this will delete your messaging engine)
6. Save and synchronize your nodes.
7. Now we need to add the bus member again. It is at this time that the messaging engine store configuration page is presented.
8. Ensure you select "Data Store" and enter the jndi name of your jdbc data source, schema name, and authentication alias that the messaging engine will use for the message store.
9. Save and sychronize your nodes.
10. Recreate your destinations exactly as they existed before, including case. (for example: cqinbd, cqinbderr, sqinbd and sqoutbd)
11. Save and Sychronize your nodes.
12. The next step is to navigate in your WebSphere console to Resources/JMS/Queues
13. For each queue, ensure that they are pointing to the corresponding bus destination (this step is necessary in case the above destinations were not created exactly as they were before). Correct any destination names in the corresponding dropdown if necessary.
15. Save and Sychronize your nodes.
16. Restart the application server (this will initialize the messaging engine and create the data store tables in the database/schema provided for the messaging engine data store).
For any problems starting the messaging engine when the final server restart takes place, the best thing to do is restart the server and then observe messaging engine log entries in the SystemOut.log from the beginning of the startup until failure is seen. These will be most useful for IBM Support to assist quickly.