Hi,
Am using
struts 1.2.8 + spring 1.2.7 + hibernate 3 in my project.
Handling StaleObjectStateException
I want to handle above mentioned exception in the service layer(spring). I have done necessary configuration in the spring configuration file. But still the exception is not handle. I came to know this by the stack trace which is printed on my console. I have created an advice or Interceptor which implemets the ThrowsAdvice interface which consists of the method afterThrowing(). I have performed necessary configuration in the spring configuration as shown below but the still stack trace is thrown.
Code in Advice or Interceptor class:
public void afterThrowing(StaleObjectStateException sose)
{
System.out.println("StaleObjectStateException exception is thrown");
}
<bean id="entityObjectStateExceptionAdvice" class="com.deemsys.elearn.arch.throwsadvice.EntityObjectStateExceptionAdvice"/>
<bean id="baseService" class="org.springframework.aop.framework.ProxyFactoryBean" abstract="true">
<property name="interceptorNames">
<list>
<value>globalDebugInterceptor</value> <value>globalPerformanceMonitorInterceptor</value>
<value>serviceInterceptor</value>
<value>transactionInterceptor</value>
<value>serviceSecurityInterceptor</value>
<value>entityObjectStateExceptionAdvice</value>
</list>
</property>
</bean>
How to handle this issue.
Regards,
Karthik.