Loading...

Application Module In Oracle

An Application Module is a logical container for coordinated objects related to a specific task with optional programming logic. There are two types of Application Modules in Oracle ADF. They are
  •         Root Application Module
  •          Nested Application Module

Root Application Module :

A root Application Module is not part of any another Application Module. This module provides transaction context for all objects contained in it. It may optionally contain nested Application Modules and will not have a parent application module. A root Application Module can be generated using JDNI calls.

Nested Application Module :

A nested Application Module is contained in another Application Module. The containing Application Module is referred as the parent Application Module. If we navigate across this containership lineage, we can eventually find the root Application Module. A nested Application Module uses the transaction context provided by the root Application Module. Thus, data modifications performed in Application Modules parented by one root Application Module will commit or rollback together.

Oracle ADF: types of application modules


Transaction:

Related with the root Application Module is the Transaction object, which provides this transaction context. From any of the Application Module, the user can get back the transaction object through a call to getTransaction(). In reality, getTransaction() first locates the root Application Module and then returns the transaction object from it.
The Transaction object takes care and handles connection to database and Entity caches. Thus, changes made through one View Object are visible to other View Objects as long as these View Objects all parented by the one root Application Module. In contrast, if two View Objects are parented by two separate root Application Modules, then changes made through the View Object will not be seen by the second View Object until the changes are committed to database through the first root Application Module and the second View Object executes query (to retrieve the most up-to-date data from database).

Creating Application Module :

A root Application Module is created by following the below steps
  •         Finding the Application Module home through JNDI.
  •          Calling create() on the Application Module home.


Here is a sample code to create a root Application Module:

    java.util.Hashtable env = new java.util.Hashtable();
    // Add environment entries into env...
    javax.naming.Context ic = new InitialContext(env);
    // 'defName' is the JNDI name for the Application Module
    // definition from which the root Application Module is to
    // be created
    String defName = ...;
    oracle.jbo.ApplicationModuleHome home = ic.lookup(defName);
    oracle.jbo.ApplicationModule am = home.create();

we can create a nested Application Module by calling createApplicationModule on the parent Application Module.

Application Module definitions are managed by oracle.jbo.server.MetaObjectManager. One can find a specific definition object by issuing:

    String defName = ...;
    oracle.jbo.server.ApplicationModuleDefImpl def;
    def = oracle.jbo.server.ApplicationModuleDefImpl.findDefObject(defName);
VirtualNuggets 7613572474395501328

Post a Comment

  1. Thank you for sharing this Blog, It includes very well information.
    iphone job Oriented course
    Mobile App Training Institutes

    ReplyDelete
  2. Your blog is too good and informative thanks for sharing this blog
    online training

    ReplyDelete
  3. Thank you so much for sharing such an awesome blog.
    monthly job support

    ReplyDelete

emo-but-icon

Home item

Popular Posts

Random Posts

Flickr Photo