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, AttributesJmxAttributeSource, AttributesTransactionAttributeSource, BatchSqlUpdate, BeanConfigurerSupport, BurlapClientInterceptor, BurlapExporter, BurlapProxyFactoryBean, BurlapServiceExporter, CachingConnectionFactory, 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, FieldRetrievingFactoryBean, FileSystemXmlApplicationContext, FilterDefinitionFactoryBean, FreeMarkerConfigurationFactoryBean, FreeMarkerConfigurer, FreeMarkerView, GenericFilterBean, GenericMessageEndpointManager, GlassFishWorkManagerTaskExecutor, H2SequenceMaxValueIncrementer, HessianClientInterceptor, HessianExporter, HessianProxyFactoryBean, HessianServiceExporter, HibernateAccessor, HibernateDaoSupport, HibernateInterceptor, HibernateTemplate, HibernateTransactionManager, HsqlMaxValueIncrementer, HsqlSequenceMaxValueIncrementer, HttpInvokerClientInterceptor, HttpInvokerProxyFactoryBean, HttpInvokerServiceExporter, InterfaceBasedMBeanInfoAssembler, InternalResourceView, IsolationLevelDataSourceAdapter, IsolationLevelDataSourceRouter, JasperReportsCsvView, JasperReportsHtmlView, JasperReportsMultiFormatView, JasperReportsPdfView, JasperReportsXlsView, JaxRpcPortClientInterceptor, JaxRpcPortProxyFactoryBean, JaxWsPortClientInterceptor, JaxWsPortProxyFactoryBean, JBossWorkManagerTaskExecutor, JdbcAccessor, JdbcDaoSupport, JdbcTemplate, JdoAccessor, JdoDaoSupport, JdoInterceptor, JdoTemplate, JdoTransactionManager, 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, LocalSessionFactoryBean, LocalSlsbInvokerInterceptor, LocalStatelessSessionProxyFactoryBean, Log4jNestedDiagnosticContextFilter, MapFactoryBean, MappingCommAreaOperation, MappingRecordOperation, MappingSqlQuery, MappingSqlQueryWithParameters, 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, ResourceMapFactoryBean, RmiClientInterceptor, RmiProxyFactoryBean, RmiRegistryFactoryBean, RmiServiceExporter, ScheduledExecutorFactoryBean, ScheduledExecutorFactoryBean, SchedulerAccessorBean, SchedulerFactoryBean, ServerSessionMessageListenerContainer, ServerSessionMessageListenerContainer102, ServiceFactoryBean, ServiceListFactoryBean, ServiceLoaderFactoryBean, ServiceLocatorFactoryBean, ServletContextRequestLoggingFilter, ServletWrappingController, SetFactoryBean, SharedEntityManagerBean, SimpleBurlapServiceExporter, SimpleHessianServiceExporter, SimpleHttpInvokerServiceExporter, SimpleHttpServerFactoryBean, SimpleHttpServerJaxWsServiceExporter, SimpleJaxWsServiceExporter, SimpleJdbcDaoSupport, SimpleMessageListenerContainer, SimpleMessageListenerContainer102, SimpleRecordOperation, SimpleRemoteSlsbInvokerInterceptor, SimpleRemoteStatelessSessionProxyFactoryBean, SimpleThreadPoolTaskExecutor, SimpleTriggerBean, SingleConnectionFactory, SingleConnectionFactory, SingleConnectionFactory102, SqlCall, SqlFunction, SqlMapClientDaoSupport, SqlMapClientFactoryBean, SqlMapClientTemplate, SqlOperation, SqlQuery, SqlServerMaxValueIncrementer, SqlUpdate, StoredProcedure, SybaseMaxValueIncrementer, ThreadPoolTaskExecutor, ThreadPoolTaskExecutor, TilesConfigurer, TilesConfigurer, TilesJstlView, TilesView, TilesView, TimerFactoryBean, TimerManagerFactoryBean, TimerTaskExecutor, TopLinkAccessor, TopLinkDaoSupport, TopLinkInterceptor, TopLinkTemplate, TopLinkTransactionManager, TransactionAspectSupport, TransactionAwareConnectionFactoryProxy, TransactionAwareDataSourceProxy, TransactionInterceptor, TransactionProxyFactoryBean, TransactionTemplate, TypeDefinitionBean, UpdatableSqlQuery, UrlBasedRemoteAccessor, UserCredentialsConnectionFactoryAdapter, UserCredentialsDataSourceAdapter, VelocityConfigurer, VelocityEngineFactoryBean, VelocityLayoutView, VelocityToolboxView, VelocityView, WebLogicJndiMBeanServerFactoryBean, WebLogicJtaTransactionManager, WebLogicMBeanServerFactoryBean, 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 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.


Copyright © 2002-2008 The Spring Framework.