Application Module connection

Hallo,
I have problem finding where db connection is already started. Following Steve Muench example of Dynamic JDBC credentials I have registered DynamicJdbcBindingFilter with code like that:
session.setAttribute(Configuration.DB_USERNAME_PROPERTY, usrName);
session.setAttribute(Configuration.DB_PASSWORD_PROPERTY, pswd);
if (jdbcURL != null) {
session.setAttribute(Configuration.DB_CONNECT_STRING_PROPERTY,jdbcURL);
super.doFilter(request, response, chain);
session.setAttribute(LOGGEDIN_ATTR,NON_NULL_VALUE);
Just after successful logon I need to call db procedure which sets some application role to logging user (dbms_session.set_role). Where I have to put this code? Where is the first class where I can obtain db connection to do that?

In the article "How to support dynamic JDBC credentials" on the last page you describe to we have to register the SessionCookie factory with the AM pool.
Do I have to configure each AM in our application? We have about ~30 AMs ....

Similar Messages

  • Root Application Module connecting to 2 databases technologies

    I have an application which needs to connect to 2 different databases.
    I managed to get access to each databases in their own respective Application Modules.
    In order to achieve that, I created a new ViewObject within the "oracle" model, and still used the "MySQL" query. Using the jbo.envinfoprovider property, I can force the Application module to connect to the appropriate database, MySQL in this case.
    Now, my problem is that I need to have a Root application module that will use BOTH "child" application module and eventually BOTH database connections. At the moment, I can only use one at a time. Using the jbo.envinfoprovider property of the ROOT application module allows me to select which of the 2 database I want to use, but I need both.
    To put it in a tree-like structure, here's what I want to achieve :
    ROOT (Oracle + MySQL)
    |
    |__ AppModule1 (Oracle)
    | |
    | |__ View1
    | |__ View2
    |
    |__ AppModule2 (MySQL)
    |
    |_ View3

    What I mean is if I deploy the application on the integrated weblogic server, using the default navigation flow defined in the adfc-config.xml file, when I reach the "forensic" page, it will try to "read" from both database and fail at reading the second database.
    The page displays the following :
    1- a table containing the records from the Oracle database (3 columns=> ID, pattern, solution)
    2- an adf_form used to populate the above table :
    - the ID is bound to a database trigger, so is set to readonly
    - the solution is a text input field
    - the Pattern is a LoV, based on the data found on the MySQL database.
    If I test the page from the "forensic.jspx" itself (by right-clicking and selecting "Run"), I can manage the data just fine (I can do any CRUD operations I want)
    on the other hand, if I go to the "adfc-config.xml" file and (right-click and then select "Run"), the page will only read one of the two database (I can control which one, by changing the jbo.envinfoprovider property of my application module)
    Hope this helps understand what I am trying to achieve.
    Thanks !

  • Jdeveloper 10g Failed to chekcout the application module connection problem

    Hello friends,
    I am using trying to simulate the demo of "Oracle Application Development Framework (Oracle ADF) declarative and visual J2EE development" given on the same site.
    To do the same I just downloaded the Jdeveloper 10g and followed the steps given in the application.
    While running the page1DataAction in StrutsPageFlow I got the following exception on my internet explorer.
    500 Internal Server Error
    JBO-30003: The application pool (model.AppModuleLocal) failed to checkout an application module due to the following exception:
    oracle.jbo.JboException: JBO-29000: Unexpected exception caught: oracle.jbo.JboException, msg=JBO-29000: Unexpected exception caught: java.lang.ClassCastException, msg=sun.jdbc.odbc.JdbcOdbcConnection
         at oracle.jbo.JboException.<init>(JboException.java:343)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:1759)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule(ApplicationPoolImpl.java:2488)
         at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:434)
         at oracle.jbo.http.HttpSessionCookieImpl.useApplicationModule(HttpSessionCookieImpl.java:241)
         at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:405)
         at oracle.jbo.common.ws.WSApplicationModuleImpl.createWorkerApplicationModule(WSApplicationModuleImpl.java:1606)
         at oracle.jbo.common.ws.WSApplicationModuleImpl.getCustomApplicationModule(WSApplicationModuleImpl.java:1584)
         at oracle.adf.model.bc4j.DCJboDataControl.setDataProvider(DCJboDataControl.java:781)
         at oracle.adf.model.bc4j.DCJboDataControl.<init>(DCJboDataControl.java:140)
         at oracle.jbo.uicli.binding.JUApplication.<init>(JUApplication.java:94)
         at oracle.jbo.uicli.binding.JUApplication.<init>(JUApplication.java:85)
         at oracle.adf.model.bc4j.DataControlFactoryImpl.createSession(DataControlFactoryImpl.java:249)
         at oracle.adf.model.bc4j.DataControlFactoryImpl.createSession(DataControlFactoryImpl.java:93)
         at oracle.jbo.uicli.mom.JUMetaObjectManager.loadCpx(JUMetaObjectManager.java:543)
         at oracle.adf.model.servlet.ADFBindingFilter.initializeBindingContext(ADFBindingFilter.java:228)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:84)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:610)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:784)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
         at java.lang.Thread.run(Thread.java:536)
    ## Detail 0 ##
    oracle.jbo.JboException: JBO-29000: Unexpected exception caught: java.lang.ClassCastException, msg=sun.jdbc.odbc.JdbcOdbcConnection
         at oracle.jbo.JboException.<init>(JboException.java:343)
         at oracle.jbo.pool.ResourcePool.createResource(ResourcePool.java:524)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:1646)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule(ApplicationPoolImpl.java:2488)
         at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:434)
         at oracle.jbo.http.HttpSessionCookieImpl.useApplicationModule(HttpSessionCookieImpl.java:241)
         at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:405)
         at oracle.jbo.common.ws.WSApplicationModuleImpl.createWorkerApplicationModule(WSApplicationModuleImpl.java:1606)
         at oracle.jbo.common.ws.WSApplicationModuleImpl.getCustomApplicationModule(WSApplicationModuleImpl.java:1584)
         at oracle.adf.model.bc4j.DCJboDataControl.setDataProvider(DCJboDataControl.java:781)
         at oracle.adf.model.bc4j.DCJboDataControl.<init>(DCJboDataControl.java:140)
         at oracle.jbo.uicli.binding.JUApplication.<init>(JUApplication.java:94)
         at oracle.jbo.uicli.binding.JUApplication.<init>(JUApplication.java:85)
         at oracle.adf.model.bc4j.DataControlFactoryImpl.createSession(DataControlFactoryImpl.java:249)
         at oracle.adf.model.bc4j.DataControlFactoryImpl.createSession(DataControlFactoryImpl.java:93)
         at oracle.jbo.uicli.mom.JUMetaObjectManager.loadCpx(JUMetaObjectManager.java:543)
         at oracle.adf.model.servlet.ADFBindingFilter.initializeBindingContext(ADFBindingFilter.java:228)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:84)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:610)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:784)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
         at java.lang.Thread.run(Thread.java:536)
    ## Detail 0 ##
    java.lang.ClassCastException: sun.jdbc.odbc.JdbcOdbcConnection
         at oracle.jbo.server.OracleSQLBuilderImpl.isConnectionAlive(OracleSQLBuilderImpl.java:3168)
         at oracle.jbo.server.ConnectionPool.getConnectionInternal(ConnectionPool.java:90)
         at oracle.jbo.server.ConnectionPool.getConnection(ConnectionPool.java:65)
         at oracle.jbo.server.ConnectionPoolManagerImpl.getConnection(ConnectionPoolManagerImpl.java:56)
         at oracle.jbo.server.DBTransactionImpl.establishNewConnection(DBTransactionImpl.java:831)
         at oracle.jbo.server.DBTransactionImpl.initTransaction(DBTransactionImpl.java:1067)
         at oracle.jbo.server.DBTransactionImpl.initTxn(DBTransactionImpl.java:5286)
         at oracle.jbo.server.DBTransactionImpl2.connect(DBTransactionImpl2.java:116)
         at oracle.jbo.common.ampool.DefaultConnectionStrategy.connect(DefaultConnectionStrategy.java:288)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.connect(ApplicationPoolImpl.java:3515)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.instantiateResource(ApplicationPoolImpl.java:2151)
         at oracle.jbo.pool.ResourcePool.createResource(ResourcePool.java:515)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:1646)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule(ApplicationPoolImpl.java:2488)
         at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:434)
         at oracle.jbo.http.HttpSessionCookieImpl.useApplicationModule(HttpSessionCookieImpl.java:241)
         at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:405)
         at oracle.jbo.common.ws.WSApplicationModuleImpl.createWorkerApplicationModule(WSApplicationModuleImpl.java:1606)
         at oracle.jbo.common.ws.WSApplicationModuleImpl.getCustomApplicationModule(WSApplicationModuleImpl.java:1584)
         at oracle.adf.model.bc4j.DCJboDataControl.setDataProvider(DCJboDataControl.java:781)
         at oracle.adf.model.bc4j.DCJboDataControl.<init>(DCJboDataControl.java:140)
         at oracle.jbo.uicli.binding.JUApplication.<init>(JUApplication.java:94)
         at oracle.jbo.uicli.binding.JUApplication.<init>(JUApplication.java:85)
         at oracle.adf.model.bc4j.DataControlFactoryImpl.createSession(DataControlFactoryImpl.java:249)
         at oracle.adf.model.bc4j.DataControlFactoryImpl.createSession(DataControlFactoryImpl.java:93)
         at oracle.jbo.uicli.mom.JUMetaObjectManager.loadCpx(JUMetaObjectManager.java:543)
         at oracle.adf.model.servlet.ADFBindingFilter.initializeBindingContext(ADFBindingFilter.java:228)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:84)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:610)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:784)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
         at java.lang.Thread.run(Thread.java:536)
    Please help me.As i am new user please tell me Is there any path to be set.
    ThankYou.

    CAN ANYONE HELP ME.

  • 902: DefaultConnectionStrategy is disconnecting an application module conne

    Very odd exception from BC4J 902
    We have 4 ears deployed to this appserver, hot deploy happens most days for all 4 deployed ears.
    There's common classes deployed in all ears. Some times we see class cast exe's but that may be another issue.
    We've not changed anything in our env. but this afternoon one of our apps (.ear) started the following malfunctions.
    We haven't bounced oc4j for 2 days and don't want to because I suspect these errors will stop, but for what period of time?
    Our dev OC4J environment has this intermittant situation started happening.
    We're intermittantly seeing the following exceptions in SqlVO.executeQuerry()
    The use case will usually work with a new session (new browser).
    Some use cases will then fail 100% for the 2nd to nth try.
    The main piece of odd evidence we see is the following line in the
    log file. Note the lack of NL after the bind param "SCRIBE"
    [415531] Clear QueryCollection in cache...
    [415531] DRVR DBG1 Statement.setEscapeProcessing
    Binding param 1: SCRIBEDefaultConnectionStrategy is disconnecting an application module connection
    [415534] ViewObject close prepared statements...When the use case executes properly (no NPE) the log does not
    have the text DefaultConnectionStrategy is ...
    or the close prepared statements line.
    Exception from a SqlVO we intermitantly see #1
    java.lang.NullPointerException
        at oracle.jbo.common.WeakHashtableImpl.put(WeakHashtableImpl.java:264)
        at oracle.jbo.common.WeakHashtable.put(WeakHashtable.java:97)
        at oracle.jbo.server.ViewObjectImpl.updateQueryCollectionCache(ViewObjectImpl.java:3332)
        at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:524)
        at oracle.jbo.server.ViewRowSetImpl.executeQuery(ViewRowSetImpl.java:543)
        at oracle.jbo.server.ViewObjectImpl.executeQuery(ViewObjectImpl.java:2557)
        at _storeDetails._jspService(_storeDetails.java:305)
        at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
        at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
        at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
        at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:721)
        at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
        at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
        at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
        at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
    Exception type #2 from SqlVo we intermittantly see
    instance of=class java.lang.NullPointerException
    java.lang.NullPointerException
         at oracle.jdbc.dbaccess.DBDataSetImpl._createOrGetDBItem(DBDataSetImpl.java:559)
         at oracle.jdbc.dbaccess.DBDataSetImpl.setBytesBindItem(DBDataSetImpl.java:1783)
         at oracle.jdbc.driver.OraclePreparedStatement.setItem(OraclePreparedStatement.java:1005)
         at oracle.jdbc.driver.OraclePreparedStatement.setString(OraclePreparedStatement.java:1387)
         at oracle.jdbc.driver.OraclePreparedStatement.setObject(OraclePreparedStatement.java:2520)
         at oracle.jdbc.driver.OraclePreparedStatement.setObject(OraclePreparedStatement.java:2905)
         at oracle.jbo.server.ViewRowSetImpl.bindParameters(ViewRowSetImpl.java:1279)
         at oracle.jbo.server.QueryCollection.executeQuery(QueryCollection.java:485)
         at oracle.jbo.server.ViewObjectImpl.executeQueryForCollection(ViewObjectImpl.java:2593)
         at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:502)
         at oracle.jbo.server.ViewRowSetImpl.executeQuery(ViewRowSetImpl.java:543)
         at oracle.jbo.server.ViewObjectImpl.executeQuery(ViewObjectImpl.java:2557)
         at _offStoreHistory._jspService(_offStoreHistory.java:304)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)Thanks, curt

    Curt:
    In your first failure, it seems one thread is closing JDBC connection of the AM while another thread is trying to use the same AM to do executeQuery.
    Similar problem for the second failure...
    Most likely explanation has to do with hot deployment. When you hot-deploy your app, your old instance is invalidated, which would close your connection.
    Bottom line: don't do hot deploy while there are active sessions.
    Thanks.
    Sung

  • DataBindings and Application Module Bean

    Hallo everybody,
    I am working on JDev 10.1.3.4 and Oracle Application Server 10.1.3.4.
    I developed an 'application module' and I maked it as remotable using 'EJB Session Bean' option;
    then I deployed it on the AS.
    I know how to call remote application module by code in a JClient application ([thanks to a metalink note|https://metalink2.oracle.com/metalink/plsql/f?p=130:14:6076423513290714654::::p14_database_id,p14_docid,p14_show_header,p14_show_help,p14_black_frame,p14_font:NOT,309753.1,1,1,1,helvetica|thanks to a metailk note]):
    bq. JUApplication app = new JUApplication(TestClient.getAppModule()); \\ app.setClientApp(DCDataControl.JCLIENT); \\ +     app.getApplicationModule(+)
    I would like to use remote application module function by DataBindings and %PageDef.
    is it possible? how can I do this?
    best regards
    Edited by: user567554 on Dec 17, 2008 5:44 PM

    Hi Frank,
    thank you for reply.
    Could you make an example how to configure my datacontrol for a remote Application Module Connection?
    I'm able to connect to a remote AM deployed to Local Embedded OC4J, but I'm not able to connect to to a remote AM deployed in a remote AS
    I think need change DataControl Configuration Attribute with the appropiate AM Configuration. Probably my AM Configuration is wrong:
    &lt;AppModuleConfig name="AppModuleEmbeddedASTest2"&gt;
    &lt;DeployPlatform&gt;EjbIas&lt;/DeployPlatform&gt;
    &lt;java.naming.security.principal&gt;oc4jadmin&lt;/java.naming.security.principal&gt;
    &lt;java.naming.security.credentials&gt;*ASpwd*&lt;/java.naming.security.credentials&gt;
    &lt;jbo.internal.embedded&gt;true&lt;/jbo.internal.embedded&gt;
    &lt;JDBCDataSource&gt;jdbc/+myConnDS+&lt;/JDBCDataSource&gt;
    &lt;AppModuleJndiName&gt;AppModuleBean&lt;/AppModuleJndiName&gt;
    &lt;HostName&gt;*AS-IPAddr*&lt;/HostName&gt;
    &lt;ApplicationPath&gt;+ejbAM  (My Application Name)+ &lt;/ApplicationPath&gt;
    &lt;java.naming.security.authentication&gt;simple&lt;/java.naming.security.authentication&gt;
    &lt;ApplicationName&gt;model.AppModule&lt;/ApplicationName&gt;
    &lt;ConnectionPort&gt;*+23791 (found in $ORACLE_HOME/j2ee/myTests//config/rmi.xml)+* &lt;/ConnectionPort&gt;
    &lt;jbo.server.internal_connection&gt;jdbc/myConnCoreDS&lt;/jbo.server.internal_connection&gt;
    &lt;/AppModuleConfig&gt;

  • 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

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

  • Can't change connection in configuration of application module

    I've trouble in changing a connection in a configuration of an application module.
    To reproduce this do the following:
    - create two or more connections (in my case: to different databases on different servers, one of them via JDBC-ODBC Bridge)
    - create an empty BC4J project
    - create an application module using one of the connections
    - right click the am and select configurations
    - in the configuration manager select the (default) configuration (usually AppModuleLocal)
    - select "edit"
    - in the "Connection Type" section select "JDBC URL"
    - Change the Connection Name to point to a different connection
    - close the connection manager
    - repeat the steps from (*)
    - repeat the steps from (*) once more
    => you'll be unable to change the connection back to the connection used first. You can change it in the configuration manager, but if you reopen the configuration manager you'll see the old connection again.

    You can edit the bc4j.xcfg and change the connation name within the configuration. I will try to reproduce and fix this bug.
    Thanks
    Juan

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

  • One application module with 3 differente data base connections

    I have 3 different servers for data base connections. The main is "sys", the second "stanby" and the third: "bdbatch". In the old application,that i m re programating, uses a properties to read the connection. If the main is not available then goes to the stanby an then to the third. With this new application with adf i have to do the same. So how can i configure the application module to do this? do i have to make extra code? or just configure an xml file??

    i faced this problem before in Dynamic JDBC Credentials topic solution provided by Steve Muench (to make your AM Databse Connection to be dynamic as you need).
    http://smuenchadf.samplecode.oracle.com/samples/11gDynamicCredentials.zip
    Note : Example Contains the Full JDBC Connection String in dynamic way
    i finished this solution in my App and Successed.
    Thanks

  • BC4J: How get Connection from Application Module

    I've written a custom method for my Application Module for using by the client tier. In this method I call a JPUblisher created class, that accesses a PL/SQL procedure. For this JPublisher created class I need a connection context. The class calls DefaultContext.getDefaultContext() but that seems to be null.
    How can I get the current Connection of the Application Module, so that I can create a DefaultContext?
    Unfortunately Transaction has no getConnection method.
    Thanks,
    Robert

    We don't make the Connection directly available because in some sense it's a rope on which you can hang yourself if you are not careful. Since BC4J AppModules are most often used from a pool, and you might be using connection pooling in addition to application module pooling, in general it is not safe to get hold of the raw JDBC connection and "hang onto it".
    If you make careful use to always get the current JDBC connection before you use it, and not try to cache it, then you should be ok. Often, you can avoid the need to get the raw JDBC connection by calling getDBTransaction().createPreparedStatement(...) or the analogous createCallableStatement() or createStatement() that are also on the DBTransaction interface.
    Here is a little function you can add to your application module impl class to retrieve the Connection:
      private Connection getCurrentConnection() {
        Statement st = null;
        try {
          st = getDBTransaction().createStatement(0);
          return st.getConnection();
        catch (SQLException s) {
          s.printStackTrace();
          return null;
        finally {
          if (st != null) try { st.close(); } catch (SQLException s2) {}
      }It basically creates a (dummy) statement, gets the current connection from the statement, then closes the statement.
    I tried using this in a custom method in an AppModuleImpl class that invoked a JPublisher-create package-wrapper class like this:
      public void callStoredProc() {
        try {
          // Empservice is package wrapper class created by JPublisher
          Empservice e = new Empservice(getCurrentConnection());
          BigDecimal sal = e.lookupsalary(new BigDecimal(7369));
          System.out.println(sal);
        catch (SQLException s) {
          s.printStackTrace();
      }and it works for me.

  • HOW TO: Connect web service (remote application module) to existing model

    Hello.
    I have J2EE application which displays some data in an applet, which reads them by a web service. I'd like to use persistence and connect with a web service called by applet to my current model set within a session. I tried to pass a session id to web service (to a function of an application module implementation). I wanted to create a new SessionCookie instance with such a session id and application id which are used for web application session (by ApplicationPoolImpl.createSessionCookie() or with custom session cookie factory). But I don't know how to pass a session and application ids to a sessioncookie creation process (ApplicationPool environment). I tried to use custom EnvInfoProvider, which set my properties, but it passes the params after a SessionCookie instance is created.
    Samples ... AppModuleServer - file generated to provide ws functionality. I changed code to use EnvInfoProvider:
    public class AppModuleServer extends Object{
      public AppModuleServer(){}
      public SomeObject[] myCustomFunction(String sessionId){
        AppModuleImpl _am = null;
        String appId="someValue";
        CustomEnvInfoProvider envProvider=new CustomEnvInfoProvider(appId, sessionId);
        try{
          _am=(AppModuleImpl)Configuration.createRootApplicationModule("data.AppModule", "AppModuleLocal", envProvider);
          return _am.myCustomFunction(sSessionId);
        finally{
          if (_am != null)Configuration.releaseRootApplicationModule(_am, false);
    }CustomEnvInfoProvider:
    public class CustomEnvInfoProvider implements EnvInfoProvider{
      private String applicationId;
      private String sessionId;
      public CustomEnvInfoProvider(String applicationId, String sessionId){
        this.applicationId=applicationId;
        this.sessionId=aessionId;
      public Object getInfo(String info, Object environment){
        if(info==null)return null;
        return ((Hashtable)environment).get(info);
      public void modifyInitialContext(Object environment){
        if(applicationId!=null)((Hashtable)environment).put("CookieApplicationId", applicationId);
        if(sessionId!=null)((Hashtable)environment).put("SessionId", sessionId);
      public int getNumOfRetries(){
        return 2;
    }Does anybody knows how to pass information from custom EnvInfoProvider just before a SessionCookie is created (e.g. how to run modifyInitialContext() function). Or another way how to pass these information from a web service base function into ApplicationPoolImpl instance. E.g., there is parameter "properties" whithin a createSessionCookie method of ApplicationPoolImpl, which is null during calling. Is it possible to pass there some additional information?
    Thanks for any suggestions.

    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

  • How to say application module(s) to consume only one DB connection

    Hi,
    In my application, i use UI Shell template. All of my task flows are said to have new transaction always and not to share the data control. i have bunch of application modules (not nested AM) with many view objects. All the view objects are custom java data source implemented and none of them requires DB connection as they interact with DB using tuxedo connection. Expected concurrent users will be around 800.
    i can understand that application module requires DB connection for activation/passivation, but how can i say all of my application modules to consume only one DB connection??
    Thanks in advance.
    Raghuraman

    Jobinesh,
    My application is based on UI tab shell template with each and every task flow set to begin with new transaction always.
    I was using database tables for LOV view objects data population alone. Now that also has been changed to custom view data source implementation because of client requirement (LOV data needs to be cached till user-browser session)
    With the new implementation,
    1. I have some AMs with instances of entity driven VOs. With this, I do transaction with legacy system through Tuxedo. Custom view data source implementation is done to populate data from service. Similarly Update to service will happen by reading transaction listener list on save.
    2. I also have couple of AMs with instances of non entity-driven VOs, which will be used as read-only table/LOV. For this also custom view data source implementation is done by reading the reference database table only one time during deployment.
    3. As of now, none of my AMs are specified as Shared AM.
    Questions:
    1. I want to utilize the AM passivation/activation feature to control memory usage. I came to know "*The passivation process saves information used by the AM into the passivation store - usually a database*". I have a database, from where i am reading data for LOV during deployment. Can i have the single connection of that database configured for all the AMs (Both tuxedo transaction VO's AM and LOV VO's AM) so that i can avail this feature. If so, how can i configure all the AMs to consume only one connection?
    2. Any other way to avail this AM passivation/activation without database.
    Thanks in advance.
    Raghu

  • Connection object from application module

    hi
    i was wondering if there is someway to retrieve the Connection object from the application module. something like:
    java.sql.Connection conn = appMod.getConn();
    i'm using JDeveloper 9.0.3.4
    Thanks in advanced
    Vitor

    Take a look at
    http://radio.weblogs.com/0118231/2004/01/30.html#a232
    Sascha

  • 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

Maybe you are looking for

  • Post Bootcamp 3.1, Windows 7 muted on startup

    Hi all, So I'm ecstatic that there's finally a working Cirrus Audio driver for Windows 7 thanks to the recent Bootcamp 3.1 update, but now I've got a new (though admittedly minor) problem: whenever I boot my computer into Windows, the sound is muted

  • How do I make Firefox OPEN in Full Screen?

    I know how to change browser size, but how do I get Firefox to open in a large window, instead of a 2 inch space I have make larger, manually?

  • UDM's with long SQL Statements

    Hi All, I want to create a UDM to monitor licenced option usage within Oracle databases (first question - is this already held in the oem repository ?). I have reviewed the Administration Guide and it states that it is a three step process to create

  • Dvd drive not working in windows

    Hi just a question when I boot Windows Xp to my mac the DVD drive cant read files when i enter the cds but if i boot it in apple it can read the files tried to reformat it work for a while but then after few more use it cant read the files when im in

  • Launch failure and shared library error

    Hello all, I need help! I think I may have accidentally trashed an important file or folder. I cannot launch MS Word or any of my MS office 04 applications. I get a warning that says Application Launch Failure . . . can't be launched because of a sha