Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Slow bean instantiation - JWS combined with Spring 3 ApplicationContext

matbroughtyDec 6 2011 — edited Dec 16 2011
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?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 13 2012
Added on Dec 6 2011
2 comments
834 views