InitializingBean应用
private static final long serialVersionUID = 4050872562188125729L;
private BeanFactory beanFactory;
private SessionFactoryUtil sessionFactoryUtil;
private static final Log logger = LogFactory
.getLog(StartReportServer.class);
public void afterPropertiesSet() throws Exception
{
if (logger.isDebugEnabled())
{
logger.debug("start report server!");
}
/* 调用主入口函数,起动Report Server */
ReportServerMain.mainEntry(new String[0]);
}
public void destroy() throws Exception
{
if (logger.isDebugEnabled())
{
logger.debug("destroy report server!");
}
}
public BeanFactory getBeanFactory()
{
return beanFactory;
}
public void setBeanFactory(BeanFactory beanFactory)
{
this.beanFactory = beanFactory;
}
public SessionFactoryUtil getSessionFactoryUtil()
{
return sessionFactoryUtil;
}
public void setSessionFactoryUtil(SessionFactoryUtil sessionFactoryUtil)
{
this.sessionFactoryUtil = sessionFactoryUtil;
}