Caching JSF Dropdown Results

I have following dropdown
Code:
<h:panelGrid columns="3" styleClass="detail" columnClasses="label">
<h:outputText value="Manufacturer" />
<h:selectOneMenu id="manufList" value="#{manufacturerBean.selectedManufacturer}" >
<f:selectItem itemLabel="New" itemValue="New" />
<f:selectItems value="#{manufacturerBean.manufacturerList}" />
<a4j:support action="#{manufacturerBean.loadManufacturerDetails}" event="onchange" reRender="manufName,manufDescription,manufSource,btnSave,btnDelete" />
</h:selectOneMenu>
</h:panelGrid>
The perfomance issue is Whenever i pick a value from the dropdown it results in 3 database calls
Here is the sequence of method calls
- First time the method in f:selectItems gets called which results in a database call
<f:selectItems value="#{manufacturerBean.manufacturerList}" />
- Second time as expected/desired Ajax4JSF onchange event action method gets called
<a4j:support action="#{manufacturerBean.loadManufacturerDetails}" event="onchange" reRender="manufName,manufDescription,manufSource,btnSave,btnDelete" />
- Third time again the method in f:selectItems gets called which results in a database call
<f:selectItems value="#{manufacturerBean.manufacturerList}" />
I understand its due to JSF Lifcycle.
Any pointers/suggestion on how to Cache the method getManufacturerList() to avoid unnecessary database calls will be highly appreciated
Regards
Bansi

u can do in one way, use IBM JSF .jar file,
<%@taglib uri="http://www.ibm.com/jsf/html_extended" prefix="hx"%>
and use <hx:scriptCollector preRender="#{yourBean.onPageLoadBegin}" />,
so when your page load it will call that method which load onces, and using flag, u can control the loading data again from back end .
I hope it will help,
Thanks
Srikanth

