12.6.1 Updating the annotations

If the contents defined in the annotations are updated, the updated contents can be applied to the application using one of the following methods:

Method of re-importing the application
In this method, the updated contents are applied by using normal replacement. Stop and then replace the application.
Method of using the reload functionality (for the exploded archive-format applications)
In this method, the contents of a deployed application are dynamically replaced by using the update detection or by executing the cjreloadapp command. You can use this method for the applications in the exploded archive format.
However, the annotations that can be updated with the reload functionality are limited. The following table lists the updatability of each annotation with the reload functionality.

Table 12-15 Updatability of each annotation with the reload functionality

Annotation nameUpdatability
@PostConstructY
@PreDestroyY
@ResourceN
@ResourcesN
@RunAsN
@DeclareRolesY
@RolesAllowedN
@PermitAllY
@DenyAllY
@StatelessN
@StatefulN
@SingletonN
@DependsOnY
@StartupY
@AccessTimeoutY
@LockY
@ConcurrencyManagementY
@InitY
@RemoveY
@AfterBeginY
@BeforeCompletionY
@AfterCompletionY
@RemoteN
@LocalN
@RemoteHomeN
@LocalHomeN
@LocalBeanN
@TransactionManagementY
@TransactionAttributeY
@PostActivateY
@PrePassivateY
@InterceptorsY
@AroundInvokeY
@ExcludeDefautInterceptorsY
@ExcludeClassInterceptorsY
@TimeoutN
@ScheduleN
@SchedulesN
@AsynchronousY
@ApplicationExceptionY
@EJBN
@EJBsN
@WebServiceY
@WebServiceProviderY
@PersistenceContextY
@PersistenceContextsY
@PersistencePropertyY
@PersistenceUnitY
@PersistenceUnitsY
@WebEndpointN
@WebServiceRefN
Legend:
Y: Can be updated
N: Cannot be updated