I ran into a similar situation a few times. I wound up fixing it with this
pattern. Does it make sense?
// This is the original method
public void SomeOperation()
{
using (RequestContext.Create())
{
SomeOperationInExistingContext();
}
}
// I move the implementation here and expose this method too
public void SomeOperationInExistingContext()
{
// Do operation
}
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of John
Davidson
Sent: Friday, November 02, 2007 8:24 AM
To: FlexWiki Users Mailing List
Subject: Re: [Flexwiki-users] Changes
I think I spoke to soon. Further investigation shows that calling
EditServiceImplementation from a plugin is now broken. I don't know if it
should or should not be allowed to make such calls, but it causes a nested
context issue.
As indicated I can program around it, but some of the other code you have
for external tools may also be broken if they make calls in the same way I
was.
John Davidson
On 11/2/07, John Davidson <[EMAIL PROTECTED]> wrote:
The only thing I see that has broken as a result of 2.0.0.164 is that my
plugin for a PageHitCounter is broken. I got inventive in it and grabbed a
context, which is of course not allowed now. Will have to do a minor rewrite
to pass a TopicInfo into the plugin rather than determine the relevant
TopicInfo in code.
Not a problem, but an example of Murphy at Work
John Davidson
On 10/29/07, Craig Andera <[EMAIL PROTECTED]> wrote:
I just checked in a pretty big change. Big in the sense of lots of files
affected. Moderate in terms of the impact.
In order to pull this off, the biggest change for developers is that *every
request into the content pipeline* must now have an active RequestContext.
This is fairly simple, as you just need to do something like this:
using (RequestContext.Create())
{
// Do operations here
}
for every top-level request. Note that nested RequestContexts are supported
only for unit testing configurations, because they make it somewhat harder
to ensure cache coherency. If you do not establish a RequestContext before
calling into the pipeline, you'll get a MissingRequestContextException, so
it should be pretty obvious how you screwed up.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Flexwiki-users mailing list
Flexwiki-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flexwiki-users