On Apr 16, 2007, at 8:27 AM, Meindert wrote:

I don't think that adding cglib will fix it, the service classes seem to
need an interface to be able to generate the proxy.
Please correct me if I'm wrong.

Yes, it should fix the problem. Spring typically uses JDK-based proxies when the target class implements some interface(s). Otherwise, CGLIB must be used. A more detailed description is here:

http://static.springframework.org/spring/docs/2.0.x/reference/aop- api.html#aop-pfb-proxy-types

and also see section 7.5.5 that follows.

Tom

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Larry Meadors
Sent: 16 April 2007 03:10 PM
To: user-java@ibatis.apache.org
Subject: Re: converting iBATIS framework DAOs to the Spring Framework

Hmm, I think I'd rather add cglib than give up transactions in the
service layer.

It's another jar, but reduces complexity (that's unusual when you
*add* a jar), and puts transaction management where it belongs, IMO.

Larry


On 4/16/07, Meindert <[EMAIL PROTECTED]> wrote:
Had a closer look at it and the logical reason the proxy could not be
generated is the fact the service classes (in JPetstore) don't use an
interface.

I would like to keep it that way, because the reason's I heard for giving
it
an interface are not convincing (reasons like 'it is the right thing to
do',
'easy interchange of implementations') .

So (for now) I would say that it is not possible to have a transaction in the business logic (if the business logic doesn't implement a interface).


Reply via email to