Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

session.getAttribute("somekey") returning NULL in SessionDestroyed


Level 2

Hi all,
     session.getAttribute("somekey") is returning null  in SessionDestroyed() method of flex listener.

Below are the steps I am following

1) I am adding flexLister in contextInitialized method of ServletContextListener


2) In sessionCreate method
     sessionCreated(FlexSession session) {

3) some where in applicaion I am putting a key vlaue pair in session like this

FlexContext.getSession().setAttribute("somekey" , someVlue)  ;

The issue is when I try to retreive vale from session

her is how I m retreiving value

   sessionDestroyed(FlexSession session) {

          session.getAttribute("somekey");     this return null WHY ?


This is always returning me null

Pls note that I am RTMP channel and  version of LCDS is 2.6

I also tried RTMPFlexSession


but no luck  , still got null

Am I doing anything wrong  ?

One more doubt, how to explicitly put data in RTMPFlexSeesion. FlexContex.getSession () always return HttpSession and I always hence I always end up putting attribute in unintended place.

Thanks ,

0 Replies