Hi everyone,
I am trying to use Spring's transaction support using the above annotation on an existing project (we are trying to migrate to Spring). The method I am trying to make transactional lives in an object that is going to be exported through RMI and I am getting this Exception:
My class declaration (I think the method itself is not that important here):Code:java.rmi.UnmarshalException: error unmarshalling return; nested exception is: java.io.WriteAbortedException: writing aborted;java.io.NotSerializableException: org.springframework.beans.factory.support.DefaultListableBeanFactory
For completion the transaction part of my appContext configuration:Code:public class TagCount extends UnicastRemoteObject
My question is, if it is possible to use @Transactional for RMI exported objects in general or if I am using it in a wrong way somehow? As we are working on existing code the object is exported to RMI manually - would using RmiServiceExporter make a difference? I would think so as one wouldn't need to extend any Remote classes, right? Though switching to Spring managed RMI would involve a lot of code changes for us.Code:<tx:annotation-driven /> <bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager"> <property name="sessionFactory" ref="sessionFactory" /> </bean>
Thanks in advance for any hints and help!
Cheers


Reply With Quote
