Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

isses in writing a small debug application

 
Ranch Hand
Posts: 1143
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear All,

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?

Let me know if it looks confusing?

Thanks,
Punit



 
Bartender
Posts: 3648
16
Android Mac OS X Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
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
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic