Fabian,

The way proxy generation works now, is that proxy type is generated based on 
three elements:
- ProxyGenerationOptions
- targetType
- proxied interface and additional interfaces

the interceptors arent part of the equation, so you cant preselect them at 
generation time, because for one proxy type you can have different sets of 
interceptors.
The runtime selection has its advantages IMHO and its a more elegant solution 
than delegating interceptor. At least if I understand correctly the idea behind 
that interceptor.
Could you maybe provide some code on how you think that interceptor should 
work? The way I see it, it would be really hackish.

Krzysztof

>>> [email protected] 2008-12-17 12:52 >>>

> In generation time you can have access to a selector, that's why I
> added to options. It was intended to drive the methods that would be
> proxy, even to skip the ones that wouldn't.
>
> When I was planning the implementation of this, I realized how this
> could be problematic for simple windsor scenarios. So I gave up
> implementing the selector at all. I can't remember all the reasons,
> but it should come once you consider all aspects:
> - proxying a type for the first time (scenario 1)
> - re-proxying a type for different scenario (logging + atm)
> - new container on same appdomain, reproxying
> - serialization/deserialization of proxy

So, you'd say selection of methods at code generation time doesn't
make sense for us anyway? I'm not sure. It would make a nice feature,
I think, but if nobody would actually use it...

The problem is that a runtime-based selection won't give us any
benefits over simply using a delegating interceptor, but it does
complicate code generation and ProxyGenerationOptions. I'd vote for
providing an out-of-the-box delegating interceptor rather than adding
this to the codegen _if_ we decide to only support this scenario.
(Even though Kryzstof has already implemented it; maintainance, tests,
etc. would be much easier with a delegating interceptor than
otherwise.)

Fabian





CONFIDENTIALITY NOTICE
This message is intended exclusively for the individual or entity to which it 
is addressed. This communication may contain information that is proprietary, 
privileged, confidential or otherwise legally exempt from disclosure. If you 
are not the named addressee, you are not authorized to read, print, retain, 
copy or disseminate this message or any part of it. If you have received this 
message in error, please delete all copies of this message and notify the 
sender immediately by return mail or fax ATSI S.A.(+4812) 285 36 04.
Any email attachment may contain software viruses which could damage your own 
computer system. Whilst reasonable precaution has been taken to minimise this 
risk, we cannot accept liability for any damage which you sustain as a result 
of software viruses. You should therefore carry out your own virus checks 
before opening any attachments.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Castle Project Development List" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/castle-project-devel?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to