ADF client-side state saving

<p>Hi, I'm developing JSF with ADF and MyFaces. I want to minimise the load on my Server, e.g. by minimising use of session beans and other types of session storage. So I use the <t:saveState> from MyFaces instead. In web.xml I set the parameter:</p>
<p>
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>client</param-value>
</context-param>
</p>
<p>This makes all the MyFaces components store state on the client. However, this still doesn't force the ADF components to use client-side state saving(!). As described here, the default behaviour in ADF is to use a session token to store page state in HttpSession. In my project I've seen all sorts of strange behaviour when the session token exceeds the number of CLIENT_STATE_MAX_TOKENS. Of course I can try to increase this value, but this will lead to even more sesison usage. </p>
<p>So, I tried setting another parameter in web.xml:</p>
<p>
<context-param>
<param-name>oracle.adf.view.faces.CLIENT_STATE_METHOD</param-name>
<param-value>all</param-value>
</context-param>
<p>
<p>This should force all state to be moved to the client in a hidden form field. But when I do this I get this type of error:</p>
<p>
2006-10-25 13:21:30,854 ERROR (taglib.core.ViewTag:181) - Error writing body content
java.io.NotSerializableException: oracle.adf.view.faces.component.core.input.CoreSelectOneChoice
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1369)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1341)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1245)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1069)
at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1245)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1069)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
at java.util.ArrayList.writeObject(ArrayList.java:569)
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:585)
at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:890)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1333)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1245)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1069)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
at oracle.adfinternal.view.faces.renderkit.core.CoreResponseStateManager.writeState(CoreResponseStateManager.java:82)
at org.apache.myfaces.application.jsp.JspStateManagerImpl.writeState(JspStateManagerImpl.java:430)
at oracle.adfinternal.view.faces.application.StateManagerImpl.writeState(StateManagerImpl.java:241)
at org.apache.myfaces.taglib.core.ViewTag.doAfterBody(ViewTag.java:145)
at org.apache.jsp.pages.innkurv.innkurvMain_jsp._jspx_meth_f_view_0(innkurvMain_jsp.java:152)
at org.apache.jsp.pages.innkurv.innkurvMain_jsp._jspService(innkurvMain_jsp.java:91)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:416)
at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
at oracle.adfinternal.view.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:157)
at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:367)
at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:336)
at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:196)
at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:87)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:174)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at no.justisdepartementet.etterlysning.web.util.ContextResourceFilter.doFilter(ContextResourceFilter.java:69)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at no.justisdepartementet.etterlysning.web.util.RedirectFilter.doFilter(RedirectFilter.java:59)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
</p>

<p>Thanks guys. I did indeed try to use <t:saveState> to save the CoreSelectOneChoice. More specifically, I tried to use <t:saveState> on a backing bean where one of its properties were a CoreSelectOneChoice. The backing bean itself needs to be serializable as well as all of its properties, so the solution is to set the local variable transient.</p>
<p>After overcoming this problem, however, I found that some of my managed beans still had serialization problems because they had references to "service managers" that were dependency injected via JSF's managed means facility. See this blog for a discussion about serialization and MyFaces.
</p>

