Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

To run the migrator with a custom marshaller using a whitelist, follow these steps:

  1. Define the whitelist of entities that should be migrated by creating a file whitelist.txt that contains the fully-qualified class names of the entities to be migrated, one per line.

  2. Implement a custom marshaller that can handle the entities you want to migrate. For example, you can create a class MyMarshaller that implements the Marshaller interface and overrides the marshall and unmarshall methods as necessary.

  3. Create a configuration file for the migrator. The configuration file should specify the source and destination databases, the custom marshaller, and the whitelist. Here's an example configuration file:

sourceDbUrl=jdbc:mysql://localhost:3306/source
sourceDbUser=root
sourceDbPassword=

destDbUrl=jdbc:mysql://localhost:3306/dest
destDbUser=root
destDbPassword=

marshaller=com.example.MyMarshaller

whitelistPath=/path/to/whitelist.txt
  1. Run the migrator with the configuration file:
java -jar migrator.jar /path/to/config.properties

This will migrate the entities specified in the whitelist using your custom marshaller.