Re: can l make the EJB home handler/Datasource shared by 1+ EJB bean instances. ??
Sunday, August 11, 2002 06:51 PM
Obtaining a home or datasource object is a very simple task which involves a jndi lookup and a downcast (or narrow) operation. Traditionally, developers do not bother sharing these objects since obtaining them is so simple that it's simply not worth the trouble. For this reason, I would recommend you save yourself the trouble of determining whether or not they are threadsafe and simply not share them. Furthermore, obtaining home objects and creating EJBs out of them is usually something done once in the lifetime of the bean. This further eliminates any advantage in object sharing (since it's something only done once).