Nesting App Modules from ADFLibs - jdev 11.1.2.3

Hello:
I have a dashboard application with 6 tabs. On each tab is a bounded task flow from an ADFLib. Note: each BTF has its own App Module.
In the Master DashBoard App,  the ADFLibs BTF's are dropped as regions in each tab. The Master App has its own application module and I want to nest each of the BTF App Modules under the single App Module in the Master app.  The reason is that each tab of the application currently creates a seperate DB connection. I want the Master App to only create one DB connection for the entire application.
In the resource pallet, I can see the App Modules from the seperate ADFLibs, and I have added these App Modules to the Master Project, but the newly added AM does not display under the Master App Module for me to nest. (in App Module ->- Data Model --> Application Module Instances)
How can I nest multiple AM's from ADFLibs under a single Master App Module?  ( the AM from ADFLibs do not display in Application Module Instances in the Master App)
Thanks

Have I added the application Modules to the Master Model?
Answer:
In the Master, In the Resource Pallet, I highlighted the Application Module in the ADFLibs (from Subsystem), right clicked and selected Add to Project. But this did not make the App Module display in the Master App Module Application Module Instances. (Note: my subsystem adflibs are deployed from ViewController with dependency on Model. I tried to hightlight App Module above and add to Model Project of Master in above) This caused WebLogic to fail to deploy.
What is the correct way to add an App Module from an ADFLIb subsystem and add the AM to the Master App so it displays in the Master App Module Application Module Instances?
All subsystems should use the same connection and all subsystems are set to No Controller Transaction and Share data controls with calling task flow is checked for all subsystem.
More testing revealed:
One thing to note:   each of my subsystem, a deployment profile was created on the ViewController with dependency on its Model project.  When I added the subsystem project above to add the AM, I adding the App Module from the adflib to the Model project of the master. This caused WebLogic to fail during deploy.
So I tried another test. In the subsystem, I created another deployment profile, on just the Model project and created an adflib. I added this new adflib to the Model project of the Master. The App Module from the subsystem now shows up in the Application Module Instances. (which I selected and moved over to the right to nest under Master App Module.  This time the application ran, but still have one connection per tab.)
Do you create ADFLibs with a deployment profile on the VC with dependancy to the Model Project?  Or do you create two seperate ADFLibs for subsystems, one for VC project only and one for Model project only?
Thanks for the help.

