org.springframework.beans.factory
Interface InitializingBean

All Known Implementing Classes:
AbstractCacheManager, AbstractColumnMaxValueIncrementer, AbstractDataFieldMaxValueIncrementer, AbstractEntityManagerFactoryBean, AbstractFactoryBean, AbstractHandlerMethodMapping, AbstractJasperReportsSingleFormatView, AbstractJasperReportsView, AbstractJaxWsServiceExporter, AbstractJmsListeningContainer, AbstractMessageListenerContainer, AbstractPdfStamperView, AbstractPollingMessageListenerContainer, AbstractRefreshableConfigApplicationContext, AbstractRefreshablePortletApplicationContext, AbstractRefreshableWebApplicationContext, AbstractRemoteSlsbInvokerInterceptor, AbstractRequestLoggingFilter, AbstractRoutingDataSource, AbstractSequenceMaxValueIncrementer, AbstractServiceLoaderBasedFactoryBean, AbstractSessionFactoryBean, AbstractSingletonProxyFactoryBean, AbstractSlsbInvokerInterceptor, AbstractTemplateView, AbstractUrlBasedView, AbstractXmlApplicationContext, AnnotationConfigWebApplicationContext, AnnotationMBeanExporter, AnnotationSessionFactoryBean, AsyncAnnotationBeanPostProcessor, BatchSqlUpdate, BeanConfigurerSupport, BeanValidationPostProcessor, BurlapClientInterceptor, BurlapExporter, BurlapProxyFactoryBean, BurlapServiceExporter, CacheAspectSupport, CacheInterceptor, CacheProxyFactoryBean, CachingConnectionFactory, CastorMarshaller, CciDaoSupport, CciLocalTransactionManager, CharacterEncodingFilter, ClassPathXmlApplicationContext, CommonsLogFactoryBean, CommonsRequestLoggingFilter, CompositeCacheManager, ConcurrentMapCacheFactoryBean, ConfigurableJasperReportsView, ConfigurableMimeFileTypeMap, ConnectionSpecConnectionFactoryAdapter, ConnectorServerFactoryBean, ConversionServiceFactoryBean, CronTriggerBean, CronTriggerFactoryBean, CustomSQLExceptionTranslatorRegistrar, CustomValidatorBean, DaoSupport, DatabaseStartupValidator, DataSourceInitializer, DataSourceTransactionManager, DB2MainframeSequenceMaxValueIncrementer, DB2SequenceMaxValueIncrementer, DefaultMessageListenerContainer, DefaultMessageListenerContainer102, DefaultPersistenceUnitManager, DelegatingConnectionFactory, DelegatingConnectionFactory, DelegatingDataSource, DelegatingFilterProxy, DerbyMaxValueIncrementer, EhCacheCacheManager, EhCacheFactoryBean, EhCacheManagerFactoryBean, EisOperation, EmbeddedDatabaseFactoryBean, EventPublicationInterceptor, ExceptionHandlerExceptionResolver, ExecutorConfigurationSupport, FieldRetrievingFactoryBean, FileSystemXmlApplicationContext, FilterDefinitionFactoryBean, ForkJoinPoolFactoryBean, FormattingConversionServiceFactoryBean, FreeMarkerConfigurationFactoryBean, FreeMarkerConfigurer, FreeMarkerView, GenericFilterBean, GenericMessageEndpointManager, GenericSqlQuery, GenericStoredProcedure, GlassFishWorkManagerTaskExecutor, H2SequenceMaxValueIncrementer, HessianClientInterceptor, HessianExporter, HessianProxyFactoryBean, HessianServiceExporter, HibernateAccessor, HibernateDaoSupport, HibernateInterceptor, HibernateTemplate, HibernateTransactionManager, HibernateTransactionManager, HiddenHttpMethodFilter, HsqlMaxValueIncrementer, HsqlSequenceMaxValueIncrementer, HttpInvokerClientInterceptor, HttpInvokerProxyFactoryBean, HttpInvokerServiceExporter, HttpPutFormContentFilter, InterfaceBasedMBeanInfoAssembler, InternalResourceView, IsolationLevelDataSourceAdapter, IsolationLevelDataSourceRouter, JasperReportsCsvView, JasperReportsHtmlView, JasperReportsMultiFormatView, JasperReportsPdfView, JasperReportsXlsView, Jaxb2Marshaller, JaxRpcPortClientInterceptor, JaxRpcPortProxyFactoryBean, JaxWsPortClientInterceptor, JaxWsPortProxyFactoryBean, JBossWorkManagerTaskExecutor, JdbcAccessor, JdbcDaoSupport, JdbcTemplate, JdoAccessor, JdoDaoSupport, JdoInterceptor, JdoTemplate, JdoTransactionManager, JibxMarshaller, JmsAccessor, JmsDestinationAccessor, JmsGatewaySupport, JmsInvokerClientInterceptor, JmsInvokerProxyFactoryBean, JmsInvokerServiceExporter, JmsMessageEndpointManager, JmsTemplate, JmsTemplate102, JmsTransactionManager, JmsTransactionManager102, JndiObjectFactoryBean, JndiObjectLocator, JndiObjectTargetSource, JndiRmiClientInterceptor, JndiRmiProxyFactoryBean, JndiRmiServiceExporter, JobDetailBean, JobDetailFactoryBean, JpaAccessor, JpaDaoSupport, JpaInterceptor, JpaTemplate, JpaTransactionManager, JstlView, JtaTransactionManager, KeyNamingStrategy, LazyConnectionDataSourceProxy, ListFactoryBean, LocalConnectionFactoryBean, LocalContainerEntityManagerFactoryBean, LocalEntityManagerFactoryBean, LocalJaxRpcServiceFactoryBean, LocalJaxWsServiceFactoryBean, LocalPersistenceManagerFactoryBean, LocalSessionFactoryBean, LocalSessionFactoryBean, LocalSlsbInvokerInterceptor, LocalStatelessSessionProxyFactoryBean, LocalValidatorFactoryBean, Log4jNestedDiagnosticContextFilter, MapFactoryBean, MappingCommAreaOperation, MappingRecordOperation, MappingSqlQuery, MappingSqlQueryWithParameters, MarshallingMessageConverter, MBeanClientInterceptor, MBeanExporter, MBeanProxyFactoryBean, MBeanServerConnectionFactoryBean, MBeanServerFactoryBean, MetadataMBeanInfoAssembler, MetadataNamingStrategy, MethodInvokingFactoryBean, MethodInvokingJobDetailFactoryBean, MethodInvokingRunnable, MethodInvokingTimerTaskFactoryBean, MethodMapTransactionAttributeSource, MethodValidationPostProcessor, MultipartFilter, MySQLMaxValueIncrementer, NamedParameterJdbcDaoSupport, NotificationListenerBean, NotificationListenerRegistrar, ObjectFactoryCreatingFactoryBean, OC4JJtaTransactionManager, OncePerRequestFilter, OpenEntityManagerInViewFilter, OpenPersistenceManagerInViewFilter, OpenSessionInViewFilter, OpenSessionInViewFilter, OpenSessionInViewInterceptor, OracleSequenceMaxValueIncrementer, PersistenceExceptionTranslationInterceptor, PortletWrappingController, PostgreSQLSequenceMaxValueIncrementer, PreferencesPlaceholderConfigurer, PropertiesFactoryBean, PropertiesMethodNameResolver, ProviderCreatingFactoryBean, ProxyFactoryBean, RdbmsOperation, RedirectView, RemoteInvocationBasedAccessor, RemoteInvocationSerializingExporter, RequestContextFilter, RequestMappingHandlerAdapter, RequestMappingHandlerMapping, RequestMappingInfoHandlerMapping, ResourceAdapterFactoryBean, ResourceBundleViewResolver, RmiClientInterceptor, RmiProxyFactoryBean, RmiRegistryFactoryBean, RmiServiceExporter, ScheduledExecutorFactoryBean, ScheduledTaskRegistrar, SchedulerAccessorBean, SchedulerFactoryBean, ServiceFactoryBean, ServiceListFactoryBean, ServiceLoaderFactoryBean, ServiceLocatorFactoryBean, ServletContextRequestLoggingFilter, ServletWrappingController, SetFactoryBean, ShallowEtagHeaderFilter, SharedEntityManagerBean, SimpleBurlapServiceExporter, SimpleCacheManager, SimpleHessianServiceExporter, SimpleHttpInvokerServiceExporter, SimpleHttpServerFactoryBean, SimpleHttpServerJaxWsServiceExporter, SimpleJaxWsServiceExporter, SimpleJdbcDaoSupport, SimpleMessageListenerContainer, SimpleMessageListenerContainer102, SimpleRecordOperation, SimpleRemoteSlsbInvokerInterceptor, SimpleRemoteStatelessSessionProxyFactoryBean, SimpleThreadPoolTaskExecutor, SimpleTriggerBean, SimpleTriggerFactoryBean, SingleConnectionFactory, SingleConnectionFactory, SingleConnectionFactory102, SortedResourcesFactoryBean, SpringPersistenceManagerProxyBean, SqlCall, SqlFunction, SqlMapClientDaoSupport, SqlMapClientFactoryBean, SqlMapClientTemplate, SqlOperation, SqlQuery, SqlServerMaxValueIncrementer, SqlUpdate, StoredProcedure, SybaseAnywhereMaxValueIncrementer, SybaseMaxValueIncrementer, TaskExecutorFactoryBean, ThreadPoolExecutorFactoryBean, ThreadPoolTaskExecutor, ThreadPoolTaskExecutor, ThreadPoolTaskScheduler, TilesConfigurer, TilesConfigurer, TilesJstlView, TilesView, TilesView, TimerFactoryBean, TimerManagerAccessor, TimerManagerFactoryBean, TimerManagerTaskScheduler, TimerTaskExecutor, TransactionAspectSupport, TransactionAwareConnectionFactoryProxy, TransactionAwareDataSourceProxy, TransactionInterceptor, TransactionProxyFactoryBean, TransactionTemplate, TypeDefinitionBean, UpdatableSqlQuery, UrlBasedRemoteAccessor, UserCredentialsConnectionFactoryAdapter, UserCredentialsDataSourceAdapter, VelocityConfigurer, VelocityEngineFactoryBean, VelocityLayoutView, VelocityToolboxView, VelocityView, WebLogicJtaTransactionManager, WebSphereDataSourceAdapter, WebSphereMBeanServerFactoryBean, WebSphereUowTransactionManager, WorkManagerTaskExecutor, WorkManagerTaskExecutor, XmlPortletApplicationContext, XmlViewResolver, XmlWebApplicationContext, XsltView, XStreamMarshaller

public interface InitializingBean

Interface to be implemented by beans that need to react once all their properties have been set by a BeanFactory: for example, to perform custom initialization, or merely to check that all mandatory properties have been set.

An alternative to implementing InitializingBean is specifying a custom init-method, for example in an XML bean definition. For a list of all bean lifecycle methods, see the BeanFactory javadocs.

Author:
Rod Johnson
See Also:
BeanNameAware, BeanFactoryAware, BeanFactory, AbstractBeanDefinition.getInitMethodName(), ApplicationContextAware

Method Summary
 void afterPropertiesSet()
          Invoked by a BeanFactory after it has set all bean properties supplied (and satisfied BeanFactoryAware and ApplicationContextAware).
 

Method Detail

afterPropertiesSet

void afterPropertiesSet()
                        throws Exception
Invoked by a BeanFactory after it has set all bean properties supplied (and satisfied BeanFactoryAware and ApplicationContextAware).

This method allows the bean instance to perform initialization only possible when all bean properties have been set and to throw an exception in the event of misconfiguration.

Throws:
Exception - in the event of misconfiguration (such as failure to set an essential property) or if initialization fails.