|
From: Luke T. <ne...@fr...> - 2004-03-08 21:14:04
|
Looking at the code for the EJB base classes, unless I'm missing something obvious (not unheard of), it seems that by default a separate bean factory is created for each bean instance. http://monkeymachine.co.uk/spring/xref/org/springframework/ejb/support/AbstractEnterpriseBean.html Is this the desired behaviour? I would have expected them to share one for each JNDI key that is used. At the moment, I have a single beans xml file which holds the configuration for my DAOs, AOP stuff etc. and which is used by a set of stateless session beans. Each session bean only uses one DAO but it seems that if I follow this approach I will end up with an exponentially growing number of objects as I add new EJBs. Even if I split each bean's configuration into a separate file it still seems inefficient and counterintuitive that I end up with an application context per EJB instance. Luke. -- Luke Taylor. Monkey Machine Ltd. PGP Key ID: 0x57E9523C http://www.monkeymachine.ltd.uk |