You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Justin Miller <ju...@gmail.com> on 2008/07/25 16:02:47 UTC

[Orchestra] does orchestra require that Cglib proxies be used

Does Orchestra require that Spring use cglib proxies rather than jdk proxies?

It seems like no matter what I do, I can't get spring to use jdk
proxies. My beans implement interfaces like they are supposed to, and
I definitely do not have any proxy-target-class tags anywhere in my
spring XML files.

This isn't a huge deal. Everything still works. I just want to follow
the recommendation that jdk proxies be used when possible.

Any thoughts?

Thanks,
Justin

Re: [Orchestra] does orchestra require that Cglib proxies be used

Posted by Justin Miller <ju...@gmail.com>.
It's definitely just backing beans that I'm referring to. I don't keep other
pieces of business logic in conversation scope. I suppose it was more that I
wanted to follow "good practice" as defined by the Spring team.

But you make a valid point regarding the loose coupling that the EL
provides.

Now that I've got it in my head though, I'm mostly just trying to understand
the behavior I see. No biggie. I would still like to know, but I don't know
that it's worth spending too much time on.

Thanks for responding!

Justin

On Mon, Jul 28, 2008 at 3:18 AM, Simon Kitching <sk...@apache.org>wrote:

>
>
>
> Justin Miller-7 wrote:
> >
> > Does Orchestra require that Spring use cglib proxies rather than jdk
> > proxies?
> >
> > It seems like no matter what I do, I can't get spring to use jdk
> > proxies. My beans implement interfaces like they are supposed to, and
> > I definitely do not have any proxy-target-class tags anywhere in my
> > spring XML files.
> >
> > This isn't a huge deal. Everything still works. I just want to follow
> > the recommendation that jdk proxies be used when possible.
> >
>
> As far as I know, jdk proxies should work. However I don't know of anyone
> who has tried this; I certainly haven't.
>
> JDK proxies of course only work for interfaces. The objects placed in
> conversation scope are generally "backing beans" for pages, and these
> normally aren't interfaces; the loose coupling already provided by EL means
> there isn't a lot of point in a separate interface. So it seems to me that
> in this case writing an interface definition for a backing bean is a lot of
> work for very little benefit.
>
> I suppose there could be a few more "business level" objects that could
> usefully be in conversation scope, in which case there may well be a
> logical
> interface for them. But I would certainly expect these to be the minority.
>
> Do you expect to have lots of business-logic classes held within
> conversation scope? If so, would you mind explaining why you take this
> approach?
>
> Regards, Simon
> --
> View this message in context:
> http://www.nabble.com/-Orchestra--does-orchestra-require-that-Cglib-proxies-be-used-tp18652354p18685280.html
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>

Re: [Orchestra] does orchestra require that Cglib proxies be used

Posted by Simon Kitching <sk...@apache.org>.


Justin Miller-7 wrote:
> 
> Does Orchestra require that Spring use cglib proxies rather than jdk
> proxies?
> 
> It seems like no matter what I do, I can't get spring to use jdk
> proxies. My beans implement interfaces like they are supposed to, and
> I definitely do not have any proxy-target-class tags anywhere in my
> spring XML files.
> 
> This isn't a huge deal. Everything still works. I just want to follow
> the recommendation that jdk proxies be used when possible.
> 

As far as I know, jdk proxies should work. However I don't know of anyone
who has tried this; I certainly haven't.

JDK proxies of course only work for interfaces. The objects placed in
conversation scope are generally "backing beans" for pages, and these
normally aren't interfaces; the loose coupling already provided by EL means
there isn't a lot of point in a separate interface. So it seems to me that
in this case writing an interface definition for a backing bean is a lot of
work for very little benefit.

I suppose there could be a few more "business level" objects that could
usefully be in conversation scope, in which case there may well be a logical
interface for them. But I would certainly expect these to be the minority.

Do you expect to have lots of business-logic classes held within
conversation scope? If so, would you mind explaining why you take this
approach?

Regards, Simon
-- 
View this message in context: http://www.nabble.com/-Orchestra--does-orchestra-require-that-Cglib-proxies-be-used-tp18652354p18685280.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.