Similar Messages

  • ADF activation/Passivation - Nested App Modules

    Hi All,
    I have a question related to application module pooling in ADF.
    We are developing a application using adf 11.1.1.7. When we initially designed the application we have created multiple application modules around 14 app modules.
    Then we realized that database connection usage is very high as number of app modules are more.
    To reduce the database connection usage, we have combined all the application modules under one root application module now.
    The connection usage is reduced now, but I have a question on memory foot print.
    1) When multiple application modules are placed under a root, during passivation, will all the state of all nested app modules under the root is written to the PS_TXN table?
    2) If  for certain child modules passivation is not required as we don't need to preserve the state of the app modules across user requests,
    can we configure that at child app module level??

    In regards to question 2, the VOs have a tuning option "Passivate State" which is set on by default which you can turn off.  Please read the associated documentation around this option.
    It's highly recommended you test your application after making this change for any impacts it may have, by doing a round of regression testing with jbo.ampool.doampooling=false.  Note however that option is not supported in production, so ensure to set it back to true.
    CM.

  • Is it possible to call a custom method in App Module from a backing bean?

    I would like to know if a custom method in App Module can be called from inside a backing bean.
    I am not sure if it is logically right to call, from a backing bean, a custom method in App Module. But would like to know if that makes sense or if it is possible.

    Hi..
    Yes it is possible.You have to add that method for client interface of AppModule.Now you can see that method in Data Controls(Refresh the data control). To call this method using bean it should add as method action to bindings(Click Bindings>+>methodAction>and Create action binding).
    Now you can call this method in bean class.
    Check following example use this concept to execute view criteria
    http://adf-lk.blogspot.com/2011/05/oracle-adf-create-view-criteria-and_4727.html

  • Access App Modules from same workspace OR from different workspaces

    Hello,
    1- I want to access an application module methods "application A", from another application module methods "Application B", the two applications are developed under different workspaces, Is this doable
    in Oracle ADF, I need a solution other than web services if possible.
    2- I tried to access a method in AppModuleA using another method in AppModuleB, the two application modules are in the same work space but in different model project, I followed the link :
    http://myadfnotebook.blogspot.com/2010/08/problem-adf-application-with-multiple.html
    I used the following code:
    public String getQueryMultipleDB(){
    getEmpView1().executeQuery();
    String DB1 = String.valueOf(getEmpView1().getRowCount());
    String DB2 = " ";
    ApplicationModule appModuleDB2 =
    Configuration.createRootApplicationModule("modelDB2.ApplicationModuleDB2.common.AppModuleDB2","AppModuleDB2Local");
    ViewObject viewObjectDB2 = appModuleDB2.findViewObject("EmpView1");
    DB2 = String.valueOf(viewObjectDB2.getRowCount());
    return "DB1: "+ DB1 + " DB2: "+ DB2;
    but I am getting the following error:
    (oracle.jbo.ConfigException) JBO-33001: Configuration file /modelDB2/ApplicationModuleDB2/common/common/bc4j.xcfg is not found in the classpath.
    Please help if possible...
    Thanks in Advance,
    MAbuShaera

    Depending on your use case have a look at either nested application modules:
    http://download.oracle.com/docs/cd/E17904_01/web.1111/b31974/bcservices.htm#sm0229
    or packaging an application module in an ADF library:
    http://download.oracle.com/docs/cd/E17904_01/web.1111/b31974/reusing_components.htm#BABCHHHJ

  • How to call an App Module from another App Module?

    Here are the settings for my project.
    MyApplication (Application)
    Model1 (Project) : Has connection settings to connect to schema1
    Model2 (Project) : Has connection settings to connect to schema2
    ViewController (Project) : View project
    How do I call Model2 from Model1 ? I tried calling findApplicationModule but that did not work.
    Can I get access to the AppModule from JNDI tree? How else can I get access to Model2 from Model1?
    Thanks

    This is the code that is getting called from App Module 1. The first method, test1, throws an error where as test2 is successful. Do you see any obvious errors in the code?
    public String test1() {
    System.out.println("This is test1");
    String amDef = "org.model.service.HrService";
    String config = "HrServiceLocal";
    ApplicationModule am2 = (ApplicationModule ) Configuration.createRootApplicationModule(amDef,config);
    HrServiceImpl am3 = (HrServiceImpl)am2;
    am3.test123();
    Configuration.releaseRootApplicationModule(am2, true);
    //return am2;
    return "test1";
    Error:
    Internal Server Error (Caught exception while handling request: oracle.jbo.ConfigException: JBO-33005: Configuration HrServiceLocal not found)
    public String test2() {
    String AMDefName = "org.model.service.HrService";
    Hashtable env = new Hashtable(2);
    env.put(JboContext.INITIAL_CONTEXT_FACTORY,JboContext.JBO_CONTEXT_FACTORY);
    env.put(JboContext.DEPLOY_PLATFORM, JboContext.PLATFORM_LOCAL);
    HrService am = null;
    try { 
    InitialContext ic = new InitialContext(env);
    ApplicationModuleHome home = (ApplicationModuleHome)ic.lookup(AMDefName);
    am = (HrService)home.create();
    String retString = am.test123();
    System.out.println("Value from the first application module=" + retString);
    catch (NamingException nex) {  /* Handle the error here if you don't find it */
    System.out.println("Naming exception " + nex);
    Configuration.releaseRootApplicationModule(am, true);
    return "test2";
    successful
    Thanks
    Mike

  • OC4J & nested app. modules

    I've successfully deployed my server BC4J project on Orion EJB server but I am not able to call
    top_app._module thatalready_exists.findApplicationModule( "AuditModule" );
    to find a nested module. I get this exception:
    Looking bean sess_iiop://thisServer/:thisSession//BAFIR/ftr.audit.AuditModule
    javax.naming.NameNotFoundException: :thisSession
    If I try to create this nested "AuditModule" as a single topmost one it creates it, but as a nested it does not. This module is indicated in the app. module wizzard to be nested.
    The project has been tested in local mode and did work ok.
    What am I doing wrong ?

    Anyone?

  • 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

  • Calling custom methods from Nested Application Modules

    We are having a problem with passing parameters to our nested App Modules.
    We have a custom method in our nested app module and when we drag that method from our data control palette in our page everything seems to work just fine. We are binding our NamedData values to #{requestScope.<field>} where the fields are inputText controls. When we run it will execute the function but the parameters are null.
    It seems to me that the Nested App Module can not evaluate the EL expression, or in other words when it gets evaluated it returns a null.
    Can anyone help with this?
    Thanks,
    Peter

    If you use an EL expression of some hard-coded value instead of #{requestScope.XXX} does that value correctly get passed to the function?
    In other words, are you 100% sure that EL expression is not evaluating to null ?
    If you drop an AM method as a parameter form on a page, you'll see that by default it's NamedData elements use EL expressions that reference attribute bindings that are bound to local page-def variables, rather than to #{requestScope.something}

  • Can't call app module methods!

    I have a web app that has two AppModules: AppModule and SFAppModule. SFAppModule is NOT nested within AppModule.
    In a method inside of AppModule, I need to set a where clause for a view that is part of the data model for the SFAppModule. I can't seem to gain access to the other application module.
    1. If I Make it a NESTED app module, then of course, I have a reference to it, as it adds it, BUT I'd end up having to fix the view references to this new AppModule.
    2. I could always move the VIEW objects out of SFAppModule into AppModule, but the idea was that any object in SF was really specific to that "subsystem". Of course one of the main launch pages needs to read 6 different views, two from each app module (we're planning on adding one more application module).
    Did we paint ourselves into a corner???
    How can we get a reference to SFAppModule from inside of AppModule if it is NOT a nested application module of AppModule?
    argh.

    Alternatives for Help Resetting Security Questions and Rescue Mail
         1. Apple ID- All about Apple ID security questions.
         2. Rescue email address and how to reset Apple ID security questions
         3. Apple ID- Contacting Apple for help with Apple ID account security.
         4. Fill out and submit this form. Select the topic, Account Security.
         5.  Call Apple Customer Service: Contacting Apple for support in your
              country and ask to speak to Account Security.
    How to Manage your Apple ID: Manage My Apple ID

  • 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

  • What's the best practice to get App Module on Jdev 10.1.3 using Struts/ADF?

    Hi,
    I read Mr. Muench's post stating that the best way to execute an App. Module method is to make the method part of the client interface and then drag and drop it on a form as a button ...
    In another post Muench says that a another way to get the App Module is using getDataProvider() method, I tried and found that this worked in:
    // standard event handler interface
    // on PageController class
    public class MyFormPageController extends PageController
    public void onUpdate(PageLifecycleContext ctx)
    AMServImp am;
    am = (AMServImpl)ctx.getBindingContext().getDefaultDataControl().getDataProvider();
    am.myMethod( ... );
    am.getTransaction().commit();
    I really like the second option because is closer to what I used to do in 10.1.2 with an event handler receiving DataActionContex parameter. Besides, is not clear to me in the former method with the drag and drop how the form inputs are assigned to the method parameters ....
    I would like to know however what is the best way and why ?
    Any comments ?
    -OM
    Message was edited by:
    omar71

    According to JSR 227, which ADFm is implementing, the view/controller portions of your application aren't really supposed to be touching the business services, or even the data controls, at all. They're supposed to do all model manipulation entirely through the databindings.
    This is just another bit of "code separation"--much like MVC code separation--that should make the application a bit easier to maintain. Your application module could change dramatically--maybe even be replaced by an EJB session bean--and all you have to do is change the .dcx file and your page model files, rather than searching through your code. Maintainability and readability is the advantage here; I don't think there could possibly be any slowdown by calling ctx.getBindingContext().getDefaultDataControl().getDataProvider(), since that's what the bindings would do anyway.
    Well, of course there's the "ADF supports going this way declaratively", which is not to be sneezed at as an advantage.
    As to how to put the form values in to the method binding: Look up the <af:setActionListener> tag (e.g., using full-text search in the help). You can nest that into your commandButton or commandLink tags and use it to set method parameters.
    Best,
    Avrom

  • Transaction control of app module implementation , from a SLSB

    Hi, We are using a Session bean , to invoke app module implementation - service methods to manipulate VOs.
    The service method of app module is having control of transactions , like commit . We want to have this control from stateless session bean.
    Could some one help me ? Thanks .

    Hi,
    expose a custom client method on the ADF BC module and have this method (in AM impl) calling commit.
    Frank

  • Can not access root app module in nested one

    I am using Jdeveloper 11g R2 (11.1.2.3) & Weblogic 10.3.5.0
    I have a root application module and few nested application modules nested under root one in my ADF application
    I have few common methods under root application module Impl class and try to access them in nested Impl classes
    like this (This code is in nestedAppModuleImpl class):
    RootAppModuleImpl root = (RootAppModuleImpl)someViewObject.getDBTransaction().getRootApplicationModule();
    root.doSomething();
    when I execute above code this excepton is thrown:
    oracle.jbo.server.ApplicationModuleImpl cannot be cast to mypackage.RootAppModuleImpl
    Any comment or workaround?
    What is the proper solution?
    Regards
    Mohsen

    Mohsen, there is something terribly wrong with your code.
    //(This code is in nestedAppModuleImpl class):
    RootAppModuleImpl root = (RootAppModuleImpl)someViewObject.getDBTransaction().getRootApplicationModule();
    root.doSomething();doesn't make sense. Does doSomething() really return an RootAppModuleImpl? You can access the root application module from the nested application module by
    RootAppModuleImpl root = (RootAppModuleImpl)getRootApplicationModule();If you get a class cast exception it means that there is something wrong with your RooAppModuleImpl. Does it extend ApplicationModuleImpl? If yes the cast should be possible.
    Is the root application module of the type RootAppModuleImpl? only then you can access the common methods after getting the root application module.
    the next method
    private ViewObject getAccountExistsView(DBTransaction t) {
    ApplicationModule root = t.getRootApplicationModule();
    ViewObject vo = root.findViewObject("MemberExistsView");
    if (vo == null) {
    vo = root.createViewObject("MemberExistsView","model.MemberExistsView");
    return vo;
    }doesn't make sense to me. Where does this method reside? in the RootAppModuleImpl? if yes, why do you call getRootApplicationModule? You are in the root application Module. I can' comment on the createViewObject you are calling, but my feeling is that you don't need it either. The view you are creating should be there already if your application module are setup correctly.
    And you are right, you should not call createRootApplicationModule if it is not needed. In your case it's not!
    Timo

  • How to detect JBO Exception from within Apps Module Custom Method ?

    Hi all,
    I have a custom method in apps module (AM) to set "Status" attribute to "A' in an antity, this is for approval.
    Also there is a rule that the transaction cannot be approved if it is already cancelled by another user (in multi user environment).
    The problem is :
    If the AM custom method fail (because it throws JBOException in the entity setter method), How can I know that it fails ?
    and report it back to the backing beans that call the custom method ?
    Thank you for your help,
    xtanto
    Below is the code :
    1. create a custom method in AM to do : setStatus ("A") ;
    public void approve(){
    ViewObject bphVo = findViewObject("BpHView1");
    BpHViewRowImpl vBphViewRow = (BpHViewRowImpl)bphVo.getCurrentRow();
    vBphViewRow.setStatus("A");
    2. Do a validation inside setStatus method of the entity :
    public void setStatus(String value) {
    if (! getCancel() == true )
    setAttributeInternal(STATUS, value);
    else
    throw new JboException("Error ! transaction already cancelled");
    3. On backing beans :
    public String approveButton_action() {
    BindingContainer bindings = getBindings();
    OperationBinding operationBinding =
    bindings.getOperationBinding("approve");
    Object result = operationBinding.execute();
    if (!operationBinding.getErrors().isEmpty()) {
    System.out.println("There is JBO Error !!");
    return null;
    else{
    commitButton_action();
    return "back";
    }

    Try this code:
    approveButtonAction()  {
    String navigationString = null;
    try {
    Object result = operationBinding.execute();
    naviagionString = success;
    catch (JboException e) {
       navigationString = null;
       (DCBindingContainer)bc.cacheException(e);
    } finally {
    if(navigationString != null)
      return commitButtonAction();
    else
      return navigationString;
    }

  • App module view object row currency and task flows

    Hello -
    Using JDev 11gR1. My application uses ADF Rich Faces with ADFBC.
    I have case where I want to
    a. select a row in a table based on a view object
    b. hit a button to invoke a method in an application module.
    c. in the app mod method, call getMyViewObject().getCurrentRow() to get the row selected by the user
    d. "do something" with the row
    In 10.1.3, this worked fine.
    In 11gR1, I am having problems:
    1. The above situation works fine if I have a regular page.
    HOWEVER,
    2. The above situation does NOT work if my table is in a page fragment in a task flow. (The getCurrentRow() returns NULL.)
    For case #2 I've checked the following:
    * verified that the selectedRowKeys and selectionListener attributes were set on the table in the page
    * verified that I'm using the correct app module instance (I have nested application modules).
    * experimented w/various transaction and data control scope settings in the task flow definition.
    So... from those details is there something obvious I am doing wrong? It looks like cases #1 and #2 above use different row set iterators. Is there a way to grab the correct row set from within my app module method? Does this have something to do with the data control scope defined by the task flow? (For 11g do I need to "rethink" sticking logic in the app module and instead placing it within a managed bean get access to my ADFBC objects via the bindings layer?)
    Thank you for reading my question,
    -- Scott

    See this article for View Object tuning tips:
    http://www.oracle.com/technology/products/jdev/tips/muench/voperftips/index.html
    Are you planning to use this AM as a nested AM inside other application modules?
    If you don't the "selection AM" will have its own, separate database connection/transaction.
    If you do, it will share connection, transaction with its containing "root" AM.
    It may not be relevant to your application, but just realize (which is explained in the article I point to above) that view objects that are not related to entity objects do not "see" pending changes in the current transaction. That feature depends on the VO/EO cooperation. It's fine to build VO's without an EO -- in fact we've made it easier to do this in 10.1.2 in the Design Time wizards -- but you just want to make sure you realize what features it's giving up. If you don't need those EO-related features, then by all means create an Expert Mode VO that's not related to EO's.

Maybe you are looking for

  • Ordering of formula and summary fields - Reports6i

    Hello, I want to know if it is possible to make certain order of field (XML tags) in XML. If I have ordinary field that I get from SQL I can put it in the place that I want it to be and position in xml is OK, but when I put formula or summary field o

  • HT1222 Problem installing iTunes on Windows 7

    The error I receive is that I there are files missing from the system for the install. I found instructions to delete the temp file in the appdata area for my username. This could not be done so I deleted all the files within. I deinstalled all the a

  • Importing 8mm tapes,

    I converted 8mm tapes using a digital8 camcorder but think the camcorder has issues, because I just picked up a 8mm camcorder and footage looks better, not noisy like on the d8, anyhow now I have a canon elura set up with pass through ready and an an

  • Component URI

    Hello All, We are implementing the search functionality in NW04 portal. My portal version is EP6.0SP16. The search is getting accessed in the masthead for both the logged in users and the anaonymous user. Now for this I have a code for opening up a s

  • Clents from specific site loosing internet access randomly

    Hi, this is happening for a while on one of our site. First, here's an overview of our setup The problem is happening on clients of 12.x subnet. So randomly some clients can't browse internet sites. It happens for 30min-1h and then comes back by itse