Carlos Sanchez wrote:
> anyone?
>
> On 7/20/06, Carlos Sanchez <[EMAIL PROTECTED]> wrote:
>   
>> I'm just wondering what people think about protected empty constructor
>> so I can extend that classes instead of write wrappers.
>>
>>     
Hi Carlos

I am not a big fan of this idea. It's still compromising the project's 
source code for the sake of a suboptimal IoC container. Indeed I'm not 
entirely sure what it will buy you, as you still need to subclass in 
order to utilise the protected no-argument constructor. Thus, you could 
instead isolate the changes using bytecode manipulation, as mentioned in 
an off-list email. You could write a general purpose no-argument utility 
class which contained a method such as:

    public static Object instantiateWithGeneratedNoArgConstructor(Class)

Additional utility methods could be added to the utility class in order 
to obtain access to other protected fields that your new wrapper class 
might require. What I'm essentially proposing is you write wrapper 
classes instead of subclassing, as the latter requires no-argument 
constructors whereas the former does not and you still end up with one 
additional class per Acegi Security class either way.

I still think that using the planned 1.1.0's namespace support with a 
private Spring beans dependency is the optimal long-term approach anyway.

Cheers
Ben

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Home: http://acegisecurity.org
Acegisecurity-developer mailing list
Acegisecurity-developer@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/acegisecurity-developer

Reply via email to