NullpointerException after App module jbo.ampool.timetolive time

Hi friends,
I face a strange scenario where my page gives NullpointerException exactly after my jbo.ampool.timetolive time elapses (In my case 2min).
When I gave the "Disconnect Application upon release" in the App configuration the same NullException raises on page load itself.
This is the following piece of code where the null pointer raises,
public <T> T resolveValueExpression(String expression, Class<T> type) {
ELContext context = FacesContext.getCurrentInstance().getELContext();
ValueExpression value = getExpressionFactory().createValueExpression(context, expression, type);
//Null raises in this Value.getValue(Contect)
// returns null even when value and context is not null
return (T) value.getValue(context);
The stack trace is as follows:
oracle.jbo.JboException: JBO-29000: Unexpected exception caught: java.lang.NullPointerException, msg=Cannot invoke method getAttribute() on null object
     at oracle.jbo.ExprEval.internalEvaluateGroovyScript(ExprEval.java:1048)
     at oracle.jbo.ExprEval.doEvaluate(ExprEval.java:1081)
     at oracle.jbo.ExprEval.evaluateForRow(ExprEval.java:911)
     at oracle.jbo.server.ViewObjectImpl.createViewAccessorRS(ViewObjectImpl.java:15564)
     at oracle.jbo.server.ViewRowImpl.createViewAccessorRS(ViewRowImpl.java:2572)
     at oracle.jbo.server.ViewRowImpl.createViewAccessorRS(ViewRowImpl.java:2583)
     at oracle.jbo.server.ViewRowStorage.getAttributeInternal(ViewRowStorage.java:1721)
     at oracle.jbo.server.ViewRowImpl.getAttributeValue(ViewRowImpl.java:1891)
     at oracle.jbo.server.ViewRowImpl.getAttributeInternal(ViewRowImpl.java:834)
     at com.symmetry.dashboard.panels.model.vo.EditPurchaseInvoiceViewRowImpl.getGoodsReceiptAuthoriserLOV1(EditPurchaseInvoiceViewRowImpl.java:2204)
     at com.symmetry.dashboard.panels.model.vo.EditPurchaseInvoiceViewRowImpl$AttributesEnum$71.get(EditPurchaseInvoiceViewRowImpl.java:945)
     at com.symmetry.dashboard.panels.model.vo.EditPurchaseInvoiceViewRowImpl.getAttrInvokeAccessor(EditPurchaseInvoiceViewRowImpl.java:2224)
     at oracle.jbo.server.ViewRowImpl.getAttribute(ViewRowImpl.java:864)
     at oracle.jbo.server.RowImpl.isRefreshRequired(RowImpl.java:574)
     at oracle.jbo.server.ViewRowImpl.isRefreshRequired(ViewRowImpl.java:5481)
     at oracle.jbo.server.RowImpl.isRefreshRequired(RowImpl.java:559)
     at oracle.jbo.server.RowImpl.checkAndAutoClearLOVAttributes(RowImpl.java:351)
     at oracle.jbo.server.ViewObjectImpl.activateTransients(ViewObjectImpl.java:18358)
     at oracle.jbo.server.ViewObjectImpl.activateTransients(ViewObjectImpl.java:18289)
     at oracle.jbo.server.ViewObjectImpl.activateState(ViewObjectImpl.java:18512)
     at oracle.jbo.server.ViewObjectImpl.activateState(ViewObjectImpl.java:18407)
     at oracle.jbo.server.ViewRowSetIteratorImpl.activateIteratorState(ViewRowSetIteratorImpl.java:4025)
     at oracle.jbo.server.ViewRowSetImpl.activateIteratorState(ViewRowSetImpl.java:7235)
     at oracle.jbo.server.ViewObjectImpl.activateIteratorState(ViewObjectImpl.java:18742)
     at oracle.jbo.server.ApplicationModuleImpl.activateVOs(ApplicationModuleImpl.java:8172)
     at oracle.jbo.server.ApplicationModuleImpl.doActivateState(ApplicationModuleImpl.java:7918)
     at oracle.jbo.server.ApplicationModuleImpl.doActivateAMState(ApplicationModuleImpl.java:7884)
     at oracle.jbo.server.Serializer.activate(Serializer.java:296)
     at oracle.jbo.server.DBSerializer.activateRootAM(DBSerializer.java:330)
     at oracle.jbo.server.ApplicationModuleImpl.activateState(ApplicationModuleImpl.java:6207)
     at oracle.jbo.server.ApplicationPoolMessageHandler.doPoolMessage(ApplicationPoolMessageHandler.java:219)
     at oracle.jbo.server.ApplicationModuleImpl.doPoolMessage(ApplicationModuleImpl.java:8933)
     at oracle.jbo.common.ampool.ApplicationPoolImpl.sendPoolMessage(ApplicationPoolImpl.java:4496)
     at oracle.jbo.common.ampool.ApplicationPoolImpl.prepareApplicationModule(ApplicationPoolImpl.java:2458)
     at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:2270)
     at oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule(ApplicationPoolImpl.java:3168)
     at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:460)
     at oracle.jbo.http.HttpSessionCookieImpl.useApplicationModule(HttpSessionCookieImpl.java:234)
     at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:431)
     at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:426)
     at oracle.adf.model.bc4j.DCJboDataControl.initializeApplicationModule(DCJboDataControl.java:516)
     at oracle.adf.model.bc4j.DCJboDataControl.getDataProvider(DCJboDataControl.java:869)
     at oracle.adf.model.binding.DCDataControl.internalGet(DCDataControl.java:1963)
     at oracle.adf.model.bc4j.DCJboDataControl.internalGet(DCJboDataControl.java:855)
     at oracle.adf.model.binding.DCDataControl.get(DCDataControl.java:1929)
     at javax.el.MapELResolver.getValue(MapELResolver.java:164)
     at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:173)
     at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:200)
     at com.sun.el.parser.AstValue.getValue(Unknown Source)
     at com.sun.el.ValueExpressionImpl.getValue(Unknown Source)
     at com.symmetry.dashboard.panels.util.BackingUtilsImpl.resolveValueExpression(BackingUtilsImpl.java:36)
     at com.symmetry.dashboard.panels.util.BackingUtilsImpl.getApplicationModuleForDataControl(BackingUtilsImpl.java:29)
     at com.symmetry.dashboard.panels.util.BackingUtils.getApplicationModuleForDataControl(BackingUtils.java:21)
     at com.symmetry.dashboard.panels.view.backing.purchase.EditInvoice.viewMatchedOrders(EditInvoice.java:1070)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:597)
     at com.sun.el.parser.AstValue.invoke(Unknown Source)
     at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
     at javax.faces.component.UIViewRoot.notifyPhaseListeners(UIViewRoot.java:608)
     at javax.faces.component.UIViewRoot.notifyBefore(UIViewRoot.java:510)
     at javax.faces.component.UIViewRoot.encodeBegin(UIViewRoot.java:564)
     at javax.faces.component.UIComponent.encodeAll(UIComponent.java:928)
     at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:266)
     at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:197)
     at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:189)
     at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:193)
     at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:777)
     at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:293)
     at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:213)
     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
     at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
     at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
     at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
     at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
     at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
     at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
     at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
     at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
     at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
     at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
     at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
     at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
     at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:175)
     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
     at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
     at java.security.AccessController.doPrivileged(Native Method)
     at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
     at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
     at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
     at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
     at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
     at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
     at java.security.AccessController.doPrivileged(Native Method)
     at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
     at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
     at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
     at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
     at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
     at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
     at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
     at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
     at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
     at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
     at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
     at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
     at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
     at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
     at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
     at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)
