Flex Session implementation in Java

Hi
I am new to Flex. I have requirement like "store and retreiving a value in FlexSession instead of passing it to UI". The application in which I am working is an existing application where the value which I mentioned is generated from a service call and storinand reteiving it inside a DB. I neeed to modify it  so that it should be from Flex Session.
I tried using FlexContext.getFlexSession().setAttribute("abc","value");
But while retreiving through  FlexContext.getFlexSession().getAttribute("abc") it is returning null.
Could somebody help in finding a solution for this. It is urgent.

Thanks for your reply Claudiu. FlexContext comes from flex-messgaing-core.jar and I don't think it is a custom class. And my issue got solved . I think I missed the below entry in web.xml,
<!-- Http Flex Session attribute and binding listener support -->
 <llstener>
<listener-class>flex.messaging.HttpFlexSession</listener-class>
</llstener>

Similar Messages

  • Hi, I have quick question about use of USEBEAN tag in SP2. When I specify a scope of SESSION for the java bean, it does not keep the values that I set for variable in the bean persistent.Thanks,Sonny

     

    Make sure that your bean is implementing the serializable interface and that
    you are accessing the bean from the session with the same name.
    Bryan
    "Sandeep Suri" <[email protected]> wrote in message
    news:[email protected]..
    Hi, I have quick question about use of USEBEAN tag in SP2. When I
    specify a scope of SESSION for the java bean, it does not keep the
    values that I set for variable in the bean persistent.Thanks,Sonny
    Try our New Web Based Forum at http://softwareforum.sun.com
    Includes Access to our Product Knowledge Base!

  • Session tracking in java client app...*not jsp or servlets*

    Does anyone know of a way to keep a property accessible throughout a user session in a Java app? I'm writing a Java native client app with Apache Axis to access remote .NET services (web services). The service issues a session ticket upon login to implement security...this ticket needs to be accessible to all objects in the client app. In addition, this ticket needs to be "renewed" every 10 minutes or so.
    Any ideas on how to keep this ticket througout the session? And on how to update/renew every 10 minutes?
    ANY help would be appreciated Still relatively new to java...

    Hello.
    I use the following scenario in my project.
    User login to the web application then servlet keeps user data (IP-address, login name, etc) and creates a user ticket with the data. User ticket looks like a XML-element. After that I store the ticket to the Xindice DB.
    http://xml.apache.org/xindice/
    Xindice client API provides the useful methods for the ticket handling (read, update, delete).

  • Is Flex Session Tracking browser compatible?

    I have implemented Flex Session Tracking it works fine with
    Internet Explorwer browser but it does not work with Mozilla? Is it
    not browser compatible?

    Is it possible for you to send me your session tracking
    codes, bcoz im also doing session tracking.
    thanks

  • [svn:bz-4.0.0_fixes] 23961: Bug#3200562: New Flex Session Id generated while disconnect with streaming amf channel

    Revision: 23961
    Revision: 23961
    Author:   [email protected]
    Date:     2012-06-15 04:42:44 -0700 (Fri, 15 Jun 2012)
    Log Message:
    Bug#3200562: New Flex Session Id generated while disconnect with streaming amf channel
    While invalidating session, make sure a new one does not get created.
    Modified Paths:
        blazeds/branches/4.0.0_fixes/modules/core/src/flex/messaging/endpoints/BaseStreamingHTTPE ndpoint.java
    Property Changed:
        blazeds/branches/4.0.0_fixes/modules/

    You're trying to do this directly in ActionScript without using Flex, correct?
    The mxmlc compiler for Flex adds some registerClassAlias calls to map types between the client and the server. This will be missing if try to use the messaging code outside of a Flex app.
    Take a look at the mx.utils.RpcClassAliasInitializer class in rpc.swc. This has a static registerClassAliases method that will do the class registration for you. You should just need to call this before running your messaging code.
    -Alex

  • [svn:bz-4.6.x] 23962: Bug#3200562: New Flex Session Id generated while disconnect with streaming amf channel

    Revision: 23962
    Revision: 23962
    Author:   [email protected]
    Date:     2012-06-15 04:57:45 -0700 (Fri, 15 Jun 2012)
    Log Message:
    Bug#3200562: New Flex Session Id generated while disconnect with streaming amf channel
    While invalidating session, make sure a new one does not get created.
    Modified Paths:
        blazeds/branches/4.6.x/modules/core/src/flex/messaging/endpoints/BaseStreamingHTTPEndpoin t.java

    I thought the same that those devices simply are too old. However I would like to know what causes this capabilities change. We want to get rid of the old H/W, but at the moment it looks as if we would need to revert back to the 4402 in order to get those things working again.
    I have not enough information, but those devices are some kind of handhelds. Their MAC OUI belongs to Newport Electronics.
    Regards,
    Patrick

  • [svn:bz-trunk] 23960: Bug#3200562: New Flex Session Id generated while disconnect with streaming amf channel

    Revision: 23960
    Revision: 23960
    Author:   [email protected]
    Date:     2012-06-15 04:15:18 -0700 (Fri, 15 Jun 2012)
    Log Message:
    Bug#3200562: New Flex Session Id generated while disconnect with streaming amf channel
    While invalidating session, make sure a new one does not get created.
    Modified Paths:
        blazeds/trunk/modules/core/src/flex/messaging/endpoints/BaseStreamingHTTPEndpoint.java

  • [svn:bz-trunk] 23948: Bug##3200562: New Flex Session Id generated while disconnect with streaming amf channel

    Revision: 23948
    Revision: 23948
    Author:   [email protected]
    Date:     2012-06-13 06:11:35 -0700 (Wed, 13 Jun 2012)
    Log Message:
    Bug##3200562: New Flex Session Id generated while disconnect with streaming amf channel
    On session time out, Flex Client is invalidated on the server side. It also results in Flex Session getting invalidated. In order to complete the client-server streaming connection handshake, the client ends up sending a CLOSE command. On the server side, for any work to be done, the MB first needs to creates a Flex Session (if none exists). After doing the necessary cleanup, the newly created Flex Session will also be invalidated. No stray Flex Sessions will left dangling...
    Modified Paths:
        blazeds/trunk/modules/core/src/flex/messaging/endpoints/BaseStreamingHTTPEndpoint.java

  • Code to set and destroy session variables in Java Server Pages(JSP)

    code to set and destroy session variables in Java Server Pages(JSP)
    we have use following statement to set session variable
    session.setAttribute("userClient",id);
    we have use following statement to destroy session variable
    session.setAttribute("userClient","");
    and
    the session.invalidate() is not working
    Plz. solve this probem

    code to set and destroy session variables in Java
    Server Pages(JSP)
    we have use following statement to set session
    variable
    session.setAttribute("userClient",id);
    we have use following statement to destroy session
    variable
    session.setAttribute("userClient","");Perhaps if you tried using
    session.setAttribute("userClient", null);
    or
    session.removeAttribute("userClient");
    and
    the session.invalidate() is not workingNot working how?
    >
    Plz. solve this probem

  • Flex session replication among cluster Help needed!

    Hi,
    I'am using Flex 3, LiceCycle Data Service 2.5.1, JBoss 4.2.1 in a web application. Our JBoss servers are in a cluster. We want to replicate Flex session among cluster, but it doesn't work. Did someone face issue with Flex session replication among application servers?
    Thank you for your help
    Gerard

    Gerard,<br /><br />You will need to cluster the LCDS 2.5.1 instances the same way you clustered <br />JBoss.<br /><br />Check out the "Configuring Data Services" chapter in the Admin guide:<br />http://livedocs.adobe.com/livecycle/es/sdkHelp/programmer/lcds/services_config_4.html<b r /><br />--<br />Tom Jordahl<br />Adobe<br /><br /><br /><[email protected]> wrote<br />> Hi,<br />><br />> I'am using Flex 3, LiceCycle Data Service 2.5.1, JBoss 4.2.1 in a web <br />> application. Our JBoss servers are in a cluster. We want to replicate Flex <br />> session among cluster, but it doesn't work. Did someone face issue with <br />> Flex session replication among application servers?<br />> Thank you for your help<br />><br />> Gerard

  • Design patterns implemented in java API

    Hi,
    I have some questions on design patterns implemented in core java class or in general in java API.
    1)Whether
    java.util.Collections, the checkedXXX(), synchronizedXXX() and unmodifiableXXX() methods.
    can be considered as a decorator pattern?
    2) Whether
    LinkedHashMap(LinkedHashSet<K>, List<V>) which returns an unmodifiable linked map which doesn't clone the items, but uses them
    can be considered as a Bridge pattern?
    3) Whether Facade pattern is implemented in java ? If so which API uses it?
    4) Whether
    •     All non-abstract methods of java.io.InputStream, java.io.OutputStream, java.io.Reader and java.io.Writer.
    •     All non-abstract methods of java.util.AbstractList, java.util.AbstractSet and java.util.AbstractMap
    can be considered as a Template method pattern?
    5) Whether
    •     java.util.Comparator#compare(), executed by among others Collections#sort()
    can be considered as a Stratergy pattern?
    6)
    Whether State pattern is implemented in java ? If so which API uses it?
    7)
    All implementations of java.lang.Runnable are considered as a Command pattern.
    8)
    Whether
    •     java.io.InputStreamReader(InputStream) (returns a Reader)
    •     java.io.OutputStreamWriter(OutputStream) (returns a Writer)
    can be considered as an Adapter pattern?
    Please clarify.
    Thanks.

    What do you think, and why?

  • How to implement a java application in Portal

    Hello,
    I was asked if it is possible to implement a java (not a web application / not java web dynpro) to implement into the portal. Is this possible with something like the java web start? Is someone using something like that in the real world?
    Thanks a lot,
      Vanessa

    Hi Vanessa.
    Yes, it is possible to integrate Java applets into portal. Have a look at XML Form Buider or SAP Management console (http://portalhost.domain:5xx13).
    Best regards,
    Aliaksandr Zhukau

  • How resource files(.rc) are implemented in java

    I want to know how resource files are implemented in java. I am using a window98 as OS.
    Thank you
    Abu_ramla

    I wonder if this might help:
    ResourceBundle rbd = ResourceBundle.getBundle("Filename");
    to get a property out of the resourceBundle use:
    String varname = (String) prb.getObject("propName");
    As allways, check the API
    Hope this helps
    Elouiza

  • Passing Session to Other Java Application

    Dear All,
    We need to pass session of SAP BO to other java application.in short we need to make single sign on between these two without using third party authentication type.
    by research , i could find out extension point API which supports to environment, through which it might be possible.
    I need your help on this.
    Environment:
    SAP BO 4.1 Sp2
    Any Help on this would be appreciated.
    Best Regards,
    Atulm

    Hi all, i have one problem. I need to pass some
    session to a java bean for processing.. Can i know are
    there any possible ways of passing? thanks.if i understand you correctly, and you mean passing a session object
    to a bean from a jsp page, do this:
    have in your bean:
    import javax.servlet.http.HttpSession;
    private HttpSession session = null;
    public void setSession (HttpSession sessionFromJsp) {
    session = sessionFromJsp;
    in your jsp:
    beanname.setSession(session);
    the variable named session is available is jsp pages,
    it is an instance of the javax.servlet.http.HttpSession class,
    and provides access to the client session information.
    dave

  • Implementing a java connector

    Has anyone tried implementing a JCA Resource Manager the would integrate into a J2EE server for communication with a remote server?
    I'm thinking about implementing one for connectivity with an Http server....
    Has anyone tried something of this sort?

    mkx wrote:
    Hi,
    we are currently implementing a Java connector for the X11 windowing system and we're running into trouble with event handling.
    What we are doing is to fork a thread from the main application that will then invoke a native event handling loop that will listen for X11 events. Whenever such an event occurs, it will call back to a Java object to report that event.
    While receiving and reporting events works fine, any successive calls from the main thread to the native windowing functions will block the program.
    Let me outline the call order again:
    1. Java application is started, main thread created
    2. New Java thread is started that invokes a native method that itself runs in a while loop
    3. Normal program flow continues in the main Java thread
    4. Main Java thread now calls some native method, and locks up
    Any idea why this is happening? Is it not possible to invoke the same native code within two distinct Java threads? I have looked into the JNI functions AttachCurrentThread and DetachCurrentThread, but they only seem to handle the problem that two native threads share the same JVM, but that's not what we need. We have two Java threads that need to share the same native code.Are you sure its not a problem with the something in the X11 code being non-reentrant?
    http://www.gnu.org/software/libc/manual/html_node/Nonreentrancy.html#Nonreentrancy
    Jim S.

Maybe you are looking for