The product can reflect many changes to a deployed application without a full redeployment, either through dynamic reloading, which applies to changes in classes and related files, or through fine-grained update operations in which individual files are added, replaced, or removed. Annotated classes are a special case. During application installation, the product scans the application's classes for annotations and uses the results to build metadata, so, for instance, servlets or web services declared by annotation are discovered at that time. When a change affects the class hierarchy of annotated classes, by adding, removing, or modifying superclasses or interfaces, the scan results can no longer be assumed accurate, and the metadata derived at installation must be regenerated.
The only action that regenerates it is a fresh installation of the application, which makes option A the correct answer. A simple restart, option B, reloads the code but reuses the stored metadata. Editing annotations manually, option C, does not apply because annotations live in the source code compiled into the archive. Modifying applications.xml, option D, would risk corrupting the deployment configuration and does not trigger a scan.
After such a change, administrators should uninstall or reinstall the updated archive, and confirm afterwards that the expected components and endpoints appear, reviewing the application's start-up messages for scan-related warnings.
[Reference: Updating enterprise applications; Dynamic reloading and fine-grained updates; Annotation scanning during application installation.]
Submit