12.7 Notes on using annotations

This section describes the notes on using the annotations.

Organization of this section
(1) Notes on importing
(2) Notes on specifying the mapped-name attribute of @Resource
(3) Notes on the resolution of the EJB links
(4) Notes on using @RemoteHome or @LocalHome
(5) Notes on using @PostConstruct or @PreDestroy
(6) Other notes

(1) Notes on importing

(2) Notes on specifying the mapped-name attribute of @Resource

With Application Server, only the mapped-name attribute specified in @Resource is processed. The mapped-name attribute specified in @Resource is processed as an attribute corresponding to the <linked-to> tag beneath the <resource-ref> tag, <linked-to> tag beneath the <resource-env-ref> tag, and <linked-queue> tag beneath the <resource-env-ref> tag in the property file. However, if both, the <linked-to> tag and <linked-queue> tag of the property file and the mapped-name attribute are specified, the value specified in the <linked-to> tag and <linked-queue> tag is given priority.

(3) Notes on the resolution of the EJB links

(4) Notes on using @RemoteHome or @LocalHome

With Application Server, the interface that forms the return value type of the create method of the home interface specified in @RemoteHome or @LocalHome is considered as the component interface. @RemoteHome and @LocalHome cannot be used with a combination of the home interface and business interface.

(5) Notes on using @PostConstruct or @PreDestroy

(6) Other notes