jsr352 icon indicating copy to clipboard operation
jsr352 copied to clipboard

removal of job artifacts

Open fcorneli opened this issue 10 years ago • 4 comments

This patch makes JobRepository injectable. It also makes removeJob and removeJobInstance to propagate down to the JDBC database.

fcorneli avatar Jun 24 '14 14:06 fcorneli

I need to look at how the JobRepository is used internally, but my initial thought is I don't like making it a public part of the API. Things like JobRepository.createStepExecution() should not be exposed. In fact we should find a way to make this not public at all.

I do think it's valid to have an API to remove batch jobs. I just think it needs to be a new API.

@chengfang Thoughts?

jamezp avatar Jun 24 '14 15:06 jamezp

@fcorneli many thanks for your thoughts and patches. Yes, we do need some administration mechanisms to delete certain past jobs. We have plan to support them via WildFly CLI or admin console. But as @jamezp mentioned, our current thinking is not to expose JobRepository as a public API, since this type of tasks belong to batch job administration rather than batch application developement.

chengfang avatar Jun 24 '14 15:06 chengfang

The JobRepository interface is indeed exposing much more than just the job repository artifact remove operations. How about introducing an interface that is limited to these job repository artifact remove operations, which JobRepository simply extends? Regarding the CLI/admin console integration, you need to expose such an interface from within JBeret somehow, no? In my view, job artifact removal is not 100% orthogonal to the batch application itself, i.e., the batch application might be in a much better position to decide which historical job artifacts can be safely removed compared to some devops admin.

fcorneli avatar Jun 26 '14 07:06 fcorneli

our current thinking is not to expose JobRepository as a public API, since this type of tasks belong to batch job administration rather than batch application developement

How about the Java SE runtime requirement set by the JSR 352? There you do not have any notion of 'batch job administration', i.e., no application server admin console or such.

fcorneli avatar Jul 02 '14 08:07 fcorneli