EJB singleton implementation


EJB programming & troubleshooting: EJB singleton implementation

  1. EJB singleton implementation (1 messages)

    Force: To implement a growing cache with a singleton behavior.
    Implementation: Using a SFSB for growing cache and writing the handle of the EJB Object onto a JNDI.
           My doubts are whether i am bound to have any performance issues here with growing number of user requests.
  2. EJB singleton implementation[ Go to top ]

    SFSBs are designed to serve one client only. Turning them into a general-purpose server doesn't work, and is probably a bad idea anyway. On a concurrent call, for instance, the App server may just throw an exception when it recognized the new transaction context.

    Search the discussion forums and pattern section for EJB singletons, there are quite a few discussions I can remember. Be sure to read through the whole discussion though. Most suggestions I've seen posted here were initially flawed (incompliant with the spec).