Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
smokingfly
Posts: 39
Registered: ‎03-24-2009
My Device: Not Specified

Session maintaining problem in Strom2

Hi,

 

I am developing application for Strom.

 

I my application consumes webservices. I am using the same object everytime to maintain the session.

And the application is running fine on Storm1.

 

But when i run my application on storm2, then i receive the error session expired.

 

Does anybody has some idea whats the issue with storm2.

 

Thanks,

Rahul

Please use plain text.
Developer
simon_hain
Posts: 15,940
Registered: ‎07-29-2008
My Device: Z10 LE
My Carrier: O2 Germany

Re: Session maintaining problem in Strom2

pretty sure it is not an error of the phone. try to debug your code. do you use static variables somewhere?

without additional info it is hard to help.

----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
Developer
smokingfly
Posts: 39
Registered: ‎03-24-2009
My Device: Not Specified

Re: Session maintaining problem in Strom2

Ya, i am using static variables.

 

But my webservice object remains the same everytime i call any webservice function.

 

Please use plain text.
Developer
smokingfly
Posts: 39
Registered: ‎03-24-2009
My Device: Not Specified

Re: Session maintaining problem in Strom2

I am using wifi connection in case of storm2 and using GPRS connection in storm1 ( because wifi connection is not available in storm1). Does it has to do something with session problem?

 

 

Please use plain text.
Developer
simon_hain
Posts: 15,940
Registered: ‎07-29-2008
My Device: Z10 LE
My Carrier: O2 Germany

Re: Session maintaining problem in Strom2

crystal ball is all fuzzy. you'll have to provide some code or do more research on your own.

----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
Developer
smokingfly
Posts: 39
Registered: ‎03-24-2009
My Device: Not Specified

Re: Session maintaining problem in Strom2

Shall i provide you my stub generated class?

I have also tried setting up, SESSION_MAINTAIN_PROPERTY property in stub class. But that didnt worked.

Please use plain text.
Developer
smokingfly
Posts: 39
Registered: ‎03-24-2009
My Device: Not Specified

Re: Session maintaining problem in Strom2

Any help in this!! I am pretty stuck with session management. How do generally session is managed in blackberry?
Please use plain text.
Developer
simon_hain
Posts: 15,940
Registered: ‎07-29-2008
My Device: Z10 LE
My Carrier: O2 Germany

Re: Session maintaining problem in Strom2

session management is dependent on your code.

 

in one of my apps, webservice-based, i call a login procedure and retrieve a sessionID.

i renew this sessionID every 2h.

if i call a service with an incorrect sessionID i get a certain error and try to login again before trying to call the service anew.

if a sessionID is found on startup (stored in runtimstore) i try to renew its session, if it fails i login and replace it.

----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
Developer
smokingfly
Posts: 39
Registered: ‎03-24-2009
My Device: Not Specified

Re: Session maintaining problem in Strom2

I am genrating stub through wireless took kit.

 

Now when i am calling webservice functions, then at server side it is sending different session ID each time.

 

Do i have to change anything on stub to somehow catch session ID and then send the same session ID each time

Please use plain text.
Developer
simon_hain
Posts: 15,940
Registered: ‎07-29-2008
My Device: Z10 LE
My Carrier: O2 Germany

Re: Session maintaining problem in Strom2

it depends on your webservice.

on my webservice the sessionID is a parameter on each method i call. it is my duty to put the correct sessionID in there.

----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.