Chapter 5. Multiple resources

In the previous two chapters we implemented a simple stateful web service that used a single resource to keep stateful information. First, we used the ServiceResourceHome so we could implement the service and the resource in the same class, and then we split up the implementation into a service class, a resource class, and a resource home class.

In this chapter we will learn how to write a service that, using a design pattern known as the factory/instance pattern, will be able to manage multiple resources.