Hi there,
I have created sample Spring + JPA app on GAE and everyting works fine
(add/edit) exept remove.

My applicationContext config is :

        <context:component-scan base-
package="com.s_sandbox.tutorial.firsr.dao" />

        <bean id="entityManagerFactory"
                
class="org.springframework.orm.jpa.LocalEntityManagerFactoryBean"
lazy-init="true">
                <property name="persistenceUnitName" 
value="transactions-optional" /
>
        </bean>

        <bean name="txManager"
class="org.springframework.orm.jpa.JpaTransactionManager">
                <property name="entityManagerFactory" 
ref="entityManagerFactory" />
        </bean>

        <tx:annotation-driven transaction-manager="txManager" />

And my DAO is :

        @Component
        public class ContactDAO extends JpaDAO<Long, Contact>{
             @Autowired
             EntityManagerFactory entityManagerFactory;

             @PostConstruct
             public void init() {
                     super.setEntityManagerFactory(entityManagerFactory);
             }
         }

and

        @Transactional(readOnly = true)
        public abstract class JpaDAO<K, E> extends JpaDaoSupport {
                protected Class<E> entityClass;

                @SuppressWarnings("unchecked")
                public JpaDAO() {
                        ParameterizedType genericSuperclass = 
(ParameterizedType)
getClass()
                                        .getGenericSuperclass();
                        this.entityClass = (Class<E>) genericSuperclass
                                        .getActualTypeArguments()[1];
                }


                @Transactional(readOnly = false, propagation =
Propagation.REQUIRES_NEW)
                public void remove(E entity) {
                        getJpaTemplate().remove(entity);
                }

                /*   Other code */
            }

I do not recive any errors. looks like my transactions does not work
but I have not idea why.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to