Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6888477
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:01:21+00:00 2026-05-27T06:01:21+00:00

How to configure Spring to continue load its beans, if one of its defined

  • 0

How to configure Spring to continue load its beans, if one of its defined beans in its init method throwed exception. lazy-init=”true” option doesn’t help – it is just ignored. In this bean init() method i try to open connection with server, which may fail to load the application spring context. Spring 3.0.6

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T06:01:22+00:00Added an answer on May 27, 2026 at 6:01 am

    The Idea of Exceptions is to fix the cause of them, not to ignore them.

    Have that said: I have never seen anything for that: you have to do it by our own. Put a try catch around the init method that consume the exception and log it.

    If you have real AspectJ, then you can use it for that task too. But Spring-AOP will not work.


    (comment) I use side library where I should call init method, which establish connection with some server, where problem might appear.

    In this case. what about a factory that provides the bean which causes the trouble to the context. The factory should check the connection first (or wait for the exception) (what exactly you do is an implementation detail) and return the bean if every thing is correct. If the connection is failing, then the factory return a Dummy implementation instead..

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How do you configure a Spring bean container (or application context) to load a
When I configure method security under Spring Security I get the error shown above
I'm trying to configure Spring so that it executes advice when a specific exception
I was trying to configure spring 3.1 and hibernate. I have written a simple
I'm trying to configure a class with Annotation based configuration in Spring 3, which
How can I configure the SpringSource Tool Suite(ver 2.3.0) Spring project to accept .aj
I'm going through some examples for how to configure asynchronous JMS messaging with Spring,
I am using spring to initialise my beans. I have configured a bean which
We are trying to configure Spring JavaMailSender to work with Amazon's SES service using
Tried to configure Spring for tests with hibernate and transactions. Getting bean from app

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.