Senior |
|
Joined: Wed Jul 13, 2005 4:31 pm Posts: 142 Location: Seattle, WA
|
Different options -
One -
Use 1 session per business method that is exposed to the client.
So, for example, if the client wants to do saveOrder(), that uses one session.
If client wants to invoke updateUser(), that uses different session.
This assumes that there is a clear separation between where the client ends and server starts. This is closer to a ejb 3.0 usage pattern.
Two-
Is to use one session per thread on the server. The session is started when Get or Post on servlet is invoked. The session is closed just after the response is sent.
Which one you use depends on your situation
|
|