JavaScript in the Enterprise
Join the DZone community and get the full member experience.
Join For FreeFor Enterprise developers, Nashorn will offers new possibilities. For example, Avatar.js relies on Nashorn to support the Node.js programming model on the Java Virtual Machine. Project Avatar extends this model with added-value capabilities such as multiple event-loops with a built-in load-balancer; multithreading capabilities with a lightweight message passing mechanism; Model-Store, a pure JavaScript ORM based on JPA; etc.
Another way of leveraging Nashorn in the enterprise is scripting. Instead of writing shell scripts, why not leverage JavaScript, eventually with some Java hooks if necessary? This simple script shows how to use Nashorn to monitor GlassFish via its REST Administration capabilities. This approach can easily be extended to fit any monitoring or management needs.
Published at DZone with permission of Reza Rahman, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.
Comments