package com.doctor.esper.spring;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @see org.opencredo.esper.spring.EsperTemplateBean
 * 
 * @author doctor
 *
 * @time 2015年6月8日 下午5:16:51
 */
public class EsperTemplateBean extends EsperTemplate {
	private final static Logger LOG = LoggerFactory.getLogger(EsperTemplateBean.class);

	@PostConstruct
	public void afterPropertiesSet() {
		LOG.debug("Initializing the esper template bean");
		super.initialize();
		LOG.debug("Completed initializing the esper template bean");
	}

	@PreDestroy
	public void destroy() {
		LOG.debug("Destroying the esper template bean");
		super.cleanup();
		LOG.debug("Finished destroying the esper template bean");
	}
}

@@ -38,77 +38,58 @@
 ort 
-javax.annotation.PostConstruct;%0Aimport javax.annotation.PreDestro
+org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactor
 y;%0A
-%0A
 impo
@@ -100,51 +100,110 @@
 rg.s
-lf4j.Logger;%0Aimport org.slf4j.LoggerFactory
+pringframework.beans.factory.DisposableBean;%0Aimport org.springframework.beans.factory.InitializingBean
 ;%0A%0A/
@@ -369,16 +369,60 @@
 emplate 
+implements InitializingBean, DisposableBean 
 %7B%0A%09priva
@@ -505,24 +505,8 @@
 );%0A%0A
-%09@PostConstruct%0A
 %09pub
@@ -683,21 +683,8 @@
 %09%7D%0A%0A
-%09@PreDestroy%0A
 %09pub

update to implements InitializingBean, DisposableBean