1. Using JRuby on Rails With Sun GlassFish Enterprise Server
Introduction to JRuby and Rails on Sun GlassFish Enterprise Server
JRuby on Rails, the Sun GlassFish Enterprise Server v3, and the GlassFish v3 Gem
Installation and Configuration of JRuby
To Install JRuby and Rails from Update Center
To Install JRuby as Standalone
Enterprise Server v3 JRuby Container Configuration
Configuring JRuby Container Through Asadmin CLI
Configuring JRuby Runtime Pool
Configuring JRuby Container Through Administration Console
To Configure JRuby Container from Administration Console
Creating a Simple Rails Application
To Create the hello Application
To Create the Controller and the View
To Pass Data From the Controller to the View
To Use Rails Without a Database
Deploying and Running a Rails Application
To Deploy the Rails Application as a Directory
Accessing a Database From a Rails Application
To Set Up the MySQL Database Server
To Create a Database-Backed Rails Application
Accessing Java Libraries From a Rails Application
To Create the Rails Application That Accesses Java Libraries
To Create the Views That Display the Images Generated by Java2D Code
To Add Java2D Code to a Rails Controller
To Run a Rails Application That Uses Java 2D Code
To Install the GlassFish v3 Gem
To Run a Rails Application on GlassFish v3 Gem
To Deploy and Run the Database-Backed Web Application
Creating and Deploying a Simple Rails Application with Warbler
The Enterprise Server v3 offers monitoring services for various objects.
Monitoring is the process of reviewing the statistics of a system to improve
performance or solve problems. The monitoring service can track and display operational statistics,
such as the number of requests per second, the average response time, and
the throughput. For more information on monitoring, see Chapter 8, Administering the Monitoring Service, in Sun GlassFish Enterprise Server v3 Administration Guide.
The JRuby Container installed on the Enterprise Server can be configured to be monitored. By default the monitoring services are disabled.
Monitoring can be configured for the container using the following asadmin CLI command:
configure-jruby-container --monitoring=true
The monitoring service can be enabled or disabled. Enable monitoring for GlassFish JRuby container with the following runtime command:
enable-monitoring --modules jruby-container=HIGH
The other possible values are OFF or LOW. Disable the monitoring for JRuby container with the following command:
disable-monitoring --modules jruby-container=OFF
JRuby statistics are available from asadmin CLI as well as from Administration Console.
To learn more about different types of JRuby statistics available from Enterprise Server,
see JRuby Statistics in Sun GlassFish Enterprise Server v3 Administration Guide.