Please use [ code][/code ] tags when posting code, that way we can more easily read your code.
Is your UserDaoImpl extending HibernateDaoSupport or do you have your own implementation...
Just noticed your problem, you are using the wrong bean.
Code:
UserManagerImpl um=(UserManagerImpl)ctx.getBean("userManagerTarget");
You must use the userManager that is the instance that is proxied and has transactions applied. This is exactly the reason why I always suggest to use an anonymous inner bean as the target, that way you cannot (easily) get access to the NON-proxied instance.
Code:
UserManagerImpl um=(UserManagerImpl)ctx.getBean("userManager");
Code:
<bean id="userdao" class="com.impl.UserDAOImpl">
<property name="sessionFactory" ref="sesfactory1"/>
</bean>
<bean id="transactionManager1" class="org.springframework.orm.hibernate3.Hibernat eTransactionManager">
<property name="sessionFactory" ref="sesfactory1"/>
</bean>
<bean id="userManager" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
<property name="transactionManager" ref="transactionManager1"/>
<property name="target">
<bean class="com.impl.UserManagerImpl">
<property name="userDAO" ref="userDao"/>
</bean>
</property>
<property name="transactionAttributes">
<props>
<prop key="getUserList">PROPAGATION_REQUIRES_NEW,-com.Testexception</prop>
<prop key="insert*">PROPAGATION_REQUIRED,-com.Testexception</prop>
</props>
</property>
</bean>
The configuration above would have prevented you from even getting the non-proxied instance.