Similar Messages

  • ADF server-side state saving method

    Hi all,
    As far as I know, ADF has three view state saving methods.
    1. client - tokens
    2. client - all
    3. server
    My question is about server-side state saving.
    If I set state saving methos "server" in web.xml, view state is stored in session scope as LRU map.
    And the size of the map can be configured with below parameters in web.xml.
    <context-param>
    <param-name>com.sun.faces.numberOfViewsInSession</param-name>
    <param-value>10</param-value>
    </context-param>
    <context-param>
    <param-name>com.sun.faces.numberOfLogicalViews</param-name>
    <param-value>5</param-value>
    </context-param>
    However I think these parameters is offered by Mojarra (Sun's JSF RI) and any ADF guides don't mention them.
    These parameters are supported in ADF?
    Regards,
    Atsushi

    Hi,
    don't have a support statement for this but would be surprised if we don't as ADF Faces runs on top of the JSF RI.
    However, I am wondering why your customer prefers state saving being handled on the server as it doesn't allow fail over for your application setup. Also it is the recommended option
    http://docs.oracle.com/cd/E25054_01/web.1111/b31973/ap_config.htm#CEGECDJF
    +"Context parameter javax.faces.STATE_SAVING_METHOD: Specifies where to store the application's view state. By default this value is server, which stores the application's view state on the server. *It is recommended that you set javax.faces.STATE_SAVING_METHOD to client* when you use ADF Faces, to store the view state on the browser client. When set to client, ADF Faces then automatically uses token-based, client-side state saving. *You can specify the number of tokens to use instead of using the default number of 15*.+
    +You can specify the following state-saving context parameters:+
    +org.apache.myfaces.trinidad.CLIENT_STATE_METHOD: Specifies the type of client-side state saving to use when client-side state saving is enabled by using javax.faces.STATE_SAVING_METHOD. The values for CLIENT_STATE_METHOD are:+
    +token: (Default) Stores the page state in the session, but persists a token to the client. The simple token, which identifies a block of state stored back on the HttpSession object, is stored on the client. This enables ADF Faces to disambiguate the same page appearing multiple times. Failover is supported.+
    +all: Stores all state information on the client in a (potentially large) hidden form field. It is useful for developers who do not want to use HttpSession.+
    +*Performance Tip:*+
    +Because of the potential size of storing all state information, it is recommended that you set client-state saving to token.+
    +*org.apache.myfaces.trinidad.CLIENT_STATE_MAX_TOKENS*: Specifies how many tokens should be stored at any one time per user, when token-based client-side state saving is enabled. The default is 15. When the number of tokens is exceeded, the state is lost for the least recently viewed pages, which affects users who actively use the Back button or who have multiple windows opened at the same time. If you are building HTML applications that rely heavily on frames, you would want to increase this value.+
    +*org.apache.myfaces.trinidad.COMPRESS_VIEW_STATE*: Specifies whether or not to globally compress state saving on the session. Each user session can have multiple pageState objects that heavily consume live memory and thereby impact performance. This overhead can become a much bigger issue in clustering when session replication occurs. The default is off.+
    +org.apache.myfaces.trinidad.USE_APPLICATION_VIEW_CACHE: Enables the Application View Cache (AVC), which can improve scalability by caching the state for the initial renders of the page's UI at an application scope. However, every page in the application must by analyzed for support in the AVC to avoid potential problems with debugging in an unexpected state and information leakage between users. Additionally, development is more difficult since page updates are not noticed until the server is restarted, and although initial render performance is enhanced, session size is not.+
    +*CAUTION:*+
    +The Application View Cache is not supported for this release. The feature does not work for any page where the rendering of the component tree causes the structure of the component tree to change temporarily. Since this is often the case, USE_APPLICATION_VIEW_CACHE should not be used."+
    So unless your customer has a good reason for server side state I would suggest him/her to go with best practices
    Frank

  • JSF 1.0 - client side state saving fails

    Existing screen worked fine in Beta with client-side state saving. Fails in 1.0 Release with:
    java.lang.NullPointerException
         at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:997)
         at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1008)
         at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1022)
         at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1008)
         at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1008)
         at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1008)
         at com.sun.faces.application.StateManagerImpl.restoreComponentState(StateManagerImpl.java:273)
         at com.sun.faces.application.StateManagerImpl.restoreView(StateManagerImpl.java:186)
         at com.sun.faces.application.ViewHandlerImpl.restoreView(ViewHandlerImpl.java:239)
         at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:157)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
         at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
    This exception is found in tomcat log. Nothing found in debug log. I switched state saving to server and screen works, however, I need the application to work with client state saving.
    Some screens in application work with client state saving. Some don't. All those that fail have the same exception as above.
    Any ideas?

    Hello
    I have the same problem but i am not using any verbatim tag in my case the problem only appears when i am using two custom validators for a inputtexd in the same page .
    the problem is solved using the server saving method but i want to use client saving method.
    If you have any ideas please help .
    this is the exeption :
    java.lang.NullPointerException     at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1004)     at com.sun.faces.application.StateManagerImpl.restoreComponentState(StateManagerImpl.java:352)     at com.sun.faces.application.StateManagerImpl.restoreView(StateManagerImpl.java:240)     at com.sun.faces.application.ViewHandlerImpl.restoreView(ViewHandlerImpl.java:228)     at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:157)     at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)     at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)     at org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:663)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:285)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:126)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)     at java.lang.Thread.run(Thread.java:534)
    thanks
    yinbr
    Message was edited by:
    yinbr

  • JSF client side state saving

    I know the following thing
    **When the HTML form is submitted it carries the view state value back to the server in the form of an HTTP parameter. JSF uses the value of this parameter to reconstruct the view during the restore view phase. The view is restored by reversing the process used to obtain the view state: it is decoded and deserialized.**
    so I have tried to run the following code in jsp page with jsf tags I was able to see the input hidden parameter with facesview state and its value
    <f:view>
            <h1>Hello World!</h1>
            <h:form>
               <h:inputText value="#{phonebean.phonenumber}" converter="Pconverter" id="input" >
            </h:inputText>
           <h:outputText value="rakeshggh" />
           <h:commandButton action="test" value="submit" />
           </h:form>
            </f:view>the encoded html output i was able to view the following hidden value which holds the view state as foolows
    <input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="H4s......very big value />
    but my question is when i have removed the jsf form tag but had some components in the view but there was no hidden element which holds the view state on
    client side , so I was wondering how the view state that stores on the client side goes to the server and gets reconstructed i.e the tree of components .It would
    be great if someone throws light on this I would appreciate it !!!

    rocky_nirvana wrote:
    **When the HTML form is submitted it carries the view state value back to the server in the form of an HTTP parameter. JSF uses the value of this parameter to reconstruct the view during the restore view phase. The view is restored by reversing the process used to obtain the view state: it is decoded and deserialized.**
    so I have tried to run the following code in jsp page with jsf tags I was able to see the input hidden parameter with facesview state and its value
    <f:view>
    <h1>Hello World!</h1>
    <h:form>
    <h:inputText value="#{phonebean.phonenumber}" converter="Pconverter" id="input" >
    </h:inputText>
    <h:outputText value="rakeshggh" />
    <h:commandButton action="test" value="submit" />
    </h:form>
    </f:view>the encoded html output i was able to view the following hidden value which holds the view state as foolows
    <input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="H4s......very big value />This is by the way only applicable if you have set view state saving to the Client Side.
    but my question is when i have removed the jsf form tag but had some components in the view but there was no hidden element which holds the view state on
    client side , so I was wondering how the view state that stores on the client side goes to the server and gets reconstructed i.e the tree of components .It would
    be great if someone throws light on this I would appreciate it !!!As GET requests are idempotent, JSF can just reproduce the same view at the server side.

  • Why sever-side state saving doesn't support fail over?

    Hi all,
    In my previous thread "ADF server-side state saving method" Frank said that it doesn't support fail over.
    Re: ADF server-side state saving method
    My customer is wondering the reason.
    If anyone has a clear statement about it, could you share it?
    Any help will be much appreciated.
    Atsushi

    Timo,
    As I wrote in my previous thread, my customer adopted multi-windows application design because they didn't know it caused viewExpiredException frequently.
    Now I'm looking for the best setting for avoiding the exception and need ADF guru's help.
    Frank said that ADF is on Sun's RI. And it seems that the state-saving parameters of Mojarra are working correctly in my environment. However any ADF docs don't mention the behavior of server-side state saving clearly. When I set state-saving method "server", view states are managed per logical view (≒ window). And it seems better for multi-window application than using client-token based state management from the perspective of preventing viewExpiredException.
    Because fail over is not their requirement, if we could make sure that server-side state saving doesn't have other side-effects they might adopt it.
    So I'd like to know in more detail about the behavior.
    Thanks,
    Atsushi

  • Problem with server side state saving ,JSF 1.1.1

    Hello,
    In my web.xml  the.STATE_SAVING_METHOD setting is s server
    <context-param>
            <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
            <param-value>server</param-value>
        </context-param>
    for measurement of application security isn't not allow to change this parameter to client , so the problem  when i access for application and i open a new page via linker for print for example and i would access for my initial page to make change or modify my initial page it s no possible to make any modification because i have a empty bean , but if the state saving is a client i haven't a problem because a tree map is stored in client browser, so my version of JSF is 1.1.1 ,
    So can you explain the cause for his problem
    and what's the solution for my problem ?
    NB:i can't change the parameter for STATE_SAVING_METHOD for a client
    Thank you

    did you search this form, there were lot of discussions in the past about server side cookies, you may find an answer to your problem.
    alternate approache for sending a value from parent page to the pop up window.
    1. when opening the pop up pass the values along with the url (if the size of variable is small)
    alternatively you can store the value in a hidden form field in parent window and access the same from poup window using
    you can simple access the page one form field value in page 2 (pop up) by using the following code.
    window.opener.document.getElementById('hiddenformfieldid').value

  • ADF Client-side Tree

    Hi there,
    i want my tree component to be expanded in client-side. I don't want it to go to server by generating DisclosureEvent and come back after i click the expand icon. Can somebody help me to find some documentation on it?
    Thanks...

    I assume you're using ADF faces? If so next time please start the subject line with 'ADF Faces'.
    There is no support for this yet. We are working on rich DHTML client-side renderers, but they won't be available for some time.

  • ADF EA 16, client state saving bug

    Hi,
    I have similiar issue as one reported at: Re: Bug in ADF client-side state saving.
    I have bug with <af:showDetail> component when using CLIENT_STATE_METHOD.
    I have this code in jsp:
    <af:showDetail id="payingItem" disclosedText="a" undisclosedText="b" styleClass="xpMenuBars"
    inlineStyle="margin-top: 10px; height: 24px; vertical-align: middle;" binding="#{outlookBar.payment}">
    When using token (server state saving) this HTML is rendered:
    <form><!-- Start: oracle.adf.ShowDetail["payingItem"] --><span id="m:payingItem"><div class="xpMenuBars" style="margin-top:10px;height:24px;vertical-align:middle" duplicate_style="vertical-align:middle"> ...
    You can see that inlineStyle attribute is printed out in HTML style attribute. When I use client side state method ("all" in web.xml) the inlineStyle is not transferred to style (it's empty):
    <form><!-- Start: oracle.adf.ShowDetail["payingItem"] --><span id="m:payingItem"><div class="xpMenuBars" style="" duplicate_style="vertical-align:middle">...
    Hope this will be resolved in EA17.
    Another question is why I have duplicate_style in HTML? Why renderer doesn't append style attribute. Browser wont recognize duplicate_style so it is quite useless.
    Regards, Miroslav Resetar

    You're seeing two separate bugs. One is the one reported earlier: inlineStyle can get dropped when saving state in the client. This has been fixed in EA17.
    The other thing you're seeing - with duplicate_style - is a different bug. It's not that we're outputting "duplicate_style" intentionally, but that our output code automatically (in debug mode) detects when someone tries to write out the same attribute twice (always a bug), and turns the second into "duplicate_xyz" to mark the mistake. So, the real bug is that when you set inlineStyle on af:showDetail, our code tries to write out "style" twice instead of merging the two together.

  • ADF Client State Saving

    I have a doubt about client state saving and ADF Faces Components/JSF.
    In my scenario, i have a hardware load balancer in front of two weblogic standard servers. The load balance is configured without affinity.
    The client token generated by the server hitted for the first roundtrip is not readable by the other server on a second roundtrip. I think because each server generates a different hash key. So when the load balancer forwards the client request to the other server in the webfarm, an error occurs because the server can not read the token.
    In .NET, we have a machineKey Attribute configurable in machine.config that let me configure the same hash key in both servers. In this way both servers can read the client token generated from each other.
    Is there something similar in ADF Faces/Weblogic scenario?
    Or ADF Faces Components can be fully stateless?

    John, in my scenario I am looking for scalability and high availability.
    Affinity does not provide high availability to users connected to a server in case of server's outage.
    Client state method setted to All does not fit in my scenario because the page is much complex and a large quantity of data would have to be stored in the client view state causing client slowdown and much network traffic overhead during roundtrips.
    So, or i use client state method setted to token and i be able to generate and read the same token by different servers in the webfarm (and store the session in JDBC persistent store) or i use ADF Faces in a complete stateless manner (nor state at client side neither at server side).
    My doubts are:
    - Is possible to generate and read the same client state token in different servers in a webfarm (http session stored in JDBC) like in ASP.NET through machineKey settings in machine.config?
    - Is possible to use ADF Faces Components in a complete stateless manner without having to store state at client side or server side to achive scalability?
    Best regards

  • ADF Faces: state saving method questions

    Please, could somebody elaborate implementation of state saving in ADF Faces? What specially interests me is a way on which it is improved in comparison with RI. Will be current implementation further improved regarding size of state which is stored in session or on client?
    Further, is it possible to make a read only page stateless? I tried naively to implement restore view phase listener which sets up transient property of view root to true. Page was rendered fine, but when I try to post something from that page NullPointerException was thrown from UIXComponentBase._getRendererImpl() method.
    Tnx

    Could you elaborate on the back button support?
    I'm trying to do something very simple right now with two JSF pages using ADF BC/Faces. One page is a simple table allowing the user to select a row. The second page allows the user to view details on the selected row. This is view only at this point. I've found however, that if I select a row and go to the detail page and then hit the back button to return to the first page and then select another row and attempt to go to the detail page I get an error message like so:
    1. validation - JBO-29000: Unexpected exception caught: oracle.jbo.JboException, msg=JBO-35007: Row currency has changed since the user interface was rendered. The expected row key was oracle.jbo.Key[1246992000 ]
    2. validation - JBO-35007: Row currency has changed since the user interface was rendered. The expected row key was oracle.jbo.Key[1246992000 ]
    I'm at a loss as to how to resolve this issue.
    Thanks,
    Corey

  • ADF Faces + hardware device in the client side.( adf swing  or adf java fx)

    We are using adf+swing in desktop app.
    We like ADF Faces but we need interations with Hardware device in the client side: scan reader, web cam, bar code reader, finger prints reader …
    How to do that’s in the adf faces web environment ( what about with sandbox security) how to obtain in the adf faces web page in the client side de video streams.
    In the future adf will be use Java FX?
    Thanks
    Juan Carlos Llanes

    Hi,
    see sample 71 http://www.oracle.com/technetwork/developer-tools/adf/learnmore/index-101235.html#CodeCornerSamples
    You can use ActiveX plugins or JavaApplet to access the client system. To reach out of the sandbox, it will require a certificate
    In the future adf will be use Java FX?
    No.

  • ADF 11G - Printing on Client Side???

    Hello,
    I'm trying to send to the client printer a file stored in my server.
    Is there any way to do that?
    More specifically, I want to see from the server the client side printers.
    I'm working on ADF 11G version 11.1.1.4. and Weblogic 10.3.2

    You know that your jdev does not match the needed wls server version?
    You can't see the client site printer on the serve. You have to send the file to the client first.
    Then you show the file in the browser and the user can use the browsers print dialog.
    Timo

  • ADF validator or JavaScript for client side validation ?

    using JDev and ADF 11g
    Problem description : To apply validations such as date range check, pattern matching, maxlength etc.. on ADF Faces Components.
    Solution 1: Use ADF validator such as Reg Expr validator, Max Length validator
    Souliton 2: Write Javascript code for validating the component's value at cleint side.
    When using ADF Validator for such type of validation checking, a request is send to the server for processing (additional overhead) . However we can do such validations with javaScript functions without the need to interact with the server. So, what benefit does ADF Validator serves when one needs to implement such validations ?
    Please share your views...

    H,
    afaik, client side validation in ADF Faces suppresses server round trips if a validation error is detected on the client. Only if no problem is found, the server side validation is challenged upon submit (so no extra round trip for validation). Shay is absolutely correct. JavaScript is a convenience but never a solution.
    Here's how to create a custom validator with a client and server side implementation : http://download.oracle.com/docs/cd/E15523_01/web.1111/b31973/af_validate.htm#BABEIIDD
    Frank

  • Disable or restrict System.out.println() statements on client side

    Hi All,
    This might be a stupid question, but i am still going ahead and asking the question.
    Is there a way to disable or restrict System.out.println() statements in applet code from executing on the client side by using settings in proxy server or firewall or other security settings.
    Thanks
    Nag

    Hi All,
    This might be a stupid question, but i am still going
    ahead and asking the question.
    Is there a way to disable or restrict
    System.out.println() statements in applet code from
    executing on the client side by using settings in
    proxy server or firewall or other security settings.
    System.out.println() calls are executed on the client machine, and thus do not pass through any firewalls or proxies. If the applet is signed, you can redirect the System.out, by System.setOut(...).

  • Bug with h:messages and client state saving?

    I have an application that uses <h:messages ...> to display validation/conversion errors on the page. I find that when I use "client" for my javax.faces.STATE_SAVING_METHOD, the messages completely destroy the display of the web page - HTML seems to be randomly cut off. Using the "server" state saving method solves the problem. Has anyone else seen this behavior? I can duplicate it easily.
    Thanks,
    Don

    Can you provide us with the jsp page you are using? I do not immediately
    see the probem you are encountering.
    Thanks,
    --roger (jsf co-spec lead)                                                                                                                                                                                                                                                                                                   

Maybe you are looking for