If you are getting no session error due to the hibernate session is not available to you.
here is the solution.
create a bean using thetranssactionProxyFactoryBean
[bean id="cpkMailingList" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean"]
[property name="target"]
[bean class="com.company.manufacturing.cron.CpkMailingList"]
[property name="emailTemplate" value="cpkemail.vm" /]
[property name="sendHTMLMailService" ref="sendHTMLMailService" /]
[property name="mailingList" value="bli@email.com"/]
[property name="message" ref="mailMessage" /]
[property name="fpyManager" ref="fpyManager"/]
[property name="productManager" ref="productManager" /]
[property name="appMeasStatManager" ref="appMeasStatManager" /]
[/bean]
[/property]
[property name="transactionAttributes"]
[props]
[prop key="sendMail"]PROPAGATION_REQUIRED[/prop]
[/props]
[/property]
[/bean]
Monday, June 8, 2009
Subscribe to:
Posts (Atom)