Announcement Announcement Module
Collapse
No announcement yet.
Annotation based startup never completing? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Annotation based startup never completing?

    We are in the middle of migrating from xml defined beans to having as much autowired with the JSR-250 annotations (@Resource, @Service, @Repository, @Component, @Controller).

    However we are experiencing the container maxing CPU and never finishing initialization. Setup consists of a typical 3 tier architecture, with MVC, Services, Dao's. Services have transactions using the transaction proxy factory. We started migration from the DAO layer, planning to move up the levels, with a few odd new classes having been developed using annotations.

    We have a total of 720 beans. Oddly enough the suppressed exception count is a crazy high number (22k after 10 hours of running).

    Looking at the code there seems to be an O(n^2) performance problem with annotation bean initialization.

    Each 'getBeanNamesForType' iterates over all bean names, call seems to trigger an invocation to create another bean which executes the same 'getBeanNamesForType'.

    Any help/pointer would be greatly appreciated.

    Stack trace is attached.

  • #2
    Looks like we found the issue, one of our beans had a property placeholder that was not being resolved, and was being cast to an integer, this was being swallowed, by DefaultSingletonBeanRegistry.onSuppressedException (), hence the bean would continuously be attempted to be reinitialized, and never succeeding.

    Does anybody know an effective way to find cyclic references in the code as we are suffering from this without much luck.

    Comment

    Working...
    X