- A Simple Resource Bean
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.
- Dependency Injection for Resources
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
- A Resource with JCA Lifecycle
Resources can receive lifecycle events by implementing javax.resource.spi.ResourceAdapter.
- Resource Thread Management
Resources using threads will want to use JCA's work management API.
The work management API lets Resin manage threads for the
resource rather than forcing the resource to manage its own threads.
Since Resin is in a better position to manager threads, using the
Work API is not only a convenience, but is a cleaner and more reliable
- Resource Timers
Resources can use the JCA timer capability to manage periodic tasks.
The timers use the familiar java.util.Timer, providing extra
support for the environment lifecycle.
CronResource is a convenient resource which schedules application Work
tasks at configurable intervals.
This is an advanced Connector tutorial for those interested in implementing
Connector drivers or who just want to understand the inner workings.
Connectors are a generalization of the JDBC DataSource, supporting
pooling and transactions for any Connector following the interface.
- Application configuration files using a custom JNDI object
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
|Copyright © 1998-2006 Caucho Technology, Inc. All rights reserved.|
Resin® is a registered trademark,
and HardCoretm and Quercustm are trademarks of Caucho Technology, Inc.