How to migrate Oracle Coherence applications to Hazelcast
If you think about migrating your Oracle Coherence to Hazelcast for whatever reason we may have something to make this process a little less painful.
First of all, go ahead and read the excellent introduction to the migration process prepared by Hazelcast: Oracle Coherence to Hazelcast Migration Guide.
Then, if your Coherence application is based on XML configuration, the migration can be partially automated using our small Oracle Coherence to Hazelcast configuration migration tool which is now available open source on github.
Our cohe2hazel project tries to transform the Coherence operational and the cache configuration files to the hazelcast.xml (hazelcast-config-3.6) configuration file using XSLT processor. This may be useful when you need to generate the initial version of configuration files for the new cache system which you can then further amend and customize. You can also use this tool in quick PoC projects to demonstrate ability to run your existing Coherence project on Hazelcast.
During the transformation, the Coherence operational config file is transformed to the Hazelcast network section and the Coherence cache config file to the Hazelcast map section. This transformation is especially helpful when your cache configuration contains a lot of cache definitions (also parameterized ones).
Now the magic happens
Usage:
java -jar cohe2hazel-1.0-SNAPSHOT.jar ${cache}.xml ${operational}.xml
Sample parameters:
java -jar cohe2hazel-1.0-SNAPSHOT.jar coherence-cache.xml tangosol-coherence.xml
Output: Generated output.xml file is a base for main Hazelcast configuration.
The tool performs three operations:
- Transforms Coherence operational xml and creates network.xml as an output.
- Transforms Coherence cache xml and creates cache.xml as an output
- Merges previously created xml files into a single output.xml.
Generated output.xml file is a base for main Hazelcast configuration.
For more information, please refer to Hazelcast documentation – configuration section.
Obviously, some limitations apply. Currently, as the API is different in both products it is not possible to automatically migrate the whole configuration, so please be aware that the configuration will be migrated in limited scope only.
You can find more on requirements, limitations and practical use in our github repo.
Migrating your Coherence application to Hazelcast now?
If you are interested in any changes to this tool or our experience in migrating Oracle Coherence projects to Hazelcast you may read more about our Hazelcast Development services.
Related Posts
Thank you for taking the time to read our blog post!