ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject [1/2] ignite git commit: IGNITE-1749 Fixed secret props usage.
Date Mon, 02 Nov 2015 08:54:33 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-843-rc1 5825ff704 -> f3254009f


IGNITE-1749 Fixed secret props usage.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/e03d39be
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/e03d39be
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/e03d39be

Branch: refs/heads/ignite-843-rc1
Commit: e03d39be097c9aad20bfc2c567b189efeef5ba0e
Parents: c880bd9
Author: vsisko <vsisko@gridgain.com>
Authored: Mon Nov 2 15:54:22 2015 +0700
Committer: Alexey Kuznetsov <akuznetsov@apache.org>
Committed: Mon Nov 2 15:54:22 2015 +0700

----------------------------------------------------------------------
 .../main/js/routes/generator/generator-java.js  | 22 +++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/e03d39be/modules/control-center-web/src/main/js/routes/generator/generator-java.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/routes/generator/generator-java.js b/modules/control-center-web/src/main/js/routes/generator/generator-java.js
index 562288a..74d76d1 100644
--- a/modules/control-center-web/src/main/js/routes/generator/generator-java.js
+++ b/modules/control-center-web/src/main/js/routes/generator/generator-java.js
@@ -1758,10 +1758,30 @@ $generatorJava.cluster = function (cluster, javaClass, clientNearCfg)
{
             res.startBlock('public static IgniteConfiguration createConfiguration() throws
Exception {');
         }
 
-        if (res.datasources.length > 0 || cluster.sslEnabled) {
+        var haveDS = _.findIndex(cluster.caches, function(cache) {
+            if (cache.cacheStoreFactory && cache.cacheStoreFactory.kind) {
+                var factory = cache.cacheStoreFactory[cache.cacheStoreFactory.kind];
+
+                if (factory && factory.dialect)
+                    return true;
+            }
+
+            return false;
+        }) >= 0;
+
+        if (haveDS || cluster.sslEnabled) {
             res.line(res.importClass('java.net.URL') + ' res = IgniteConfiguration.class.getResource("/secret.properties");');
+
+            res.needEmptyLine = true;
+
             res.line(res.importClass('java.io.File') + ' propsFile = new File(res.toURI());');
+
+            res.needEmptyLine = true;
+
             res.line(res.importClass('java.util.Properties') + ' props = new Properties();');
+
+            res.needEmptyLine = true;
+
             res.startBlock('try (' + res.importClass('java.io.InputStream') + ' in = new
' + res.importClass('java.io.FileInputStream') + '(propsFile)) {');
             res.line('props.load(in);');
             res.endBlock('}');


Mime
View raw message