Slow bean instantiation - JWS combined with Spring 3 ApplicationContext
Good Evening,
Has anyone been using Spring with JWS (Spring 3, JRE 1.6+ - in my case 1.6.0_24) and noticed the bean creation is incredibly slow?
I am using the ClassPathXmlApplicationContext and am seeing 10 - 15 seconds to instantiate some very simple beans.
16:41:48.455 [avawsApplicationMain] DEBUG ctory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'messageSource'
16:41:48.455 [avawsApplicationMain] DEBUG ctory.support.DefaultListableBeanFactory - Creating instance of bean 'messageSource'
16:41:48.458 [avawsApplicationMain] DEBUG ctory.support.DefaultListableBeanFactory - Eagerly caching bean 'messageSource' to allow for resolving potential circular references
16:42:01.976 [avawsApplicationMain] DEBUG ctory.support.DefaultListableBeanFactory - Finished creating instance of bean 'messageSource'
(Note: I have tried turning off circular references and that didn't make any difference)
The exact same code starts up within a second or two outside the JWS environment.
Spring context also worked fine within JWS when using Spring 2.5 - it is only since I upgraded to Spring 3 I have had the issue.
Once my web start app has started (nigh on 1 minute) it is fine, but the slow start-up is not really acceptable.
Any ideas?