If you want to change your datasource use from singleDS to multiDS this is the right guide for you.
Before starting following this guides steps, ReVO cannot be running because it would invalidate the procedure by locking the update of MDA project files.
Step 1
Update the following files setting the property "multiDatasourceFlag" to true:
- MDA/core/ProductAssembler.xml
- MDA/project.xml
Use the files named with "multiRegion" as templates.
Step 2
Open ReVO and regenerate everything (excluding "Flows" if you don't need them).
Step 3
Open Eclipse and update your workspace. Now comes the fun part!
Step 4.1
Based on your "standalone-full.xml" configuration you should update the "hibernate.cfg.dsX.xml" files, where the X are the number of datasources to which you will connect. If you connect to 3 datasources you should update the files containing: ds1, ds2 and ds3 in the name.
Step 4.2
To activate the use of the modified hibernate.cfg.dsX.xml files, you need to update:
- MDA/core/multiDataSource.properties
- MDA/core/multiDataSourceDMMapping.properties
Step 4.3
Update the file "PRJ_Configuration/src/applicationCoreContext.xml" changing the beans' "sessionFactoryManager" class property to "it.genesys.revo.framework.core.multidatasource.SessionFactoryManagerMultiDS".
Step 5
Clean your temporary files in the JBoss/WildFly server, update the configuration with the script.
Step 6
Start server from Eclipse.
Enjoy!
The same steps are to be used when creating a custom pack for a deploy in a clients' environment, just without Eclipse and setting the right flags in LEM. The configuration files (not ProductAssembler.xml and project.xml) have to be modified by the custom script.