Session handling in Flex

I am using remote object for the flex and service communication. After multiple time log in and log out , which is done by remote object call also, I am getting different session id for browser and from the client side. Is there any way to restrict this session id conflict

I think you are getting confused by comparing flex
development with jsp serverside development, its completely
different thing,
1. How to pass hidden variables using flex.(In jsp we pass it
throuth hidden field, is there any mechanism similar to that one)
-- honestly, where do you really want to pass hidden field to
? (hidden fields is a hack implemented to overcome the way http
protocol works , in flex you don't need that hack) .
2) you can implement exception routine same way (even easier
in flex) if error occures show this and this page(for example error
canvas. with error mesage thats it,
3) How to do session handling in Flex.
-- question is too vague, do you ave concrete problem that
you think of?

Similar Messages

  • How can we handle in flex application if the server is down?

    how can we handle in flex application if the server is down?

    You and me both. 
    As ambiguous as the original question was, I think he was just asking how to handle a server exception and I would suggest generally just using a Alert.show("your specific message (eg.  The server is currently unavailable)") in the place where you handle the fault return from your service or http call.  I'm sure there are more complicated messaging frameworks or approaches, but that seems to be enough for my apps.

  • Again Session-Handling

    Hi there, one question about session-handling in JSP.
    I'm trying to set attributes in the JSP and afterwards get them back.
    No chance! They always vanish! Here is the code:
    <%@page contentType="text/html"%>
    <%@page import="java.util.*"%>
    <html>
    <head><title>JSP Page</title></head>
    <body>
    <%
    // Output of Session-Attributes
    for (Enumeration enum=session.getAttributeNames();enum.hasMoreElements();)
    String name2 = (String)enum.nextElement();
    String value2 = (String)session.getAttribute(name2);
    out.println(name2+":"+value2);
    // Set Attributes that I get from Form!
    String name = request.getParameter("name");
    String value = request.getParameter("value");
    if (name!=null)
    session.setAttribute(name,value);
    %>
    <form action="SessionTest.jsp" method=get>
    <input type=text name=name>
    <input type=text name=value>
    <input type=submit>
    </form>
    </body>
    </html>
    Really dont have a clue!
    Thx, ToM

    Works ok for me:
    Couple of suggestions: put the setting code, before the display code.
    That way you will see the pair that you just set in session ;-)
    Also try this:
    Session id = <%= session.getId() %> and see if it stays the same.
    If you are getting a different session every time, then its not maintaining the session.
    Common cause of session problem is: cookies are turned off.
    Either turn cookies on, or use URL rewriting:
    <form action="<%= response.encodeURL("SessionTest.jsp") %>">
    <%@page contentType="text/html"%>
    <%@page import="java.util.*"%>
    <html>
    <head><title>JSP Page</title></head>
    <body>
    <%
    // Set Attributes that I get from Form!
    String name = request.getParameter("name");
    String value = request.getParameter("value");
    if (name!=null)
    session.setAttribute(name,value);
    // Output of Session-Attributes
    for (Enumeration enum=session.getAttributeNames();enum.hasMoreElements();)
    String name2 = (String)enum.nextElement();
    String value2 = (String)session.getAttribute(name2);
    out.println(name2+":"+value2 + "<br>");
    %>
    <form action="SessionTest.jsp" method=get>
    <input type=text name=name>
    <input type=text name=value>
    <input type=submit>
    </form>
    </body>
    </html>Cheers,
    evnafets

  • Problem on "Session Handling"

    Hi everyone,I write a simple servlet program on Session handling.In this I use invalidate() method to invalidate the session.
    invalidate() But the problem is that when i push the back button the session data gets back,means in the previous page session data gets visible.please help me.

    All what you can do is to instruct the client not to cache the page. You can do this by adding the following entries to the HTML head:
    <meta http-equiv="cache-control" content="max-age=0, must-revalidate, no-cache, no-store, private">
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="expires" content="-1">If you want to do this programmatically on HttpServletResponse (using a Filter or so):
    response.setHeader("cache-control", "max-age=0, must-revalidate, no-cache, no-store, private"); // HTTP 1.1
    response.setHeader("pragma", "no-cache"); // HTTP 1.0
    response.setDateHeader("expires", -1); // ProxyMake sure that you clears your browser cache before testing.

  • Error handling message: flex.messaging.MessageException: No destination with id '' is registered with any service

    Hi,
    We are using both Remoting and HttpService calls for our business application.
    We were able to communicate with the LCDS server till this point with whatever default settings provided for AMFChannel configuration in services-config.xml through a flex client. Also we have a clustered environment for this servers which works out fine till now.
    Now for performance enhancement improvements, we started using Caching Mechanism for our HttpService urls (through some third party service), which will now be cached on the network instead of accessing every time from our clustered servers. But all our AMF calls through Remoting services are still the same.
    So after migrating to this Caching environment, we started encountering intermittent issues where some of our AMF calls were failing with falling exception trace :
    16:03:40,576 INFO [STDOUT] [Flex] [ERROR] Error handling message: flex.messaging.MessageException: No destination with id '' is registered with any service.
    incomingMessage: Flex Message (flex.messaging.messages.CommandMessage)
    operation = invalid.12
    clientId = D7855C44-810B-64AB-C176-7C38F83DEB2C
    correlationId =
    destination =
    messageId = 2DA6BDB8-859E-8AE1-03A4-57743DE03188
    timestamp = 1247007820561
    timeToLive = 0
    body = {}
    hdr(DSId) = D77C6BD2-3808-1512-3984-CCF397428E35
    hdr(DSEndpoint) = my-amf
    errorReply: Flex Message (flex.messaging.messages.ErrorMessage)
    clientId = D7855C44-810B-64AB-C176-7C38F83DEB2C
    correlationId = 2DA6BDB8-859E-8AE1-03A4-57743DE03188
    destination =
    messageId = D7855C64-3E08-466B-96F8-5BAE7D385129
    timestamp = 1247007820574
    timeToLive = 0
    body = null
    code = Server.Processing
    message = No destination with id '' is registered with any service.
    details = null
    rootCause = null
    body = null
    extendedData = null
    So i do not understand, most of the times the AMF calls works correctly and some times it fails with above fail trace.
    Any suggestions would be appreciated.
    Thanks,
    FlexPirate

    It might be a bit late but replying for anyone who lands on this page facing this same problem.
    The solution for "No destination with id '<my dest id>' is registered with any service" problem is that you have to make sure your destination definition is added in your:
    C:\ColdFusion9\wwwroot\WEB-INF\flex\messaging-config.xml
    Secondly, If you are deploying it on a ColdFusion Server, then you have to make sure exact same definition is added in Server messaging-config.xml file as well.
    This should solve this problem.
    While we are at it, wanted to point another possible gotcha.
    if your Server is using SSL protocol i.e. it has https:// rather than http://, Then within your <destination> definition block in messaging-config.xml, you have to add appropriate secure channels in <channels> section. You can find all available channel definitions in
    C:\ColdFusion9\wwwroot\WEB-INF\flex\services-config.xml

  • Global Error Handling in Flex

    Hello All,
    I want to know if there is away to do Global Error Handling in Flex so that in case of any error, the pop-up (showing the exception stack trace) on the client machine should not come, instead I would be able to handle the exception in a more subtle manner.
    Can I do something at the application level to prevent this ??  or should it be handled in each Flex method individually, code enclosed between try-catch blocks ?
    Thanks & Regards,
    Agraj

    Hi,
    Try referring the below links...
    http://www.summa-tech.com/blog/2010/01/04/global-error-handling-in-flex/
    http://livedocs.adobe.com/flex/3/html/help.html?content=11_Handling_errors_06.html
    You have one sample demo with source in first link.
    Hope this will be helpful.
    If this post answers your question or helps, please kindly mark it as such.
    Thanks,
    Bhasker Chari

  • Configure no. of session handled for same sql

    hi, experts,
    hi, if there is one report (only fire 1 sql by this report).
    if only one internet explorer to run this report , it use 3 minutes to get it.
    I use 3 internet explorers to run the same report but not running the report at the same time.
    firstly, I run the report on first internet explorer.
    then after 10 seconds, I run the report on 2nd internet explorer.
    then after 10 seconds, I run the report on 3rd internet explorer.
    after result on all internet explorer came, I check the sessions on the "Manage Sessions"
    there are 2 sessions for same report.
    How to configure no. of session handled for same sql on OBIEE?
    thank you very much!

    shipon_97 wrote:
    Here I see that at a particular time of the database , the number of session from v$session is "271" where as the number of session in the "v$resource_limit" is "280" . Here I get some differ among these parameters .
    Would anybody plz tell why the no of sessions differ between v$session and v$resource_limit parameters .
    The v$session views shows current sessions (which change rapidly), while the v$resource_limit shows the maximum resource utilization, like a high-water mark.
    http://download-east.oracle.com/docs/cd/A97630_01/server.920/a96536/ch3155.htm

  • Error - session handle nor valid for ivi

    Hi All
    I have posted this question in existing thread also I guess.
     I am trying to control TDK lambda power supply through LabVIEW using IVI drivers.
    logical name set in a MAX is same as what I am giving in VI to InitializeWithOptions.vi . However I am ending up with this error "IviDCPwr Initialize With Options.vi<ERR>
    Primary Error: (Hex 0xBFFA1190) The session handle is not valid."
    Not sure why this error is coming.
     Can anyone help me with this error?

    You might be using an IVI-COM driver and trying to use IVI-C Class driver VIs without having installed the IVI-COM adapters.
    As mentioned in the knowledge base below The IVI-COM adapters are included with IVI Compliance Package 3.2 and later, but must be enabled in the installer's feature tree.
    IVI-C Class Driver Support for IVI-COM Specific Drivers
    http://digital.ni.com/public.nsf/allkb/5499F9DBD07522F686256F260066BA86?OpenDocument
    duplicate post
    http://forums.ni.com/t5/Instrument-Control-GPIB-Serial/TDK-Lambda-Power-Supply-error/m-p/3118149#M68...

  • Implementation of session handling for using web services

    Hi,
    I would like to use session handling in web services using ABAP stack in order to start the session with an user login function followed by other RFC calls till a user logout. So far, I found only the following help note in the SAP online help:
    Interface Profile
    In the interface profile, choose the required processing type: Stateful or Stateless.
    A stateful service retains its status within the framework of a HTTP session throughout several calls form the same service consumer. The standard value for services is Stateless.If you require stateful communication, you can choose this instead.
    [http://help.sap.com/saphelp_nwpi71/helpdata/de/45/25291b5a2657c0e10000000a1553f7/content.htm |http://help.sap.com/saphelp_nwpi71/helpdata/en/45/25291b5a2657c0e10000000a1553f7/content.htm]
    Please, could someone explain me the further required steps of SAPs session handling idea cause just settting the status to stateful is still not the solution itself...
    Regards,
    Jens

    Now, I found the possible scenarios, suggest by SAP Help, regarding security for Web Services ([http://help.sap.com/saphelp_nw73/helpdata/en/48/8ebbba66be06b2e10000000a42189b/content.htm|http://help.sap.com/saphelp_nw73/helpdata/en/48/8ebbba66be06b2e10000000a42189b/content.htm]):
    - SAML & WS SecureConversation -> SSO
    - WS Security UsernameToken & WS SecureConversation
    - User ID and Password in HTTP Header & HTTPS
    - SAP Authentication Assertion Ticket & HTTPS -> SSO
    - X.509 SSL Client Certificate through HTTPS
    - WS Security: X.509 Certificate Authentication at Message Level
    Are scenarios with SSO the solution for creating sessions!?

  • What are default Zend Session handling best practices to prevent Cross Site Request Forgery?

    I have enjoyed the David Powers book Adobe Dreamweaver CS5 with PHP:  Training from the Source - and have put many of the examples into practice.  I have a security related concern that may be tied to the Zend::Auth example in the book.  While this is installed an working on my site:
    <?php
    $failed = FALSE;
    if ($_POST) {
      if (empty($_POST['username']) || empty($_POST['password'])) {
        $failed = TRUE;
      } else {
        require_once('library.php');
        // check the user's credentials
        try {
          $auth = Zend_Auth::getInstance();
          $adapter = new Zend_Auth_Adapter_DbTable($dbRead, 'user', 'login', 'user_pass', 'sha1(?)');
          $adapter->setIdentity($_POST['username']);
          $adapter->setCredential($_POST['password']);
          $result = $auth->authenticate($adapter);
          if ($result->isValid()) {
            $storage = $auth->getStorage();
            $storage->write($adapter->getResultRowObject(array(
              'ID', 'login',  'user_first', 'user_last', 'user_role')));
            header('Location: /member/index.php');
            exit;
          } else {
            $failed = TRUE;
        } catch (Exception $e) {
          echo $e->getMessage();
    if (isset($_GET['logout'])) {
      require_once('library.php');
      try {
        $auth = Zend_Auth::getInstance();
        $auth->clearIdentity();
      } catch (Exception $e) {
        echo $e->getMessage();
    Apparently, there is  very limited protection against Cross Site Request Forgery, where the resulting SessionID could be easily hijacked?  I am using the Zend Community edition (I have 1.11.11).     I have an observation from a client that this authentication is not up to snuff. 
    To boil it down: 
    1.  Is there a Zend configuration file that might have some settings to upgrade the Session and or authentication security basics? I'm wondering specifically about the settings in /library/Zend/session.php? Ie secure the session against a changing user IP, and invoking some other session handling stuff (time-out etc). 
    2.  If I understand it correctly, "salting" won't help with this, unless it's added/checked via a hidden POST at login time? 
    Ideally, the man himself, David Powers would jump in here - but I'll take any help I can get!
    Thanks!

    Might ask them over here.
    http://forums.asp.net/1146.aspx/1?MVC
    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows]
    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

  • ERP2004: ESS JCO session handling in Web Dynpro apps?

    Hello,
    we run ESS/MSS Web Dynpro scenarios, running on WAS 6.40, SP12 in
    Enterprise Portal EP6 SP2 Patch 32. Our go live will be with > 1000 ESS users.
    1. When will the sessions in R/3 backend system be terminated by the
    Web Dynpro Application?
    How is the session handling in FPM (Floor Plan Manager) implemented?
    2. Are there any recommendations regarding the JCO connection settings
    in Web Dynpro Content Administrator (Maximum Pool Size, Maximum Connections,
    Connection Timeout, Maximum Wait Time) to reduce / optimize the load for the
    backend system? I found a documentation in SDN but it is not
    specific for ESS / MSS based on Web Dynpro.
    Background of questions above: The customer is worry about the load on
    SAP R/3 backend side: too much current users in the R/3 backend system,
    possibly bad performance etc. because the JCO sessions are open a long time.
    Are there any experiences with customers running productive ESS / MSS scenarios
    based on Web Dynpro?
    Thanks & Best regards,
    Daniel

    Hi,
    1. For best practices on JCO settings follow the tutorial below and do it accordingly for your no of users. YOu might have to do some trial and error procedure.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3103eb90-0201-0010-71af-be6f4a6f61d1
    2. For standards, security settings, cache management etc, SAP will give a TODO list after a remote audit of your project.
    regds,
    Sukanta Rudra

  • Asynchronous Error Handling in Flex

    Hi,
    When going through the Error Handling in Flex from Adobe site, i got confusion in understanding Asynchronous Way of
    Error Handling Mechanish in FLEX .
    Here the authro Mentiones an example related to File Uploading that is for FileReference class .
    I am not quite familiar with File Uploading , so i could not able to gran this concept .
    Please let me know what is this Asynchrnous Way of Error Handling in FLEX , because as far is synchronous is concerned it is straight Forward Mechanism .
    Please help me in understanding this Concept.

    Hi,
    This type of error handling means that you will listen for events on the calling instance such as a file reference object. You will use the method addEventListener() and listen for events such as IO_ERROR or whatever event the instance will dispatch on error.
    See the documentation for specific error events of each class that acts as a service.
    The async part means that the error if thrown will happen after the line and method executes where you called your service.
    Mike

  • Session Handling in ATG

    Friend,
    Could you please provide any best document about session handling in ATG.
    Thanks in advance

    You can refer these:
    http://docs.oracle.com/cd/E35318_02/Platform.10-1-1/ATGInstallGuide/html/s0710sessionmanagementinoracleatgwebc01.html
    http://docs.oracle.com/cd/E35318_02/Platform.10-1-1/ATGInstallGuide/html/s0814enablingcomponentbackup01.html
    https://docs.google.com/file/d/0B8rpgofYlaJnYTBiNGNmNjMtODU0MS00NDNmLThmOWItNGQzN2UwODBjODRi/edit?pli=1

  • Need to store multiple session values in flex

    Hi,
         I need to store multiple session values in flex based on the user who logged in.
    For Example, if a user logged in as an administrator and in another windows another user logged in as guest, i need to maintain two seperate session for the two different users.
    Is it possible for maintaining different sessions.
    Expecting your valuable response.
    Thanks
    Jude Paul

    Look at Shared Objects. You can store this information in them by creating a unique object for each type of user.

  • Regarding session handling in BSP

    hi all,
        we have integrated our BSP application to EP 5.o, we have used 'existbspapplication'(used buffered page) function in our default page to handle the sessions.
       and its working fine, but now we have to integrate it to the  EP 6.0 and we find the sessions are not terminated, and tend to remain after closing the application manually.
       my question is does portal handle sessions if yes, tried the same(by removing session handling code from default page) but could not get the desired result. is there any other way to handle sessions in EP 6.0
      thanks,
      raju
    Message was edited by: krishnam raju

    Hi,
    Did you set the checkbox for portal integration on in the properties of the BSP page?
    Check also
    http://help.sap.com/saphelp_nw2004s/helpdata/en/83/132197c3564643af326a5ebccb604f/frameset.htm
    Furthermore, check things like
    /people/eddy.declercq/blog/2005/11/15/enemy-of-the-state
    /people/eddy.declercq/blog/2006/03/20/wake-me-up-before-you-go-go
    Eddy

Maybe you are looking for