Caused by: java.lang.NullPointerException: Cannot invoke method getAttribute() on null object
     at org.codehaus.groovy.runtime.NullObject.invokeMethod(NullObject.java:77)
     at org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod(InvokerHelper.java:750)
     at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:727)
     at org.codehaus.groovy.runtime.callsite.NullCallSite.call(NullCallSite.java:17)
     at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
     at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117)
     at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
     at bc4j.CreatedBy.gs.run(bc4j.CreatedBy.gs.groovy:1)
     at oracle.jbo.ExprEval.internalEvaluateGroovyScript(ExprEval.java:1032)
     ... 117 more
Pls do give be possible solution to fix this

I believe my problem is that the jbo.ampool.minavailablesize is higher than the normal load on the system. This is stopping app modules to be removed once the jbo.ampool.maxinactiveage time is reached, therefore the only time an AM is removed is when the jbo.ampool.timetolive limit is reached.
e.g.
* 35 users log into the application in the morning. The AM pool contains 35 AM's
* GC on the pool happens. If an AM has reached the jbo.ampool.maxinactiveage then they will not be removed because it would mean that the pool (currently 35) drops below the jbo.ampool.minavailablesize (50)
* GC happens again and the jbo.ampool.timetolive threshold is now reached on all AM's so they are all removed from the pool.

