Scott,

Registering your services in Windsor and using it's interceptor support is
by the easiest way.

See the interceptor docs at
http://www.castleproject.org/container/documentation/trunk/usersguide/interceptors.html,
the 'using' page at http://using.castleproject.org/display/IoC/Home or a
user example at
http://davybrion.com/blog/2008/05/adding-behavior-without-modifying-existing-code-with-windsor/


-- Roelof.

On Fri, Apr 24, 2009 at 5:05 AM, scott_m <[email protected]> wrote:

>
> I am writing a service framework using WCF. Each service method needs
> to authorize that a user has permission to perform the specified
> method (preprocessing).
> After the method has completed, an audit event must be written to the
> datastore for reporting purposes (post processing).
>
> PCode Example:
>
> MyService.DeleteDocument(int docId)
> {
> //1. authorize that user has permissions to delete document, throw
> exception if necessary
> //2. delete the document
> //3. Log audit entry noting which user deleted which document
> }
>
>
> I am pretty new to Castle but read
> that DynamicProxy project is good for cross cutting concerns such as
> authorization and auditing. Is there a recommended way for using the
> Castle interceptors for authorization and auditing?
> Specifically, can you specify that a diff interceptor should be
> executed before and after the core method invocation?
> Mausch recommended to use a separate interceptor for authorization and
> auditing.   How do you wire up the two interceptors (code wise and
> config wise) for this scenario such that one fires before the real
> target invocation and one fires after the actual target invocation.
>
>
> thanks!
>
>
> ScottM
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" 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-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to