Myna 1.0 Alpha 12 Release Change Log

Released: 06/10/2009

New Features:

  • Upgraded to Rhino 1.7R2
  • See and

  • Many improvements to DB Manager:
    • Added tab support.Pressing tab will indent in sql windows
    • Query window improvements: Right clicking a table and selecting "Query" will now generate formatted SQLthat aliases the table name and refers to the columns by the aliased table name. If the table is in a named schema, then schema name is prepended to the table name
    • Support for editing tables:Can create and modify tables, their columns and their primary and foreign keys. Try right-clicking an existing table and select "Edit Table". Both myna and SQL code is generated when you edit tables
  • REST support.This makes it possible to pass simple parameters to a script page that look like sub directories to the caller. Here is an example, assuming "context" is the servlet context myna is installed to:

    Original URL:

    URL mapped version:

    If you don't provide a value for the last parameter, it will be "". This is also useful for serving binary content with familiar URLs, like so:

    <img src="/context/URL-MAP/images/image_loader.sjs/id/23345/img.jpg"/>

    Some browsers e.g Internet Explorer, ignore the mime type of downloaded files in favor of windows extension mapping. For IE a URL like this works much better:

    <a href="">Download as Excel</a> 

    This can also be used to secure sensitive downloads. Here is an example of authenticated access to images, using the example above:

    <img src="/context/URL-MAP/images/image_loader.sjs/id/23345/img.jpg"/>

    then image_loader.sjs might look like this:

    if ( ! ($req.authUser =="admin" && $req.authPassword=="secret")){ 
        $res.requestBasicAuth("Enter the secret password") }
        $res.printBinary(new Myna.File("file:/mnt/secret_stuff/images/image_" 
            + $ +".jpg").readBinary(),"image/jpeg");
    Also added PUT and DELETE support. You can tell whether a request was called via GET, POST, PUT, or DELETE by checking $req.type

  • Experimental ServerJS support Myna now comes bundled with the Narwhal Java implementation of ServerJS. Learn more about ServerJS: and Narwhal:
  • Ruby's "times" function: Added Number.js which currently only contains the Ruby-like times()prototype function. This is used to replace

    for (var x=0; x < 10; ++x){ doStuff(x) } 

    (10).times(function(x){ doStuff(x) }) 

  • Added Array.dim(count). This function returns an array of size count with null
  • values. This is useful for initializing an array like so: var tenStrings = Array.dim(10).map(function(alwaysNull,index){ return "String " + index++; }

    Other Changes:

  • Myna now requires at least a 1.5 JVM.The major reason for this is the deprecation of the 1.4 JVM by the Rhino team. It is getting harder to find libraries compatible with the older JVM's added Rhino features: FEATURE_LOCATION_INFORMATION_IN_ERROR and FEATURE_ENHANCED_JAVA_ACCESS These should improve Myna's error handling, especially java exceptions
  • Improved request management. Request timeouts and "stopping" running requests from the administrator are now handled via Context.ObserveInstructionCount(). This is makes thread termination far more reliable, and generates a catchable error that is logged. "killing" threads from the Administrator now calls Thread.interrupt() followed by Thread.stop()