Max no of application modules

Hi all,
In our Jdeveloper application, we have around 18 root application modules (with no nested application modules).
For a new project, we want to build a another model project on top of this application. Is it possible to do so? and if so what are the issues that we should consider?
Also, as i got to know, there is a limitation on maximum no of application modules that an application can have. Can some one pls explain on it?
Thanks in advance,
Surangi

"Will this cause a performance or any other issue that would degrade application quality?"
It depends doesn't it. If you have heaps of CPU & memory and only 1 user, no. If you have millions of user, a 486 and a tape driver for memory, yes.
In essence we have no statistics about your system, and even if we did it would be pretty meaningless to us. As such you should under take load and stress testing to gather statistics and see if the performance is adequate in your specific case.
"And is there a identified number as the optimum number of application modules for one application?"
Again there are no guidelines on this, there is no magic X number. Obviously the more AMs you have the more CPU & memory you will consume. But if you have a low number of users this will be not a problem, and from a development point of view it may just be easier to separate AMs.
CM.

Similar Messages

  • Set max fetch size on application module

    Is there a way to set max fetch size on application module level, rather then setting it for every view object separately? I don't want to allow any of my view objects in application module to fetch more then 1000 rows.

    Hi,
    Tools-->... contains option for setting rows in batches of... , but doesn't contain option for setting max fetch size. I guess I'll have to do it in implementation class for view objects... Thanks anyway
    Dragana

  • BUG?  Application Module State Management

    I have 2 read-only view objects VO1 & VO2 with a View Link that links them by a primary key field. VO1 (master) is on the first .jspx page and VO2 (detail) is on the 2nd .jspx page. VO1 has a SQL query, but is populated programmatically in an App Module Service method that sets the where clause parameters. VO2 is on a separate .jspx page. VO2 has one bind variable in its SQL query that is populated when the user clicks a commandLink on a row within VO1 - this takes the user to the 2nd .jspx page to view VO2 table results.
    The issue is that when the user navigates back to the first .jspx page containing VO1, a duplicate row is added to the end the data table (or as the first record on the second page of results if there are multiple pages.) If I re-query VO1, re-sort the data using the column headings, or passivate the data (see below), the duplicate row goes away. Note I have tried using the same iterator on both pages and this same issue occurs.
    Ok - after 5 days of troubleshooting, here is the potential bug. If Application Pooling is enabled on the Application Module, I experience the issue above. If I don't enale Application Pooling, and Passivate state for the App Module, this issue does not occur (see below):
    Application Module Settings - Error Occurs if Pooling is enabled
    (unchecked) Failover Transaction State Upon Managed Release
    (unchecked) Disconnect Application Module Upon Release
    (checked) Support Dynamic JDBC Credentials
    (checked) Reset Non-Transcational State Upon Unmanaged Release
    (checked) Enable Application Module Pooing
    If I un-check Enable Application Module Pooling the error does NOT occur. Note I've experimented with many combinations, and its only the Application Module Pooling that affects the behavior.
    Note both view objects are set to Passivate state (but not for transient values, though tested passivating those as well and there was no difference.)
    Can someone please advise? This is a showstopper for implementing our application to production. See the threads below for more information. Finally note that I have not yet been able to replicate this in a simple test case, but there is some specific characteristics about my current application causing this behavior (and it appears others have experienced as well.)
    Duplicate rows displayed in list
    Need help  - Duplicate Rows being added to View Object?
    Thanks.
    Here is the code on the AM service method to populate the rows for VO1 (no insert or create rows - only executing the query):
    ViewObject vo1 = findViewObject("VO1");
    vo1.setMaxFetchSize(250); // set max fetch size 250
    vo1.setWhereClauseParam(0, x0);
    vo1.setWhereClauseParam(1, x1);
    vo1.setWhereClauseParam(2, x2);
    vo1.setWhereClauseParam(3, x3);
    vo1.setWhereClauseParam(4, x4);
    vo1.setWhereClauseParam(5, x5);
    vo1.setWhereClauseParam(6, x6);
    vo1.setWhereClauseParam(7, x7);
    vo1.setWhereClauseParam(8, x8);
    vo1.setWhereClauseParam(9, x9);
    vo1.setWhereClauseParam(10, x10);
    vo1.executeQuery();
    Message was edited by:
    javaX

    More information on this issue:
    After further testing, I discovered that the 'Disconnect Application Module Upon Release' also plays a factor with this issue.
    If 'Enable Application Module Pooling' is unchecked the issue does not occur because the view object is passivated.
    If 'Enable Application Module Pooling' is checked (jbo.ampool.doampooling=true), then the issue occurs UNLESS I also set 'Disconnect Application Module Upon Release' (jbo.doconnnectionpooling=true). If I set the latter to true, then I do not experience the duplicate row issue. I would rather not have to enable jbo.doconnectionpooling=true because of the performance impacts as recommended in the dev guide. Any Suggestions?
    -- updated on 10/1/06 ----
    Setting jbo.doconnectionpooling=true only fixes this issue when I use a ViewLink as the mechanism to pass the row Id from VO1 (master on .jspx page #1) to VO2 (detail on page #2.) If I use an actionListener to pass the value from page #1 to page #2, setting jbo.doconnectionpooling=true does not fix the issue.
    <af:commandLink actionListener="#{bindings.setCurrentRowWithKey.execute}"
    action="page2" text="#{row.Name}">
    <af:setActionListener from="#{row.Id}" to="#{backing_bean_page2.rowid}"/>
    </af:commandLink>
    Message was edited by:
    javaX

  • How to access application module from ActionForm Execute?

    I've got a very simple ADF/UIX/Struts application where I'm trying to create a simple Login function. I have a /loginAction data action pointing to a login.uix page forward. The login.uix page has a <struts:form> on it with a user and a password field. There is a LoginBean with the corresponding get/set values. I have an ADF model created with a boolean login(String username, String password) function exposed as a client method.
    Eventually, when I have this basic part working, then I'll actually be using an ActionForward mapping to dispatch to different home pages, based on the particular login account (the name of the forward will be stored in the authentication table).
    I've tried overriding Execute(), since that is where you can return the appropriate ActionForward mapping, but that does not have a DataActionContext passed in -- so I can't get to the application module.
    I've also looked at processComponentEvents, but that doesn't have any ActionForward results nor a way to pass back ActionErrors (in case the login fails).
    How do I call my login client method when a user has entered a username/password and pressed the Submit button?

    Here is another solution as provided by Oracle Support in response to a TAR that I opened:
    I had described my need to access a login() function defined in my Application Module, returning true/false if the login succeeds/fails. Here is the reply, posted with permission:
    I have gotten the following information back from one of the development folks pertaining to the question you asked.
    His suggestions are as follows:
    1) Expose the method as a client method on the App module
    2) On the pageflow create a new DataAction
    3) Drag and drop the logon method from the AppModule operations node and drop it onto the new data Action
    3) Edit the set-property values that are created in the Struts metadata for this new DataAction to use the correct expressions to get the logon info to pass to the middle tier.
    e.g.
    <action path="/authenticateUser" className="oracle.adf.controller.struts.actions.DataActionMapping" type="AuthenticateUserAction" name="DataForm"
    unknown="false">
    <set-property property="modelReference" value="authenticateUserUIModel"/>
    <set-property property="methodName" value="authenticateUserUIModel.authenticateUser"/>
    <set-property property="resultLocation" value="${requestScope.methodResult}"/>
    <set-property property="numParams" value="2"/>
    <set-property property="paramNames[0]" value="${param.logonUsername}"/>
    <set-property property="paramNames[1]" value="${param.logonPassword}"/>
    <forward name="fail" path="/logon.do"/>
    <forward name="success" path="/menu.do"/>
    </action>
    So in this case the values of the logonUsername and logonPassword fields in the form that submitted to this DataAction are passed as the two parameters that my authenticateUser method on the AppModule requires.
    I have also overriden the data action class to customise the findForward() method to route the user depending on if the method call worked or not.
    And here's the code for the customized FindForward in the DataAction:
    protected void findForward(DataActionContext actionContext) throws Exception
    HttpServletRequest request = actionContext.getHttpServletRequest();
    HttpSession session = request.getSession();
    String target = "fail";
    //Get the result of the Model Method call
    JUCtrlActionBinding method = actionContext.getCustomMethod();
    boolean successfulLogon = ((Boolean)method.getResult()).booleanValue();
    if (!successfulLogon)
    // If the logon fails we need to do the following
    // 1. Increament the counter once this exceeds 3 any logon will fail
    // 2. Create an error message to display on the logon screen
    // note this is a non specific error to prevent hackers from
    // knowing that they at least got the username right or from
    // knowing that there is a Max attempts value if they are trying
    // an automated attack
    Integer attempts = (Integer)session.getAttribute("logonAttempts");
    int intAttempts = 0;
    if (attempts != null)
    intAttempts = attempts.intValue();
    session.setAttribute("logonAttempts", new Integer(++intAttempts));
    //The error message comes out of the ApplicationResources.properties file.
    actionContext.getActionErrors().add("general",new ActionError("logon.error.logonFailed"));
    this.saveErrors(actionContext.getHttpServletRequest(),
    actionContext.getActionErrors());
    else
    //If connection was OK do we need to save the username in a cookie?
    String remember = (String)request.getParameter("logonRemember");
    int cookieLife = 0; //Expire
    if ( remember != null && remember.length()>0 )
    cookieLife = 2592000;
    String name = (String)request.getParameter("logonUsername");
    Cookie userCookie = new Cookie("CARA_USER_COOKIE",name);
    userCookie.setMaxAge(cookieLife);
    actionContext.getHttpServletResponse().addCookie(userCookie);
    target = "success";
    actionContext.setActionForward(target);
    I hope this helps anyone looking to implement something similar. It also illustrates the "preferred" way of executing a client method and working with the result.

  • Painting one root Application Module to rule them all

    hi
    The description below uses the same MyApplicationModuleListener approach as I describe in the forum thread "painting a picture of Application Module pooling".
    Another example review of Application Module pools behaviour is the blog post by Chris Muir, "JDev 11g, Task Flows & ADF BC – one root Application Module to rule them all?".
    That post also says "... we'll have trouble discerning what the ADF BC layer is actually doing underneath the task flow transaction options. ...", where the approach below might help alleviate some of that discerning trouble.
    And about "... By deduction as there are no other log entries, this second instance of Root1AppModule must be nested under the root Root1AppModule? ..." more information will be logged, so less deduction is required.
    The blog post describes an application similar to this one (which is using the HR.EMPLOYEES table) created using JDeveloper 11.1.1.6.0
    at http://www.consideringred.com/files/oracle/2012/OneSizeOneRootAMApp-v0.01.zip
    It uses somewhat different names than the blog post, and it has two sets of task-flows so that no transaction configuration changes are required to review the behaviour.
    When a MyApplicationModuleListener approach is introduced (with minor changes, mostly configuration, using JAR files available in MyApplicationModuleListenerApp-v0.03.zip) it results in the application available
    at http://www.consideringred.com/files/oracle/2012/OneSizeOneRootAMApp-v0.02.zip
    Using this, the (chained) "No Controller Transaction" scenario's result in similar logging like this:
    [C][L][r1001][(ctx31) /faces : /firstIndex] setRequestInfoPrefix() : extra [GET with 3 parameters (partial request false) (initial render true) (postback true)]
    [C][L][r1002][(ctx32) /faces : /firstIndex] setRequestInfoPrefix() : extra [GET with 3 parameters (partial request false) (initial render true) (postback true)]
    [C][L][r1001][(ctx31) /faces : /firstIndex] onAfterRequest() : no ApplicationPools
    [C][L][r1002][(ctx32) /faces : /firstIndex] onAfterRequest() : no ApplicationPools
    [C][L][r1003][(ctx31) /faces : /firstIndex] setRequestInfoPrefix() : extra [POST with 5 parameters (partial request false) (initial render false) (postback true)]
    [C][L][r1003][(ctx31) /faces : /firstIndex] onNewConstruction() : [(am501) FirstAppModuleImpl_1 (not root) parent = (null)]
    [C][L][r1003][(ctx31) /faces : /firstIndex] onActivate() : [(am501) FirstAppModule (is root)](session version 11.1.1.61.92 oracle.jbo.server.SessionImpl@16cbcec)
    [C][L][r1003][(ctx31) /faces : /firstIndex] onCreate() : [(am501) FirstAppModule (is root)]
    ########FirstAppModuleImpl.create() called.  AM isRoot() = true
    [C][L][r1003][(ctx31) /faces : /firstIndex] onAfterConnect() : [(am501) FirstAppModule (is root)]
    [C][L][r1003][(ctx31) /faces : /firstIndex] onPrepareSession() : [(am501) FirstAppModule (is root)]
    ########FirstAppModuleImpl.prepareSession() called.  AM isRoot() = true
    [C][L][r1003][(ctx31) /faces : /firstIndex] onAfterDoPoolMessage() : [(am501) FirstAppModule (is root)][(ses101) MESSAGE_TYPE_USING (1) STATUS_SUCCESS (8) (rp 4)]
    [C][L][r1003][(ctx31) /faces : /firstIndex] onPassivateState() : 5 : [(am501) FirstAppModule (is root)] pId = -1, pClientData = null, pFlags = PASSIVATE_HINT_FLAG (16)
    [C][L][r1003][(ctx31) /faces : /firstIndex] onAfterDoPoolMessage() : [(am501) FirstAppModule (is root)][(ses101) MESSAGE_TYPE_RELEASING (2) STATUS_SUCCESS (8) (rp 3)]
    [C][L][r1003][(ctx31) /faces : /firstIndex] onNewShortId() : pNewShortId = ds81, pId = java:comp/env/jdbc/connHRDS - com.bea:ServerRuntime=DefaultServer,Name=OneSizeOneRootAMApp@connHR@connHR,ApplicationRuntime=OneSizeOneRootAMApp,Type=JDBCDataSourceRuntime
    [C][L][r1003][(ctx31) /faces : /firstIndex] onAfterRequest() : 1 : ApplicationPool = onesizeonerootamapp.model.FirstAppModuleLocal
    (ap21)[cre 1; rem 0; act 0; pas 0; co 1; ci 1; ref reu 0; ref rec 0; unr rec 0; fail 0; tot am 1; max am 1; avg am 1; tot ava 1; avg ava 1; avg una 0; tot ref 1; ses 1; avg ses 1]
    (ds81)[cur cap 1; avai 0; unav 1; cp hig 1; ac cur 1; ac avg 0; ac hig 1; co del 168; co tot 1; res req 1; fai res 0; fai rec 0; h avai 1; h unav 1; lea co 0; psc acc 0; psc add 0; psc csi 0; psc del 0; psc hit 0; psc mis 0; wfc cur 0; wfc fai 0; wfc hig 0; wfc tot 0; wse hig 0]
    [C][L][r1004][(ctx31) /faces : /firstam-btf/empVoFirstViPage] setRequestInfoPrefix() : extra [GET with 5 parameters (partial request true) (initial render false) (postback true)]
    [C][L][r1004][(ctx31) /faces : /firstam-btf/empVoFirstViPage] onAfterDoPoolMessage() : [(am501) FirstAppModule (is root)][(ses101) MESSAGE_TYPE_USING (1) STATUS_SUCCESS (8) (rp 4)]
    [C][L][r1004][(ctx31) /faces : /firstam-btf/empVoFirstViPage] onPassivateState() : 5 : [(am501) FirstAppModule (is root)] pId = -1, pClientData = null, pFlags = PASSIVATE_HINT_FLAG (16)
    [C][L][r1004][(ctx31) /faces : /firstam-btf/empVoFirstViPage] onAfterDoPoolMessage() : [(am501) FirstAppModule (is root)][(ses101) MESSAGE_TYPE_RELEASING (2) STATUS_SUCCESS (8) (rp 3)]
    [C][L][r1004][(ctx31) /faces : /firstam-btf/empVoFirstViPage] onAfterRequest() : 1 : ApplicationPool = onesizeonerootamapp.model.FirstAppModuleLocal
    (ap21)[cre 1; rem 0; act 0; pas 0; co 2; ci 2; ref reu 1; ref rec 0; unr rec 0; fail 0; tot am 1; max am 1; avg am 1; tot ava 1; avg ava 1; avg una 0; tot ref 1; ses 1; avg ses 1]
    (ds81)[cur cap 1; avai 0; unav 1; cp hig 1; ac cur 1; ac avg 0; ac hig 1; co del 168; co tot 1; res req 1; fai res 0; fai rec 0; h avai 1; h unav 1; lea co 0; psc acc 2; psc add 2; psc csi 2; psc del 0; psc hit 0; psc mis 2; wfc cur 0; wfc fai 0; wfc hig 0; wfc tot 0; wse hig 0]
    [C][L][r1005][(ctx31) /faces : /firstam-btf/empVoFirstViPage] setRequestInfoPrefix() : extra [POST with 55 parameters (partial request false) (initial render false) (postback true)]
    [C][L][r1005][(ctx31) /faces : /firstam-btf/empVoFirstViPage] onAfterDoPoolMessage() : [(am501) FirstAppModule (is root)][(ses101) MESSAGE_TYPE_USING (1) STATUS_SUCCESS (8) (rp 4)]
    [C][L][r1005][(ctx31) /faces : /firstam-btf/empVoFirstViPage] onNewConstruction() : [(am502) SecondAppModuleImpl_154 (not root) parent = (null)]
    [C][L][r1005][(ctx31) /faces : /firstam-btf/empVoFirstViPage] onActivate() : [(am502) SecondAppModule (is root)](session version 11.1.1.61.92 oracle.jbo.server.SessionImpl@8add89)
    [C][L][r1005][(ctx31) /faces : /firstam-btf/empVoFirstViPage] onCreate() : [(am502) SecondAppModule (is root)]
    ########SecondAppModuleImpl.create() called.  AM isRoot() = true
    [C][L][r1005][(ctx31) /faces : /firstam-btf/empVoFirstViPage] onAfterConnect() : [(am502) SecondAppModule (is root)]
    [C][L][r1005][(ctx31) /faces : /firstam-btf/empVoFirstViPage] onPrepareSession() : [(am502) SecondAppModule (is root)]
    ########SecondAppModuleImpl.prepareSession() called.  AM isRoot() = true
    [C][L][r1005][(ctx31) /faces : /firstam-btf/empVoFirstViPage] onAfterDoPoolMessage() : [(am502) SecondAppModule (is root)][(ses101) MESSAGE_TYPE_USING (1) STATUS_SUCCESS (8) (rp 4)]
    [C][L][r1005][(ctx31) /faces : /firstam-btf/empVoFirstViPage] onPassivateState() : 5 : [(am501) FirstAppModule (is root)] pId = -1, pClientData = null, pFlags = PASSIVATE_HINT_FLAG (16)
    [C][L][r1005][(ctx31) /faces : /firstam-btf/empVoFirstViPage] onAfterDoPoolMessage() : [(am501) FirstAppModule (is root)][(ses101) MESSAGE_TYPE_RELEASING (2) STATUS_SUCCESS (8) (rp 3)]
    [C][L][r1005][(ctx31) /faces : /firstam-btf/empVoFirstViPage] onPassivateState() : 5 : [(am502) SecondAppModule (is root)] pId = -1, pClientData = null, pFlags = PASSIVATE_HINT_FLAG (16)
    [C][L][r1005][(ctx31) /faces : /firstam-btf/empVoFirstViPage] onAfterDoPoolMessage() : [(am502) SecondAppModule (is root)][(ses101) MESSAGE_TYPE_RELEASING (2) STATUS_SUCCESS (8) (rp 3)]
    [C][L][r1005][(ctx31) /faces : /firstam-btf/empVoFirstViPage] onAfterRequest() : 1 : ApplicationPool = onesizeonerootamapp.model.FirstAppModuleLocal
    (ap21)[cre 1; rem 0; act 0; pas 0; co 3; ci 3; ref reu 2; ref rec 0; unr rec 0; fail 0; tot am 1; max am 1; avg am 1; tot ava 1; avg ava 1; avg una 0; tot ref 1; ses 1; avg ses 1]
    (ds81)[cur cap 2; avai 0; unav 2; cp hig 2; ac cur 2; ac avg 0; ac hig 2; co del 122; co tot 2; res req 2; fai res 0; fai rec 0; h avai 1; h unav 2; lea co 0; psc acc 2; psc add 2; psc csi 2; psc del 0; psc hit 0; psc mis 2; wfc cur 0; wfc fai 0; wfc hig 0; wfc tot 0; wse hig 0]
    [C][L][r1005][(ctx31) /faces : /firstam-btf/empVoFirstViPage] onAfterRequest() : 2 : ApplicationPool = onesizeonerootamapp.model.SecondAppModuleLocal
    (ap22)[cre 1; rem 0; act 0; pas 0; co 1; ci 1; ref reu 0; ref rec 0; unr rec 0; fail 0; tot am 1; max am 1; avg am 1; tot ava 1; avg ava 1; avg una 0; tot ref 1; ses 1; avg ses 1]
    (ds81)[cur cap 2; avai 0; unav 2; cp hig 2; ac cur 2; ac avg 0; ac hig 2; co del 122; co tot 2; res req 2; fai res 0; fai rec 0; h avai 1; h unav 2; lea co 0; psc acc 2; psc add 2; psc csi 2; psc del 0; psc hit 0; psc mis 2; wfc cur 0; wfc fai 0; wfc hig 0; wfc tot 0; wse hig 0]
    [C][L][r1006][(ctx31) /faces : /secondam-btf/empVoSecondViPage] setRequestInfoPrefix() : extra [GET with 5 parameters (partial request true) (initial render false) (postback true)]
    [C][L][r1006][(ctx31) /faces : /secondam-btf/empVoSecondViPage] onAfterDoPoolMessage() : [(am502) SecondAppModule (is root)][(ses101) MESSAGE_TYPE_USING (1) STATUS_SUCCESS (8) (rp 4)]
    [C][L][r1006][(ctx31) /faces : /secondam-btf/empVoSecondViPage] onPassivateState() : 5 : [(am502) SecondAppModule (is root)] pId = -1, pClientData = null, pFlags = PASSIVATE_HINT_FLAG (16)
    [C][L][r1006][(ctx31) /faces : /secondam-btf/empVoSecondViPage] onAfterDoPoolMessage() : [(am502) SecondAppModule (is root)][(ses101) MESSAGE_TYPE_RELEASING (2) STATUS_SUCCESS (8) (rp 3)]
    [C][L][r1006][(ctx31) /faces : /secondam-btf/empVoSecondViPage] onAfterRequest() : 1 : ApplicationPool = onesizeonerootamapp.model.FirstAppModuleLocal
    (ap21)[cre 1; rem 0; act 0; pas 0; co 3; ci 3; ref reu 2; ref rec 0; unr rec 0; fail 0; tot am 1; max am 1; avg am 1; tot ava 1; avg ava 1; avg una 0; tot ref 1; ses 1; avg ses 1]
    (ds81)[cur cap 2; avai 0; unav 2; cp hig 2; ac cur 2; ac avg 0; ac hig 2; co del 122; co tot 2; res req 2; fai res 0; fai rec 0; h avai 1; h unav 2; lea co 0; psc acc 4; psc add 4; psc csi 4; psc del 0; psc hit 0; psc mis 4; wfc cur 0; wfc fai 0; wfc hig 0; wfc tot 0; wse hig 0]
    [C][L][r1006][(ctx31) /faces : /secondam-btf/empVoSecondViPage] onAfterRequest() : 2 : ApplicationPool = onesizeonerootamapp.model.SecondAppModuleLocal
    (ap22)[cre 1; rem 0; act 0; pas 0; co 2; ci 2; ref reu 1; ref rec 0; unr rec 0; fail 0; tot am 1; max am 1; avg am 1; tot ava 1; avg ava 1; avg una 0; tot ref 1; ses 1; avg ses 1]
    (ds81)[cur cap 2; avai 0; unav 2; cp hig 2; ac cur 2; ac avg 0; ac hig 2; co del 122; co tot 2; res req 2; fai res 0; fai rec 0; h avai 1; h unav 2; lea co 0; psc acc 4; psc add 4; psc csi 4; psc del 0; psc hit 0; psc mis 4; wfc cur 0; wfc fai 0; wfc hig 0; wfc tot 0; wse hig 0]The "Always Begin New Transaction and Always Use Existing transaction" scenario results in logging like this:
    [C][L][r1001][(ctx31) /faces : /secondIndex] setRequestInfoPrefix() : extra [GET with 3 parameters (partial request false) (initial render true) (postback true)]
    [C][L][r1002][(ctx32) /faces : /secondIndex] setRequestInfoPrefix() : extra [GET with 3 parameters (partial request false) (initial render true) (postback true)]
    [C][L][r1001][(ctx31) /faces : /secondIndex] onAfterRequest() : no ApplicationPools
    [C][L][r1002][(ctx32) /faces : /secondIndex] onAfterRequest() : no ApplicationPools
    [C][L][r1003][(ctx32) /faces : /secondIndex] setRequestInfoPrefix() : extra [POST with 5 parameters (partial request false) (initial render false) (postback true)]
    [C][L][r1003][(ctx32) /faces : /secondIndex] onNewConstruction() : [(am501) FirstAppModuleImpl_1 (not root) parent = (null)]
    [C][L][r1003][(ctx32) /faces : /secondIndex] onActivate() : [(am501) FirstAppModule (is root)](session version 11.1.1.61.92 oracle.jbo.server.SessionImpl@1d90a2c)
    [C][L][r1003][(ctx32) /faces : /secondIndex] onCreate() : [(am501) FirstAppModule (is root)]
    ########FirstAppModuleImpl.create() called.  AM isRoot() = true
    [C][L][r1003][(ctx32) /faces : /secondIndex] onAfterConnect() : [(am501) FirstAppModule (is root)]
    [C][L][r1003][(ctx32) /faces : /secondIndex] onPrepareSession() : [(am501) FirstAppModule (is root)]
    ########FirstAppModuleImpl.prepareSession() called.  AM isRoot() = true
    [C][L][r1003][(ctx32) /faces : /secondIndex] onAfterDoPoolMessage() : [(am501) FirstAppModule (is root)][(ses101) MESSAGE_TYPE_USING (1) STATUS_SUCCESS (8) (rp 4)]
    [C][L][r1003][(ctx32) /faces : /secondIndex] onNewConstruction() : [(am502) FirstAppModuleImpl_2 (not root) parent = (null)]
    [C][L][r1003][(ctx32) /faces : /secondIndex] onSetParent() : 2 : [(am502) onesizeonerootamapp_model_FirstAppModule (not root) parent = (null)] parent = [(am501) FirstAppModule (is root)]
    [C][L][r1003][(ctx32) /faces : /secondIndex] onCreate() : [(am502) onesizeonerootamapp_model_FirstAppModule (not root) parent = [(am501) FirstAppModule (is root)]]
    ########FirstAppModuleImpl.create() called.  AM isRoot() = false
    [C][L][r1003][(ctx32) /faces : /secondIndex] onPassivateState() : 5 : [(am501) FirstAppModule (is root)] pId = -1, pClientData = null, pFlags = PASSIVATE_HINT_FLAG (16)
    [C][L][r1003][(ctx32) /faces : /secondIndex] onAfterDoPoolMessage() : [(am501) FirstAppModule (is root)][(ses101) MESSAGE_TYPE_RELEASING (2) STATUS_SUCCESS (8) (rp 3)]
    [C][L][r1003][(ctx32) /faces : /secondIndex] onNewShortId() : pNewShortId = ds81, pId = java:comp/env/jdbc/connHRDS - com.bea:ServerRuntime=DefaultServer,Name=OneSizeOneRootAMApp@connHR@connHR,ApplicationRuntime=OneSizeOneRootAMApp,Type=JDBCDataSourceRuntime
    [C][L][r1003][(ctx32) /faces : /secondIndex] onAfterRequest() : 1 : ApplicationPool = onesizeonerootamapp.model.FirstAppModuleLocal
    (ap21)[cre 1; rem 0; act 0; pas 0; co 1; ci 1; ref reu 0; ref rec 0; unr rec 0; fail 0; tot am 1; max am 1; avg am 1; tot ava 1; avg ava 1; avg una 0; tot ref 1; ses 1; avg ses 1]
    (ds81)[cur cap 1; avai 0; unav 1; cp hig 1; ac cur 1; ac avg 0; ac hig 1; co del 75; co tot 1; res req 1; fai res 0; fai rec 0; h avai 1; h unav 1; lea co 0; psc acc 0; psc add 0; psc csi 0; psc del 0; psc hit 0; psc mis 0; wfc cur 0; wfc fai 0; wfc hig 0; wfc tot 0; wse hig 0]
    [L-before][L][(ctx32) /faces : /firstam-tx-btf/empVoFirstViPage] onAfterDoPoolMessage() : [(am501) FirstAppModule (is root)][(ses101) MESSAGE_TYPE_USING (1) STATUS_SUCCESS (8) (rp 4)]
    [C][L][r1004][(ctx32) /faces : /firstam-tx-btf/empVoFirstViPage] setRequestInfoPrefix() : extra [GET with 5 parameters (partial request true) (initial render false) (postback true)]
    [C][L][r1004][(ctx32) /faces : /firstam-tx-btf/empVoFirstViPage] onPassivateState() : 5 : [(am501) FirstAppModule (is root)] pId = -1, pClientData = null, pFlags = PASSIVATE_HINT_FLAG (16)
    [C][L][r1004][(ctx32) /faces : /firstam-tx-btf/empVoFirstViPage] onAfterDoPoolMessage() : [(am501) FirstAppModule (is root)][(ses101) MESSAGE_TYPE_RELEASING (2) STATUS_SUCCESS (8) (rp 3)]
    [C][L][r1004][(ctx32) /faces : /firstam-tx-btf/empVoFirstViPage] onAfterRequest() : 1 : ApplicationPool = onesizeonerootamapp.model.FirstAppModuleLocal
    (ap21)[cre 1; rem 0; act 0; pas 0; co 2; ci 2; ref reu 1; ref rec 0; unr rec 0; fail 0; tot am 1; max am 1; avg am 1; tot ava 1; avg ava 1; avg una 0; tot ref 1; ses 1; avg ses 1]
    (ds81)[cur cap 1; avai 0; unav 1; cp hig 1; ac cur 1; ac avg 0; ac hig 1; co del 75; co tot 1; res req 1; fai res 0; fai rec 0; h avai 1; h unav 1; lea co 0; psc acc 2; psc add 2; psc csi 2; psc del 0; psc hit 0; psc mis 2; wfc cur 0; wfc fai 0; wfc hig 0; wfc tot 0; wse hig 0]
    [L-before][L][(ctx31) /faces : /firstam-tx-btf/empVoFirstViPage] onAfterDoPoolMessage() : [(am501) FirstAppModule (is root)][(ses101) MESSAGE_TYPE_USING (1) STATUS_SUCCESS (8) (rp 4)]
    [C][L][r1005][(ctx31) /faces : /firstam-tx-btf/empVoFirstViPage] setRequestInfoPrefix() : extra [POST with 55 parameters (partial request false) (initial render false) (postback true)]
    [C][L][r1005][(ctx31) /faces : /firstam-tx-btf/empVoFirstViPage] onPassivateStateForUndo() : [(am501) FirstAppModule (is root)] pId = null, pClientData = null, pFlags = unknown passivation flags (0)
    [C][L][r1005][(ctx31) /faces : /firstam-tx-btf/empVoFirstViPage] onPassivateState() : 2 : [(am501) FirstAppModule (is root)] pClientData = null, pFlags = PASSIVATE_UNDO_FLAG, PASSIVATE_TO_STACK_FLAG (40)
    [C][L][r1005][(ctx31) /faces : /firstam-tx-btf/empVoFirstViPage] onPassivateConnectionState() : [(am502) onesizeonerootamapp_model_FirstAppModule (not root) parent = [(am501) FirstAppModule (is root)]] pDoc = (name = #document, doc elem = null), pParent = (name = CONN)
    [C][L][r1005][(ctx31) /faces : /firstam-tx-btf/empVoFirstViPage] onPassivateConnectionState() : [(am501) FirstAppModule (is root)] pDoc = (name = #document, doc elem = null), pParent = (name = CONN)
    [C][L][r1005][(ctx31) /faces : /firstam-tx-btf/empVoFirstViPage] onPrepareForPassivation() : [(am501) FirstAppModule (is root)] pOut = (name = #document, doc elem = null) pParent = (name = AM)
    [C][L][r1005][(ctx31) /faces : /firstam-tx-btf/empVoFirstViPage] onPrepareForPassivation() : [(am502) onesizeonerootamapp_model_FirstAppModule (not root) parent = [(am501) FirstAppModule (is root)]] pOut = (name = #document, doc elem = null) pParent = (name = AM)
    [C][L][r1005][(ctx31) /faces : /firstam-tx-btf/empVoFirstViPage] onPassivateState() : 3 : [(am502) onesizeonerootamapp_model_FirstAppModule (not root) parent = [(am501) FirstAppModule (is root)]] pDoc = (name = #document, doc elem = null), pParent = (name = AM)
    [C][L][r1005][(ctx31) /faces : /firstam-tx-btf/empVoFirstViPage] onPassivateState() : 3 : [(am501) FirstAppModule (is root)] pDoc = (name = #document, doc elem = null), pParent = (name = AM)
    [C][L][r1005][(ctx31) /faces : /firstam-tx-btf/empVoFirstViPage] onNewConstruction() : [(am503) SecondAppModuleImpl_155 (not root) parent = (null)]
    [C][L][r1005][(ctx31) /faces : /firstam-tx-btf/empVoFirstViPage] onSetParent() : 2 : [(am503) onesizeonerootamapp_model_SecondAppModule (not root) parent = (null)] parent = [(am501) FirstAppModule (is root)]
    [C][L][r1005][(ctx31) /faces : /firstam-tx-btf/empVoFirstViPage] onCreate() : [(am503) onesizeonerootamapp_model_SecondAppModule (not root) parent = [(am501) FirstAppModule (is root)]]
    ########SecondAppModuleImpl.create() called.  AM isRoot() = false
    [C][L][r1005][(ctx31) /faces : /firstam-tx-btf/empVoFirstViPage] onPassivateState() : 5 : [(am501) FirstAppModule (is root)] pId = -1, pClientData = null, pFlags = PASSIVATE_HINT_FLAG (16)
    [C][L][r1005][(ctx31) /faces : /firstam-tx-btf/empVoFirstViPage] onAfterDoPoolMessage() : [(am501) FirstAppModule (is root)][(ses101) MESSAGE_TYPE_RELEASING (2) STATUS_SUCCESS (8) (rp 3)]
    [C][L][r1005][(ctx31) /faces : /firstam-tx-btf/empVoFirstViPage] onAfterRequest() : 1 : ApplicationPool = onesizeonerootamapp.model.FirstAppModuleLocal
    (ap21)[cre 1; rem 0; act 0; pas 0; co 3; ci 3; ref reu 2; ref rec 0; unr rec 0; fail 0; tot am 1; max am 1; avg am 1; tot ava 1; avg ava 1; avg una 0; tot ref 1; ses 1; avg ses 1]
    (ds81)[cur cap 2; avai 1; unav 1; cp hig 2; ac cur 1; ac avg 0; ac hig 2; co del 79; co tot 2; res req 2; fai res 0; fai rec 0; h avai 1; h unav 2; lea co 0; psc acc 3; psc add 3; psc csi 3; psc del 0; psc hit 0; psc mis 3; wfc cur 0; wfc fai 0; wfc hig 0; wfc tot 0; wse hig 0]
    [L-before][L][(ctx31) /faces : /secondam-tx-btf/empVoSecondViPage] onAfterDoPoolMessage() : [(am501) FirstAppModule (is root)][(ses101) MESSAGE_TYPE_USING (1) STATUS_SUCCESS (8) (rp 4)]
    [C][L][r1006][(ctx31) /faces : /secondam-tx-btf/empVoSecondViPage] setRequestInfoPrefix() : extra [GET with 5 parameters (partial request true) (initial render false) (postback true)]
    [C][L][r1006][(ctx31) /faces : /secondam-tx-btf/empVoSecondViPage] onPassivateState() : 5 : [(am501) FirstAppModule (is root)] pId = -1, pClientData = null, pFlags = PASSIVATE_HINT_FLAG (16)
    [C][L][r1006][(ctx31) /faces : /secondam-tx-btf/empVoSecondViPage] onAfterDoPoolMessage() : [(am501) FirstAppModule (is root)][(ses101) MESSAGE_TYPE_RELEASING (2) STATUS_SUCCESS (8) (rp 3)]
    [C][L][r1006][(ctx31) /faces : /secondam-tx-btf/empVoSecondViPage] onAfterRequest() : 1 : ApplicationPool = onesizeonerootamapp.model.FirstAppModuleLocal
    (ap21)[cre 1; rem 0; act 0; pas 0; co 4; ci 4; ref reu 3; ref rec 0; unr rec 0; fail 0; tot am 1; max am 1; avg am 1; tot ava 1; avg ava 1; avg una 0; tot ref 1; ses 1; avg ses 1]
    (ds81)[cur cap 2; avai 1; unav 1; cp hig 2; ac cur 1; ac avg 0; ac hig 2; co del 79; co tot 2; res req 2; fai res 0; fai rec 0; h avai 1; h unav 2; lea co 0; psc acc 5; psc add 3; psc csi 3; psc del 0; psc hit 1; psc mis 4; wfc cur 0; wfc fai 0; wfc hig 0; wfc tot 0; wse hig 0]This seems to confirm more explicitly some of the observations in the blog post, and at the same time might add some additional insight into what the framework is doing.
    Suggestions to improve such MyApplicationModuleListener approach (or an alternative approach) are welcome.
    many thanks
    Jan Vervecken

    fyi
    Some additional features were added in the JAR files available
    in http://www.consideringred.com/files/oracle/2013/MyApplicationModuleListenerApp-v0.05.zip
    Like line numbers, or a queryOneRecord() method to support logging the database session SID, or a TaskFlowInfoHelper class to allow logging task-flow transaction options or DataControlFrame information.
    If these JAR files are used, it results in the modified example application
    at http://www.consideringred.com/files/oracle/2013/OneSizeOneRootAMApp-v0.03.zip
    For the same scenarios (using OneSizeOneRootAMApp-v0.03.zip), the resulting logging can be found in these files:
    - "maml-log-20130113-jdev111160-nctx.txt" : when using JDeveloper 11.1.1.6.0 and the chained "No Controller Transaction" scenario :
    [0002][C][L][r1001][(ctx31) /faces : /firstIndex] logContextInformation() :
    [0003]#{a_versionBean.appVersionInfo} = OneSizeOneRootAMApp v0.03 : oracle.jbo.Version = 11.1.1.61.92
    [0007][C][L][r1002][(ctx32) /faces : /firstIndex] onAfterPrepareModel() : task-flow = (no current TaskFlowId) (unbounded task-flow pages)
    [0008]transaction type = (no current TaskFlowId), DC scope = (no current TaskFlowId), DC frame = e1o4lmuw3_2, open transaction = null, is transaction dirty = false
    [0044][C][L][r1005][(ctx32) /faces : /firstam-btf/empVoFirstViPage] onAfterPrepareModel() : task-flow = /WEB-INF/btf/firstam-btf.xml#firstam-btf (no page-fragments)
    [0045]transaction type = -No Controller Transaction-, DC scope = shared DataControlScopeType, DC frame = e1o4lmuw3_2, open transaction = null, is transaction dirty = false
    [0046][C][L][r1005][(ctx32) /faces : /firstam-btf/empVoFirstViPage] onAfterPrepareModel() : task-flow = /WEB-INF/btf/secondam-btf.xml#secondam-btf (no page-fragments)
    [0047]transaction type = -No Controller Transaction-, DC scope = shared DataControlScopeType, DC frame = e1o4lmuw3_2, open transaction = null, is transaction dirty = true
    [0057][C][L][r1005][(ctx32) /faces : /firstam-btf/empVoFirstViPage] onAfterDoPoolMessage() : [(am501) FirstAppModule (is root)][(ses101) MESSAGE_TYPE_RELEASING (2) STATUS_SUCCESS (8) (rp 3)]
    [0058](am501) SID = 41 for select sys_context('USERENV', 'SID') as sid from dual
    [0060][C][L][r1005][(ctx32) /faces : /firstam-btf/empVoFirstViPage] onAfterDoPoolMessage() : [(am502) SecondAppModule (is root)][(ses101) MESSAGE_TYPE_RELEASING (2) STATUS_SUCCESS (8) (rp 3)]
    [0061](am502) SID = 27 for select sys_context('USERENV', 'SID') as sid from dual
    Notice the transaction type and DataControl scope information per task-flow.
    Notice the different database session SID values ("[0058](am501) SID = 41" and "[0061](am502) SID = 27") during the same request [r1005].
    - "maml-log-20130113-jdev111230-nctx.txt" : when using JDeveloper 11.1.2.3.0 and the chained "No Controller Transaction" scenario :
    [0002][C][L][r1001][(ctx31) /faces : /firstIndex] logContextInformation() :
    [0003]#{a_versionBean.appVersionInfo} = OneSizeOneRootAMApp v0.03 : oracle.jbo.Version = 11.1.2.62.76
    Notice the logged information seems similar to when, for the same application and scenario, JDeveloper 11.1.1.6.0 is used (above).
    - "maml-log-20130113-jdev111160-tx.txt" : when using JDeveloper 11.1.1.6.0 and the "Always Begin New Transaction and Always Use Existing transaction" scenario :
    [0002][C][L][r1001][(ctx31) /faces : /secondIndex] logContextInformation() :
    [0003]#{a_versionBean.appVersionInfo} = OneSizeOneRootAMApp v0.03 : oracle.jbo.Version = 11.1.1.61.92
    [0013][C][L][r1003][(ctx32) /faces : /secondIndex] onAfterPrepareModel() : task-flow = /WEB-INF/btf/firstam-tx-btf.xml#firstam-tx-btf (no page-fragments)
    [0014]transaction type = Always Begin New Transaction, DC scope = isolated DataControlScopeType, DC frame = 1220j2l4q9_5, open transaction = 1220j2l4q9_5, is transaction dirty = false
    [0017][C][L][r1003][(ctx32) /faces : /secondIndex] onCreate() : [(am501) FirstAppModule (is root)]
    [0018](am501) SID = 41 for select sys_context('USERENV', 'SID') as sid from dual
    [0025][C][L][r1003][(ctx32) /faces : /secondIndex] onCreate() : [(am502) onesizeonerootamapp_model_FirstAppModule (not root) parent = [(am501) FirstAppModule (is root)]]
    [0026](am502) SID = 41 for select sys_context('USERENV', 'SID') as sid from dual
    [0056][C][L][r1005][(ctx32) /faces : /firstam-tx-btf/empVoFirstViPage] onAfterPrepareModel() : task-flow = /WEB-INF/btf/secondam-tx-btf.xml#secondam-tx-btf (no page-fragments)
    [0057]transaction type = Always Use Existing Transaction, DC scope = shared DataControlScopeType, DC frame = 1220j2l4q9_5, open transaction = 1220j2l4q9_5, is transaction dirty = true
    [0060][C][L][r1005][(ctx32) /faces : /firstam-tx-btf/empVoFirstViPage] onCreate() : [(am503) onesizeonerootamapp_model_SecondAppModule (not root) parent = [(am501) FirstAppModule (is root)]]
    [0061](am503) SID = 41 for select sys_context('USERENV', 'SID') as sid from dual
    [0063][C][L][r1005][(ctx32) /faces : /firstam-tx-btf/empVoFirstViPage] onAfterDoPoolMessage() : [(am501) FirstAppModule (is root)][(ses101) MESSAGE_TYPE_RELEASING (2) STATUS_SUCCESS (8) (rp 3)]
    [0064](am501) SID = 41 for select sys_context('USERENV', 'SID') as sid from dual
    Notice that nested Application Module instances are created, resulting in one database session SID value per request.
    - "maml-log-20130113-jdev111230-tx.txt" : when using JDeveloper 11.1.2.3.0 and the "Always Begin New Transaction and Always Use Existing transaction" scenario :
    [0002][C][L][r1001][(ctx31) /faces : /secondIndex] logContextInformation() :
    [0003]#{a_versionBean.appVersionInfo} = OneSizeOneRootAMApp v0.03 : oracle.jbo.Version = 11.1.2.62.76
    [0052][C][L][r1005][(ctx32) /faces : /firstam-tx-btf/empVoFirstViPage] onAfterPrepareModel() : task-flow = /WEB-INF/btf/firstam-tx-btf.xml#firstam-tx-btf (no page-fragments)
    [0053]transaction type = Always Begin New Transaction, DC scope = isolated DataControlScopeType, DC frame = dw58co387_4, open transaction = dw58co387_4, is transaction dirty = false
    [0059][C][L][r1005][(ctx32) /faces : /firstam-tx-btf/empVoFirstViPage] onAfterPrepareModel() : task-flow = /WEB-INF/btf/secondam-tx-btf.xml#secondam-tx-btf (no page-fragments)
    [0060]transaction type = Always Use Existing Transaction, DC scope = shared DataControlScopeType, DC frame = dw58co387_4, open transaction = dw58co387_4, is transaction dirty = true
    [0070][C][L][r1005][(ctx32) /faces : /firstam-tx-btf/empVoFirstViPage] onAfterDoPoolMessage() : [(am501) FirstAppModule (is root)][(ses101) MESSAGE_TYPE_RELEASING (2) STATUS_SUCCESS (8) (rp 3)]
    [0071](am501) SID = 38 for select sys_context('USERENV', 'SID') as sid from dual
    [0073][C][L][r1005][(ctx32) /faces : /firstam-tx-btf/empVoFirstViPage] onAfterDoPoolMessage() : [(am502) SecondAppModule (is root)][(ses101) MESSAGE_TYPE_RELEASING (2) STATUS_SUCCESS (8) (rp 3)]
    [0074](am502) SID = 38 for select sys_context('USERENV', 'SID') as sid from dual
    Notice that two root Application Module instances are used in the same request (and no nested instances), and both (am501) and (am502) report using the same database session SID value. That seems to be "Bruce" [1] at work.
    Remember, it should not be difficult (and not intrusive) to configure similar logging for other ADF applications.
    - [1] seeblog post "Task flows: Sayonara auto AM nesting in 11.1.2.0.0. Hello, ah, let's call it Bruce."
    at http://one-size-doesnt-fit-all.blogspot.com.au/2011/08/task-flows-sayonara-auto-am-nesting-in.html
    regards
    Jan Vervecken

  • Database sessions, Application Modules and Pools

    Hi,
    I have an ADF 10.1.3 application (ADF Faces on ADF BC) that uses JAAS to authenticate it's users. After the user has logged in I would like my session_user_info managed bean to query the database and retrieve all the user's details, for access throughout the user's session. Initially I wrote the following code to achieve this:
          ApplicationModule am = Configuration.createRootApplicationModule(applicationModuleName, applicationConfigName);
          ViewObject vo = am.findViewObject("CurrentUserView1") ;
          vo.setNamedWhereClauseParam("v_userName",userName);
          vo.executeQuery();
          if(vo.getRowCount() <= 0)
            user = null ;
          else
            user = (CurrentUserViewRowImpl) vo.first();
          Configuration.releaseRootApplicationModule(am, true); This works fine BUT because it's creating a new root ApplicationModule each time I end up with an excessive number of database connections after a very short space of time (the call to Configuration.releaseRootApplicationModule does not seem to be releasing the database connection, even though the application module is released). I also don't like this as it feels like I'm "breaking" the framework by making a direct call to the model layer.
    So the next thing I wanted to try was creating a DataControl (by dragging my CurrentUserView1 on to a jspx page, then deleting it to preserve the bindings) and make a call to that using something like this:
            /**** TODO GET BINDING TO CurrentUserView1 ******/
            OperationBinding operationBinding =
                bindings.getOperationBinding("ExecuteWithParams");
            JUCtrlAttrsBinding vUsername =
                (JUCtrlAttrsBinding)bindings.findNamedObject("v_userName");
            statusCode.setAttribute("v_userName", username);
            Object result = operationBinding.execute();
            if (operationBinding.getErrors().isEmpty()) {
               /***** TODO Cast this result object in to something useful *****/
                setUser(result)
            }But as you can see I still don't completely understand what I have to do here (and yes I have trawled the various guides and documentation - but I can't work out exactly what applies to me as this isn't a backing bean).
    If any of you Aces out there can give me some pointers it would be MUCH appreciated as I've beat my head against this for a week now!!
    Dave
    Edited by: Short Dave on Dec 1, 2008 2:52 PM

    John,
    It's been 2 months since I asked this question and in that time I have tried innumerable ways of getting my application and database pools to behave in such a way that doesn't end up filling my database with unclosed sessions. The situation I'd ideally like to achieve is this:
    Application Modules
    A pool of application modules minimum 5 maximum 150 with a "working set" of about 25 (the jbo.recyclethreshold setting)
    For application modules to timeout if they are inactive for > 120 seconds (so if somebody has left their browser open in the background I don't want them hogging my AMs)
    Database Connections +(I am using a JDBC data source to allow multiple applications to reuse my connection pool settings)+
    A pool of database connections minimum 5 maximum 150
    If a connection is inactive for > 300 seconds for that connection to be closed (i.e. if an AM has been returned to the pool, but is not re-used within 5 minutes then I'd like the connection closed)
    Obviously, for the purposes of testing, I don't want to try and manage 150 browser sessions to see if this setup works, so I have been trying to create a scaled-down version of my requirements:
    Application Modules
    A pool of application modules minimum 1 maximum 5 with a "working set" of 1 (the jbo.recyclethreshold setting)
    For application modules to timeout if they are inactive for > 30 seconds
    Database Connections
    A pool of database connections minimum 1 maximum 5
    If a connection is inactive for > 60 seconds for that connection to be closed
    My problem is that, despite all the API's, the ADF for 4GL guide, forum entries and Steve Muench's guide to AM Pooling I still can't get this relatively simple example to work.
    My bc4j.xcfg file looks like (assume all other settings are as default):
             <jbo.recyclethreshold>1</jbo.recyclethreshold>
             <jbo.ampool.maxavailablesize>5</jbo.ampool.maxavailablesize>
             <jbo.ampool.maxinactiveage>30000</jbo.ampool.maxinactiveage>
             <jbo.ampool.minavailablesize>1</jbo.ampool.minavailablesize>
             <ApplicationName>gpl.model.PreUserLoginModule</ApplicationName>
             <jbo.ampool.monitorsleepinterval>30000</jbo.ampool.monitorsleepinterval>My data-sources.xml file has the following entries for the connection used by that application module (assume all other settings are as default):
      <connection-pool name="jdev-connection-pool-gslportal_at_ppmsdb"
                       disable-server-connection-pooling="false"
                       validate-connection="false" inactivity-timeout="60"
                       max-connections="5" min-connections="1"
                       property-check-interval="30"
                       used-connection-wait-timeout="30">With this configuration I can open a maximum of 5 browsers and each one connects successfully. On opening the 6th I get an exception because no more connections are available (as expected). My problem is that if I wait for 5 minutes I'd expect that
    a) 4 of the inactive application modules should be released (with one left available as per the min setting)
    b) The database connections of the 4 inactive application modules should be released as per the "inactivity" and "used-connection-wait" timeouts on the data-source
    c) I'd now expect the 6th browser to be able to connect because of the "freed up" resources
    From what I can make out none of these things happens. Even if I close the original 5 browsers, the 6th still cannot connect.
    I have noticed that if I set the "time-to-live-timeout" for the datasource then this will close the connection after the given period of time, but regardless of whether or not the connection was in use and in doing so renders the application module held in the pool as useless. (So if any of my original 5 sessions attempt to re-use the application module with the closed database connection, a "Closed Connection" SQLException is raised).
    I do appreciate this topic has been given LOTS of forum discussion already - but I really have done my research and am still none the wiser. Any help or guidance will be much appreciated.
    Kind Regards
    Dave

  • Disconnect Application Module Upon Release app module configuration.

    Hi,
    I read in one article that using that "*Disconnect Application Module Upon Release*" in App module configuration is strongly not recommended (http://andrejusb.blogspot.com/2010/02/optimizing-oracle-adf-application-pool.html).
    Can anyone pls let me know if there are any other problems apart from this (https://forums.oracle.com/forums/thread.jspa?messageID=9873898#9873898) LOV issue.

    Hi Frank,
    Thank you very much for your support.... very much needed.......
    I will give a outline of my app and please do tell me where you need indepth details so we can narrow down to the flaw.
    * JAVA : *1.6*
    * JEVELOPER VERSION: *11*
    * WebLogic : *11*
    * Oracle DB : *11g*
    ----------------------------------------- ORACLE DATABASE DETAILS*
    * VERSION : *11g*
    * MAX CURSORS LIMIT : *300*
    ----------------------------------------- WEBLOGIC DETAILS*
    * DATA SOURCE : XXXDS (Not jdbc url)
    * JNDI : jdbc/XXXDS
    * Connection pool details:
    - initial size : *1*
    - Max Capacity : *50000*
    - Inactive connection time out : *0*
    * Every other settings are defaults
    ----------------------------------------- AM's details*
    * My model contains : *19* App modules ( All root )
    * app module configs: (Giving only those were changed, else are defaults)
    --- Connection type : Data Source - datasource name : jdbc/XXXDS (One given in weblogic)
    --- jbo.ampool.maxinactiveage : *60000*
    --- jbo.ampool.monitorsleepinterval     : *30000*
    --- jbo.ampool.timetolive :*120000*
    --- jbo.locking.mode : optimistic
    ----------------------------------------- Overridden Methods*
    This method is called each and every time an app module since all appl modue extends this
    @Override
    protected void *prepareSession(Session session) {*
    String username = ADFContext.getCurrent().getSecurityContext().getUserName().toUpperCase();
    log.debug("Preparing session for user " + username);
    Statement st = getDBTransaction().createPreparedStatement("rollback", 0);
    try {
    if (st.getConnection() instanceof PoolConnection) {
    PoolConnection poolConnection = (PoolConnection) st.getConnection();
    OracleConnection connection = (OracleConnection) poolConnection.checkConnection();
    if (connection.isProxySession() && username.equals(connection.getProperties().get(PROXY_USER_PROPERTY))) {
    // no proxying required, we already have a connection that is proxied for this user
    super.prepareSession(session);
    return;
    clearStatementCache(poolConnection);
    if (connection.isProxySession()) {
    log.debug("Connection already proxied. Tearing down previous connection.");
    connection.close(OracleConnection.PROXY_SESSION);
    log.debug("Creating proxy connection for user " + username);
    Properties properties = new Properties();
    properties.put(PROXY_USER_PROPERTY, username);
    connection.openProxySession(OracleConnection.PROXYTYPE_USER_NAME, properties);
    clearStatementCache(poolConnection);
    validateUser(username);
    } else {
    throw new JboException("Connection was not a PoolConnection, your AppModule appears to be using JDBC URL configuration instead of a managed data source.\n Try changing the Local and Shared 'Configurations' for this application module: " + this.getDefFullName());
    } catch (SQLException e) {
    log.error("Unable to prepare session correctly, proxying failed.", e);
    } finally {
    try {
    st.close();
    } catch (SQLException e) {
    log.warn("Unable to close statement", e);
    super.prepareSession(session);
    @Override
    protected void beforeDisconnect() *{*
    Statement st = getDBTransaction().createPreparedStatement("rollback", 0);
    try {
    PoolConnection poolConnection = (PoolConnection) st.getConnection();
    clearStatementCache(poolConnection);
    } catch (SQLException e) {
    log.warn("Unable to tear down session correctly, clearing statement caches failed.", e);
    } finally {
    try {
    st.close();
    } catch (SQLException e) {
    log.warn("Unable to close statement", e);
    super.beforeDisconnect();
    ----------------------------------------- Few points about our design
    * A single page can load more than one app modules.
    * All LOV comes under a single app module.
    * We use multiple LOV in the same page.
    thank you for ur help......

  • How do multiple developers share the same application module

    Is there a suggested method for multiple developers to share the same application module? We have 2 developers that will have EOs in the same directory and would like to know how they can share an application module but do development on different pieces of a project.
    Thanks,
    Paula

    Try using CVS or any other source control system. Still there are some points to think about before doing big projects, because there are many files which are updated by JDEV without knowledge by the developer. This causes many conflicts using a version control system like CVS.
    If you developers both are working on the server part of the application, I suggest using multiple application modules. See this blogs:
    http://radio.weblogs.com/0118231/stories/2005/05/27/howGranularShouldMyApplicationModulesBe.html
    http://radio.weblogs.com/0118231/stories/2005/07/19/nestedApplicationModules.html
    On the client side it depends on which technology you are using (struts, swing, jsf, ...).

  • Error While Calling a WebService from Application Module

    Hi all
    I have generated a Proxy from a web Service and i am trying to call the web service from an Application Module it is throwing me error
    JBO-29000: Unexpected exception caught: oracle.classloader.util.AnnotatedNoClassDefFoundError, msg= Missing class: webservices.types.com.siebel.xml.order_interface.Orders Dependent class: java.lang.reflect.Array Loader: jre.bootstrap Code-Source: unknown Configuration: jre bootstrap
    Missing class: webservices.types.com.siebel.xml.order_interface.Orders Dependent class: java.lang.reflect.Array Loader: jre.bootstrap Code-Source: unknown Configuration: jre bootstrap
    IMy web Service is correct, as i have executed the client and it is working fine, but when i try to class the web service from an external class or from an application module it is throwing me this error. So any light on this issue will be very helpful
    thanks

    Hi,
    did you registered the web service in the external service registration? The "DataAccessException:" is a hint to this issue.
    best regards,
    Rene

  • How to add an error message in the application module?

    Hi,
    I have some code running in the application module. I want to display error messages in the messages section of the screen if an error happens in my code.
    How could I achieve this?
    I am using JDeveloper 10G
    Thanks

    Muhammed,
    Have you tried throwing a JboException in your AM code?
    John

  • How To Access HTTPS Web Service  in Application Module

    I need to know how to access HTTPS web service in application module.
    If you can provide the tutorial or guidance to achieve this really appreciate.
    Thanks
    Sameera

    Use the Web Service Proxy wizard in JDeveloper to create a class that calls your Web service, and then call this class from code in your AM.
    http://docs.oracle.com/cd/E16340_01/web.1111/b31974/web_services.htm#CJAHGIEF

  • MBean Attribute (Does not apply to application modules)

    Can any one tell what this mean ?
    MBean Attribute (Does not apply to application modules) :
    is this means that it wont help for datasources for any J2EE application ????
    Inactive Connection Timeout     
    The number of inactive seconds on a reserved connection before WebLogic Server reclaims the connection and releases it back into the connection pool.
    You can use the Inactive Connection Timeout feature to reclaim leaked connections - connections that were not explicitly closed by the application. Note that this feature is not intended to be used in place of properly closing connections.
    When set to 0, the feature is disabled.
    MBean Attribute (Does not apply to application modules) :
    JDBCConnectionPoolParamsBean.InactiveConnectionTimeoutSeconds
    Minimum value: 0
    Maximum value: 2147483647

    Yes!, they do not apply for any applications they are management interfaces, internal to weblogic.
    Below is the brief information about it:
    A managed bean (MBean) is a Java bean that provides a Java Management Extensions (JMX) interface. JMX is the J2EE solution for monitoring and managing resources on a network.
    BEA WebLogic Server provides a set of MBeans that you can use to configure, monitor, and manage WebLogic Server resources through JMX. This reference document organizes WebLogic Server MBeans into the following categories:
    MBeanServer Services, which serve as your entry point into navigating the MBean hierarchies. Some of these MBeans contain attributes and operations for managing changes to WebLogic Server configuration MBeans.
    Configuration MBeans, which expose attributes and operations for configuring WebLogic Server resources.
    Runtime MBeans, which provide information about the runtime state of its resources.
    New MBeans, which have been added in the current release of WebLogic Server. These new MBeans are also listed in other categories in this document (for example, new runtime MBeans are also listed under the Runtime MBeans category).
    Deprecated MBeans, which are deprecated in the current release of WebLogic Server.

  • Problem releasing the application module after upgrade to 11.1.1.2

    We have recently upgraded from JDeveloper 11.1.1.1 to 11.1.1.2.
    In the "tearDown()" method in our Unit Tests, the Application Module is realeased using:
    private ApplicationModule am;
    Configuration.releaseRootApplicationModule(am, true);
    Alter the upgrade, this produces the following error:
    oracle.jbo.JboException: JBO-33025: Failed to release application module MapServiceGlobal. Cookie handle not found.
    Please Help.
    FYI - this is the code that is used to create the application module:
    Hashtable env = new Hashtable(2);
    env.put(JboContext.INITIAL_CONTEXT_FACTORY,JboContext.JBO_CONTEXT_FACTORY);
    env.put(JboContext.DEPLOY_PLATFORM, JboContext.PLATFORM_LOCAL);
    try
    InitialContext ic = new InitialContext(env);
    ApplicationModuleHome home = (ApplicationModuleHome)ic.lookup(rootAM);
    am = home.create();
    catch (NamingException nex)
    /* Handle the error here if you don't find it */
    throw new NamingException("Application Module naming exception " + rootAM + " : " + nex.getMessage());
    /* Connect the AM to a database connection */
    am.getTransaction().connect(jdbcConnectionURL);
    * Set the bundled exception mode so that exceptions are thrown in the
    * same way as when we're running in the web application.
    am.getTransaction().setBundledExceptionMode(true);
    Thanks,
    -Spiro

    Hi,
    I used OCEP 10.3.0.0 and upgraded the wlevs30 domain to PS6(11.1.1.7.0). and it worked without such error.
    My experience is:
    1) in OCEP 10.3.0.0 it needs not to add the security groups in atnstore.txt
    2) you need to add <scratch-directory/> for Jetty in server's config.xml otherwise you will see the visualizer takes a long time to get up on Windows
    Thanks
    Junger

  • How do I call an Application Module method from a EntityImpl class?

    Guys and Gals,
    Using Studio Edition Version 11.1.1.3.0.
    I've got a price update form, that when submitted, takes the part numbers and prices in the form and updates the corresponding Parts' price in the Parts table. Anytime this Parts view object's ReplacementPrice attribute is changed, an application module method needs to be called which updates a whole slew of related view objects. I know you can modify view objects via associations (How do I call an Application Module method from a ViewObjectImpl class? but that's not what I'm trying to do. These AppModuleImpl methods are the hub for all price updates, as many different operations may affect related pricing (base price lists, price buckets, etc) and hence, call the updatePartPricing(key) method.
    For some reason, the below code does not call / run / activate the application module's method. The AppModuleDataControl exists and recordPartHistory(key) is registered and public. At runtime, the am.<method> code is simply ignored, and as a weird side-effect, I cannot navigate out of my current page flow.
      public void setReplacementPrice(Number value)
        setAttributeInternal(REPLACEMENTPRICE, value);
        AppModuleImpl am = (AppModuleImpl)this.getDBTransaction().findApplicationModule("AppModuleDataControl");
        Key key = new Key(new Object[]
            { getPartNumber() });
        am.recordPartHistory(key);  // AppModuleImpl method which records pricing history
        am.updatePartPricing(key); // AppModuleImpl method which updates a whole slew of related pricing tables
      }Any ideas?

    Thanks Timo.
    Turns out the code provided was correct, but the AppModuleImpl method being called was not. A dependent ViewObject wasn't returning the row I was expecting. I then tried to perform some operations on that row, which in turn ... just stopped everything, but didn't give me an error.
    It was the lack of the error that threw me off. I had never messed with calling an AppModuleImpl method from the EntityImpl so I assumed that's what was messing up.
    You are correct. It is available from the ViewRow, but I thought it better to put it in the EntityImpl. This method will be called every time the replacement cost is modified. If I didn't put it in the EntityImpl, I'd have to remember to call it every time a replacement cost changed.

  • How to configure Application module pooling?

    I want to know wheather bc4j container itself manages Application module pooling if yes then please tell me is there any file to set parameters for congiguration like one which we have for apache web server.
    If no then please let me know how to create applicatiom module pooling.
    Thanks in advance.

    Application module pooling is configurable through an application module configuration. In order to edit an application module configuration you may right click an application module and select Configurations...
    The BC4J data web beans and the BC4J JSP datatags are both application pool clients. The BC4J documentation includes descriptions of the application pool properties. The documentation also includes a code sample which illustrates how to write your own pool client.

Maybe you are looking for

  • Intrastat - Set ID

    Hi all, We want to do our intrastat reporting on billing date (FKDAT) via trx VI98. I checked the SAP help and there they say that you have to 'set ID' f) Additional specifications Origin of date: Use this indicator to control which date should be ta

  • Help need in Taskflow.

    Hi All, I have one .jsff page in which i have a popup. When i click "ok" in af:dialog iam getting following error <UIXRegion><getRegionModel> java.lang.IllegalStateException: The expression "#{bindings.dynamicRegion1.regionModel}" (that was specified

  • Spotlight Refresh Time?

    Is there a function in spotlight that causes it to repeat the search after a given period of time and if so is it controllable? I find that after a search is complete and the search window stabilizes it waits for some period of time and then repeats

  • Can't create folders

    I have iPhone and have had iPod touch so know how to create folders. My iPad will not allow me to create folders. Never has. Why would this be?..... Have checked apple site as thought perhaps it was a function not offered. Can anyone help?

  • My Iphone 5's Display is broken is it covered after three days of owning it?

    It is smashed on the display but nothing else is Apple going to cover it if its under the 90 day warranty