English 中文(简体)
2. 冰风拦截器只 h有标记的方法
原标题:Configure windsor interceptor to hook only marked methods

Is there possibility to configure Interceptor to hook methods only of special interface, or by base class? Currently I have registered Interceptor that works with scope of connections to one DB. Now I added another scope working with another db and want to add another interceptor, which will hook methods of second scope. It is possible to configure interceptor via xml files, instead of checking target of invocation properties.

我通过部件添加拦截器:

 <component
    type="Common.IoC.SessionScopeInterceptor, Common"
    lifestyle="transient">
 </component>

AFAIK这一拦截器拦截了在风.集装箱内登记的所有班级的所有方法。

我也想补充这样的内容。

 <component
    type="Common.IoC.SessionScopeInterceptor, Common"
    lifestyle="transient"
    interceptOnlyVirtualMethods="true"
    interceptClass="Common.IoC.SessionScope1, Common"
    >
 </component>
最佳回答

你们需要创建自己的精华,以履行你所期望的行为。 基本上,你需要实施类似于Mikael Sundberg在

问题回答

暂无回答




相关问题
Possible to sandbox Python configuration file?

I m thinking of implementing a configuration file written in Python syntax, not unlike what Django does. While I ve seen one or two SO questions about the merits of using executable code in ...

How to validate Java logging properties files?

I have a basic facility for allowing users to remotely apply changes to the logging files in my application. Some logs are configured using java.util.logging properties files, and some are configured ...

Where should I put this configuration setting?

I m designing a fairly small web application which will run on a Sun application server (v9.1). It only has a few pages, no database of its own, and will retrieve/update data via web services. There s ...

.Net application configuration add xml-data

I need to add xml-content to my application configuration file. Is there a way to add it directly to the appSettings section or do I need to implement a configSection? Is it possible to add the xml ...

Dependency bundle (jar-files/sources/API docs) in Eclipse

I m developing various in-house extensions for JIRA, the issue tracker we use. So far I worked with Netbeans and everything worked like a charm. However, now I need to switch to Eclipse and I m ...

热门标签