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:

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

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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to