|
From: MacMahon, M. <M.M...@em...> - 2003-11-12 12:30:26
|
Hi Rod, Thanks for the swift reply (as ever!). <QUOTE> What might be even nicer would be 3 tiers: 1. shared across JVM 2. shared per EJB deployment 3. per EJB instance </QUOTE> I think (1) should be the default. In fact, I would nearly go as far to question the usefulness of Spring in an EJB without this - developers would go back to making horrible getInstance() calls! I take your point about clustered environments - IMHO we could live with one beanfactory per jvm. For now is it best that I override loadBeanFactory() too keep my own static reference. Thanks again, Mark -----Original Message----- From: Rod Johnson [mailto:rod...@in...] Sent: 12 November 2003 12:08 To: spr...@li... Subject: Re: [Springframework-developer] AbstractEnterpriseBean+mutiple beanfactory instances problem Mark, At the moment it's equivalent to each bean instance managing its own POJOs, just as if you created them using the new operator. What I am considering is adding an additional parent bean factory that is a singleton. This enables common objects to be shared. What might be even nicer would be 3 tiers: 1. shared across JVM 2. shared per EJB deployment 3. per EJB instance The only problem is that using a singleton at all in an EJB context is somewhat fraught. E.g. it won't work across a cluster. Regards, Rod ----- Original Message ----- From: "MacMahon, Mark" <M.M...@em...> To: <spr...@li...> Sent: Wednesday, November 12, 2003 11:51 AM Subject: [Springframework-developer] AbstractEnterpriseBean+mutiple beanfactory instances problem > > Hi All, > > I just have a quick question regarding the use of Spring from a > Stateful/Stateless session bean. > > If Each implementation of Spring's AbstractEnterpriseBean loads its own > BeanFactory, how can I guarantee that the beans loaded from the BeanFactory > are truly singleton? > > Shouldn't the XmlBeanFactoryLoader keep a static reference to the > BeanFactory to ensure that it is loaded only once in a JVM and thus shared > across all Session Bean instances in the instance pool? > Am I missing something? > > Thanks in advance, > > Mark. > > > ____________________________________________________ > > emuse technologies > U24 Trinity Enterprise Centre, Pearse Street, Dublin 2, Ireland. > Tel: +353 (0)1 6717317 Fax: +353 (0)1 6717319 > website: <http://www.emusetechnologies.com/> > email: in...@em... <mailto:in...@em...> > ____________________________________________________ > > This message has been scanned for viruses using GroupShield for Exchange > Server. > > CONFIDENTIALITY NOTICE - The information contained in this email message is > intended only for confidential use of the named recipient. If the reader is > not the intended recipient or the person responsible for delivering it to > the recipient, you are hereby notified that you have received this > communication in error and that any review, dissemination or copying of this > communication is strictly prohibited. If you have received this in error, > please notify the sender immediately. > > The information, opinions and recommendations contained herein are and must > be construed solely as statements of opinion and not statements of fact. No > warranty, expressed or implied, as to the accuracy, timeliness, > completeness, merchantability or fitness for any particular purpose of any > such recommendation or information is given or made by emuse technologies in > any form or manner whatsoever. > > > > > ------------------------------------------------------- > This SF.Net email sponsored by: ApacheCon 2003, > 16-19 November in Las Vegas. Learn firsthand the latest > developments in Apache, PHP, Perl, XML, Java, MySQL, > WebDAV, and more! http://www.apachecon.com/ > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > ------------------------------------------------------- This SF.Net email sponsored by: ApacheCon 2003, 16-19 November in Las Vegas. Learn firsthand the latest developments in Apache, PHP, Perl, XML, Java, MySQL, WebDAV, and more! http://www.apachecon.com/ _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |