Site Tools

Sidebar

Smart Card Solution

User Manual

JavaCard API Samples

Java Card Specification

Knowledge Sharing

javacard:jcre:11.3.4_applet_deletion_manager_behavior

11.3.4 Applet Deletion Manager Behavior

Java Card RE implementers shall also define other behaviors of their Applet Deletion Manager, including the following:

  • Whether or not applet deletion can be aborted and how this is done
  • What happens if an exception, reset, or power fail occurs during applet deletion
  • What happens if another applet is selected before the Applet Deletion Manager is finished with its work

The following three categories of applet deletion are required on the card:

  • Applet instance deletion involves the removal of the applet object instance and the objects owned by the applet instance and associated Java Card RE structures.
  • Applet/library package deletion involves the removal of all the card resident components of the CAP file, including code and any associated Java Card RE management structures.
  • Deletion of the applet package and the contained applet instances involves the removal of the card-resident code and Java Card RE structures associated with the applet package, and all the applet instances and objects in the context of the package and associated Java Card RE structures.
Invocation of the Method javacard.framework.AppletEvent.uninstall

Whenever one or more applet instances is being deleted, the Applet Deletion Manager shall inform each of the applets of potential deletion by invoking, if implemented, the applet's uninstall method. When multiple applet instances are being deleted, the order of invocation of the uninstall methods is unspecified. Prior to following the stepwise sequence described in Section 11.3.4.1, Applet Instance Deletion, Section 11.3.4.2, Applet/Library Package Deletion, or Section 11.3.4.3, Applet Package and Contained Instances Deletion, the Java Card RE shall do the following:

  • Perform any security and authorization checks required for the deletion of each of the applet instances to be deleted. If the checks fail, an error is returned and the applet deletion fails.
  • Otherwise, check if an applet instance belonging to the contexts of the applet instances being deleted, is active on the card. If so, an error is returned and the applet instance deletion fails.
  • Otherwise, perform the following steps for each of the applet instances to be deleted:

If the applet instance being deleted implements the AppletEvent interface, set the currently selected applet to that of the applet instance and invoke the uninstall method of the applet instance.

  • A context switch into the context of the applet instance occurs upon invocation.
  • If an uncaught exception is thrown during the execution of the uninstall method, it is caught and ignored.
javacard/jcre/11.3.4_applet_deletion_manager_behavior.txt · Last modified: 2017/05/13 04:08 (external edit)