git-tfs-id: [http://tfs.userrendszerhaz.hu:8080/tfs/DefaultCollection]$/MediaCube...
authorSweidan Omar <TFS\sweidan.omar>
Fri, 10 Dec 2021 10:16:35 +0000 (10:16 +0000)
committerSweidan Omar <TFS\sweidan.omar>
Fri, 10 Dec 2021 10:16:35 +0000 (10:16 +0000)
server/user.jobengine.osgi.server/src/user/jobengine/server/JobEngineConfiguration.java

index dc591b012dd235db0baa4c91c427784d3c4165ba..af0aa58293975d6682cef69a4c729a0f603f9a35 100644 (file)
@@ -74,9 +74,9 @@ public class JobEngineConfiguration implements IJobEngineConfiguration {
                Set<File> libFiles = getJavaFileList(Paths.get(stepsDir), null);\r
                libFiles.addAll(sharedFiles);\r
 \r
-               //              for (File f : libFiles) {\r
-               //                      logger.info("GroovyClassLoader source {}", f.getAbsolutePath());\r
-               //              }\r
+               // for (File f : libFiles) {\r
+               // logger.info("GroovyClassLoader source {}", f.getAbsolutePath());\r
+               // }\r
 \r
                GroovyClassLoader gcl = new GroovyClassLoader(stepsClassLoader) {\r
 \r
@@ -84,8 +84,8 @@ public class JobEngineConfiguration implements IJobEngineConfiguration {
                        protected CompilationUnit createCompilationUnit(CompilerConfiguration config, CodeSource source) {\r
                                CompilationUnit result = new CompilationUnit(config, source, this);\r
                                libFiles.forEach(f -> result.addSource(f));\r
-                               //loadStepSources(result, Paths.get(stepsDir, "shared"));\r
-                               //loadStepSources(result, Paths.get(stepsDir));\r
+                               // loadStepSources(result, Paths.get(stepsDir, "shared"));\r
+                               // loadStepSources(result, Paths.get(stepsDir));\r
                                return result;\r
                        }\r
 \r
@@ -151,7 +151,7 @@ public class JobEngineConfiguration implements IJobEngineConfiguration {
                        URL[] urls = { path.toUri().toURL() };\r
                        stepsClassLoader = URLClassLoader.newInstance(urls, Thread.currentThread().getContextClassLoader());\r
                } catch (FileNotFoundException e) {\r
-                       //nincs jobs/classes mappa\r
+                       // nincs jobs/classes mappa\r
                        URL[] urls = {};\r
                        stepsClassLoader = URLClassLoader.newInstance(urls, Thread.currentThread().getContextClassLoader());\r
                }\r
@@ -253,9 +253,10 @@ public class JobEngineConfiguration implements IJobEngineConfiguration {
                Path path = Paths.get(stepsDir, className);\r
                File classFile = null;\r
 \r
-               //Windows alatt az eleresi utak irasmodja egyforma kell legyen.\r
-               //A GroovyClassLoader\r
-               //ld. createGroovyClassLoader a new File(path.toFile().getCanonicalPath())-al operal.\r
+               // Windows alatt az eleresi utak irasmodja egyforma kell legyen.\r
+               // A GroovyClassLoader\r
+               // ld. createGroovyClassLoader a new File(path.toFile().getCanonicalPath())-al\r
+               // operal.\r
                classFile = new File(path.toFile().getCanonicalPath());\r
                logger.info("Class path is normalized to {}", classFile.getCanonicalPath());\r
 \r
@@ -285,11 +286,11 @@ public class JobEngineConfiguration implements IJobEngineConfiguration {
                                        if (!executors.containsKey(unitName)) {\r
                                                logger.info("Executor now registered for {}", unitName);\r
                                                executors.put(unitName, executor);\r
-                                               //az uj vegrehajtokat el is kell inditani\r
+                                               // az uj vegrehajtokat el is kell inditani\r
                                                if (autoStart)\r
                                                        executor.startup();\r
                                        } else {\r
-                                               //logger.info("Executor already registered for {}", unitName);\r
+                                               // logger.info("Executor already registered for {}", unitName);\r
                                                IJobStepExecutor stepExecutor = executors.get(unitName);\r
                                                int currentMaxConcurrent = stepExecutor.getMaxConcurrent();\r
                                                int newMaxConcurrent = executor.getMaxConcurrent();\r
@@ -316,7 +317,7 @@ public class JobEngineConfiguration implements IJobEngineConfiguration {
        @Override\r
        public void loadSchedules() throws Exception {\r
 \r
-               //a kulcs nem lehet a template, mert kulonbozo parameterekkel is benne lehet!\r
+               // a kulcs nem lehet a template, mert kulonbozo parameterekkel is benne lehet!\r
                schedules.clear();\r
                String configFilePath = systemConfig.getConfig(JobEngineConfiguration.CONF_SCHEDULES);\r
                logger.info("Loading scheduler configuration file {}", configFilePath);\r
@@ -353,8 +354,9 @@ public class JobEngineConfiguration implements IJobEngineConfiguration {
 \r
                                        try {\r
                                                if (add) {\r
-                                                       //ha a betoltendo osztaly eleresi utja korabban mas kapitalissal kerul feldolgozasra, hibat kapunk\r
-                                                       //ld. loadClassFromSourceCode\r
+                                                       // ha a betoltendo osztaly eleresi utja korabban mas kapitalissal kerul\r
+                                                       // feldolgozasra, hibat kapunk\r
+                                                       // ld. loadClassFromSourceCode\r
                                                        File classFile = new File(p.toFile().getCanonicalPath());\r
                                                        result.add(classFile);\r
                                                }\r
@@ -373,9 +375,9 @@ public class JobEngineConfiguration implements IJobEngineConfiguration {
        private void loadTemplate(Path config) {\r
                InputStream stream = null;\r
                try {\r
-                       //                      byte[] xmlBytes = Files.readAllBytes(config);\r
-                       //                      String xml = new String(xmlBytes);\r
-                       //                      stream = new ByteArrayInputStream(xmlBytes);\r
+                       // byte[] xmlBytes = Files.readAllBytes(config);\r
+                       // String xml = new String(xmlBytes);\r
+                       // stream = new ByteArrayInputStream(xmlBytes);\r
                        stream = Files.newInputStream(config);\r
                        String fileName = config.getFileName().toString();\r
                        Parser parser = new Parser(stream);\r