Announcement Announcement Module
No announcement yet.
lazy-init question Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • lazy-init question

    Hi all,

    Could someone help me if using lazy-init would resolve my following issue? I have, in my spring configuration file all different DAO beans defined. By the nature of the application, the user would be able to switch regions from qa to uat to prod at the time of login. I have different beans defined that maps to different datasources. Now, while I test it in my local environment, I am getting error at startup when spring tries to load the bean that is linked to prod data source as my local environment does not have connectivity to the production data source. If I use lazy-init="true" would it resolve this problem of throwing error at startup in local environment? I will appreciate any suggestions..


  • #2
    I think that should work. But make sure all the beans that have DAO dependencies are also maked for lazy initialization.