Similar Messages

  • ADF 10g: AM pool dropped to zero after the jbo.ampool.timetolive is reached

    Hi,
    JDev: 10.1.3.2.0.4066
    I have a problem where all appModules in the application module pool are removed when the jbo.ampool.timetolive threshold is reached, even the currently referenced ones. This causing serious performance issues in our application. I have seen reports from Steve Muench on his blog (http://radio-weblogs.com/0118231/2006/03/30.html) that this issue can happen under certain circumstances but the link is broken, so am not sure what the reason is. Does anyone have a link to where this was moved to? Steve also has added (Disabling jbo.ampool.timetolive on this forum of how to "disabled the time to live consideration" but the timetolive is still removing all the appModules in the pool. Why is the pool being completely wiped out after the timetolive?
    Here is the BC4J configuration that is being used:
    NB:
    * web session timeout is 45 minutes
    * I am using a JDBC pool as well
          <AppModuleConfig name="Oracle">
             <DeployPlatform>LOCAL</DeployPlatform>
             <JDBCName>cvclaims_Oracle</JDBCName>
             <jbo.TypeMapEntries>Java</jbo.TypeMapEntries>
             <jbo.project>Model</jbo.project>
             <AppModuleJndiName>my.adf.root.RootAppModule</AppModuleJndiName>        
             <java.naming.factory.initial>oracle.jbo.common.JboInitialContextFactory</java.naming.factory.initial>
             <ApplicationName>my.adf.root.RootAppModule</ApplicationName>        
             <jbo.locking.mode>optimistic</jbo.locking.mode>        
             <jbo.ampool.initpoolsize>50</jbo.ampool.initpoolsize>
             <jbo.ampool.maxpoolsize>100</jbo.ampool.maxpoolsize>
             <jbo.recyclethreshold>50</jbo.recyclethreshold>
             <jbo.ampool.maxavailablesize>50</jbo.ampool.maxavailablesize>
             <jbo.ampool.minavailablesize>50</jbo.ampool.minavailablesize>
             <jbo.poolmaxavailablesize>51</jbo.poolmaxavailablesize>
             <jbo.maxpoolsize>51</jbo.maxpoolsize>
             <jbo.initpoolsize>51</jbo.initpoolsize>
             <jbo.poolminavailablesize>51</jbo.poolminavailablesize>
             <jbo.ampool.maxinactiveage>2760000</jbo.ampool.maxinactiveage>
             <jbo.ampool.monitorsleepinterval>60000</jbo.ampool.monitorsleepinterval>
             <jbo.ampool.timetolive>2850000</jbo.ampool.timetolive>
          </AppModuleConfig> Here is the code that logs out a user:
                    // Check whether the URL is the LOGOUT URL
                    if (requestURL.endsWith(logoutUrl)) {
                        // Log out, invalidate the session.
                        // Tried the patch mentioned in this thread with no change:
                        // ADF BC/ Faces - Logout exception
                        // This linked blog reports that the below ADFContext
                        // addition fixed it:
                        // http://vgoldin.blogspot.com/2007/02/adf-invalidating-web-session-in-apache.html
                        // but there may be more than one problem here.
                        // Others have suggested just wrapping the invalidate code
                        // in try/catch.
                        // Trying both here.
                        try {
                            ADFContext.getCurrent().removeScope(ADFContext.SESSION_SCOPE);
                        } catch (Exception e) {
                            e.printStackTrace();
                        try {
                            session.invalidate();
                        } catch (Exception e) {
                            e.printStackTrace();
                        MDC.remove(MDC_USERNAME);
                        if (!logoutDestinationUrlChecked && logoutDestinationUrl.startsWith("/")) {
                            logoutDestinationUrlChecked = true;
                            logoutDestinationUrl = request.getContextPath() + logoutDestinationUrl;
                            // relative path, prefix with request context path;
                        log.debug("Session is invalidated, redirecting to " + logoutDestinationUrl);
                        // we do redirect instead of forward so that this filter
                        // will be visisted again for the requested logout
                        // destination
                        // forcing a new login when applicable.
                        response.sendRedirect(response.encodeRedirectURL(logoutDestinationUrl)); DumpPoolStatistics.jsp page output
    This page is explained in Steve Muench's blog
    head:Application module lifetime statistics
    Number of application module creations,3208
    Number of application module removals,3184
    head:State management statistics
    Number of transactional state activations,2073
    Number of transactional state passivations,2873
    head:Application pool use statistics
    Number of application pool check outs,193821
    Number of application pool check ins,193818
    Number of referenced application modules that were reused,183071
    Number of referenced application modules that were recycled,0
    Number of unreferenced application modules that were recycled,7594
    Number of application pool check out failures,8
    head:Application module statistics
    Total number of application modules in the pool,24
    Maximum number of application modules in the pool,50
    Average number of application modules in the pool,23
    Total number of available application modules in the pool,21
    Average number of available application modules in the pool,21
    Average number of unavailable application modules in the pool,2
    Total number of referenced application modules in the pool,24
    head:Application module age statistics
    Number of referenced instances unused for >10 min,7
    Number of referenced instances unused for >5 min,2
    Number of referenced instances unused for >1 min,6
    Number of referenced instances used during last 1 min,9
    Number of instances unused for >10 min,0
    Number of instances unused for >5 min,0
    Number of instances unused for >1 min,0
    Number of instances used during last 1 min,0
    head:Session statistics
    Number of sessions registered with the pool,32
    Average number of sessions referencing transactional state,427
    head:Session age statistics
    Number of sessions inactive for >10 min,14
    Number of sessions inactive for >5 min,2
    Number of sessions inactive for >1 min,7
    Number of sessions active during last 1 min,9 The above DumpPoolStatistics page shows the AM pool shortly after the timetolive has kicked in. There is 24 app modules in the pool despite the jbo.ampool.minavailablesize being 50. There is also 32 users in the application so I would of expected there to be a corresponding number of appModules.
    Thanks
    Barry
    Edited by: Bar on Mar 9, 2011 5:18 PM
    Edited by: Bar on Mar 9, 2011 5:20 PM

    I believe my problem is that the jbo.ampool.minavailablesize is higher than the normal load on the system. This is stopping app modules to be removed once the jbo.ampool.maxinactiveage time is reached, therefore the only time an AM is removed is when the jbo.ampool.timetolive limit is reached.
    e.g.
    * 35 users log into the application in the morning. The AM pool contains 35 AM's
    * GC on the pool happens. If an AM has reached the jbo.ampool.maxinactiveage then they will not be removed because it would mean that the pool (currently 35) drops below the jbo.ampool.minavailablesize (50)
    * GC happens again and the jbo.ampool.timetolive threshold is now reached on all AM's so they are all removed from the pool.

  • Disabling jbo.ampool.timetolive

    Hi!
    I want to disable the use of the parameter jbo.ampool.timetolive, because I set the limit of the AM pool to zero using jbo.ampool.minavaiblesize.
    Now, I don´t know if this is possible, my best guess is to set the value to -1. Am I right?
    Thanks!

    The number -1 has no special significance for this property.
    If you have minavailablesize set to 0 and you set the timetolive to a value in milliseconds that is larger than the max idle time, then you will effectively have disabled the time to live consideration since you'll always have removed the AM from the pool for being idle before you'd ever have to consider removing it for having exceeded its time-to-live setting.

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

  • Jbo.ampool.maxavailablesize/jbo.recyclethreshold vs recent activity

    I have an ADF application with application pooling but not connection pooling. I have a situation where a recently active ADF application has its pool/session released.
    The number of active pools/sessions exceed the jbo.ampool.maxavailablesize/jbo.recyclethreshold. They have all been active for a shorter period of time than the idle instance timeout (jbo.ampool.maxinactiveage) (10 hours) and jbo.ampool.timetolive (10 hours) so there are no automatic choices for which pool/session to clean up. At this point, the pool/session that gets cleaned up does not appear to be the least recently used. Is there a setting that causes the least recently active pool/session to get cleaned up? If there was a choice between one active 1 hour ago and one active 1 minute ago, I would prefer it to clean up the 1 hour ago case.
    -- Chuck

    Any hints are appreciated
    Thanks
    Frank Brandstetter

  • JBO-25301: Application module ... is not a root app module but has no..

    Hello,
    Tools:_
    Jdeveloper 10.1.2
    JPDK 10.1.2
    ADF
    Portal version 10.1.2 (repository upgrade 10.1.4)
    Problem:_
    I have an application that calls other application module from it's own application module. Some times it gives error (not every time):
    •     JBO-29000: Unexpected exception caught: oracle.jbo.JboException, msg=JBO-29000: Unexpected exception caught: oracle.jbo.InvalidOwnerException, msg=JBO-25301: Application module FormHistoryServiceLocal is not a root app module but has no parent
    •        JBO-29000: Unexpected exception caught: oracle.jbo.InvalidOwnerException, msg=JBO-25301: Application module FormHistoryServiceLocal is not a root app module but has no parent
    •           JBO-25301: Application module FormHistoryServiceLocal is not a root app module but has no parent
    Code that application uses to call other application module:_
    public ApplicationHandler( ApplicationModule rootModule )
        try
          if(rootModule != null)
            formHistory = (FormHistoryService)rootModule.findApplicationModule(FORMHISTORYSERVICE_LOCAL);
            if(formHistory == null){
              formHistory = (FormHistoryService)rootModule.createApplicationModule( FORMHISTORYSERVICE_LOCAL, FORMHISTORYSERVICE_DEF );
            userInfoDAO.connect();
          }else System.out.println("Application Module was NULL");
        }catch(Exception e)
          e.printStackTrace();
    (calls: formHistory.addToHistory())
    The other application module:+
    public void addToHistory( Number formId, Number status, Number type, Number userId, String event )
        FormhistoryDefImpl defImpl = (FormhistoryDefImpl)EntityDefImpl.findDefObject("com.mysite.app.Formhistory");
        FormhistoryImpl fh = (FormhistoryImpl)defImpl.CreateFormhistory( this.getDBTransaction(), new NameValuePairs() ); //************ Exception is thrown from here! ************
        fh.setFormid(formId);
        fh.setStatus(status);
        fh.setType(type);
        fh.setUserid(userId);
        fh.setEvent(event);
        oracle.jbo.domain.Date eventTimestamp = new oracle.jbo.domain.Date((new java.sql.Timestamp(new java.util.Date().getTime())));
        fh.setEventtimestamp(eventTimestamp);
        this.getTransaction().commit();
    What's wrong here?
    JBO description:+
    JBO-25301: InvalidOwnerException
    Cause: While traversing the parenthood chain for application modules, a child application module was found with no container (parent) application module.
    Action: If this application has added custom business component classes, it may be that the application code is attempting to access a child application module before it is fully initialized. If this is not the case, this error probably represents some internal error in BC4J framework, in which case contact BC4J Technical Support.
    How can i ensure that child application module is already initialized?

    Anyone?

  • I recebtly bought an app (FIFA 12) now every time i play a match after the match it does not save an just goes to the home page without warning and i have to start all over again and no i did not press the home button. plz help

    i recebtly bought an app (FIFA 12) now every time i play a match after the match it does not save an just goes to the home page without warning and i have to start all over again and no i did not press the home button. plz help

    You can't gift it, gifting can only be done from within the store, not from within your library.
    Puchases are considered final but you can try the 'report a problem' link to contact iTunes Support and see if they will refund or credit you : http://reportaproblem.apple.com
    If the 'report a problem' link doesn't work then you can try contacting iTunes Support via this page : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption

  • TS3297 After updating to ios6 I am mostly unable to download apps, about 95% of the time I get a box saying "cannot connect to iTunes Store". Have checked for more updates and been around in circles on apple tech "support", any ideas anyone?

    After updating to ios6 I am mostly unable to download apps, about 95% of the time I get a box saying "cannot connect to iTunes Store". Have checked for more updates and been around in circles on apple tech "support", any ideas anyone?

    After updating to ios6 I am mostly unable to download apps, about 95% of the time I get a box saying "cannot connect to iTunes Store". Have checked for more updates and been around in circles on apple tech "support", any ideas anyone?

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

  • Web Start - Can't Connect To App Modules

    Has anyone had the problem of on being able to connect to their application modules deployed to Ora AS 10g when using web start? We can successfully use the tester on our local and deployed configurations for the app modules. We can also successfully run our JClient application locally and use our app modules deployed on the app server (and locally). We recently upgraded our containers from jdev 9.0.5.2 level to 10.1.2 level. Here is the stack trace I get:
    JBO-30003: The application pool (net.nighthawk.talon.model.bc.portal.PortalModuleAS) 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: oracle.jbo.ApplicationModuleCreateException, msg=JBO-25222: Unable to create application module.
         at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:1743)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule(ApplicationPoolImpl.java:2576)
         at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:441)
         at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:411)
         at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:406)
         at oracle.jbo.client.Configuration.getApplicationModule(Configuration.java:1370)
         at oracle.jbo.client.Configuration.createRootApplicationModule(Configuration.java:1328)
         at oracle.jbo.client.Configuration.createRootApplicationModule(Configuration.java:1300)
         at net.nighthawk.talon.jclientview.login.utility.LoginUtils.CreatePortalAppModule(LoginUtils.java:308)
         at net.nighthawk.talon.jclientview.login.utility.LoginUtils.LoadBackgroundImage(LoginUtils.java:222)
         at net.nighthawk.talon.jclientview.TalonDashBoard.jbInit(TalonDashBoard.java:148)
         at net.nighthawk.talon.jclientview.TalonDashBoard.<init>(TalonDashBoard.java:128)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
         at java.lang.reflect.Constructor.newInstance(Unknown Source)
         at java.lang.Class.newInstance0(Unknown Source)
         at java.lang.Class.newInstance(Unknown Source)
         at net.nighthawk.talon.jclientview.ObjectInstanceCreator.CreateObjectInstance(ObjectInstanceCreator.java:41)
         at net.nighthawk.talon.jclientview.Talon.main(Talon.java:21)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at com.sun.javaws.Launcher.executeApplication(Unknown Source)
         at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
         at com.sun.javaws.Launcher.continueLaunch(Unknown Source)
         at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source)
         at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source)
         at com.sun.javaws.Launcher.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    ## Detail 0 ##
    oracle.jbo.JboException: JBO-29000: Unexpected exception caught: oracle.jbo.ApplicationModuleCreateException, msg=JBO-25222: Unable to create application module.
         at oracle.jbo.pool.ResourcePool.createResource(ResourcePool.java:532)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.prepareApplicationModule(ApplicationPoolImpl.java:1830)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:1711)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule(ApplicationPoolImpl.java:2576)
         at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:441)
         at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:411)
         at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:406)
         at oracle.jbo.client.Configuration.getApplicationModule(Configuration.java:1370)
         at oracle.jbo.client.Configuration.createRootApplicationModule(Configuration.java:1328)
         at oracle.jbo.client.Configuration.createRootApplicationModule(Configuration.java:1300)
         at net.nighthawk.talon.jclientview.login.utility.LoginUtils.CreatePortalAppModule(LoginUtils.java:308)
         at net.nighthawk.talon.jclientview.login.utility.LoginUtils.LoadBackgroundImage(LoginUtils.java:222)
         at net.nighthawk.talon.jclientview.TalonDashBoard.jbInit(TalonDashBoard.java:148)
         at net.nighthawk.talon.jclientview.TalonDashBoard.<init>(TalonDashBoard.java:128)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
         at java.lang.reflect.Constructor.newInstance(Unknown Source)
         at java.lang.Class.newInstance0(Unknown Source)
         at java.lang.Class.newInstance(Unknown Source)
         at net.nighthawk.talon.jclientview.ObjectInstanceCreator.CreateObjectInstance(ObjectInstanceCreator.java:41)
         at net.nighthawk.talon.jclientview.Talon.main(Talon.java:21)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at com.sun.javaws.Launcher.executeApplication(Unknown Source)
         at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
         at com.sun.javaws.Launcher.continueLaunch(Unknown Source)
         at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source)
         at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source)
         at com.sun.javaws.Launcher.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    ## Detail 0 ##
    oracle.jbo.ApplicationModuleCreateException: JBO-25222: Unable to create application module.
         at oracle.jbo.client.remote.ejb.AbstractApplicationModuleHomeImpl.createRemoteEJBApplicationModuleProxy(AbstractApplicationModuleHomeImpl.java:75)
         at oracle.jbo.client.ejb.ApplicationModuleHomeImpl.create(ApplicationModuleHomeImpl.java:63)
         at oracle.jbo.common.ampool.DefaultConnectionStrategy.createApplicationModule(DefaultConnectionStrategy.java:140)
         at oracle.jbo.common.ampool.DefaultConnectionStrategy.createApplicationModule(DefaultConnectionStrategy.java:81)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.instantiateResource(ApplicationPoolImpl.java:2184)
         at oracle.jbo.pool.ResourcePool.createResource(ResourcePool.java:523)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.prepareApplicationModule(ApplicationPoolImpl.java:1830)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:1711)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule(ApplicationPoolImpl.java:2576)
         at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:441)
         at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:411)
         at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:406)
         at oracle.jbo.client.Configuration.getApplicationModule(Configuration.java:1370)
         at oracle.jbo.client.Configuration.createRootApplicationModule(Configuration.java:1328)
         at oracle.jbo.client.Configuration.createRootApplicationModule(Configuration.java:1300)
         at net.nighthawk.talon.jclientview.login.utility.LoginUtils.CreatePortalAppModule(LoginUtils.java:308)
         at net.nighthawk.talon.jclientview.login.utility.LoginUtils.LoadBackgroundImage(LoginUtils.java:222)
         at net.nighthawk.talon.jclientview.TalonDashBoard.jbInit(TalonDashBoard.java:148)
         at net.nighthawk.talon.jclientview.TalonDashBoard.<init>(TalonDashBoard.java:128)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
         at java.lang.reflect.Constructor.newInstance(Unknown Source)
         at java.lang.Class.newInstance0(Unknown Source)
         at java.lang.Class.newInstance(Unknown Source)
         at net.nighthawk.talon.jclientview.ObjectInstanceCreator.CreateObjectInstance(ObjectInstanceCreator.java:41)
         at net.nighthawk.talon.jclientview.Talon.main(Talon.java:21)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at com.sun.javaws.Launcher.executeApplication(Unknown Source)
         at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
         at com.sun.javaws.Launcher.continueLaunch(Unknown Source)
         at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source)
         at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source)
         at com.sun.javaws.Launcher.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    ## Detail 0 ##
    java.lang.NullPointerException
         at oracle.jbo.client.remote.ejb.ApplicationModuleProxy.createClientAdapter(ApplicationModuleProxy.java:181)
         at oracle.jbo.client.remote.ejb.ApplicationModuleProxy.doCreate(ApplicationModuleProxy.java:135)
         at oracle.jbo.client.remote.ejb.ApplicationModuleProxy.create(ApplicationModuleProxy.java:59)
         at oracle.jbo.client.remote.ejb.AbstractApplicationModuleHomeImpl.createRemoteEJBApplicationModuleProxy(AbstractApplicationModuleHomeImpl.java:44)
         at oracle.jbo.client.ejb.ApplicationModuleHomeImpl.create(ApplicationModuleHomeImpl.java:63)
         at oracle.jbo.common.ampool.DefaultConnectionStrategy.createApplicationModule(DefaultConnectionStrategy.java:140)
         at oracle.jbo.common.ampool.DefaultConnectionStrategy.createApplicationModule(DefaultConnectionStrategy.java:81)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.instantiateResource(ApplicationPoolImpl.java:2184)
         at oracle.jbo.pool.ResourcePool.createResource(ResourcePool.java:523)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.prepareApplicationModule(ApplicationPoolImpl.java:1830)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:1711)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule(ApplicationPoolImpl.java:2576)
         at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:441)
         at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:411)
         at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:406)
         at oracle.jbo.client.Configuration.getApplicationModule(Configuration.java:1370)
         at oracle.jbo.client.Configuration.createRootApplicationModule(Configuration.java:1328)
         at oracle.jbo.client.Configuration.createRootApplicationModule(Configuration.java:1300)
         at net.nighthawk.talon.jclientview.login.utility.LoginUtils.CreatePortalAppModule(LoginUtils.java:308)
         at net.nighthawk.talon.jclientview.login.utility.LoginUtils.LoadBackgroundImage(LoginUtils.java:222)
         at net.nighthawk.talon.jclientview.TalonDashBoard.jbInit(TalonDashBoard.java:148)
         at net.nighthawk.talon.jclientview.TalonDashBoard.<init>(TalonDashBoard.java:128)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
         at java.lang.reflect.Constructor.newInstance(Unknown Source)
         at java.lang.Class.newInstance0(Unknown Source)
         at java.lang.Class.newInstance(Unknown Source)
         at net.nighthawk.talon.jclientview.ObjectInstanceCreator.CreateObjectInstance(ObjectInstanceCreator.java:41)
         at net.nighthawk.talon.jclientview.Talon.main(Talon.java:21)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at com.sun.javaws.Launcher.executeApplication(Unknown Source)
         at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
         at com.sun.javaws.Launcher.continueLaunch(Unknown Source)
         at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source)
         at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source)
         at com.sun.javaws.Launcher.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)

    Hi,
    Did you have a look at
    http://www.oracle.com/technology/products/jdev/collateral/papers/10g/adfjclientbcwebstart.pdf
    If you are deploying your BC modules as EJB then this document also contains information of how to test this deployment within the BC tester.
    Frank

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

  • "Application module  is not a root app module but has no parent"

    This is to follow up on my answered question on rootAN substitution
    Re: "login session has expired" after am substitution
    I am working on an OAF extension.
    I have a new LOV region. I extended (to be substituted) the seeded VO, call it xxVO. And I have three custom methods using this xxVO that are called from processFormRequest of my controller which extends the seeded controller.
    So putting these methods in rootAM and AM substitution didn't work as some folks pointed out.
    So I created xxAM (extends root AM), put xxVO in xxAM’s data model and put my methods in xxAM, set this xxAM as AMDefinition for my custom LOV region.
    In my controller I do
    OAApplicationModule xxAM = new xxprg.oracle.apps.icx.por.req.server.xxprgRequisitionAMImpl();
    But I am getting
    => oracle.apps.fnd.framework.OAException: oracle.jbo.InvalidOwnerException: JBO-25301: Application module is not a root app module but has no parent
    at
    xxAM.invokeMethod("handleChangeRequester", parameters);
    I found a few posts on the same topic. One advise was to not instantiate ‘new’ AM but do something like this
    Xo2cAcctOviewExtAMImpl amExt = (Xo2cAcctOviewExtAMImpl )pageContext.getApplicationModule(webBean);
    In this example I am confused about the fact that ‘getApplicationModule(webBean);’ which is used in the signature of the processFormRequest will return a ‘rootAM’, is this correct?
    There was another workaround mentioned in other posts to not use xxAM at all but build a class to mimic an xxAM passing all needed values that custom methods require. In which case how(or better where) do I instantiate xxVO since now xxVO won’t be part of any AM data model?
    Can someone please clarify.
    Thank you
    Anatoliy

    Pratap,
    Thank you for the response.
    The reason I need to use new xxCO on the page is this.
    Seeded page CheckoutLinesPG.
    It has advanced table on it where every column has it's one external region.
    The new LOV region xxRN is put on a page also under this table new column.
    1. When a requester (seeded region on the seeded page) is changed then my xxLOV should reflect the change and be populated according to what is selected in the Requester LOV.
    2. When one-time address is added (another seeded region on the seeded page) my xxLOV should be disabled, when one time address taken out - enabled again.
    So xxCO should apply to the whole page.
    The VO behind advanced table PoRequisitionLinesVO is extended with 2 additional attributes and will substitute, the new xxVO is under xxAM data model.
    All works fine with my methods in the seeded RequisitionAM which I get a handle to in the xxCO. But I don;t know how to get the handle to the xxAM if I put my methods there.
    Thanks,
    Anatoliy
    P.S. just fyi - I know it is not the recommended approach but what I did for now I put all calls into the controller - in the controller I can get a handle to root AM, through that I am getting a handle to xxVO which (!) is substituted during runtime with my xxVO. But if you can figure out how to get a handle to xxAM in my case it will be great.
    Edited by: asmirnov on Mar 24, 2009 2:04 PM

  • Question about  ampool.timetolive property

    Hi, the question is what happens when ampool.timetolive property expires and the
    user continues to use the module in it’s session.
    I’m getting some suspicious null pointer exceptions caused by the framework and database connections lost and I’m wondering
    if these are related to the ampool.timetolive property or session timeout property in web.xml.
    Any comment will be helpful,
    Thanks

    Only inactive AM instances are removed from the pool according to the documentation. Try setting the jbo.ampool.monitorsleepinterval parameter to a high enough value so that the background clean-up process does not run for a long time. By default it runs every 10 minutes.
    Hope it helps,
    Nick

  • How to correctly set jbo.ampool.maxavailablesize and minavailablesize ?

    Hi all,
    On performance tuning of our ADF BC application, during load test I notice from application server (10.1.3.3) console that :
    Request Processing Time (seconds) 11.45
    Requests per second 7.91
    From the docs, it is recommended to set both jbo.ampool.maxavailablesize and minavailablesize to be mutiplication of the above values, i.e : 90.
    We have about 12 application modules (AM) in the application, no nested one.
    The question is :
    1) Should I set maxavailablesize and minavailablesize of ALL the 12 application modules to be 90 ?
    Or Should I set the values selectively based on which AMs mostly accessed by the application invoked by the user ?
    2) After I change the maxavailablesize and minavailablesize to be 90, I notice that just after the OC4J start and no user access the application yet, the database already has 20-30 sessions opened, Is this normal ?
    Thank you for your help,
    xtanto

    Can you be more specific about what docs are recommending this? I don't see why you would want the max available size and min available size to be the same thing, but I'd like to review what documentation you are referring to for context.
    max pool size puts an upper limit on the number of AM's that can be created in that pool. If you hit this limit users wait until one of the existing instances is freed up.
    max available size gives a desired maximum that the pool should shrink down to after a period of higher-than-expected load.
    the min available size is the lowest number that the AM pool can shrink down to when the system is less loaded.
    I'd need to see all of your pool parameters, understand if you're using JDBC datasource or URL connection, and understand whether you use jbo.doconnectionpooling= true or false to explain any given set of behavior.

  • Need to Return immediately and commit the App Module on a different thread

    I have an action that I want to return fast (immediately) but the server processing takes longer than acceptable. The results of the operation don't matter to the page submitting it and I want it to be able to navigate away even if the operation is not complete. I want to either be able to send a non-blocking server event from the browser or on the server side start a new thread that performs the operation allowing the original thread to return immediately. The new thread would need access to an Application Module in order to commit data. How would I go about accomplishing this?
    Some thoughts
    I've tried creating a ConcurrentLinkedQueue and putting the DataControl on the que, then in the other thread I pull it off the que, process and commit the data. This works unless the page is navigated away from. Then calling dc.getApplicationModule(); returns null.
    I thought about using createRootApplicationModule in the new thread (since the new thread has no context) but don't know how that would work
    This is the code in the run method of the new thread. In this example, I'm adding data to the app module in the original thread and committing the data in a new thread.
    (like I said, it works most of the time.)
    Object[] req = (Object[])que.poll();
    DCDataControl dc = (DCDataControl)req[0];
    try{
    ApplicationModule am = dc.getApplicationModule();
    if (am != null){
    am.getTransaction().commit();
    } else{
    System.out.println("AM:null unable to commit ");
    } catch (Exception e){
    e.printStackTrace();
    finally{
    if (dc!= null){ dc.resetState();} // release app module
    }

    Thanks for the replies. I am aware of the inherent risks of running a separate thread within a managed container.
    The use case is a performance logging operation. We have a internal web app used by a network of franchises with over 1000 users. We log response time and performances statistics to the database. When the user clicks to navigate or commit data, the response time that the user experiences is logged after the page has fully rendered either through a PPR or a full submit. This is done by submitting ADFCustomEvent from javascript on the page after rendering is complete.. The event sends up the time difference from when the user first clicked to when the page was fully rendered. This information is then merged with logged events stored on the users Session that shows the name and response time of every query that was executed during the previous request. Depending on the page this could be up to half dozen to a dozen or more queries. The logging operation as experienced by the browser is generally fast (<200ms) but sometimes can be as long as a second or more when the database gets busy. A half second is too long as makes the app appear sluggish if the user can't type or click immediately after the page has finished rendering. The logged data is aggregated so we know exactly how much of the page load was due to a slow browser/network, how much was database time, webservice call time, etc... If it's due to a slow database we can drill down and see which query is the culprit. These performance metrics are critical to operations and are charted throughout the day so we know exactly what our users are experiencing. All of our users use a custom firefox client that we control. Using this logging framework we were able to determine that upgrading to a Firefox 4.0 based client cut browser render time by more than half a second on average. We can also tell what type of hardware the user is running so can place the blame for poor performance where appropriate. We have determined that pages render considerably faster on Windows 7 than on Windows 98 with the same hardware. We are moving the logging tables off of our exadata database to a separate box to remove that load from the application database. Since we expect the other database not to perform as well we don't want it to affect the user experience, hence the need to log asynchronously. I would like to put the data on a queue and have a background daemon process read from the queue and commit to the database. I would like the daemon thread to be able to use BC components. I would prefer not to resort to using a web service because of the inherent overhead. The logging operation is not a long operation but is of high frequency so should be as streamlined as possible. The load is spread over 6 servers with 4 JVM's each (24 weblogic instances). I know it's possible to use BC components from a plain Servlet (which runs on it's own thread) so what I want is to have something like a servlet thread that loops forever processing my logging queue.
    One other method I am investigating is using my own non-blocking ajax call that callls a servlet to perform the logging. I will need to pull out the timestamp contained within a client side ADF component along with the pages ctrl-state variable that is included with every ADF request as it uses this as the key to get to the data on the session. ADF really needs a non-blocking ADFCustomEvent for this type of request. (send and don't care about the response)
    The client component with the server listener looks like this
    <af:outputText value="#{pageFlowScope.perfClientTS}" visible="false"
    id="perfClientTSField" clientComponent="true">
    <af:serverListener type="logPerfData" method="#{perfLog.logPerfDataAction}"/>
    </af:outputText>
    The script that queues the ajax call after the page loads looks like this
    AdfCustomEvent.queue(perfClientTSField, "logPerfData", {
    typeId : typeId,
    subTypeId : subTypeId,
    responseTime1 : new String(responseTime1),
    responseTime2 : new String(responseTime2),
    openedVia: via
    true);
    I also tried calling the noResponseExpected() method on the event before queuing it but it still blocked the UI and caused an additional side effect in that the client sent two ajax requests instead of one. It somehow thought something on the client side needed to be synced with the server.
    email me and I can send a doc with more details about how our performance logging framework works.
    Edited by: Don Kleppinger on Mar 14, 2012 2:52 PM

Maybe you are looking for