Hi Robert,

in your updateEditablePerson() resource method you create a transaction:

        @PUT
        @Path("...")
        public void updateEditablePerson(...) {
                DeepaMehtaTransaction tx = dm4.beginTx();
                try {
                        ...
                        tx.success();
                } finally {
                        tx.finish();
                }
        }

In a JAX-RS resource method you're not required to create a transaction 
manually.
Instead you can rely on DM's @Transactional annotation:

        import de.deepamehta.core.service.Transactional;

        @PUT
        @Path("...")
        @Transactional
        public void updateEditablePerson(...) {
                ...
        }

This wraps the entire request processing in a transaction.

There are rare cases in DM when you're required to create a transaction 
manually.

Cheers,
Jörg

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

-- 
devel mailing list
devel@lists.deepamehta.de
http://lists.deepamehta.de/mailman/listinfo/devel-lists.deepamehta.de

Reply via email to