   t2 = setInterval(function () {

               session.call('com.example.add2', [x, 18]).then(
                  function (res) {
                     console.log("add2() result:", res);
                  },
                  function (err) {
                     console.log("add2() error:", err);
                  }
               );

               x += 3;
            }, 1000);
         };


         // fired when connection was lost (or could not be established)
         //
         connection.onclose