Package org.springframework.beans.factory

Examples of org.springframework.beans.factory.InitializingBean


    }

    @Override
    public void afterPropertiesSet() throws Exception {
        if (executor instanceof InitializingBean) {
            InitializingBean bean = (InitializingBean) executor;
            bean.afterPropertiesSet();
        }
    }
View Full Code Here


            if (defaultStrategy instanceof ApplicationContextAware) {
                ApplicationContextAware applicationContextAware = (ApplicationContextAware) defaultStrategy;
                applicationContextAware.setApplicationContext(applicationContext);
            }
            if (defaultStrategy instanceof InitializingBean) {
                InitializingBean initializingBean = (InitializingBean) defaultStrategy;
                try {
                    initializingBean.afterPropertiesSet();
                }
                catch (Exception ex) {
                    throw new BeanCreationException("Invocation of init method failed", ex);
                }
            }
View Full Code Here

                ServletContext servletContext = ((WebApplicationContext) applicationContext).getServletContext();
                ((ServletContextAware) strategy).setServletContext(servletContext);
            }
        }
        if (strategy instanceof InitializingBean) {
            InitializingBean initializingBean = (InitializingBean) strategy;
            try {
                initializingBean.afterPropertiesSet();
            }
            catch (Throwable ex) {
                throw new BeanCreationException("Invocation of init method failed", ex);
            }
        }
View Full Code Here

    }

    @Override
    public void afterPropertiesSet() throws Exception {
        if (executor instanceof InitializingBean) {
            InitializingBean bean = (InitializingBean) executor;
            bean.afterPropertiesSet();
        }
    }
View Full Code Here

    assertEquals(3, ((Ordered) listener).getOrder());
  }

  @Test
  public void testProxiedAnnotationsFactoryMethod() throws Exception {
    Object delegate = new InitializingBean() {
      @BeforeStep
      public void foo(StepExecution execution) {
      }

      @Override
View Full Code Here

    assertFalse(StepListenerFactoryBean.isListener(proxy));
  }

  @Test
  public void testProxiedAnnotationsIsListener() throws Exception {
    Object delegate = new InitializingBean() {
      @BeforeStep
      public void foo(StepExecution execution) {
      }

      @Override
View Full Code Here

        }

        @Bean
        InitializingBean init(
                final IdentityService identityService) {
            return new InitializingBean() {
                @Override
                public void afterPropertiesSet() throws Exception {

                    // install groups & users
                    Group userGroup = group("user");
View Full Code Here

TOP

Related Classes of org.springframework.beans.factory.InitializingBean

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.