Ce contenu n'est pas disponible dans la langue sélectionnée.
12.48. The ApplicationContext
The
ApplicationContext
is a context object for storing of state information. It is scoped around the associated Smooks
instance, that is, only one ApplicationContext
instance exists per Smooks
instance. This context object can be used to store data that needs to be maintained and accessible across multiple Smooks.filterSource
executions. Components (including SAXVisitor
components) can gain access to their associated ApplicationContext
instance by declaring an ApplicationContext
class property and annotating it with the @AppContext
annotation. See the example below:
public class MySmooksComponent { @AppContext private ApplicationContext appContext; // etc... }