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

Similar Messages

  • 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

  • Intermittent error in production server JBO-25200: Application module is not connected to a database.

    We've set 60 min as session timeout and AM pool parameters also high  (<AM-Pooling jbo.ampool.maxinactiveage="1200000" jbo.ampool.initpoolsize="25" jbo.ampool.maxpoolsize="1000" jbo.recyclethreshold="50" jbo.ampool.maxavailablesize="50" jbo.ampool.minavailablesize="25"/>) in our application due to requirements.  We are using jdev 11.1.1.7.0
    Intermittently The page is getting refreshed and unsaved data is lost when user leaves a page for 5 or 10 min and on return back to application and performing operations back. There is not much load also on the server. When we analyze the logs the below exception is thrown on the logs.
    Exception Class: oracle.jbo.NotConnectedException
    Message: JBO-25200: Application module is not connected to a database.
    Agent: APP_BSA_BPA[mnatest_soa2]@egw-bpm2-mnat.wfs.com:5508
    API: Exception
    Thread Name: [ACTIVE] ExecuteThread: '6' for queue: 'weblogic.kernel.Default (self-tuning)' <562720362>
    Exception StackTrace
    Method Class Line        File Name
    handleRollback oracle.jbo.server.DefaultTxnHandlerImpl 145         <unknown>
    doRollback oracle.jbo.server.DBTransactionImpl 5174       <unknown>
    rollback oracle.jbo.server.DBTransactionImpl 2544       <unknown>
    resetState oracle.jbo.server.ApplicationModuleImpl 4860       <unknown>
    disconnect oracle.jbo.common.ampool.DefaultConnectionStrategy 343         <unknown>
    doPoolDisconnect oracle.jbo.server.ApplicationPoolMessageHandler 592         <unknown>
    doPoolMessage oracle.jbo.server.ApplicationPoolMessageHandler 430         <unknown>
    doPoolMessage oracle.jbo.server.ApplicationModuleImpl 9316       <unknown>
    sendPoolMessage oracle.jbo.common.ampool.ApplicationPoolImpl 4530       <unknown>
    prepareApplicationModule oracle.jbo.common.ampool.ApplicationPoolImpl 2460       <unknown>
    doCheckout oracle.jbo.common.ampool.ApplicationPoolImpl 2270       <unknown>
    useApplicationModule oracle.jbo.common.ampool.ApplicationPoolImpl 3169       <unknown>
    useApplicationModule oracle.jbo.common.ampool.SessionCookieImpl 592         <unknown>
    useApplicationModule oracle.jbo.http.HttpSessionCookieImpl 234         <unknown>
    useApplicationModule oracle.jbo.common.ampool.SessionCookieImpl 525         <unknown>
    useApplicationModule oracle.jbo.common.ampool.SessionCookieImpl 520         <unknown>
    initializeApplicationModule oracle.adf.model.bc4j.DCJboDataControl 523         <unknown>
    getApplicationModule oracle.adf.model.bc4j.DCJboDataControl 869         <unknown>
    internalGetBeanDataControl oracle.adf.model.bc4j.DCJboDataControl 969         <unknown>
    findOrCreateMethodRowSetIterator oracle.adf.model.bc4j.DCJboDataControl 1236       <unknown>
    initSourceRSI oracle.jbo.uicli.binding.JUMethodIteratorDef$JUMethodIteratorBinding 698         <unknown>
    callInitSourceRSI oracle.adf.model.binding.DCIteratorBinding 1679       <unknown>
    internalGetRowSetIterator oracle.adf.model.binding.DCIteratorBinding 1652       <unknown>
    refresh oracle.adf.model.binding.DCIteratorBinding 4506       <unknown>
    refreshIfNeeded oracle.adf.model.binding.DCExecutableBinding 341         <unknown>
    getRowSetIterator oracle.adf.model.binding.DCIteratorBinding 1612       <unknown>
    getViewObject oracle.jbo.uicli.binding.JUMethodIteratorDef$JUMethodIteratorBinding 473         <unknown>
    _loadCriterionList oracle.adfinternal.view.faces.model.binding.FacesCtrlSearchBinding$AdfConjunctionCriterion 3504 <unknown>
    getCriterionList oracle.adfinternal.view.faces.model.binding.FacesCtrlSearchBinding$AdfConjunctionCriterion 3417 <unknown>
    invoke sun.reflect.GeneratedMethodAccessor4821 - <unknown>
    invoke sun.reflect.DelegatingMethodAccessorImpl       25 <unknown>
    invoke java.lang.reflect.Method 597         <unknown>
    Any idea why this exception thrown ? Is this because of weblogic server connections cleanup or something to do with connections?  As per my understanding , JDBC connection will not be released when AM is active/managed mode.  Oracle Doc says
    " That application module instance holds onto the JDBC connection object that it acquired from the pool until the application module instance is removed from the application module pool."

    jbo.ampool.maxinactiveage is set to 20 min which means that If AM in the pool is inactive for 20 min then clean this AM in the next cycle (still that is not our case).  We also set jbo.recyclethreshold="50" means 50 AMs can exists in the pool with managed-state. We set these because of performance reasons.  As per my understanding, AM instance will be deleted (????) but in any action on the UI will pick up another instance of the AM because datacontrolframe is still valid in the session.  Do we have any best practice like jbo.ampool.maxinactiveage should be equal to session time out?. The error seems AM lost the underlying JDBC connection and somehow application is using that stale AM ?. what will be possible reason?.

  • Application module is not connected to a database

    Using JDev 11.1.1.3
    I have an application that uses EJB and i have an application that uses business components. The EJB app needs to integrate some parts from the BC application so i package the BC model in a jar file and use it in my EJB to create some records.
    This is some code that i execute in my EJB to create a new record using the BC jar:
    ApplicationModule module = Configuration.createRootApplicationModule("bcApp.model.MyModuleImpl", "MyModuleLocal");
    am = (MyModuleImpl)module;
    BillDefImpl billDef = (BillDefImpl)BillImpl.getDefinitionObject();
    bill = (BillImpl)billDef.createInstance2(am.getDBTransaction(), null);
    //set some attributes
    EntityDefImpl billLineDef = BillLineImpl.getDefinitionObject();
    BillLineImpl billLine = (BillLineImpl)billLineDef.createInstance2(am.getDBTransaction(),null);
    billLine.setBill(bill);
    //set some attributes
    am.getTransaction().commit();The weird behavior of this is that the first time i call this code, everything is working just fine. Both the bill and billLine are created in the database. No error shows up in the console.
    When i try to do the exact same in the same session, i get the "Application module is not connected to a databas" error. When i open a new session, everything is working fine again.
    I also tried using the am.getDBTransaction().commit(); instead of the getTransaction.
    Can anybody tell me what could cause this kind of behavior? Am i doing something wrong?
    Edited by: Yannick Ongena on Sep 5, 2011 7:31 AM

    Sorry, just a typo. I modified the classes/package for this post.
    I also did some more testing and it appears to be EJB related. The code i provided above is called from an EJB. When I execute the code from a managed bean, i don't get this error when i execute it a second time.
    Maybe also useful info. My application module uses a JNDI data source that is configured on the weblogic server.

  • JBO-25200: Application module is not connected to a database

    Using JDev 9.0.3.
    I am receiving the following error when running my app through JDevloper's embedded OC4J:
    JBO-25200: Application module is not connected to a database.
    The error is happening when I execute the following line(s) of code:
    // holds the ViewObject RowSet
    RowSet accessTypeRS = PersonalInfoForm.getAccessTypeRS();
    if (accessTypeRS != null) {
    if (accessTypeRS.getEstimatedRowCount() > 0) {
    accessTypeRS.setRangeSize(-1);
    I receive the error when trying to execute the setRangeSize method. However, several prior attempts caused the error at the line above (getEstimatedRowCount)
    I am using connection pooling with a datasource and I'm retrieving an application module through the app module pool.
    jbo.doconnectionpooling is set to true.
    Disconnect ApplicationModule upon release is checked.
    Any ideas on why and how this is happening?
    Thanks!
    -Teri Kemple
    <AppModuleConfig name="PersonalInfoBcModuleLocal">
    <DsName>jdbc/arcavisionCoreDS</DsName>
    <DeployPlatform>LOCAL</DeployPlatform>
    <DsPasswd>adw02_www</DsPasswd>
    <jbo.doconnectionpooling>true</jbo.doconnectionpooling>
    <DsUserName>adw02_www</DsUserName>
    <JDBCDataSource>jdbc/arcavisionCoreDS</JDBCDataSource>
    <jbo.project>PersonalInfoBC0</jbo.project>
    <AppModuleJndiName>com.arca.personalinfo.bc.PersonalInfoBcModule</AppModuleJndiName>
    <ApplicationName>com.arca.personalinfo.bc.PersonalInfoBcModule</ApplicationName>
    </AppModuleConfig>
    <ConnectionDefinition name="jdbc/arcavisionCoreDS">
    <ENTRY name="DsPasswd" value="adw02_www"/>
    <ENTRY name="DsName" value="jdbc/arcavisionCoreDS"/>
    <ENTRY name="DsUserName" value="adw02_www"/>
    </ConnectionDefinition>

    Hi,
    Please post test steps using the BC4J tester or a test script that illustrates the issue against a simple table. Otherwise, it is extremeley difficult to debug/diagnose the issue on this forum.
    I have not seen this issue in any of the automated unit test scripts that exercise the ApplicationModule pooling.
    Thanks,
    JR

  • 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 - 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

  • 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

  • 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

  • Application module with no connection to the database in jdeveloper 10.1.3

    I have a number of programmatic bc view objects and entity objects which i have implemented through the time from different projects and now that i have collected them i want to add all of them in a reusable application module. However i don't need a connection to the database for this application module. Is it possible to enforce the application module to circumvent the db connection?

    Hi user,
    Just out of curiosity, why would you use ADF BC for that - if I had a bunch of non-db data sources, I'd probably use POJOs and create POJO data controls.
    I didn't look in 10g, but in 11g, the ApplicationModule has a method called getDBConnectionRequired() that you could override to see if that solves your issue.
    John

  • 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 modules

    Hi,
    Is it (somehow) possible to nest an application module from another adf bc project?
    Using JDev 10.1.3.3 and JHeadstart 10.1.3.2.51.
    Ciao
    Aino

    Thanx for your quick reply.
    Is it possible to include the AM from the other project on design time and have it appear in the AM editor (as it would be with nested AM's from the same project)?
    Ciao
    Aino

  • (IMP)application module and DB connection issue

    Hi,
    In my BC4J application, Application module is not releasing DB connection after the execution of the JSP page. It usually takes approx 3500-4000sec. to release it. On what parameters this time is dependent??
    I am using data-source to connect to DB. Application Module configurations parameters are set with default values.
    If i select "Disconnect Application Module Upon Release" from the configuration of Application module, it releases DBconnection at the end of http Request. Is it a proper solution to the issue ? any performance related issues with it?
    My JSP code's basic structure is
    try
    <jbo:ApplicationModule id="<AM ID>" definition="<Fully qualified AM classname>" releasemode="Stateless/stateFul" />
    // application code
    catch(Exception e)
    // Code to take necessary action if exception occurs
    finally
    <jbo:ReleasePageResources appid="<AM ID>" releasemode="Stateless/StateFul"/>
    Please guide me on this.
    Thanks in advance,
    Devang

    Hi john,
    Thanks for your reply... in other way can i restrict the number of connections created for the application module By selecting the Disconnect Application Module Upon Release in application module configuration.
    If i select that check box in Appmodule-->configurations->Edit->Pooling and Scalability means, while loading my screen number of connections are increased after completion of loading a screen immediatly connections also got reduced. if i select this check box whether it will give any other problems.
    Here am using the uishell dynamic tab after opening more number of tabs am getting connection pool error.not allways.. thats why am trying to restrict the no.of connections opening.
    please can you provide some info regarding this
    Reg,
    Brahma B

Maybe you are looking for

  • Hiring action with reference Pernr via HR_MAINTAIN_MASTERDATA

    Ciao, I need some help to solve the following problem: I get all needed data for an hiring action via external interface and need to perform the hiring action with HR_MAINTAIN_MASTERDATA by passing a reference personel number to the function. my prob

  • Credit card not valid in Norway

    The title says it all, I have seen that many people have problems like this. I have tried for maybe a week now to add my debit card and credit card! But it doesn't work... Can you guys please fix this! I need to download my daily apps...

  • SAPK-1507EINSTPL - DDIC activation error

    Hi, Have a Solution manager 7.0 installation. Dual stack. Solaris 64. Oracle 10.2.0.4. Java stack have been patched to SPS 18. Kernel 701 Sup pkg lvl 23. Should have upgraded abap first but missed that. Also managed to miss udate of SPAM/SAINT. my cu

  • InDesign handling RAW adjustments?

    I'm glad about the new mini-bridge in InDesign CS5, but when I place an image in my document, it ignores the adjustments I've done on the image in CameraRAW. Can InDesign register these settings, or am I forced to save adjusted images as new files, b

  • Webshops

    hi We r using internet sales (ISA 5.0) with SAP r/3 as backend. We have around 300 product catalogs.(product catalogs are made by converting customer material info record of each customer into corresponding product catalog by a program ).How to go ab