-
1. Re: Executing batch jobs (JSR 352) in a non HA WildFly (full-profile) cluster
jamezp Jul 2, 2014 9:30 PM (in response to damzgaard)1 of 1 people found this helpfulI don't believe batch is currently supported in a cluster. I know there was at least nothing special done at this point. It has been discussed, but that's as far as it's gone at this point.
--
James R. Perkins -
2. Re: Executing batch jobs (JSR 352) in a non HA WildFly (full-profile) cluster
damzgaard Jul 4, 2014 2:22 AM (in response to jamezp)Hi James,
Thank for the information.
I have done some investigations on my own and I currently see two issues with the implementation as it is in 8.1:
- Batch jobs are not loaded from the META-INF/batch-jobs directory at launch time nor at first access to the BatchRuntime.getJobOperator()
- Batch job repository is not loaded from the database at launch time nor at the first access to the BatchRuntime.getJobOperator()
Both issues are somewhat related and makes it hard to monitor the system since it will report no batch job know after a restart of the JVM - i.e. how can one know that a batch job is failed if it is not listed at all after a JVM restart?
Am I getting things wrong here?
Best regards
Christian
-
3. Re: Executing batch jobs (JSR 352) in a non HA WildFly (full-profile) cluster
fcorneli Jul 4, 2014 6:54 AM (in response to damzgaard)1 of 1 people found this helpfulHi Christian,
I've stumbled upon the same 'issue'. According to the JSR352 specs for JobOperator.getJobNames:
"Returns a set of all job names known to the batch runtime."
The rationale behind this behavior (in JBeret) is that the batch runtime only knows about jobs once it has started one. However, via for example JobOperator.getJobInstances you can always query for job instances/executions, even while getJobNames still gives you an empty set. So within your monitoring you need to know about the job names in advance.
Kind Regards,
Frank. -
4. Re: Executing batch jobs (JSR 352) in a non HA WildFly (full-profile) cluster
damzgaard Jul 7, 2014 2:54 AM (in response to fcorneli)Hi Frank,
Thank you for your input - I'll look into the usage of getJobInstances instead.
I reoccn that the reason for the BatchRuntime not to discover the batch job files are that there is no Java API for listing content of the classpath without parsing the .jar file using the .zip file API.
Using the META-INF/INDEX.LIST file could be an option to detect the batch files automatically, but unfortunately the Maven archiver plug-in in broken in this area http://jira.codehaus.org/browse/MASSEMBLY-657 and not likely to be fixed any time soon since it was reported over an year ago.
Best regards
Christian