Hi,

I know this discussion is quite old, but I was wondering if you could
elaborate about why storing a scope in a static member is a bad idea.

In my case I develop a plugin for AutoCAD. This plugin uses
ActiveRecord, but I obviously can not manage AutoCAD's threads. So I
basically end up with my methods being called from different threads
(and of course losing scopes).

Storing the scope in a static member seems to be a (good?) solution
for me, doesn't it ?

Thanks in advance for your advice,


On Mar 13 2007, 1:39 am, "josh robb" <[EMAIL PROTECTED]> wrote:
> Write your ownIThreadScopeInfoand store the scope in a static member.
>
> This is a pretty bad idea though.
>
> On 3/12/07, Widerberg Marcus <[EMAIL PROTECTED]> wrote:
>
>
>
> > Sorry, a bit vague! I mean thread boundary. The scope is tied to a
> > thread. Any ideas as to make it apply everywhere?
>
> > This is just to ease testing.
>
> > It's a wacky case, I know. /mawi
>
> > Hamilton Verissimo wrote:
> > > You want a scope/scopeholder that cross boundaries?
>
> > > On 3/12/07, Widerberg Marcus <[EMAIL PROTECTED]> wrote:
>
> > >> Hello,
>
> > >> I have some subsystem integration tests, that test a WCF link of our
> > >> solution. I want to stub out the AR part of the equation. I've simply
> > >> used the example provided by Ayende, having a mocked sessionscope.
>
> > >> When I cross some boundary, the scope becomes null. A scope is tied
> > >> to a thread (check source or simply use reflector on SessionScope and
> > >> ThreadScopeAccessor which it uses).
>
> > >> Anyhoo... im looking around the code trying to find a solution, but
> > >> it's not obvious, and I am not so familiar with the source so... any
> > >> ideas or is this a dead end?
>
> > >> /mawi
>
> > >> Related threads:
>
> >http://forum.castleproject.org/viewtopic.php?p=5683&sid=2aac66bc3e9632
> > >> 4d
>
> > 911592c7338ed221&bcsi_scan_5667A13D028ADCDE=0bvCfI/nRfWp2CXE75InVQcAAA
> > >> DQ o2YH&bcsi_scan_filename=viewtopic.php
>
> >http://forum.castleproject.org/viewtopic.php?p=5683&sid=2aac66bc3e9632
> > >> 4d
>
> > 911592c7338ed221&bcsi_scan_5667A13D028ADCDE=0bvCfI/nRfWp2CXE75InVQcAAA
> > >> DQ o2YH&bcsi_scan_filename=viewtopic.php
>
>
--~--~---------~--~----~------------~-------~--~----~
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