[jboss-user] [JBoss Seam] - Re: Protected methods on Seam components

quilleashm do-not-reply at jboss.com
Thu Feb 15 05:23:07 EST 2007

I don't have to have them protected in this instance but I'm using the SingleItemScreenAction class here to make life easier for implementors so all they have to define are some simple getters().  Making them protected means they are only accessible to subclasses which is what I want.

Perhaps not so "obviously" :) but Seam uses a cglib proxy to wrap all component objects it creates.  The proxy object subclasses the component so the Seam interceptors are called on each method call which, amongst other things, handles the bijection around calling the actual target method.  A final method can't be subclassed so cglib doesn't add a method proxy for them so you get no Seam interception and therefore no bijection.

Still not sure why a method being protected means cglib can't proxy it tho.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4016931#4016931

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4016931

More information about the jboss-user mailing list