此内容没有您所选择的语言版本。
3.3. Creating POJOs
Before a POJO can be used, you need to create it. You need a naming mechanism that allows you to register a reference to the POJO instance with a name. Clients need this name to use the POJO.
The Microcontainer provides such a mechanism: a Controller. A Controller allows you to deploy your POJO-based services into a run-time environment.
3.3.1. XML Deployment Descriptors 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
After compiling the classes, use an XML deployment descriptor to create instances of them. The descriptor contains a list of beans representing individual instances. Each bean has a unique name, so that it can be called by clients at run-time. The following descriptor deploys an instance of the HRManager:
This XML creates an instance of the
HRManager
class and registers it with the name HRService. This file is passed to an XML deployer associated with the Microcontainer at run-time, which performs the actual deployment, and instantiates the beans.