We at our organization use upgrade manager to upgrade from older release to newer release. internally this upgrade manager uses several migrators (each module/team has it's own migrator) to migrate from older release to newer.
The big pain is to debug these migrators, everyone escape their self from migrator issues because of this pain.
when we get customer issues, we try to reproduce them by simulating the migrator. to simulate the migrator we write the main method (in most of the migrators it's already written, we add it when we write that migrator) and call the migrator in that main method.
But for this we have to checkout the file write main method (if it's not there)and then call the class from cmd.
i was thinking of writing a small GUI app which simulates all this, so people can get rid of this pain.
Here are what issues i observed before start writing ::
1.> In the migrator we create db connection (we don't hardcode the connection but it automatically takes from the installation where we run the upgrade manager). so how do i will pass the hard coded connection from my app?
2.> in the GUI app i can give text fields where user can enter the migrator name and db details and in the backend i will create object of that migrator and call that migrator using main but:
what if that migrator already has a main method?
For your question 1: You may want to look into a properties file putting in the DB connection stuff and when program runs, read the values and make the JDBC url accordingly.
For your Q2: what's the difference between the original main and the one you write? Does modifying the original main needed in order to "debug" the application?
K. Tsang CEng MBCS PMP PMI-ACP OCMJEA OCPJP
A "dutch baby" is not a baby. But this tiny ad is baby sized:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth