Women in Technology

Hear us Roar



Article:
  On-Demand Stateful EJBs
Subject:   Wasting instances on the server
Date:   2005-03-20 09:34:47
From:   Johal
When does the client call EJB remove on the statefull bean? It seems like an awfull waste to leave instances floating around until the ejb container automatically removes them!
Full Threads Newest First

Showing messages 1 through 3 of 3.

  • Wasting instances on the server
    2005-03-20 18:34:06  Swami [View]

    The client could have the stateful instance removed when the current user logs off. This is possible as we could store the instance of the delegate in the session and have the session binding listener invoke a method on the delegate to remove the instance of the stateful bean if one was created. For non-web based clients, we could have this logic embeded in the log off event.
  • Wasting instances on the server
    2005-03-20 18:34:13  Swami [View]

    The client could have the stateful instance removed when the current user logs off. This is possible as we could store the instance of the delegate in the session and have the session binding listener invoke a method on the delegate to remove the instance of the stateful bean if one was created. For non-web based clients, we could have this logic embeded in the log off event.
    • Wasting instances on the server
      2005-03-21 01:16:34  Johal [View]

      That should work.
      Another problem is when the app tier has terminated the SFSB but the webtier still has the handle. (say user touches his web session by browsing pages, but doesn't the SFSB is not touched since he is browsing other pages)