At 10:13 AM 2000/12/19 -0500, you wrote:
>Hello,
>
>
>
>  We have used stateless session bean and Ejb to store/retrieve data from
> the database.
>
>  We would like to keep a track of the sessions of different users/clients
> who are accessing data simultaneously from the database
>  ,using session tracking.
>
>
>
>  can anybody please help,
>
>
>
>  thanks,
>
>  Shailesh

Hi,

You can use the presentation layer, and the session tracking built into
that to keep track of the activity in a session.  While this is easily
possible, I would suggest that  you could also add a stateful session bean
for each user to hold session information while keeping your stateless
sessions beans and allowing them to perform the required actions.  By
keeping application session information in stateful session beans, rather
than in HTTPSession, you ensure that your application can be used with
interfaces other than a browser.

Also, you may find that some application servers will provide automatic
replication of state of stateful beans, so that they can share load, and so
that they can implement failover systems.  Application servers are less
likely to have mechanisms to replicate HTTPSession state across servers.

You could then use the HttpSessionBindingListener to monitor when an HTTP
Session is closed and use that to release the corresponding Stateful
SessionBean.

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to