ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ivasilin...@apache.org
Subject [3/3] incubator-ignite git commit: #ignite-964: java7 js cache is working
Date Fri, 10 Jul 2015 14:51:50 GMT
#ignite-964: java7 js cache is working


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

Branch: refs/heads/ignite-964
Commit: 4e4547a9e7114a6a376298010a53f3a81cc7083e
Parents: b19536b
Author: ivasilinets <ivasilinets@gridgain.com>
Authored: Fri Jul 10 17:51:40 2015 +0300
Committer: ivasilinets <ivasilinets@gridgain.com>
Committed: Fri Jul 10 17:51:40 2015 +0300

----------------------------------------------------------------------
 .../processors/rest/GridRestProcessor.java      |  5 +-
 .../IgniteScriptingCommandHandler.java          |  6 +-
 .../scripting/IgniteScriptingProcessor.java     | 86 +++++++++++++++++++-
 .../scripting/ScriptingCacheEntry.java          | 57 -------------
 .../processors/scripting/ScriptingJSIgnite.java |  5 +-
 .../processors/scripting/ScriptingJsCache.java  | 15 ++--
 .../scripting/ScriptingObjectConverter.java     |  2 +-
 .../ScriptingObjectConverter8.java              | 24 ++++++
 .../http/jetty/GridJettyRestHandler.java        | 44 +++++-----
 .../http/jetty/GridJettyRestProtocol.java       |  2 +-
 10 files changed, 148 insertions(+), 98 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4e4547a9/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/GridRestProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/GridRestProcessor.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/GridRestProcessor.java
index df2304a..e387f98 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/GridRestProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/GridRestProcessor.java
@@ -248,7 +248,7 @@ public class GridRestProcessor extends GridProcessorAdapter {
     }
 
     /** {@inheritDoc} */
-    @Override public void start() throws IgniteCheckedException {
+    @Override public void onKernalStart() throws IgniteCheckedException {
         if (isRestEnabled()) {
             // Start protocols.
             startTcpProtocol();
@@ -273,10 +273,7 @@ public class GridRestProcessor extends GridProcessorAdapter {
                 }
             }
         }
-    }
 
