Course Summary
Caucho Resin Administration covers the details of installing and configuring the Resin Java application server.
Students will learn the details of configuring the Resin server, Resin clusters, and JavaEE applications. The course will go from the initial steps of installing and configuring a Resin server to deploying and monitoring applications. Along the way, students will learn to configure database connectivity, set up logging, and map the application to different web paths and virtual hosts.
Advanced topics such as clustering, reliability, performance tuning, security, and using Resin in a unit testing environment will also be covered in detail, with best practices being discussed for each.
Duration
3 days.
Objectives
Upon completion of this course, you will be able to:
- Install and setup Resin on both Windows and UNIX-type environments
- Navigate Resin's directory structure
- Understand Resin architecture and configuration files
- Deploy, support, and troubleshoot Java and PHP applications on Resin
- Understand web application structure and configuration: web.xml
- Configure database connectivity for web applications
- Monitor and profile applications using the administration application
- Secure Resin and applications running on it
- Set up Resin for SSL
- Tune Resin's performance
- Improve the reliability of applications via Resin configuration
- Set up Resin clustering and load balancing
- Configure Apache and IIS to work with Resin
Audience
This course is for web/application server administrators who need to be able to install, configure, run, and tune the Resin Java Application Server.
To get the most benefit from this course, you should be familiar with the basic principles of web/application server administration.
Additionally, prior exposure to any of these concepts can be helpful:
- HTTP protocol (i.e., the stateless nature of HTTP, the need for sessions, HTTP methods, SSL, etc.)
- Java environments (e.g., memory settings, automatic garbage collection)
- Basic concepts behind Java Web Applications
*Please note that all these concepts are covered in the class.
Outline
Caucho Resin Overview
- Brief history of Caucho
- Resin current features overview
- Brief overview of Resin versions
- Resin Licensing (Open Source versus Professional)
- Comparison with other application servers
Installing Resin
- Download and install a JVM
- Download Resin
- Installing on UNIX
- Building the JNI libraries for UNIX
- Installing on Windows
- Starting Resin from the command line
- Setting up Resin to run at system start
Resin Directories
- Resin Directory Structure
- Web Application Directory Structure
- Deploying HTML and JSP Pages
- Lab: Deploying a Web App
Architecture and Configuration Resin
- Overview of Resin architecture
- How Resin's configuration relates to its architecture
- <resin>
- <cluster>
- <server>
- <host>
- <web-app>
- Using defaults
- Understanding Resin's classloaders
- The Resin watchdog
- Lab: Setting up virtual hosts
Deploying Web Applications
- Web Application Administration
- .war files
- Deploying Web Applications
- Versioned .war files
- Developing in place
- Lab: Deploying a Web Application statically
- Lab: Deploying a Web Application dynamically
- Viewing the Resin administration application (/resin-admin)
- Setting up an administration password
- Managing deployed applications from /resin-admin
Deploying PHP applications with Quercus
- Overview of Quercus
- When and why to use PHP on a Java server
- Setting up a PHP application
- Setting php.ini values
- Compiling PHP to Java
- Lab: Deploying WordPress on Resin using Quercus
- Accessing server information using PHP
- Lab: Writing a custom administration tool in Quercus
Java Web Applications
- Overview of Servlets
- Lifecycle of a Servlet
- Overview of JavaServer Pages
- A Simple JavaServer Page
- JSP and JavaBeans
- JSP Tag Libraries
- PHP applications on Quercus
- The MVC frameworks (e.g. Spring, Struts)
- Servlet 3.0
- The Directory Structure of a Web App
- web.xml configuration file
- The <web-app/> Element
- Mapping a Servlet to a URL
- A Sample web.xml file
- Simplified resin-web.xml syntax
- Rewrite dispatch
- Lab: Adding a rewrite dispatch rule to resin-web.xml
Database Connectivity
- Overview of JDBC
- JDBC Drivers
- Configuring Resin to Connect to a Database
- Connection Pools
- Download and Install MySQL
- Create a Database in MySQL
- Download and Deploy a JDBC Driver
- Defining a DataSource in Resin
- Accessing a DataSource via JNDI
- Accessing a DataSource via WebBeans
- Debugging connections with <spy/>
- Pinging for reliability
- Backup drivers
- Lab: JDBC Connections
The Resin Administration application
- Resin Administration application overview
- Summary tab
- Cache tab
- Cluster tab
- Config tab
- JMX tab
- Memory tab
- Profile tab
- Thread tab
- Webapp tab
- Creating a reference snapshot
- Lab: Debugging a problem application
- Java Management Extensions (JMX) on Resin
Resin Security
- Running without root privileges on UNIX
- FORM-based authentication
- Resin Authenticator architecture
- Single Signon
- Security constraints
- Lab: Creating a single signon form
- Configuring Resin for SSL
- OpenSSL versus JSSE
- Requiring SSL in applications
- Lab: Setting up SSL
Tuning Resin
- Hotspots: the usual suspects
- Java memory overview
- Using the Resin administration profile and memory pages
- JVM arguments
- Threads
- Caching
- Keepalive
- GzipFilter
- Lab: Tuning for a sample application
Improving Reliability
- Basic Logging
- Log handlers
- Automatically emailing severe logs
- Ping pages
- Automatic memory-based restart
- Automatic CPU-based restart
- Lab: Setting up a ping page
Setting up a Resin Cluster
- Clustering overview
- Adding servers statically
- Adding servers dynamically
- Monitoring servers
- Load balancing setup
- Load balancing algorithms
- Retrying POSTs
- Distributed Sessions
- Sticky sessions
- Lab: Setting up a cluster
Using Resin with Apache & IIS
- Connecting Resin to Apache
- When to use Apache
- mod_caucho
- Connecting Resin to IIS
- Lab: Setting up Resin with Apache or IIS
- Rewrite dispatch
- Lab: Converting Apache rewrite rules to Resin
Advanced Topics
- Embedding
- Using Resin in unit testing
- Scheduled tasks
Course Testimonials
Taste great. Very filling.
Very informative and excellent lab exercises. Found the material to be very practical and immediately applicable to administering Resin.
This class really helped me understand how to install Resin and deploy web applications. I would recommend this course to anyone who is looking at how to implement or upgrade Resin in their environment.
Emil is a superb trainer and mentor/colleague.
I thought the class was done quite well. The information I came for (clustering) was very thorough and answered all of my questions. I believe this information will prove to be quite valuable while implementing our new web applications.