Similar Messages

  • Entity-Named Query Caching - Need live results from DB not Cached

    I've developed an application EJB3 web application which uses Entity Beans and NamedQueries to retrieve my results.
    Aswell as my main EJB3 web application I also have an external interface (Oracle Stored Procedure) which is updating data in my database tables. The problem is that the when the NamedQueries are called they only bring back "Cached" resultsets and not the live results that exists in the database at that time. If my Stored Procedure updates a value (or if I update a value via Toad for testing) the NamedQuery does not bring back these changes. From what I have read about NamedQueries it seems that they do actually query the live db but send back the cached values for performance reasons.
    Is there a way to turn off caching of Query results?
    If not is there another way to deal with this issue?
    ps. I'm using Jdev 10.1.3.4 and appserver 10.1.3.1

    Anyone?

  • Olap cache not storing result sets for certain queries

    Hi - another cache question
    my result set for a query is not getting set in OLAP CACHE - the query variable level is stored ok but not the result set.
    different queries store the result sets ok.
    there is nothing in the query or cube properties that should disable the caching of the result set.
    there is plenty of space available and there has not been any changes to the query or data loaded or aggregates changed.
    any ideas?
    cheers - Neil

    I would do a performance check in RSRT2.  This will usually give you some additional information related to olap cache. 
    Hope that helps.

  • Caching objects in the data cache as a result of an extent.

    Patrick -
    I wanted to post this since it's related to a question I posted about extents and the data cache on
    11/8.
    I discovered that the com.solarmetric.kodo.DefaultFetchBatchSize setting affects how many objects
    get put into the data cache as a result of running an extent (in 2.3.2). If I have:
    com.solarmetric.kodo.DefaultFetchBatchSize=20
    then as soon as I execute the second line below:
    Iterator anIterator = results.iterator();
    Object anObject = anIterator.next();
    I see 20 objects in my data cache. In a prior reply you indicated that you were going to check this
    behavior in 2.4 so I wanted to send you this additional information. This behavior isn't a problem
    for me.
    Les

    Les,
    This is expected behavior -- the DefaultBatchFetchSize instructs Kodo to
    retrieve objects from the scrollable ResultSet in groups of 20. So,
    getting the first item from the iterator will cause a page of 20 objects
    to be pulled from the result set.
    -Patrick
    Les Selecky wrote:
    Patrick -
    I wanted to post this since it's related to a question I posted about
    extents and the data cache on
    11/8.
    I discovered that the com.solarmetric.kodo.DefaultFetchBatchSize
    setting affects how many objects
    get put into the data cache as a result of running an extent (in
    2.3.2). If I have:
    com.solarmetric.kodo.DefaultFetchBatchSize=20
    then as soon as I execute the second line below:
    Iterator anIterator = results.iterator();
    Object anObject = anIterator.next();
    I see 20 objects in my data cache. In a prior reply you indicated that
    you were going to check this
    behavior in 2.4 so I wanted to send you this additional information.
    This behavior isn't a problem
    for me.
    Les
    Patrick Linskey [email protected]
    SolarMetric Inc. http://www.solarmetric.com

  • Dispaly operators in JSF dropDown

    Hi ,
    There is a requirement in my project to add and delete a row onclick of a button.
    Each row has a drop down which displays ("<",">","<=",">=") operators.
    When i am using the below HTML code for displaying dropdowns ,add and delete functionalities working fine..
    <select name="select13" class="TextBlackNormal">
    <option>></option>
    <option><</option>
    <option>>=</option>
    <option><=</option>
    </select>
    But in case of JSF dropdown tag,add and delete fucntionalites are not working onclick of a button.But it displays the dropdown List.
    <h:selectOneMenu value="#{ruleBlock.priceRangeFromOperator}">
    <f:selectItems value="#{PriceVarianceRuleBean.priceRangeOpeList}"/>
    </h:selectOneMenu>
    I configured the priceRangeOpeList as
    priceRangeOpeList.add(new SelectItem("<","<","<"));
    priceRangeOpeList.add(new SelectItem(">",">",">"));
    Add and delete functionlaites are working fine if i use below configuration for the drop down.but the the values in the drop down are dispalyed as (>,< like this instead of < , >).So i think the problem is with the operators.Can you please tell me how to display these opearators in the dropdown.
    priceRangeOpeList=new ArrayList();
    priceRangeOpeList.add(new SelectItem(">",">",">"));
    priceRangeOpeList.add(new SelectItem("<","<",">"));
    Thanks

    You should use HTML entities for reserved HTML characters. The < denotes the start of a HTML tag and the > the end, you do understand?
    Instead of < use <
    Instead of > use &gt;
    Instead of " use &quot;
    Instead of ' use &apos;
    Instead of & use &amp;
    Also see [http://www.w3schools.com/tags/ref_entities.asp]
    You can escape them "automagically" when using <h:outputText> or <c:out>.

  • How to cache jsf page

    how to cache jsf page with submitted data .

    Where do you want to cache it? And with which purposes?

  • Unable to show JSF dropdown with a list containing custom beans

    Hi,
    Please help me with my problem guys.
    In the JSF Portlet application that Iam currently working, I need to show some dropdowns,so I am passing arraylist in my JSP like this:
    <code]
    <f:view>
    <hx:scriptCollector id="scriptCollector1">
    <h:form styleClass="form" id="form1"><P>Place content here.
    <h:selectOneMenu styleClass="selectOneMenu" id="menu1" >
    <f:selectItems value="#{gfogBean.northAmericaList.toArray}"/>
    </h:selectOneMenu>
    </h:form>
    </hx:scriptCollector>
    </f:view>
    gfgoBean is my FacesManagedBean, northAmericaList has objects of type TestBean....
    public class GfogBean {
         private String exchangeEurope;
         private String exchangeAsiaPacific;
         private String exchangeNorthAmerica;
         private List northAmericaList = new ArrayList();
          * @return Returns the northAmericaList.
         public List getNorthAmericaList() {
              northAmericaList.add(new TestBean("north","north"));
              return northAmericaList;
          * @param northAmericaList The northAmericaList to set.
         public void setNorthAmericaList(List northAmericaList) {
              this.northAmericaList = northAmericaList;
          * @return Returns the exchangeAsiaPacific.
         public String getExchangeAsiaPacific() {
              return exchangeAsiaPacific;
          * @param exchangeAsiaPacific The exchangeAsiaPacific to set.
         public void setExchangeAsiaPacific(String exchangeAsiaPacific) {
              this.exchangeAsiaPacific = exchangeAsiaPacific;
          * @return Returns the exchangeEurope.
         public String getExchangeEurope() {
              return exchangeEurope;
          * @param exchangeEurope The exchangeEurope to set.
         public void setExchangeEurope(String exchangeEurope) {
              this.exchangeEurope = exchangeEurope;
          * @return Returns the exchangeNorthAmerica.
         public String getExchangeNorthAmerica() {
              return exchangeNorthAmerica;
          * @param exchangeNorthAmerica The exchangeNorthAmerica to set.
         public void setExchangeNorthAmerica(String exchangeNorthAmerica) {
              this.exchangeNorthAmerica = exchangeNorthAmerica;
    }But I am getting this exception.
    Nested Exception is javax.servlet.jsp.JspException: javax.faces.el.ReferenceSyntaxException: The "." operator was supplied with an index value of type "java.lang.String" to be applied to a List or array, but that value cannot be converted to an integer.
         at com.sun.faces.taglib.html_basic.SelectOneMenuTag.doEndTag(SelectOneMenuTag.java:483)
         at org.apache.jsp._GfogWeb._jspService(_GfogWeb.java:220)
         at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:344)
         at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:683)
         at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:781)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
         at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
         at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
         at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
         at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1049)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:600)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java:254)
         at org.apache.pluto.core.impl.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.java:112)
         at com.ibm.faces.context.PortletExternalContextImpl.dispatch(PortletExternalContextImpl.java:439)
         at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:295)
         at com.ibm.faces.application.PortletViewHandlerImpl.renderView(PortletViewHandlerImpl.java:74)
         at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:217)
         at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
         at com.ibm.faces.webapp.FacesGenericPortlet.doRender(FacesGenericPortlet.java:358)
         at com.ibm.faces.webapp.FacesGenericPortlet.doView(FacesGenericPortlet.java:389)
         at com.jpmorgan.gfogwebportlet.portlet.GfogInitPortlet.doView(GfogInitPortlet.java:51)
         at com.ibm.faces.webapp.FacesGenericPortlet.doDispatch(FacesGenericPortlet.java:290)
         at javax.portlet.GenericPortlet.render(GenericPortlet.java:163)
         at com.ibm.wps.pe.pc.std.cmpf.impl.PortletFilterChainImpl.render(PortletFilterChainImpl.java:144)
         at com.ibm.wps.pe.pc.std.invoker.impl.PortletServlet.dispatch(PortletServlet.java:131)
         at com.ibm.wps.pe.pc.std.invoker.impl.PortletServlet.doGet(PortletServlet.java:70)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at com.ibm.wps.pe.pc.std.cache.CacheablePortlet.service(CacheablePortlet.java:256)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
         at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
         at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
         at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
         at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1049)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:600)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java:254)
         at com.ibm.wps.pe.pc.std.invoker.impl.PortletInvokerImpl.invoke(PortletInvokerImpl.java:204)
         at com.ibm.wps.pe.pc.std.invoker.impl.PortletInvokerImpl.invoke(PortletInvokerImpl.java:168)
         at com.ibm.wps.pe.pc.std.invoker.impl.PortletInvokerImpl.render(PortletInvokerImpl.java:97)
         at com.ibm.wps.pe.pc.std.PortletContainerImpl.renderPortlet(PortletContainerImpl.java:110)
         at com.ibm.wps.pe.pc.PortletContainerImpl.doRenderPortlet(PortletContainerImpl.java:545)
         at com.ibm.wps.pe.ext.render.AbstractRenderManager.performService(AbstractRenderManager.java:251)
         at com.ibm.wps.pe.pc.PortletContainerImpl.renderPortlet(PortletContainerImpl.java:100)
         at com.ibm.wps.engine.tags.PortletRenderTag.doStartTag(PortletRenderTag.java:155)
         at org.apache.jsp._Control._jspService(Control.jsp  :176)
         at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:344)
         at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:683)
         at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:781)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
         at com.ibm.ws.webcontainer.servlet.ServicingServletState.service(StrictLifecycleServlet.java:333)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
         at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
         at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
         at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1044)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:600)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java:254)
         at com.ibm.wps.services.dispatcher.DispatcherServiceImpl.handleRequest(DispatcherServiceImpl.java:89)
         at com.ibm.wps.services.dispatcher.DispatcherServiceImpl.include(DispatcherServiceImpl.java:50)
         at com.ibm.wps.services.dispatcher.Dispatcher.include(Dispatcher.java:44)
         at com.ibm.wps.engine.templates.skins.Default.render(Default.java:74)
         at com.ibm.wps.engine.templates.SkinTemplate.render(SkinTemplate.java:71)
         at com.ibm.wps.composition.elements.Component.render(Component.java:785)
         at com.ibm.wps.composition.elements.Control.render(Control.java:182)
         at com.ibm.wps.composition.Composition.render(Composition.java:2880)
         at com.ibm.wps.model.wrappers.LayoutModelWrapperFactoryImpl$LayoutModelWrapperImpl.render(LayoutModelWrapperFactoryImpl.java:204)
         at com.ibm.wps.model.ModelUtil$WrappedCompositionModel.render(ModelUtil.java:832)
         at org.apache.jsp._UnlayeredContainer_2D_V._jspService(UnlayeredContainer-V.jsp     :11)
         at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:344)
         at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:683)
         at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:781)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
         at com.ibm.ws.webcontainer.servlet.ServicingServletState.service(StrictLifecycleServlet.java:333)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
         at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
         at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
         at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1044)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:600)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java:254)
         at com.ibm.wps.services.dispatcher.DispatcherServiceImpl.handleRequest(DispatcherServiceImpl.java:89)
         at com.ibm.wps.services.dispatcher.DispatcherServiceImpl.include(DispatcherServiceImpl.java:50)
         at com.ibm.wps.services.dispatcher.Dispatcher.include(Dispatcher.java:44)
         at com.ibm.wps.engine.templates.skins.Default.render(Default.java:74)
         at com.ibm.wps.engine.templates.SkinTemplate.render(SkinTemplate.java:71)
         at com.ibm.wps.composition.elements.Component.render(Component.java:785)
         at com.ibm.wps.composition.Composition.render(Composition.java:2880)
         at com.ibm.wps.model.wrappers.LayoutModelWrapperFactoryImpl$LayoutModelWrapperImpl.render(LayoutModelWrapperFactoryImpl.java:204)
         at com.ibm.wps.engine.tags2.PageRenderTag.doStartTag(PageRenderTag.java:397)
         at org.apache.jsp._Home._jspService(Home.jsp  :15)
         at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:344)
         at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:683)
         at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:781)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
         at com.ibm.ws.webcontainer.servlet.ServicingServletState.service(StrictLifecycleServlet.java:333)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
         at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
         at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
         at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1044)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:600)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java:254)
         at com.ibm.wps.services.dispatcher.DispatcherServiceImpl.handleRequest(DispatcherServiceImpl.java:89)
         at com.ibm.wps.services.dispatcher.DispatcherServiceImpl.include(DispatcherServiceImpl.java:50)
         at com.ibm.wps.services.dispatcher.Dispatcher.include(Dispatcher.java:44)
         at com.ibm.wps.engine.templates.screens.Default.render(Default.java:91)
         at com.ibm.wps.engine.templates.ScreenTemplate.render(ScreenTemplate.java:61)
         at com.ibm.wps.engine.tags2.ScreenRenderTag.doStartTag(ScreenRenderTag.java:89)
         at org.apache.jsp._Default._jspService(Default.jsp  :768)
         at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:344)
         at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:683)
         at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:781)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
         at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
         at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
         at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
         at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1044)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:600)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java:254)
         at com.ibm.wps.services.dispatcher.DispatcherServiceImpl.handleRequest(DispatcherServiceImpl.java:89)
         at com.ibm.wps.services.dispatcher.DispatcherServiceImpl.include(DispatcherServiceImpl.java:50)
         at com.ibm.wps.services.dispatcher.Dispatcher.include(Dispatcher.java:44)
         at com.ibm.wps.engine.templates.themes.Default.render(Default.java:103)
         at com.ibm.wps.engine.templates.ThemeTemplate.render(ThemeTemplate.java:67)
         at com.ibm.wps.engine.phases.WPRenderPhase.processRendering(WPRenderPhase.java:312)
         at com.ibm.wps.engine.phases.WPRenderPhase.execute(WPRenderPhase.java:135)
         at com.ibm.wps.state.phases.AbstractRenderPhase.next(AbstractRenderPhase.java:106)
         at com.ibm.wps.engine.phases.WPAbstractRenderPhase.next(WPAbstractRenderPhase.java:93)
         at com.ibm.wps.engine.Servlet.callPortal(Servlet.java:713)
         at com.ibm.wps.engine.Servlet.doGet(Servlet.java:562)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
         at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
         at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
         at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
         at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
         at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:76)
         at com.ibm.wps.state.filter.StateCleanup.doFilter(StateCleanup.java:86)
         at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132)
         at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71)
         at com.ibm.wps.mappingurl.impl.URLAnalyzer.doFilter(URLAnalyzer.java:216)
         at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132)
         at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1040)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:600)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:201)
         at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:125)
         at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:286)
         at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
         at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:116)
         at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:186)
         at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
         at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
         at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:624)
         at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:458)
         at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:912)Then I changed the <f:selectItems/> little bit like
    <f:selectItems value="#selectItems.gfogBean.northAmericaList.toArray}"/>Then there was no error ,but the dropdown was null.
    Again I modifed the <f:selectItems/> tag in this way:
    <f:selectItems value="#{selectitems.gfogBean.northAmericaList.testBeanValue.testBeanValue.toArray}"/>then the dropdown appeared but the values were showing up twice.
    Can anybody give me solution to this problem.Even a custom converter or a custom component could solve this problem.. \n
    Because in my application, we are not populating the arraylists with SelectItem type.

    The perInfoAll list should be declared locally in getPerInfoAll(), otherwise it grows every time you call it.
    #{e.id};Remove the semicolon, unless you want to see it on the page, which doesn't seem right. Try <h:outputText value="#{e.id}"/> instead. Only certain types of children are supported inside h:column.

  • How to Caching the querry results

    Hi All,
    We have a requirement of caching the particular query results and get the results from the cache whenever the query is executed by user.
    Let me explain clearly. we have a high level complex query which runs on the BW cube(BW 3.5). The query is having the lot of structure elements and each element is restricted and calculated with no of characteristic values. That means the query needs to read each and every detail of the data to get the output. Because of that aggregates are no longer useful. The query will takes 30-45 min for each run. Due to no of users running the report  some time it is timed out.
    Is there is any way we can run the report and save the results in some caching. so that when ever the user runs the query it should bring back the results from caching.This will save lot of users time.
    Appreciate any kind of info on that.
    Thanks in Advance..

    Hi Bhaskara,
    about cache take a look at performance docs under:
    FAQ - The Future of SAP NetWeaver Business Intelligence in the Light of the NetWeaver BI&Business Objects Roadmap.
    Consider also that you are in 3.5 release, so you can try to use also APD functionalities. You can save into a structure the result of the query, and the built a more simple query on this structure with all result already stored at an aggregate level (for every detail of the structure elements).
    For APD docs take a look at: www.service.sap.com/bi --> Product Information Previous Releases --> SAP BW 3.5 --> Data Mining / APD.
    Ciao.
    Riccardo.

  • How can I cache dvt graph results?

    Hello colleagues, I need some help regarding dvt graphs performance.
    In our application we have big amount of data which the user can filter by adding grouping options, time ranges, etc. For the graph to be updated (the query to be re-executed), the user has to press a "Refresh" button each time he changes the query parameters.
    Once the new results are displayed in the graph, the user can change the graph type by pressing either a pie, bar, line or table buttons. As a consequence of this, the query is re-executed and returns the same previous results. This obviously drops the performance of the application.
    So, how we can manage to refresh the type of graph (for example from pie to bar) without re-executing the query. Note that the "Refresh" button should always re-execute the query even if the parameters were not changed.
    I'll appreciate your help.
    Regards,
    Nicolas
    Edited by: 864814 on Oct 14, 2011 6:05 AM

    And by the way how are you switching the graph type? Are you using an af:graph tag and switching just the type? Or are you rendering a complete new graph on your page?

  • Implementing cache for dropdown values in Web Dynpro Iview

    Hi All,
             I am currently in the processing of enhancing a web dynpro application which contains among other things around 15 drop down boxes. The values in these drop down boxes are coming from oracle database and these values change occasionally.
            To optimize the response time, I have implemented simple caching machanism using static  variable in plain java class. The objective is to retrieve the values for the first time from oracle db and use the same datastructure for subsequent calls. Though I have found that the number of calls to the database reduced significantly I am facing some problem understanding and implementing the cache refresh behaviour.
          I want to implement a cache refresh machanism for every 12 hours.
        Solutions tried.
                   Creating a thread to refresh the cache for every 12 hours.
                   Creating a timer for refreshing the cache for every 12 hours.
        Problems encountered :
        1.  Is it appropriate to use threads in a web dynpro app?
        2.  What I have observed is that  the thread (I have created a daemon thread) is alive even after I have deployed a new copy of the code.  When I deploy a new code is it not supposed to remove all copies from the memory?
           If using a daemon thread is appropriate, What is the web dynpro
              framework's class loading behavior when a new copy of code is deployed?
             Does it completely unload existing classes (there by killing the daemon thread
                   created in previous deployment)?
       3. Assuming that we have found suitable solution for thread issues, what would  happen when the application is deployed on a cluster? Can we send a message to
            all the nodes in the cluster?
    I would like to understand what other developers has done in these kind of situations. Your experience and insight will be valuable and help me decide to implement caching or not in  the first place.   
    Thanks in advance.
    Regards
    Pallayya Batchu

    Pallayya,
    <i>1. Is it appropriate to use threads in a web dynpro app?</i>
    Not recommended as with any J2EE application
    <i>2. What I have observed is that the thread (I have created a daemon thread) is alive even after I have deployed a new copy of the code. When I deploy a new code is it not supposed to remove all copies from the memory?</i>
    Re-deployment doesn't mean stopping all user spawned threads. It just causes unloading of classes if there are no hard references from anything but deployed application. In your case, there are probably references from Thread/Runnable so your previous version is not unloaded on redeployment.
    <i>3. Assuming that we have found suitable solution for thread issues, what would happen when the application is deployed on a cluster? Can we send a message to all the nodes in the cluster?</i>
    Probably you can, probably you cannot. Even if you can it would be complex.
    My advise -- abandon threads altogether, use real cache instead:
    package com.yourcompany.yourapp.utils;
    import java.util.HashMap;
    import java.util.Map;
    public class ValueHelpCache {
      private static class Entry {
        long lastLoadTime;
        Map  payload;
        Entry(final Map payload) {
          this.payload = payload;
          this.lastLoadTime = System.currentTimeMillis();
      final private Map _entries = new HashMap();
      private ValueHelpCache() {}
      synchronized public Map getValueHelp(final String valuyeHelpKey) {
         Entry entry = (Entry)_entries.get(valuyeHelpKey);
         if ( entry == null) {
           entry = new Entry( loadValueHelpFromDatabase(valuyeHelpKey) );
           _entries.put(valuyeHelpKey, entry);
         } else {
           final long now = System.currentTimeMillis();
           if ( now - entry.lastLoadTime > ENTRY_TTL ) {
             entry.payload = loadValueHelpFromDatabase(valuyeHelpKey);
             entry.lastLoadTime = now;
        return entry.payload;
      private Map loadValueHelpFromDatabase(final String valuyeHelpKey) {
        /* @TODO implement loading values from database */
        return null;
      public static ValueHelpCache getInstance() { return INSTANCE; }
      final public static long ENTRY_TTL = 12 * 60 * 60 * 1000;
      final private static ValueHelpCache INSTANCE = new ValueHelpCache();
    This way client code tracks itself what entries are stale and need to be reloaded. No threads at all and no problems in cluster. You may alter time tracking mechanism to reload at given time of day, say at 12AM and 12PM -- just use java.util.Calendar and change code accordingly.
    Valery Silaev
    SaM Solutions
    http://www.sam-solutions.net

  • Afc:cache JSF and af:forEach

    I have to iterate with a forEach to dynamicaly add panels in a tab.
    I would like that each tab can be included in cache BUT i have to use different id for each cache element iterated...
    How to do it ??? (it seems that generating the id dynamicaly is not possible because id can not be EL generated)
    <af:showOneTab>
    <af:forEach items="#backing_commercialoffer.composedPackages}"
    var="packageLink" varStatus="vs" begin="1">
    <afc:cache id="#{vs.index}" duration="60"
    searchKeys="commofferList"
    cacheMissOnRePost="false">
    <af:showDetailItem text="#{packageLink.currentVersion.dateAsString}">

    Hmmm it looks like I've found the answer in help for that tag:
    "< af:forEach > does not currently support scenarios where the size of the "items" list or array changes from one request to the next. It may be possible to work around this in specific scenarios by manually deleting all children of the parent component, but this has not yet been tested. "
    This is the case which caused my problem... the question remains - what for then is that tag, if it doesn't support the situation when count of records changes :-) ??? And other question - how to render nice table then? Do we have to use only standard table?
    Leszek

  • Caching of search results

    Hello
    a customer of mine upgraded to apex release 4.2.2.00.11. Now they have upgraded the application behaves different.
    The customer uses Apex in combination with EBS R12. The problem is that when they open a responsibilty the first time, the apex search screen opens, and there are no fields entered. If they continue working, a open the responsibility again, the search screen opens again but now the fields are entered. It seems that Apex uses cache? Customer would like to know how they can turn this off by default. They now how to change the behaviour per screen, but would like to know how to change this for all screens at once/
    Can anyone help me?

    iz*319871*is wrote:
    They now how to change the behaviour per screen, but would like to know how to change this for all screens at once/
    Hi,
    What page attribute you referring?
    Maybe you check application security attributes
    http://docs.oracle.com/cd/E37097_01/doc/doc.42/e35125/bldr_attr.htm#CHDDDHHF
    Regards,
    Jari
    My Blog: http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0
    Twitter: http://www.twitter.com/jariolai

  • Browser is Caching the HTTPRequest Result :S

    I have an external xml file, full of images.
    Today i added 2 new images but my web is showing the old,
    seems like browser showing old data due to caching.
    How to resolve?

    If the xml is an asset of your directory structure withing
    the Flex project and being exported, you should try cleaning the
    project under the project menu. If it's sitting, waiting on the
    server, the obvious (broswer cache) is worth
    double-checking.,

  • SiSoft Sandra Cache & Memory Benchmark Results - Normal?

    Do these results look pretty typical for my system?
    MSI K8T Neo-FSR
    AMD Athlon 64 3000+
    512MB PC3200 DDR400

    Yeaaaaah, I just realized that. I thought it would upload automatically to the forums.   Dinnertime right now anyways. I'll get that pic up in a bit.
    Ok, ok. here we go.  

  • Oracle 11g result cache and TimesTen

    Oracle 11g has introduced the concept of result cache whereby the result set of frequently executed queries are stored in cache and used later when other users request the same query. This is different from caching the data blocks and exceuting the query over and over again.
    Tom Kyte calls this just-in-time materialized view whereby the results are dynamically evaluated without DBA intervention
    http://www.oracle.com/technology/oramag/oracle/07-sep/o57asktom.html
    My point is that in view of utilities like result_cache and possible use of Solid State Disks in Oracle to speed up physical I/O etc is there any need for a product like TimesTen? It sounds to me that it may just asdd another layer of complexity?

    Oracle result cache ia a useful tool but it is distinctly different from TimesTen. My understanding of Oracle's result cache is caching results set for seldom changing data like look up tables (currencies ID/code), reference data that does not change often (list of counter parties) etc. It would be pointless for caching result set where the underlying data changes frequently.
    There is also another argument for SQL result cache in that if you are hitting high on your use of CPUs and you have enough of memory then you can cache some of the results set thus saving on your CPU cycles.
    Considering the arguments about hard wired RDBMS and Solid State Disks (SSD), we can talk about it all day but having SSD does not eliminate the optimiser consideration for physical I/O. A table scan is a table scan whether data resides on SCSI or SSD disk. SSD will be faster but we are still performing physical IOs.
    With regard to TimesTen, the product positioning is different. TimesTen is closer to middletier than Oracle. It is designed to work closely to application layer whereas Oracle has much wider purpose. For real time response and moderate volumes there is no way one can substitue TimesTen with any hard wired RDBMS. The request for result cache has been around for sometime. In areas like program trading and market data where the underlying data changes rapidly, TimesTen will come very handy as the data is real time/transient and the calculations have to be done almost realtime, with least complications from the execution engine. I fail to see how one can deploy result cache in this scenario. Because of the underlying change of data, Oracle will be forced to calculate the queries almost everytime and the result cache will be just wasted.
    Hope this helps,
    Mich

Maybe you are looking for