Richard Hauswald <richard.hausw...@...> writes: 
> I ran into this problem doing some hibernate testing a few years ago.
> In my case the problem was, that hsqldb by default, requires all I/U/D
> queries to be executed insode a transaction which also needs to be
> commited, otherwise the data is not persisted. Also make shure that
> the file of the database resides outside the webapp root directory,
> otherwise it will be overwritten on each new deployment. Also tell
> hibernate to only update (<property
> name="hbm2ddl.auto">update</property>) the schema on application
> startup. A <property name="hbm2ddl.auto">create-drop</property> will
> delete all the data created before. Hope this helps,
> Richard

Hi Richard -- That does help indeed.  I'll know for sure when I go home and try 
more than just one or two cases.

I think Stripersist may be handling my transaction for me, as I persist to my 
entity manager first and then commit the transaction:

        public Resolution save() {
                logger.info("*** In save()");
                
                EntityManager em = Stripersist.getEntityManager();
                em.persist(person);
                em.getTransaction().commit();

                getContext().getMessages().add(
                        new SimpleMessage("{0} has been saved.", person)
                );
                
                return new ForwardResolution(THANKS);
        }



------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to