Resource Manager (RM)

ARCHITECTURAL ROLE

This pattern is layer-specific; it is used within the Integration architectural layer. An RM is the boundary class interacting with Business Facade or business Helper classes. 

BEHAVIOR DEFINED

A PED Resource Manager (RM) typically supports a technology enabling a trip outside the JVM. A well-designed RM API can be used with minimal coding, minimal testing, and worker-thread safety. 

Sometimes a technology API prompts the use of a alternative pattern name rather than using the RM designation; in the Persistence arena a popular alternative is a Repository (Repository) pattern. 

Structural Characteristics

Characteristic

Recommended

Note

 Extend Base Class Y  
 No-arg Constructor Y 1.
 CDI Scoping @Application  
 Instance State N  
 Static Public Methods (enum) Y 1. 
 Fluent Methods N  
 Delegate to Helper Optional  
 Worker-thread Safe Y 1.
  1. Either a CDI bean/proxy or an Enum can guarantee worker-thread safety.
Source Example