The usual culprit here is in the naming of the manager class your are using
to do the save/edit. AppFuse ships with the following definitions for the
AOP transaction proxy:
<aop:config>
<aop:advisor id="userManagerTx" advice-ref="userManagerTxAdvice"
pointcut="execution(* *..service.UserManager.*(..))" order="0"/>
<aop:advisor id="userManagerSecurity"
advice-ref="userSecurityAdvice" pointcut="execution(*
*..service.UserManager.saveUser(..))" order="1"/>
<aop:advisor id="managerTx" advice-ref="txAdvice"
pointcut="execution(* *..service.*Manager.*(..))" order="2"/>
</aop:config>
In short this says proxy all classes with names ending in 'Manager' that are
in package 'service'. In AppFuse this translates to proxying all methods
defined in the manager interface (it is the interface that is proxied here,
not the implementation).
There are two options to solve your problem:
1) Change the naming on your manager/manager interface to match the above.
2) Add the annotation @Transactional to the methods in your manager you want
under transaction.
Mike.
On Nov 10, 2007 8:50 AM, Rob Hills <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> I've been developing a complicated "overview" form for my application
> and created a separate Action class for it. However, once the user has
> selected an object on that form, they use a "normal" CRUD form to edit
> it and save that to the "normal" CRUD action for that object.
>
> However, when I try and save from the edit form, I get a Hibernate error
> "Write operations are not allowed in read-only mode (FlushMode
> NEVER/MANUAL)...". When accessed via the normal CRUD listing form, this
> edit form works fine.
>
> I suspect my problem is that I'm starting off from one action and
> finishing up trying to save my object via another object. Is this
> correct? If so, do I need to re-engineer my original CRUD object to
> also handle my "overview" form, or is there another way around this
> problem?
>
> TIA,
>
> Rob Hills
> Waikiki, Western Australia
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>