You should consider to have a look into the paramsPrepareParams pattern
(see struts-default.xml for a brief description) and to write and use a
TransactionInterceptor. The latter one gives you the same cross cutting
TX approach you want from your @Transational annotation, but in addition
to tha
will u make a tiny tutori for your work like struts-spring-ajax and
put in the wiki of S2
that will be awesome ;)
F
On Tue, May 5, 2009 at 10:17 AM, Mauricio Aniche
wrote:
> Wes,
>
> I just put the proxy-target-class="true", put all cglib and its dependencies
> and everything worked!
>
> Thanks
Wes,
I just put the proxy-target-class="true", put all cglib and its dependencies
and everything worked!
Thanks in advance,
Mauricio
On Fri, May 1, 2009 at 9:32 AM, Wes Wannemacher wrote:
> See if you can force Spring to use CGLIB proxies... JDK proxies are
> interface-based, so unless you are
Hi Dustin,
Yes, I do require the ability to be able to manually set transaction
boundaries from controller code. The main reason is because Hibernate
updates database records when a persistent object changes state during a
transaction. It picks up on the changes made to the object when the
tr
discuss about this
is it possible the working version share to us
so we can see the thing here
F
On Sat, May 2, 2009 at 11:57 PM, dusty wrote:
>
> Jeroen,
>
> This setup is so that you can initiate and control the properties of the
> transaction from the controller, if that is a pattern you re
Jeroen,
This setup is so that you can initiate and control the properties of the
transaction from the controller, if that is a pattern you require?
Do you do this for all your calls to the service layer from controllers, and
how is it better/different from a calling a service method annotated wi
See if you can force Spring to use CGLIB proxies... JDK proxies are
interface-based, so unless you are implementing an interface that
exposes all of the methods you will interact with (Action interface
has no methods, IIRC), then AOP / @Transactional won't work right.
Although, carry on with the S
I'll agree that a service layer alone won't cut it, simply because of
the way JPA/Hibernate works. Updating an instance for example is just
something that doesn't belong in a service. I'm by no means an expert of
best practices in JPA/Hibernate and Spring, but I've found a combination
of servic
Hi Jeroen,
The problem is that I am not a big fan of services layer. Sometimes it looks
very anemic to me. But I totally agree with you when you say the action
should not know about persistence problems, and that's why I want to do it
via AOP.
I had the same thought about the problem: the Spring
You really shouldn't be making your Struts 2 actions @Transactional.
Doing that causes Spring to create a proxy so it can put some extra
transaction-handling logic between the method call and the actual
method. The thing is, Struts 2 and OGNL rely heavily on reflection on
the action classes whi
Yes, I am. Everything works fine when I don't try to use Spring
transactional AOP!
Mauricio
On Thu, Apr 30, 2009 at 9:43 PM, Dave Newton wrote:
> Mauricio Aniche wrote:
>
>> I am using Struts2+Spring+JPA/Hibernate. When I use the @Transactional to
>> mark an execute() method in a Struts2 Action
Mauricio Aniche wrote:
I am using Struts2+Spring+JPA/Hibernate. When I use the @Transactional to
mark an execute() method in a Struts2 Action, the action stops working
properly (i.e. the attributes in the action are not automatically setted).
It does not work with Spring AOP transactions as well.
Hi,
I am using Struts2+Spring+JPA/Hibernate. When I use the @Transactional to
mark an execute() method in a Struts2 Action, the action stops working
properly (i.e. the attributes in the action are not automatically setted).
It does not work with Spring AOP transactions as well.
In my struts.confi
13 matches
Mail list logo