An Application Module is a logical container for coordinated objects related to a particular task, with optional programming logic. Application Modules provide a simple runtime data connection model (one connection per Application Module) and a context for defining and executing transactions. The Business Components for Java framework provides an oracle.jbo.common.ampool package that clients can use to manage and share a pool of Application Modules. An Application Module provides the following functionality:
Define a database session and a transaction boundary. See About Application Modules and Transactions.
Control concurrent access to data. See About Transactions and Locks.
Group related View Objects into a data model that clients can access in a single network roundtrip. See About Application Modules, View Objects, and Data Models.
Store application-specific Java code in an object on the middle tier. See About Application Modules and Custom Code.
Create read-only View Objects from SQL statements and clauses. See Using SQL with View Objects.
Access utility methods for testing and debugging. See Using Application Module Utility Methods.
You can define an Application Module using wizards at design time, or clients can use a generic Application Module provided by the Business Components for Java framework. You don't need to write Java code unless you want to customize the Application Module or the View Objects it contains.
Application Modules can be nested. That is, an Application Module can (logically) contain one or more other Application Modules as well as View Objects. When Application Modules are nested, the outer-most (top-level) Application Module provides the transaction context for the others. The following figure shows two examples. In the first example, amTwo contains amThree, but it does not provide its transaction context because amOne is the outer-most Application Module. In the second example, the generic Application Module is outer-most, so it provides the transaction context for amFour.
The following methods are frequently used when working with Application Modules.
createViewObject
findViewObject
createViewObjectFromQueryStmt
findViewLink
remove
You can deploy an Application Module to any supported platform. Client applications use different approaches to find an Application Module, depending on where it is deployed. For more information, see Loading an Application Module and Finding an Application Module.