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
BedrockMission!

Learn More

View all

Sign in to view all badges

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

Avatar

Avatar
Level 1
dam_C
Level 1

Likes

0 likes

Total Posts

8 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
dam_C
Level 1

Likes

0 likes

Total Posts

8 posts

Correct Reply

0 solutions
View profile
dam_C
Level 1

24-05-2009

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

   FlexSession.addSessionCreateListener(myListener)

2) In sessionCreate method
     sessionCreated(FlexSession session) {
            session.addSessionDestroyListener(this)

    }   
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

  RTMPFlexSession.addSessionCreateListener(myListener)

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 ,
Dharmendra

Accepted Solutions (0)

Answers (0)