Results 1 to 3 of 3

Thread: Spring Initialized successfully or not

  1. #1

    Default Spring Initialized successfully or not

    Hi,

    I am using spring 3.1.1 and initialized through web.xml.

    Code:
    	<listener>
    		<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    	</listener>
    
    	<servlet>
    		<servlet-name>spring</servlet-name>
    		<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
    		<init-param>
    			<param-name>contextConfigLocation</param-name>
    			<param-value>/WEB-INF/spring/xxx-mvc-beans.xml</param-value>
    		</init-param>
    		<load-on-startup>1</load-on-startup>
    	</servlet>
    When all my beans and its external resources that they depend on exist then spring gets initialized properly otherwise it doesn't.

    I want to send an email when spring successfully initializes all beans and also I want to send an email when it fails.

    I am trying to see if there is a way I can hook this logic in any of the spring's lifecycle methods..

    Any pointers are appreciated.

    Thanks

  2. #2
    Join Date
    Dec 2010
    Location
    Singapore
    Posts
    285

    Default

    Hi,

    Have a look at application events, http://static.springsource.org/sprin...onality-events
    Amila Domingo

  3. #3

    Default

    Awesome..Thank you..

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •