Apr 9th, 2009, 04:20 AM
ContextSingletonBeanFactoryLocator does not conform with EJB spec?
The use of ContextSingletonBeanFactoryLocator does not seem conforming with the EJB specification in the following area:
1. Static is not allowed in EJB, hence is Singleton.
2. Synchronized is not allowed in EJB (Spring framework must have used mutex lock when initializing app context to avoid duplication when multiple EJB instances are created).
The only logical use of IoC from EJB is using the default context locator, namely ContextJndiBeanFactoryLocator. However, this would create 1 app context per 1 EJB instance created, and it has its own issue particularly when dealing with initialization of complex beans and those having large memory footprints.
Any comment on this?
Apr 12th, 2009, 09:40 PM