Skip to content

Instantly share code, notes, and snippets.

View k2sd's full-sized avatar

k2sd

  • Fujitsu Limited
View GitHub Profile
@k2sd
k2sd / LimitListSize_batchCli.patch
Created October 28, 2016 08:27
Limits list length of list-batch-jobs/list-batch-job-executions by setting a system property.
Index: ListBatchJobExecutions.java
===================================================================
--- ListBatchJobExecutions.java (revision 64309)
+++ ListBatchJobExecutions.java (working copy)
@@ -138,25 +138,54 @@
}
} else {
JobOperator jobOperator = getJobOperatorFromBatchRuntime();
- Set<String> jobNames = jobOperator.getJobNames();
- if (jobNames != null) {
@k2sd
k2sd / AbstractListCommandProxy.java.patch
Last active December 16, 2016 06:01
For fixing NPE msg on jbatch cli command.
Index: AbstractListCommandProxy.java
===================================================================
--- AbstractListCommandProxy.java (revision 64309)
+++ AbstractListCommandProxy.java (working copy)
@@ -54,6 +54,8 @@ import org.glassfish.internal.api.Target;
import org.jvnet.hk2.annotations.Service;
import javax.inject.Inject;
+
+import java.util.List;
@k2sd
k2sd / batchcli.patch
Created September 20, 2016 07:38
asadmin list-batch-jobs/list-batch-job-executions (with long option): quick patch to improve 20% -- 30% on listing speed
Index: appserver/batch/glassfish-batch-commands/src/main/java/org/glassfish/batch/ListBatchJobExecutions.java
===================================================================
--- appserver/batch/glassfish-batch-commands/src/main/java/org/glassfish/batch/ListBatchJobExecutions.java (revision 64298)
+++ appserver/batch/glassfish-batch-commands/src/main/java/org/glassfish/batch/ListBatchJobExecutions.java (working copy)
@@ -51,8 +51,11 @@
import org.jvnet.hk2.annotations.Service;
import javax.batch.operations.*;
+import javax.batch.runtime.BatchStatus;
import javax.batch.runtime.JobExecution;