Posts

Showing posts with the label AppModule

Manual passivation and activation of Application Module instance variables

Image
JDev version: 12.2.1.3.0
We are aware of ADF's passivation and activation mechanism. We know that when we need to persist the state of a transient attribute of a view object, we ask the framework explicitly to passivate such an attribute.
However, sometimes we may also need to persist the state of an Application Module class' member variable. Let us say that we have an Integer variable which gets incremented on a certain operation. At a high user load, or when doFailover is turned on, the application module instance is passivated and activated almost on every request.
The ADF framework passivates only that data which is required to initialize the application module to the earlier state, and the ones that we explicitly ask for (by checking the passivate checkbox). All other instance level values are rejected and re-initialized. Let's see an example.
To demonstrate this, I have turned off application module pooling, to ensure all requests are forced to be passivated to the d…