Inversion of Control (IoC) Tutorials
Resin 3.1

Documentation
Examples
Changes

Quercus
Database
Amber
EJB
SOA/ESB
IoC
JMS
Servlet
JMX
Hessian
Security

JAXB IoC
Basic Resource
Injection
Periodic Task
JNDI appconfig
JAX-WS example
Tutorials
JAXB IoC

JAXB IoC

Resin's configuration integrates JAXB-style bean configuration.

Basic Resource

Resources are beans configured in the resin.conf or web.xml and stored in JNDI. The tutorial shows the configuration of a trivial bean as a resource and looking it up using JNDI.

Injection

The Dependency Injection pattern simplifies application code, and increases configuration flexibility by deferring component configuration and assembly to the container. Resin calls setters on the configured objects to assemble the resource dependencies.

Periodic Task

This tutorial demonstrates the creation of a PeriodicTask that performs a task at intervals and collects statistics on it's performance. An administration interface to the task is provided, and while the task is active the user is shown a "temporarily unavailable" page.

The code for this tutorial provides a full featured example that can be used as a cut-and-paste source for solving real problems. The PeriodicTask keeps detailed statistics, an administration interface is provided with a servlet, and the task can be executed either manually or automatically at timed intervals.

JNDI appconfig

Applications often need to read, and possibly write, configuration files. An excellent way to accomplish this is to implement a custom JNDI object, which is easily configured and easily obtained from anywhere in the application.

This implementation of the concept allows you to configure a base directory for configuration files. An object of type AppConfig is obtained with a jndi lookup. It is used to open files relative to the base directory.


JAX-WS example
Tutorials
JAXB IoC
Copyright © 1998-2006 Caucho Technology, Inc. All rights reserved.
Resin ® is a registered trademark, and Quercustm, Ambertm, and Hessiantm are trademarks of Caucho Technology.