Skip to main content

Some Tips on Application Module Usage

Copying some points related to application module configuration on top of what you see in the following chapter - 44 Tuning Application Module Pools and Connection Pools

1. When a web client access a page a new AM instances will be created till the pool size crosses recycleThreshold.

2.Call to Configuration.createRootApplicationModule(qualifiedAMDefName, configName); will use instance from the pool if poolsize > recycleThreshold and unreferenced (free) AM instances are available.  Later when client calls Configuration.releaseRootApplicationModule(applicationModule, true); will remove the instance- doesn't matter how the instance is acquired .

3.Though the call Configuration.releaseRootApplicationModule(applicationModule, false/* remove flag */) , there is now way for a framework to identify the previously used AM instances if the client again calls Configuration.createRootApplicationModule(qualifiedAMDefName, configName) to create a new instance within the same request. However , with releaseRootApplicationModule(..., false) you do get the benefit of potentially reusing that AM (after it was reset) vs. creating a new AM.  Configuration.releaseRootApplicationModule(..., true), removes the AM from the pool.  Configuration.releaseRootApplicationModule(..., false) resets the AM and keeps it in the pool for future use.

4. Framework uses LRU algorithm for selecting an AM instance from the pool for recycling/passivating its state  when new client request for AM.


Popular posts from this blog

Happy New Year 2018 !

We can't go back and change the beginning, but we always can start where we are and change the ending. Believe in yourself and you will be unstoppable!

Wishing you and your family a very happy new year 2018 !!!

How to set Bind Variable Values at runtime ?

In this post I'm sharing a couple of approaches for programmatically setting bind variables values at run time. This post is an attempt to explain 'When to use what ?'[ In case if you are familiar with 'Bind Variables' in ADF BC, please refer Section 5.10, Working with Bind Variables in Fusion Developer's Guide ]

1. Set the Bind Variable value using RowSet::setNamedWhereClauseParam(...)

You can use use the setNamedWhereClauseParam(...) method on the ViewObject interface (which extends oracle.jbo.RowSet) to set the value for bind variables. Please note this sets the value on default RowSet. In other words, this doesn't have any effect on the secondary RowSets that you/system generates.
ViewObject vo = am.findViewObject("EmployeesView1"); vo.setNamedWhereClauseParam("bindVarDeptId", new Number(10)); vo.executeQuery();
2. Set the Bind Variable value using ViewObject's VariableValueManager::setVariableValue(...)

VariableValueManager Ma…