cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Hartmann <>
Subject [Solved ]Re: [Forms, JDO, PostgreSQL] Saving to bean requires transaction
Date Fri, 26 Nov 2004 16:05:03 GMT
Andreas Hartmann wrote:
> Hi Cocooners,
> I'm using the Forms with JDO and a PostgreSQL database.
> Basically I'm doing the same stuff like in the JDO example
> (at least I think so ...)
> Problem:
> When the binding tries to set a field of the bean, the JDO-
> enhanced bean object complains that no transaction is active
> (JDOUserException, Eclipse debugger stack attached below)

The problem was that I fetched the objects using a query:

         query = manager.newQuery(Semester.class);
         Collection semesters = (Collection) query.execute();

This way, each object gets a JDO state manager attached.
That's why transactions are taken care of.

The beans have to be creating using the constructor, then
they won't require transactions in their setters.

-- Andreas

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message