-    /** {@inheritDoc} */
-    @Override public void onKernalStart() throws IgniteCheckedException {
         if (isRestEnabled()) {
             for (GridRestProtocol proto : protos)
                 proto.onKernalStart();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4e4547a9/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/scripting/IgniteScriptingCommandHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/scripting/IgniteScriptingCommandHandler.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/scripting/IgniteScriptingCommandHandler.java
index 2d0a06e..21381f1 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/scripting/IgniteScriptingCommandHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/scripting/IgniteScriptingCommandHandler.java
@@ -28,7 +28,6 @@ import org.apache.ignite.internal.processors.scripting.*;
 import org.apache.ignite.internal.util.future.*;
 import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
-import org.apache.ignite.json.*;
 import org.apache.ignite.lang.*;
 import org.apache.ignite.resources.*;
 import org.jetbrains.annotations.*;
@@ -214,8 +213,9 @@ public class IgniteScriptingCommandHandler extends GridRestCommandHandlerAdapter
         public JsCallFunctionJob(String func, Object argv) {
             this.func = func;
 
-            this.argv = ScriptingObjectConverter8.convertToRestObject(
-                JSONCacheObject.toSimpleObject(argv));
+            IgniteScriptingProcessor proc = ((IgniteKernal) ignite).context().scripting();
+
+            this.argv = proc.toScriptingObject(proc.toJavaObject(argv));
         }
 
         /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4e4547a9/modules/core/src/main/java/org/apache/ignite/internal/processors/scripting/IgniteScriptingProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/scripting/IgniteScriptingProcessor.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/scripting/IgniteScriptingProcessor.java
index 9ff89e2..e5eba31 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/scripting/IgniteScriptingProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/scripting/IgniteScriptingProcessor.java
@@ -32,7 +32,7 @@ import static javax.script.ScriptContext.*;
  */
 public class IgniteScriptingProcessor extends GridProcessorAdapter {
     /** Javascript engine name. */
-    public static final String JAVA_SCRIPT_ENGINE_NAME = "javascript";
+    public static final String JAVA_SCRIPT_ENGINE_NAME = "rhino";
 
     /** Java8 scripting converter class. */
     private static final String CONV_CLS_JAVA8 =
@@ -59,8 +59,10 @@ public class IgniteScriptingProcessor extends GridProcessorAdapter {
             Constructor<?> ctor = cls.getConstructor(GridKernalContext.class);
 
             converter = (ScriptingObjectConverter)ctor.newInstance(ctx);
+            System.out.println("JDK 8 is found!!!!");
         }
         catch (ClassNotFoundException ignored) {
+            System.out.println("JDK 8 is not found!!!!");
             converter = new ScriptingObjectConverter();
         }
         catch (NoSuchMethodException | InvocationTargetException | InstantiationException
| IllegalAccessException e) {
@@ -69,7 +71,9 @@ public class IgniteScriptingProcessor extends GridProcessorAdapter {
 
         ScriptEngineManager factory = new ScriptEngineManager();
 
+        System.out.println("ENGINE!!!!");
         jsEngine = factory.getEngineByName(JAVA_SCRIPT_ENGINE_NAME);
+        System.out.println("ENGINE FOUND!!!!");
 
         addBinding("ignite", new ScriptingJSIgnite(ctx.grid()));
 
@@ -183,4 +187,84 @@ public class IgniteScriptingProcessor extends GridProcessorAdapter {
     public Object toJavaObject(Object o) {
         return converter.toJavaObject(o);
     }
+
+    /**
+     * @param o Object from script.
+     * @return Object to store in cache.
+     */
+    public Object getField(String key, Object o) {
+        return converter.getField(key, o);
+    }
+
+    /**
+     * @param o Object from script.
+     * @return Object to store in cache.
+     */
+    public Object getFields(Object o) {
+        return converter.getFields(o);
+    }
+
+    /**
+     * @param key Key.
+     * @param val Value.
+     * @return Scripting entry.
+     */
+    public Object createScriptingEntry(Object key, Object val) {
+        return new ScriptingCacheEntry(getFields(key), getFields(val));
+    }
+
+    /**
+     * Scripting cache entry.
+     */
+    public static class ScriptingCacheEntry {
+        /** Key. */
+        private Object key;
+
+        /** Value. */
+        private Object val;
+
+        /**
+         * @param key Key.
+         * @param val Value.
+         */
+        public ScriptingCacheEntry(Object key, Object val) {
+            if (key instanceof ScriptingObjectConverter)
+                this.key = key;
+            else
+                this.key = key;
+
+            if (val instanceof ScriptingObjectConverter)
+                this.val = val;
+            else
+                this.val = val;
+        }
+
+        /**
+         * @return Key.
+         */
+        public Object getKey() {
+            return key;
+        }
+
+        /**
+         * @param key Key.
+         */
+        public void setKey(Object key) {
+            this.key = key;
+        }
+
+        /**
+         * @return Value.
+         */
+        public Object getValue() {
+            return val;
+        }
+
+        /**
+         * @param val Value.
+         */
+        public void setValue(Object val) {
+            this.val = val;
+        }
+    }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4e4547a9/modules/core/src/main/java/org/apache/ignite/internal/processors/scripting/ScriptingCacheEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/scripting/ScriptingCacheEntry.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/scripting/ScriptingCacheEntry.java
deleted file mode 100644
index adb43d1..0000000
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/scripting/ScriptingCacheEntry.java
+++ /dev/null
@@ -1,57 +0,0 @@
-package org.apache.ignite.internal.processors.scripting;
-
-
-/**
- * Scripting cache entry.
- */
-public class ScriptingCacheEntry {
-    /** Key. */
-    private Object key;
-
-    /** Value. */
-    private Object val;
-
-    /**
-     * @param key Key.
-     * @param val Value.
-     */
-    public ScriptingCacheEntry(Object key, Object val) {
-        if (key instanceof ScriptingObjectConverter)
-            this.key = ((ScriptingObjectConverter)key).getFields();
-        else
-            this.key = key;
-
-        if (val instanceof ScriptingObjectConverter)
-            this.val = ((ScriptingObjectConverter)val).getFields();
-        else
-            this.val = val;
-    }
-
-    /**
-     * @return Key.
-     */
-    public Object getKey() {
-        return key;
-    }
-
-    /**
-     * @param key Key.
-     */
-    public void setKey(Object key) {
-        this.key = key;
-    }
-
-    /**
-     * @return Value.
-     */
-    public Object getValue() {
-        return val;
-    }
-
-    /**
-     * @param val Value.
-     */
-    public void setValue(Object val) {
-        this.val = val;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4e4547a9/modules/core/src/main/java/org/apache/ignite/internal/processors/scripting/ScriptingJSIgnite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/scripting/ScriptingJSIgnite.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/scripting/ScriptingJSIgnite.java
index 1c89318..a10d1e5 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/scripting/ScriptingJSIgnite.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/scripting/ScriptingJSIgnite.java
@@ -18,6 +18,7 @@
 package org.apache.ignite.internal.processors.scripting;
 
 import org.apache.ignite.*;
+import org.apache.ignite.internal.*;
 
 /**
  * Node js ignite.
@@ -38,7 +39,7 @@ public class ScriptingJSIgnite {
      * @return Node js cache.
      */
     public ScriptingJsCache cache(String cache) {
-        return new ScriptingJsCache(ignite.cache(cache));
+        return new ScriptingJsCache(ignite.cache(cache), ((IgniteKernal)ignite).context().scripting());
     }
 
     /**
@@ -46,7 +47,7 @@ public class ScriptingJSIgnite {
      * @return Node js cache.
      */
     public ScriptingJsCache getOrCreateCache(String cache) {
-        return new ScriptingJsCache(ignite.getOrCreateCache(cache));
+        return new ScriptingJsCache(ignite.getOrCreateCache(cache), ((IgniteKernal)ignite).context().scripting());
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4e4547a9/modules/core/src/main/java/org/apache/ignite/internal/processors/scripting/ScriptingJsCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/scripting/ScriptingJsCache.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/scripting/ScriptingJsCache.java
index ce3975f..e6c271c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/scripting/ScriptingJsCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/scripting/ScriptingJsCache.java
@@ -34,9 +34,11 @@ public class ScriptingJsCache {
 
     /**
      * @param cache Ignite cache.
+     * @param proc Ignite scripting processor.
      */
     public ScriptingJsCache(IgniteCache cache, IgniteScriptingProcessor proc) {
         this.cache = cache;
+        this.proc = proc;
     }
 
     /**
@@ -83,16 +85,15 @@ public class ScriptingJsCache {
      * @param keys Keys.
      * @return Cache entries.
      */
-    public List<ScriptingCacheEntry> getAll(List keys) {
+    public List<Object> getAll(List keys) {
         List cacheKeys = (List)proc.toJavaObject(keys);
 
         Map<Object, Object> entries = cache.getAll(new HashSet<>(cacheKeys));
 
-        List<ScriptingCacheEntry> res = new ArrayList<>();
+        List<Object> res = new ArrayList<>();
 
         for (Map.Entry<Object, Object> e : entries.entrySet())
-            res.add(new ScriptingCacheEntry(
-                proc.toScriptingObject(e.getKey()),
+            res.add(proc.createScriptingEntry(proc.toScriptingObject(e.getKey()),
                 proc.toScriptingObject(e.getValue())));
 
         return res;
@@ -115,10 +116,8 @@ public class ScriptingJsCache {
 
         Map<Object, Object> cacheEntries = U.newHashMap(entries.size());
 
-        for (Object e : cacheKeys) {
-            JSONCacheObject e0 = (JSONCacheObject)e;
-            cacheEntries.put(e0.getField("key"), e0.getField("value"));
-        }
+        for (Object e : cacheKeys)
+            cacheEntries.put(proc.getField("key", e), proc.getField("value", e));
 
         cache.putAll(cacheEntries);
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4e4547a9/modules/core/src/main/java/org/apache/ignite/internal/processors/scripting/ScriptingObjectConverter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/scripting/ScriptingObjectConverter.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/scripting/ScriptingObjectConverter.java
index 7e2758b..d5c6dfd 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/scripting/ScriptingObjectConverter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/scripting/ScriptingObjectConverter.java
@@ -54,6 +54,6 @@ public class ScriptingObjectConverter {
      * @return Object to store in cache.
      */
     public Object getFields(Object o) {
-        return JSONCacheObject.toSimpleObject(o);
+        return o;
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4e4547a9/modules/core/src/main/java8/org.apache.ignite.internal.processors.scripting/ScriptingObjectConverter8.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java8/org.apache.ignite.internal.processors.scripting/ScriptingObjectConverter8.java
b/modules/core/src/main/java8/org.apache.ignite.internal.processors.scripting/ScriptingObjectConverter8.java
index 23ea93d..1355b46 100644
--- a/modules/core/src/main/java8/org.apache.ignite.internal.processors.scripting/ScriptingObjectConverter8.java
+++ b/modules/core/src/main/java8/org.apache.ignite.internal.processors.scripting/ScriptingObjectConverter8.java
@@ -68,6 +68,30 @@ public class ScriptingObjectConverter8 extends ScriptingObjectConverter
implemen
         return fields.get(key);
     }
 
+    /**
+     * @param o Object from script.
+     * @return Object to store in cache.
+     */
+    public Object getField(String key, Object o) {
+        if (o instanceof JSONCacheObject)
+            return ((JSONCacheObject)o).getField(key);
+        if (o instanceof ScriptingObjectConverter8)
+            return ((ScriptingObjectConverter8)o).getField(key);
+
+        return null;
+    }
+
+    /**
+     * @param o Object from script.
+     * @return Object to store in cache.
+     */
+    public Object getFields(Object o) {
+        if (o instanceof ScriptingObjectConverter8)
+            return ((ScriptingObjectConverter8)o).getFields();
+
+        return o;
+    }
+
     @Override public Object call(Object o, Object... objects) {
         System.out.println("!!!!CALL");
         return null;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4e4547a9/modules/rest-http/src/main/java/org/apache/ignite/internal/processors/rest/protocols/http/jetty/GridJettyRestHandler.java
----------------------------------------------------------------------
diff --git a/modules/rest-http/src/main/java/org/apache/ignite/internal/processors/rest/protocols/http/jetty/GridJettyRestHandler.java
b/modules/rest-http/src/main/java/org/apache/ignite/internal/processors/rest/protocols/http/jetty/GridJettyRestHandler.java
index 0828779..f576a3e 100644
--- a/modules/rest-http/src/main/java/org/apache/ignite/internal/processors/rest/protocols/http/jetty/GridJettyRestHandler.java
+++ b/modules/rest-http/src/main/java/org/apache/ignite/internal/processors/rest/protocols/http/jetty/GridJettyRestHandler.java
@@ -26,7 +26,6 @@ import org.apache.ignite.internal.processors.rest.request.*;
 import org.apache.ignite.internal.processors.scripting.*;
 import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
-import org.apache.ignite.json.*;
 import org.apache.ignite.lang.*;
 import org.apache.ignite.plugin.security.*;
 import org.eclipse.jetty.server.*;
@@ -73,20 +72,26 @@ public class GridJettyRestHandler extends AbstractHandler {
     /** Authentication checker. */
     private final IgniteClosure<String, Boolean> authChecker;
 
+    /** Ignite scripting processor. */
+    IgniteScriptingProcessor proc;
+
     /**
      * Creates new HTTP requests handler.
      *
+     * @param proc Scripting processor.
      * @param hnd Handler.
      * @param authChecker Authentication checking closure.
      * @param log Logger.
      */
-    GridJettyRestHandler(GridRestProtocolHandler hnd, IgniteClosure<String, Boolean>
authChecker, IgniteLogger log) {
+    GridJettyRestHandler(IgniteScriptingProcessor proc, GridRestProtocolHandler hnd,
+        IgniteClosure<String, Boolean> authChecker, IgniteLogger log) {
         assert hnd != null;
         assert log != null;
 
         this.hnd = hnd;
         this.log = log;
         this.authChecker = authChecker;
+        this.proc = proc;
 
         // Init default page and favicon.
         try {
@@ -330,10 +335,10 @@ public class GridJettyRestHandler extends AbstractHandler {
         if (cmd == CACHE_GET_ALL) {
             Map o = (Map)cmdRes.getResponse();
 
-            List<ScriptingCacheEntry> res = new ArrayList<>();
+            List<Object> res = new ArrayList<>();
 
             for (Object k : o.keySet())
-                res.add(new ScriptingCacheEntry(k, o.get(k)));
+                res.add(proc.createScriptingEntry(k, o.get(k)));
 
             cmdRes.setResponse(res);
 
@@ -341,8 +346,7 @@ public class GridJettyRestHandler extends AbstractHandler {
         else {
             Object o = cmdRes.getResponse();
 
-            if (o instanceof ScriptingObjectConverter8)
-                cmdRes.setResponse(((ScriptingObjectConverter8)o).getFields());
+            cmdRes.setResponse(proc.getFields(o));
         }
     }
 
@@ -411,19 +415,17 @@ public class GridJettyRestHandler extends AbstractHandler {
                 String cacheName = (String)params.get("cacheName");
 
                 if (req.getHeader("JSONObject") != null) {
-                    JSONObject o = parseRequest(req);
+                    Object o = proc.toJavaObject(parseRequest(req));
 
-                    Map<Object, Object> map = U.newHashMap(o.keySet().size());
+                    Map<Object, Object> map = new HashMap<>();
 
                     switch (cmd) {
                         case CACHE_PUT_ALL: {
-                            List entries = (List) o.get("entries");
+                            List entries = (List)proc.getField("entries", o);
 
                             for (Object entry : entries) {
-                                JSONCacheObject cacheEntry = new JSONCacheObject((JSONObject)
entry);
-
-                                Object key = cacheEntry.getField("key");
-                                Object val = cacheEntry.getField("value");
+                                Object key = proc.getField("key", entry);
+                                Object val = proc.getField("value", entry);
 
                                 map.put(key, val);
                             }
@@ -438,9 +440,9 @@ public class GridJettyRestHandler extends AbstractHandler {
                         case CACHE_GET_ALL:
                         case CACHE_REMOVE_ALL:
                         case CACHE_CONTAINS_KEYS: {
-                            JSONCacheObject cacheObj = new JSONCacheObject(o);
+                            Object cacheObj = proc.toJavaObject(o);
 
-                            List keys = (List) cacheObj.getField("keys");
+                            List keys = (List)proc.getField("keys", cacheObj);
 
                             for (Object key : keys)
                                 map.put(key, null);
@@ -464,13 +466,13 @@ public class GridJettyRestHandler extends AbstractHandler {
                         case CACHE_REPLACE:
                         case CACHE_GET_AND_REPLACE:
                         case CACHE_REPLACE_VALUE: {
-                            JSONCacheObject cacheObj = new JSONCacheObject(o);
+                            Object cacheObj = proc.toJavaObject(o);
 
                             restReq0.cacheName(F.isEmpty(cacheName) ? null : cacheName);
 
-                            restReq0.key(cacheObj.getField("key"));
-                            restReq0.value(cacheObj.getField("val"));
-                            restReq0.value2(cacheObj.getField("oldVal"));
+                            restReq0.key(proc.getField("key", cacheObj));
+                            restReq0.value(proc.getField("val", cacheObj));
+                            restReq0.value2(proc.getField("oldVal", cacheObj));
                             break;
                         }
 
@@ -588,12 +590,12 @@ public class GridJettyRestHandler extends AbstractHandler {
                 RestRunScriptRequest restReq0 = new RestRunScriptRequest();
 
                 restReq0.script((String)params.get("func"));
-                restReq0.cacheName((String)params.get("cacheName"));
+                restReq0.cacheName((String) params.get("cacheName"));
 
                 JSONObject o = parseRequest(req);
                 restReq0.argument(o.get("arg"));
 
-                Object cacheObj = JSONCacheObject.toSimpleObject(o.get("key"));
+                Object cacheObj = proc.toJavaObject(o.get("key"));
                 restReq0.affinityKey(cacheObj);
 
                 restReq = restReq0;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4e4547a9/modules/rest-http/src/main/java/org/apache/ignite/internal/processors/rest/protocols/http/jetty/GridJettyRestProtocol.java
----------------------------------------------------------------------
diff --git a/modules/rest-http/src/main/java/org/apache/ignite/internal/processors/rest/protocols/http/jetty/GridJettyRestProtocol.java
b/modules/rest-http/src/main/java/org/apache/ignite/internal/processors/rest/protocols/http/jetty/GridJettyRestProtocol.java
index d02e73b..7051fb6 100644
--- a/modules/rest-http/src/main/java/org/apache/ignite/internal/processors/rest/protocols/http/jetty/GridJettyRestProtocol.java
+++ b/modules/rest-http/src/main/java/org/apache/ignite/internal/processors/rest/protocols/http/jetty/GridJettyRestProtocol.java
@@ -116,7 +116,7 @@ public class GridJettyRestProtocol extends GridRestProtocolAdapter {
 
         System.setProperty(IGNITE_JETTY_HOST, locHost.getHostAddress());
 
-        jettyHnd = new GridJettyRestHandler(hnd, new C1<String, Boolean>() {
+        jettyHnd = new GridJettyRestHandler(ctx.scripting(), hnd, new C1<String, Boolean>()
{
             @Override public Boolean apply(String tok) {
                 return F.isEmpty(secretKey) || authenticate(tok);
             }


Mime
View raw message