Caching of EJBs - home / remote or handle(s)


EJB programming & troubleshooting: Caching of EJBs - home / remote or handle(s)

  1. Caching of EJBs - home / remote or handle(s) (1 messages)


         In implementing the caching mechanism at the Service Locator ...

        I currently use the mechanism of caching the references of the session bean remotes/locals and entity homes in an Hashtable with the key as the Princical.getName().

    Now my question is .... which it better to hold ... the remote/local/home references of the EJBs or the (Home/)Handle.

    What are the pros and cons of either. and when should which one be used.

    I would appreciate any suggestions on the above...

  2. sample code please , in both of your sentences you have a home interface name which is cached. we are now caching the home/remote interface at server initialization time. caching the local might not be necessary as for looking up on the single jvm is not expensive.As for as remote, i don'nt think so.
    good luck
    anil lingutla