|
[
Permlink
| « Hide
]
Robert Kasanicky added a comment - 29/Feb/08 02:58 AM
CommandLineJobRunner now requires just single xml file argument, samples modified to use import statement (and removed parent context loading from test launcher)
I don't think this is a good approach. It's much friendlier to the command line runner, but less friendly to any launch environment that only needs to concern itself with the job and not with execution environment. In this case, it forces the user to keep two different job configurations for normal run and restart if they use any type of application container for scheduled launches.
e.g. suppose you have XML file "A" containing only the job definition bean "job-A" and does not import anything, since your application container looks up the execution environment (somehow) and keeps it in memory. Now suppose "job-A" fails, so you need to perform a restart from the command line. You would need to create an alternate version of "A" containing an appropriate import statement or you need to create a configuration "B" to link "A" to the execution environment (ala the test contexts in samples). Either way you now have double the configuration files. This also makes it much more difficult to switch between environments for testing. e.g. suppose you have one execution environment that uses the database and one that does not that is used for unit testing. You would need to create two versions of every job configuration if you use the 'import' strategy, one to import each version of the environment. I think the ability to swap environments between invocations is too powerful to lose. We haven't lost it. All the samples are still runnable as a single pair of imports (as per the unit tests), or as a standalone job configuration context (as per the JMX demo - which admittedly is not exhaustively testing all the samples, but the principle is there).
My point is that it becomes cumbersome to create contexts for every permutation of your runtime environment. I'm going to create a forum issue to discuss this some time today - I'll post back the link when I've created the thread.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||