ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Duffey <tduf...@utilivisor.com>
Subject Re: converting iBATIS framework DAOs to the Spring Framework
Date Mon, 16 Apr 2007 13:42:40 GMT

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:


and also see section 7.5.5 that follows.


> -----Original Message-----
> From: larry.meadors@gmail.com [mailto:larry.meadors@gmail.com] 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 <meindert@pastelebusiness.com> 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).

View raw message