Site Tools

Sidebar

Smart Card Solution

User Manual

JavaCard API Samples

Java Card Specification

Knowledge Sharing

javacard:jcre:6.1.5_transient_objects_and_contexts

6.1.5 Transient Objects and Contexts

Transient objects of CLEAR_ON_RESET type behave like persistent objects in that they can be accessed only when the currently active context is the object's owning context (the currently active context at the time when the object was created).

Transient objects of CLEAR_ON_DESELECT type can only be created or accessed when the currently active context is the context of the currently selected applet. If any of the makeTransient factory methods of JCSystem class are called to create a CLEAR_ON_DESELECT type transient object when the currently active context is not the context of the currently selected applet (even if the attempting context is that of an active applet instance on another logical channel), the method shall throw a java.lang.SystemException with reason code of ILLEGAL_TRANSIENT. If an attempt is made to access a transient object of CLEAR_ON_DESELECT type when the currently active context is not the context of the currently selected applet (even if the attempting context is that of an active applet instance on another logical channel), the Java Card RE shall throw a java.lang.SecurityException.

Applets that are part of the same package share the same context. Every applet instance from a package shares all its object instances with all other instances from the same package. This includes transient objects of both CLEAR_ON_RESET type and CLEAR_ON_DESELECT type owned by these applet instances.

The transient objects of CLEAR_ON_DESELECT type owned by any applet instance in the same package shall be accessible when any of the applet instances is the currently selected applet.

javacard/jcre/6.1.5_transient_objects_and_contexts.txt · Last modified: 2017/05/13 04:07 (external edit)