Oh right of course SL means service locator... sorry been hiking all day,
so a bit out of my mind ;-)  I'll certainly test SL with another IOC when I
have a chance.

On Mon, Jul 9, 2012 at 12:02 AM, <[email protected]> wrote:

> Service Locator...
>
> I'm trying to ascertain if this is directly related to castle. It could be
> the way the service locator hangs on to references or something. I think SL
> leaks memory or something similar....
>
> Sent from my iPhone
>
> On 9 Jul 2012, at 04:28, Stephen Hardie <[email protected]> wrote:
>
> By SL if you mean SilverLight, I can't say, I'm running this code in a
> windows service/console app. As for another IOC I haven't tried it yet.
> I'll give this a try when I have a chance. I suspect it's the
> ServiceLocator more so than Windsor Castle releasing them through the
> IServiceLocator interface, but I'm not sure how to isolate the problem or
> even fix it to prevent the services from being removed.
>
>
> On Sun, Jul 8, 2012 at 12:57 PM, <[email protected]> wrote:
>
>> Does this issue arise using SL and another IOC?
>>
>> Sent from my iPhone
>>
>> On 8 Jul 2012, at 18:38, Stephen Hardie <[email protected]> wrote:
>>
>> Berke,
>>
>> I'm very much aware of the implications of using the service locator, but
>> I didn't come here to argument about the service locator being an
>> anti-pattern. I was looking for answers related to Castle and Workflow.
>>
>> On Sun, Jul 8, 2012 at 6:43 AM, Berke Sokhan <[email protected]>wrote:
>>
>>> Just to note (and sorry I wont be answering your questions),
>>>
>>> Service Locator is an anti-pattern and leads to poor man's DI:
>>>
>>> http://blog.ploeh.dk/2010/02/03/ServiceLocatorIsAnAntiPattern.aspx
>>>
>>> http://stackoverflow.com/questions/6833995/how-to-avoid-service-locator-anti-pattern
>>>
>>> http://www.andyfrench.info/2011/05/service-locator-anti-pattern_17.html
>>>
>>> http://stackoverflow.com/questions/9409068/why-is-mvc4-using-the-service-locator-anti-pattern
>>>
>>>
>>> I dont know WF very well, but may be you could've refactored your
>>> application that it wont be needing common service locator usage anymore...
>>>
>>> Just my .5 cent...
>>>
>>>
>>> 2012/7/8 Stephen Hardie <[email protected]>
>>>
>>>>  Has anyone run into any issues with using Castle w/ MS ServiceLocator
>>>> and then later invoking the workflowInvoker or WorkflowApplication
>>>> (workflow foundation)?
>>>>
>>>> Here's the steps that cause problems...
>>>>
>>>> 1. Register services through Castle Windsor (as singleton)
>>>> 2. Retrieve a service through the ServiceLocator API (
>>>> http://commonservicelocator.codeplex.com/ )
>>>> 3. Execute the service I retrieved.
>>>> 4. This service then executes an activity/workflow using the
>>>> WorkflowInvoker.
>>>> 5. If I try and retrieve the service through the ServiceLocator again
>>>> then it fails saying it's unable to find the component.
>>>>
>>>> The only workaround I've found for this is to run the workflow in a
>>>> separate app domain and call it via a MarshalByRef proxy.
>>>>
>>>> When I try and debug this after the WorkflowInvoker runs I can see the
>>>> services in ServiceLocator are gone.
>>>>
>>>> Does WF interact with ServiceLocator during cleanup?
>>>> Is this a Workflow Issue, ServiceLocator issue, or Castle Windsor issue?
>>>> Is there a direction you could point me in on this issue?
>>>>
>>>>
>>>>
>>>>
>>>>  --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Castle Project Users" group.
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msg/castle-project-users/-/Ja6umBVddy8J.
>>>> 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.
>>>>
>>>
>>>
>>>
>>> --
>>> Berke SOKHAN.
>>>
>>> http://twitter.com/berkesokhan
>>> http://blog.berkesokhan.com
>>> http://www.birliktegelistir.com/editors.aspx
>>>
>>> --
>>> 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.
>>>
>>
>>  --
>> 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.
>>
>>  --
>> 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.
>>
>
>  --
> 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.
>
>  --
> 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.
>

-- 
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