Created by: Farhang Farid on 20-12-2009 10:17:04 PM Hello Everyone I have come across what I think is a major CVP bug and I want to confirm this with everyone. When I use getAllSessionData in a custom element to retrieve a Hashmap of all variables in the session I see a strange behavious: If I have two concurrent calls running on the same application at the same time , the Hashmap that is returned from getAllSessionData contains variables set/used by both applications. According to the CVP documentation getAllSessionData should only return the session variables that are stored in the session of "the call" up to that point, but this clearly not happening I have ran many test and I am convinced that this is an issue in CVP code. Here is an example of tests that I have ran so far : On my application I retrieve the session ID and store it in the session. when I use getAllSessionData in the application and print out all session variables I can see the session ID from both calls stored in the session. Any ideas?
Subject: RE: New Message from Farhang Farid in Customer Voice Portal (CVP) - General Replied by: Ranjana Narayan on 21-12-2009 06:04:26 AM Hi Farhang, getAllSessionData always returns the data pertaining to that call. As for your issue, I believe it has got to do with the scoping of the Hashmap variable you are using in the application. Mind you, there will be only one instance of the custom element class that exists on the JVM. The same instance is used to handle concurrent multiple calls, and hence if you have your hashmap defined as a class variable, there is a high chance that there is data corruption between calls. To avoid this problem, make sure you read and write the hashmap variable outof/into the sessionData only in local scope (within the method). This single instance philosophy is documented in the Programmers Guide. I strongly suggest that you track back the read/writes of the hashmap in your callflow, this could solve your issue. Hope this helps, Ranjana.
________________________________
From: Cisco Developer Community Forums [mailto:cdicuser@developer.cisco.com] Sent: Monday, December 21, 2009 3:47 AM To: cdicuser@developer.cisco.com Subject: New Message from Farhang Farid in Customer Voice Portal (CVP) - General Discussion - All Versions: CVP bug: getAllSessionData and concurrent call Issue
Farhang Farid has created a new message in the forum "General Discussion - All Versions":
-------------------------------------------------------------- Hello Everyone I have come across what I think is a major CVP bug and I want to confirm this with everyone. When I use getAllSessionData in a custom element to retrieve a Hashmap of all variables in the session I see a strange behavious: If I have two concurrent calls running on the same application at the same time , the Hashmap that is returned from getAllSessionData contains variables set/used by both applications. According to the CVP documentation getAllSessionData should only return the session variables that are stored in the session of "the call" up to that point, but this clearly not happening I have ran many test and I am convinced that this is an issue in CVP code. Here is an example of tests that I have ran so far : On my application I retrieve the session ID and store it in the session. when I use getAllSessionData in the application and print out all session variables I can see the session ID from both calls stored in the session. Any ideas? -- To respond to this post, please click the following link:
Subject: Re: New Message from Farhang Farid in Customer Voice Portal (CVP) - General Replied by: Janine Graves on 22-12-2009 03:20:10 AM I just tried this with CVP 7.0.2 and I didn't have the problem that you state with getAllSessionData. When I use System.out.println to display the result of getAllSessionData while I have 2 concurrent calls, each shows only the Session Data for that phone call.
Janine
Cisco Developer Community Forums wrote: > Farhang Farid has created a new message in the forum "General > Discussion - All Versions": > > -------------------------------------------------------------- > Hello Everyone >  > I have come across what I think is a major CVP bug and I want to > confirm this with everyone. >  > When I use getAllSessionData in a custom element to retrieve a Hashmap > of all variables in the session I see a strange behavious: >  > If I have two concurrent calls running on the same application at the > same time , the Hashmap that is returned from getAllSessionData > contains variables set/used by both applications. >  > According to the CVP documentation getAllSessionData should only > return the session variables that are stored in the session of "the > call" up to that point, but this clearly not happening >  > I have ran many test and I am convinced that this is an issue in CVP > code. >  > Here is an example of tests that I have ran so far : >  > On my application I retrieve the session ID and store it in the session. > when I use getAllSessionData in the application and print out all > session variables I can see the session ID from both calls stored in > the session. >  > Any ideas? > -- > To respond to this post, please click the following link: > > <http://developer.cisco.com/web/cvp/forums/-/message_boards/message/1854022> > > or simply reply to this email.
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: