You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Daniel Baldes <db...@open.ch> on 2008/03/03 10:25:13 UTC
Struts2, JDO transaction handling
Hi,
If I want to edit my domain objects directly, how can I handle
transactions? Example:
<s:textfield name="login.username" />
My action has getLogin(), which returns a database-persistent object. In
order to let struts set properties of the object, a transaction must be
active.
I wonder if there is a "common way" to do this, if you don't use spring.
One way around this would be to return detached objects and attach them
in a transaction, but this leads to rather complex code because our
domain model is heavily networked and we would need to consider what to
detach, we cannot link non-detached objects to detached ones etc.
Any hints / suggestions?
Thanks in advance,
Daniel
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org