2 questions:
I'm writing a web application and am making a webservice call for authentication to another application that my web app is integrating with.
Here are my options:
1) I store the webservice connection in the session. That way, I can call methods on the connection to get user assets all through the application lifecycle.
2) I get the assets I need from the original webservice connection and then close the webservice connection. However I need to store the assets in the session. (The assets aren't that big, it will be no more than 10
java beans with only 2 instance variables each) The application is designed to be a 3 step process, it should only take a user about 1 minute to use, once they have completed the steps, the session will automatically be invalidated. If for some reason they decide to open the application where the session is created adnt ehy dont complete the process, I'm only going to have the session stay alive for 5 minutes.
So now my questions:
Which of these is desirable?
If number 1 is desirable, how do I call the webservice disconnection method when the session invalidates? I think it may have something to do with Listeners, but I haven't dug that deep into Google yet
Thanks for any help!
-Nate