PDA

View Full Version : Auto proxy in hierarchical context


key
04-04-2007, 03:22 AM
Hi all.

I have a question about configuring auto proxy in hierarchical context.

I made up two definition files, "AutoProxy.xml" and "MyObject.xml".

"AutoProxy.xml" contains definition for my auto proxy creator.
"MyObject.xml" is for the target object.

They worked when I put them all in the root context. However, it doesn't work once I move the target object's definition to child context.
I mean something like this:

<context>
<resource uri="AutoProxy.xml"/>

<context name="MyContext">
<resource uri="MyObject.xml"/>
</context>
</context>

The container doesn't seem to try to create a proxy for my target object. I have to move "AutoProxy.xml" to the child context as well to make it works correctly.

Is this expected behavior or am I something wrong?
I use version 1.1.0 P3 on .NET Framework 2.0.

Mark Pollack
04-04-2007, 03:16 PM
Hi,

That is the expected behavior. The autoproxy creator only applies to objects in the same context, not objects in child or parent contexts. If you have a case for different behavior we can consider it for inclusion in a future release. I've updated the AOP docs (sect 12.8) to mention this.

Cheers,
Mark

key
04-04-2007, 05:47 PM
Hi, Mark.

If that's the way it is, I'll follow it.

Thank you for your reply.