Package org.jruby.embed

Examples of org.jruby.embed.ScriptingContainer.terminate()


    // if the script can be executed repeatedly, all is fine. It raises an exception
    // if the driver got unregistered at some point.
    for (int i=1;i<=5;i++){
      ScriptingContainer c = RubyStepFactory.createScriptingContainer(false, RubyVersion.RUBY_1_8);
      c.runScriptlet(testScript);
      c.terminate();
      System.out.println("Testing JDBC Driver persistence: iteration "+i);
    }
   
  }
 
View Full Code Here


        "puts @token";
    container.runScriptlet(script);
    String token = (String) container.get("@token");
    Jwt jwt = JwtHelper.decodeAndVerify(token, hmac);
    assertEquals(TEST_CLAIMS, jwt.getClaims());
    container.terminate();
  }

  public static class JRubyJwtInstalled implements MethodRule {
    private static boolean setupOkSet;
    private static boolean setupOk;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.