Application Module Nesting Performance

I have multiple application modules and it is currently nested to one main application module.Due to the complexity of my logic, I would like to refactor it further but I cannot move it outside the root application module because the instance of the other services is invoked by
rootAppModule.findApplicationModule("childAppModule"),
If I move it outside the root application module, do we have a performance issue by using createApplicationModule whenever I access the application module?

It's hard to say in general if you'd have a "performance issue", but what I can say is moving it to be its own top-level application module would mean:
-> An extra/different JDBC connection instance
-> An extra/different entity cache
So that might translate into slower performance, but it's always worth doing some benchmarking of exactly what you have in mind to see if for your circumstance the use would incur unwanted overhead or be negligible in the big picture.

Similar Messages

  • Best Practice to use a single root Application Module?

    I was reading in another thread that it may be a good idea to have all application modules nested within a single root application module (AM) so that there is only 1 session maintained for the root AM, versus an individual session for each AM. Is this a best practice? If yes, should the root AM be a skeleton AM (minimal customer service methods), or, should you select the most heavily used AM and nest the other AM's underneath of it?
    In my case, I currenlty have 2 AM's (and will have 3 AM's in the future) each representing a different set of use cases withn the application (i.e., one supports users searches / shopping cart-like functionality, and the second supports an enrollment process.) It could be the case that a user only accesses pages on the web site to do searches (first AM), or only to do enrollment (2nd AM), or, they may access pages of the site that access both AM's. Right now I have 2 separate AM's that are not nested. Should I nest the AM's and define a root AM?
    thanks

    Hi javaX
    The main physical effect of having 2 separate AMs is that they have their own transactions with the database, and presumably sit in the application module pool as their own instances consuming connections from the connection pool. Alternatively a single root AM with 2 nested AMs share a single transaction through the root AM; only the root AM controls the transaction in this scenario.
    As such it's a question of do you need separate transactions or will one suffice?
    How you group your EOs/VOs etc within the AMs is up to you, but usually falls into logical groups such as you have done. If a single transaction is fine, instead of creating multiple AMs, you could instead just create logical package structures instead. Neither method is right or wrong, they're just different ways of structuring your application.
    When you create a nested AM structure, within your ViewController project in the Data Control Palette you'll actually see 3 data controls mapped to each AM. In addition expanding the root AM data control, you'll see the nested AMs again. Create a dummy project with a nested AM structure and you'll see what I mean.
    If you base your page definitions on anything from the root AM and it's children in the Data Control Palette, this will work on the root AM's transaction.
    If you base your page definitions on something from one of the other AM data controls that isn't inside the main root AM in the Data Control Palette, instead of using the root AM's transaction, the separate child AM will be treated as root AM and will have its own transaction.
    The thing to care of when developing web pages is to consistently use the AM and it's nested AMs, or the child AMs directly with their separate transactions, otherwise it might cause a bit of a nightmare debugging situation later on when the same application is locking and blocking on the same records from 2 separate AM transactions.
    Hope this helps.
    CM.

  • Nested Application Module Performance

    What are the implications of nesting application modules? I am nesting them in such a way that they are defined at design-time and used by calling findApplicationModule(String) on the root ApplicationModule. Could there be any significant overhead accessing one nested app mod in this way as opposed to going to the desired app mod directly? Or is there anything else to watch out for with this type of design? I haven't had any trouble so far but my project is not too large yet.

    For example, I have three ApplicationModule objects.
    RootModule, Module1, and Module2. By nesting Module1
    and Module2 under RootModule, I can use either once I
    have an instance of RootModule by calling
    findApplicationModule(String name). This is useful
    when I want to do things inside both Module1 and
    Module2 and still use the same connection and
    transaction context.
    If I only want something out of Module1 during a
    request, would it be advantageous to ONLY create
    Module1 directly and bypass my RootModule?
    Meaning this:mod1Am =
    Configuration.createRootApplicationModule("Module1","M
    dule1Config");
    mod1Am.myCustomOperation();As opposed to
    this:rootAm =
    Configuration.createRootApplicationModule("RootModule"
    "RootConfig");
    mod1Am = rootAm.findApplicationModule("Module1");
    mod1Am.myCustomOperation();
    Nick:
    There are advantages to creating Module1 directly. It would be that you don't create unnecessary objects (in your case, you would avoid unnecessary creation of Module2").
    However, I would make the following side comment: from your message, it sounds like you would create an AM for every request and remove it at the end. Did you consider using AppModule pool? AM pool would be better than create-remove because AM pool can keep around a number of root AM instances and manage resources for you. This way, you don't have to create any AM for each request. AM pool is also able to support stateful operations with excellent scalability.
    Thanks.
    Sung

  • Best Practice - Bounded Task Flows, Regions and Nested Application Modules

    Using JDev 11.1.1.3; understand that it's generally considered good practice to just have 1 root application module servicing model content / services for each page. In our application, we've used a number of bounded task flows and page fragments deployed as af:region's into pages as either a) views targeted in page-flow navigation, b) tab panel content inside a regular jspx, or c) af:popup / af:dialog content. As it stands, we've not engaged nesting of the application modules for this embedded region content, so these regions are no doubt instantiating new AM's if/when invoked. Should the AM's servicing these embedded regions be deployed nested within the root AM's, and then if so, does this change the way that the jsff / fragment content is actually developed (currently as per any other jspx using the DataControl pallete). Or are the best-practice directives talking about a page as being the design-time / declarative composition of content rather than the run-time aggregation of page + fragments ... in which case the fact that our embedded fragments are not using nested AM's is unlikely to concern.
    Thanks,

    Probably a better question for the ADF EMG: http://groups.google.com/group/adf-methodology?hl=en
    CM.

  • Nested Application Module - commit behavior

    Guys,
    I have ADF BC in the following hierarchial manner.
    AM1
    -VO1
    -VO2
    -AM2 (nested AM)
    Assume that there are pending transactions on both AM1 and AM2.
    what is the behaviour for the follwing?
    Q1 . Issuing commit on AM1, will it commit AM2 also?
    Q2 . Issuing commit on AM2, will it alone commit?
    Edited by: Dev on Apr 19, 2011 12:00 PM

    ADF distinguish between root application module and nested application modules. A root app module has no parent whereas an nested app module has a parent. A root app module holds the transaction (and only the root app module). Nested app module share the transaction of the root app module (they are nested in).
    So Q1: yes and Q2: no.
    Read 9.4.2 here http://download.oracle.com/docs/cd/E17904_01/web.1111/b31974/bcservices.htm#sm0229 fro more info.
    Timo

  • How application module helps for performance improve

    Hi Everyone,
    I have a sample web-application in which I am connecting with single AM instance (AM for database view object), retrieving some information and then close the connection. I am doing this as,
    // making AM instance
    <application module instance> = Configuration.createRootApplicationModule(<AM name>, config);
    // performing operations
    <operation result> = <application module instance>.<access VO with any operation>();
    System.out.println("Get result here");
    // disconnecting AM instance
    <application module instance>.getDBTransaction().disconnect();
    Configuration.releaseRootApplicationModule(<application module instance>, true);
    These are the activities which are performed by a single user. Now, I am doing stress test on same activities. I am testing the same code with 300 concurrent users (using JMeter with JSP URL). These are working fine. Also I checked multiple times, it always working fine.
    Now, I need to do something through which I can improve the performance. I know, I can use AM pool configurations to make this more effective. I have gone through the Oracle documents and checked the same test case with default or recommended pool configurations and I found similar kind of results (there is not much difference).
    On other hand, I tried with 'releaseRootApplicationModule' method with false parameter and found better results in default as well as recommended pool configurations.
    My question is, is the change of pool configurations recommended by Oracle really work? or do I need to concentrate more on coding part with default pool configurations?
    Here, I would like to know, what are the best practice (in code as well as pool configurations), I need to follow if I really want to improve the performance in real scenarios (when our application will access with large no. of concurrent users).
    I really look forward some help from experts. I have given a lot of time on this to know how really we can make our application more effective in terms of performance.
    I really appreciate for your reply.
    Regards,
    Dilip Gupta.

    >
    We added the createRootApplicationModule() API (in the oracle.jbo.client.Configuration class) to simplify acquiring an application module from the pool for brief programmatic manipulation before it is released back to the AM pool.
    Steve Muench.
    >
    check [url http://radio-weblogs.com/0118231/2009/08/20.html#a959]Check Your App for Misuse of Configuration.createRootApplicationModule()
    Edited by: Mohammad Jabr on May 10, 2012 7:14 AM

  • How can i understand nested application module?

    Is there inherit relation between root application module and child application module?
    jiayu
    thanks

    Hi,
    no, they are not inheriting from each other but share the same transactional context. Nested AM are also loaded lazily, which means you minimize the footprint of your app.
    Check
    http://radio.weblogs.com/0118231/
    for good information on ADF BC
    Frank

  • Jclient Binding to nested application module

    we use a test case of
    Applications
    ParrentAM & NestedAM
    Forms
    ParrentForm & NestedForm
    We added a reference to the NestedAM datacontrol in the ParrentDatabindings.cpx
    When the ParrentForm attempts to set the bindingcontext in the NestedForm we recieve a null pointer exception.
    Can anyone provide some insite or an example for binding to a nested application module?
    thanks.

    Robert,
    what do you mean with "Nested Form", is it a JClient panel that is contained in another JClient panel ?
    Which JDeveloper release are you working with? Can you provide me a step by step instruction on how to reproduce your testcase in JClient (assume that I have a Business Component Model that has a MasterApp and a nested NestedApp module, both based on the Scott schema).
    thanks for your help
    Frank
    JDeveloper Product Management

  • Transaction Management for Nested Application Module

    Hi
    I'm using Jdev 11.1.2.0
    I am having nested Application Module. In that I want to separate view object data need to commit without commit the root application module view object.
    Is it possible. Kindly reply me.

    No, the root application module controls the transaction of all need application modules. A commit will commit all changes together. You have to use different root application modules for this.
    Timo

  • Instantiate a nested application module programmatically

    Hi, is it possible to instantiate a nested application module programmatically using Configuration class or other any other class?
    The API of Configuration refers only to root application module.
    The nested service has strong cohesion and is loose coupled with root application module and I want to use it in a stand alone client.
    Any comment will be helpful,
    Thanks
    Ilias

    Hi,
    +"The nested service has strong cohesion and is loose coupled with root application module and I want to use it in a stand alone client. "+
    If this is the case, why don't you call it as a root Application Module ? If there is no dependency to the root AM, then it doesn't matter if you call it as a nested AM or root AM
    Frank

  • Nested Application Module State

    As I understand it Application Modules (AM) that are nested inherit the parent 'Transaction'. My question is do they inherit the Stateful/Stateless behaviour from the parent ?

    yes it inherits' the complete definition.
    including release_mode, which is the parameter i assume, that you mean.
    hth clemens

  • Nested Application Module

    I have this problem, and I wish I can find a solution.
    I have two application module, am1 and am2, am2 is nested in am1, and I'm using <jbo:ApplicationModule> tag to open a connection for the application module.
    I have this case, I want to access page that insert into a table but this insertion should not be committed until another operation is committed, and these two operation occurred on two different views in the 2 application module, so I want to know how can I get the application module am2 using <jbo:ApplicationModule> tag, and making it using the transaction context of application module am1.

    Omar,
    there is a getRootApplicationModule()method on the ApplicationModuleImpl class, did you try this ?
    Frank

  • Nested application module use own connection

    Hi everyone,
    I'm trying to figure out how to let a nested application module use it's own connection instead of it's parent.
    Any suggestions?
    We're using Jdeveloper 10.1.3.3.0.
    Regards

    Hi,
    The issue is not about the data, but about the database connection. The idea is to have a general BC library (with iits Application Modules and View Objects), using its own database schema, and have that one imported in other applications, with other database schemas.
    We have to use these imported BC's in the application AM, because that's the way JHeadstart works. This will result in a table not found exception, because the imported VO's are in another schema.
    We were hoping that we could nest an imported Application Module and that it uses its own connection to its own database schema, but unfortuantely that does not seem possible since nested application modules inherit the connection of the parent (root) application module.
    Or is there perhaps a way to achieve this; i.e. have a nested application module using its own database connection and not inherit this from its parent?
    Ciao
    Aino

  • Performance - Application Module instantiation

    I am experiencing poor performance the first time a user instantiates a application module which is taking roughly 8 seconds down to 1 second for subsequent attempts. Pooling is enabled and we are using JDev 10.1.2 build 1811. I was wondering if someone could tell me how I could instantiate the application module pool so the users avoid this initial delay by loading these behind the scenes when they initially log onto the main application.

    It's hard to say in general if you'd have a "performance issue", but what I can say is moving it to be its own top-level application module would mean:
    -> An extra/different JDBC connection instance
    -> An extra/different entity cache
    So that might translate into slower performance, but it's always worth doing some benchmarking of exactly what you have in mind to see if for your circumstance the use would incur unwanted overhead or be negligible in the big picture.

  • Nesting Application Modules from different Projects(solved).

    I am wondering if there is a possibility of nesting application modules that are part of different projects?
    thanks, Florin
    Message was edited by:
    florinmarcus

    I've fond myself the answer to this question.
    It is explained in the documentation:
    Fusion Developer’s Guide for Oracle Application Development 11g
    Chapter 35.7 Working with Libraries of Reusable Business Components

Maybe you are looking for