org.springframework.beans.factory
Interface InitializingBean

All Known Implementing Classes:
AbstractColumnMaxValueIncrementer, AbstractDataFieldMaxValueIncrementer, AbstractEntityManagerFactoryBean, AbstractFactoryBean, AbstractJasperReportsSingleFormatView, AbstractJasperReportsView, AbstractJaxWsServiceExporter, AbstractJmsListeningContainer, AbstractMessageListenerContainer, AbstractPdfStamperView, AbstractPollingMessageListenerContainer, AbstractRefreshableConfigApplicationContext, AbstractRefreshablePortletApplicationContext, AbstractRefreshableWebApplicationContext, AbstractRemoteSlsbInvokerInterceptor, AbstractRequestLoggingFilter, AbstractRoutingDataSource, AbstractSequenceMaxValueIncrementer, AbstractServiceLoaderBasedFactoryBean, AbstractSessionFactoryBean, AbstractSingletonProxyFactoryBean, AbstractSlsbInvokerInterceptor, AbstractTemplateView, AbstractUrlBasedView, AbstractXmlApplicationContext, AnnotationMBeanExporter, AnnotationSessionFactoryBean, BatchSqlUpdate, BeanConfigurerSupport, BurlapClientInterceptor, BurlapExporter, BurlapProxyFactoryBean, BurlapServiceExporter, CachingConnectionFactory, CastorMarshaller, CciDaoSupport, CciLocalTransactionManager, CharacterEncodingFilter, ClassPathXmlApplicationContext, CommonsLogFactoryBean, CommonsRequestLoggingFilter, ConfigurableJasperReportsView, ConfigurableMimeFileTypeMap, ConnectionSpecConnectionFactoryAdapter, ConnectorServerFactoryBean, CronTriggerBean, DaoSupport, DatabaseStartupValidator, DataSourceTransactionManager, DB2MainframeSequenceMaxValueIncrementer, DB2SequenceMaxValueIncrementer, DefaultMessageListenerContainer, DefaultMessageListenerContainer102, DefaultPersistenceUnitManager, DelegatingConnectionFactory, DelegatingConnectionFactory, DelegatingDataSource, DelegatingFilterProxy, DerbyMaxValueIncrementer, EhCacheFactoryBean, EhCacheManagerFactoryBean, EisOperation, EventPublicationInterceptor, ExecutorConfigurationSupport, FieldRetrievingFactoryBean, FileSystemXmlApplicationContext, FilterDefinitionFactoryBean, FreeMarkerConfigurationFactoryBean, FreeMarkerConfigurer, FreeMarkerView, GenericFilterBean, GenericMessageEndpointManager, GlassFishWorkManagerTaskExecutor, H2SequenceMaxValueIncrementer, HessianClientInterceptor, HessianExporter, HessianProxyFactoryBean, HessianServiceExporter, HibernateAccessor, HibernateDaoSupport, HibernateInterceptor, HibernateTemplate, HibernateTransactionManager, HiddenHttpMethodFilter, HsqlMaxValueIncrementer, HsqlSequenceMaxValueIncrementer, HttpInvokerClientInterceptor, HttpInvokerProxyFactoryBean, HttpInvokerServiceExporter, 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, JpaAccessor, JpaDaoSupport, JpaInterceptor, JpaTemplate, JpaTransactionManager, JstlView, JtaTransactionManager, KeyNamingStrategy, LazyConnectionDataSourceProxy, ListFactoryBean, LocalConnectionFactoryBean, LocalContainerEntityManagerFactoryBean, LocalEntityManagerFactoryBean, LocalJaxRpcServiceFactoryBean, LocalJaxWsServiceFactoryBean, LocalPersistenceManagerFactoryBean, LocalSessionFactoryBean, LocalSlsbInvokerInterceptor, LocalStatelessSessionProxyFactoryBean, Log4jNestedDiagnosticContextFilter, MapFactoryBean, MappingCommAreaOperation, MappingRecordOperation, MappingSqlQuery, MappingSqlQueryWithParameters, MarshallingMessageConverter, MBeanClientInterceptor, MBeanExporter, MBeanProxyFactoryBean, MBeanServerConnectionFactoryBean, MBeanServerFactoryBean, MetadataMBeanInfoAssembler, MetadataNamingStrategy, MethodInvokingFactoryBean, MethodInvokingJobDetailFactoryBean, MethodInvokingRunnable, MethodInvokingTimerTaskFactoryBean, MethodMapTransactionAttributeSource, MultipartFilter, MySQLMaxValueIncrementer, NamedParameterJdbcDaoSupport, NotificationListenerBean, NotificationListenerRegistrar, ObjectFactoryCreatingFactoryBean, OC4JJtaTransactionManager, OncePerRequestFilter, OpenEntityManagerInViewFilter, OpenPersistenceManagerInViewFilter, OpenSessionInViewFilter, OpenSessionInViewInterceptor, OracleSequenceMaxValueIncrementer, PersistenceExceptionTranslationInterceptor, PortletWrappingController, PostgreSQLSequenceMaxValueIncrementer, PreferencesPlaceholderConfigurer, PropertiesFactoryBean, PropertiesMethodNameResolver, RdbmsOperation, RedirectView, RemoteInvocationBasedAccessor, RemoteInvocationSerializingExporter, RequestContextFilter, ResourceAdapterFactoryBean, RmiClientInterceptor, RmiProxyFactoryBean, RmiRegistryFactoryBean, RmiServiceExporter, ScheduledExecutorFactoryBean, SchedulerAccessorBean, SchedulerFactoryBean, ServiceFactoryBean, ServiceListFactoryBean, ServiceLoaderFactoryBean, ServiceLocatorFactoryBean, ServletContextRequestLoggingFilter, ServletWrappingController, SetFactoryBean, ShallowEtagHeaderFilter, SharedEntityManagerBean, SimpleBurlapServiceExporter, SimpleHessianServiceExporter, SimpleHttpInvokerServiceExporter, SimpleHttpServerFactoryBean, SimpleHttpServerJaxWsServiceExporter, SimpleJaxWsServiceExporter, SimpleJdbcDaoSupport, SimpleMessageListenerContainer, SimpleMessageListenerContainer102, SimpleRecordOperation, SimpleRemoteSlsbInvokerInterceptor, SimpleRemoteStatelessSessionProxyFactoryBean, SimpleThreadPoolTaskExecutor, SimpleTriggerBean, SingleConnectionFactory, SingleConnectionFactory, SingleConnectionFactory102, SpringPersistenceManagerProxyBean, SqlCall, SqlFunction, SqlMapClientDaoSupport, SqlMapClientFactoryBean, SqlMapClientTemplate, SqlOperation, SqlQuery, SqlServerMaxValueIncrementer, SqlUpdate, StoredProcedure, SybaseMaxValueIncrementer, ThreadPoolExecutorFactoryBean, ThreadPoolTaskExecutor, ThreadPoolTaskExecutor, TilesConfigurer, TilesView, TimerFactoryBean, TimerManagerFactoryBean, TimerTaskExecutor, TransactionAspectSupport, TransactionAwareConnectionFactoryProxy, TransactionAwareDataSourceProxy, TransactionInterceptor, TransactionProxyFactoryBean, TransactionTemplate, TypeDefinitionBean, UpdatableSqlQuery, UrlBasedRemoteAccessor, UserCredentialsConnectionFactoryAdapter, UserCredentialsDataSourceAdapter, VelocityConfigurer, VelocityEngineFactoryBean, VelocityLayoutView, VelocityToolboxView, VelocityView, WebLogicJtaTransactionManager, WebSphereDataSourceAdapter, WebSphereMBeanServerFactoryBean, WebSphereUowTransactionManager, WorkManagerTaskExecutor, WorkManagerTaskExecutor, XmlPortletApplicationContext, XmlWebApplicationContext, XsltView

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 java.lang.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:
java.lang.Exception - in the event of misconfiguration (such as failure to set an essential property) or if initialization fails.