Hi Guys,<div><br></div><div>I also implemented something w/ JSR 223 - <a href="https://github.com/saturnism/infinispan/tree/jsr223-mr/core/src/main/java/org/infinispan/distexec/mapreduce">https://github.com/saturnism/infinispan/tree/jsr223-mr/core/src/main/java/org/infinispan/distexec/mapreduce</a></div>
<div><br></div><div>With tests that uses scripts like this:</div><div><a href="https://github.com/saturnism/infinispan/tree/jsr223-mr/core/src/test/resources/mapreduce">https://github.com/saturnism/infinispan/tree/jsr223-mr/core/src/test/resources/mapreduce</a><br>
<br><div class="gmail_quote">On Mon, Jan 28, 2013 at 6:53 AM, Ales Justin <span dir="ltr"><<a href="mailto:ales.justin@gmail.com" target="_blank">ales.justin@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">> M/R classes do have access to the cache so they can get a hold of the app's class loader. But the tricky part is that the M/R tasks themselves need to be loaded from that class loader first…<br>
<br>
</div>This already seems to work -- as we use tasks extensively in CapeDwarf,<br>
and it seems to work OK; note: CapeDwarf runs in both ways - modular and embedded<br>
<span class="HOEnZb"><font color="#888888"><br>
-Ales<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
> On 28 Jan 2013, at 14:01, Ales Justin <<a href="mailto:ales.justin@gmail.com">ales.justin@gmail.com</a>> wrote:<br>
><br>
>>> Ales - how could we bundle something like this as an AS module and play nice with modular class loading there?<br>
>><br>
>> Well, I would say we're back to that discussion with AdvancedCache::withClassloader. :-)<br>
>> Same thing with M/R -- can it tap into app's CL?<br>
>> Otherwise TCCL should do, in JEE env.<br>
>><br>
>> Or perhaps some init(Cache cache) on M/R classes, where it can get a hold of Cache,<br>
>> which would then expose app' CL, via AC::withClassloader?<br>
>><br>
>> -Ales<br>
>><br>
>>> On 26 Jan 2013, at 21:55, Ales Justin <<a href="mailto:ales.justin@gmail.com">ales.justin@gmail.com</a>> wrote:<br>
>>><br>
>>>>> Would the thread context classloader be the right thing to use?<br>
>>>><br>
>>>> It depends how Infinispan's M/R code handles setting of TCCL.<br>
>>>> Specially in remote invocations.<br>
>>>> But I would expect it to work.<br>
>>>> Not the best, but good enough. :-)<br>
>>>><br>
>>>>> Or, perhaps it can use ScriptEngine?<br>
>>>><br>
>>>> What's ScriptEngine?<br>
>>>><br>
>>>> -Ales<br>
>>>><br>
>>>> _______________________________________________<br>
>>>> infinispan-dev mailing list<br>
>>>> <a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br>
>>>> <a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br>
>>><br>
>>> --<br>
>>> Manik Surtani<br>
>>> <a href="mailto:manik@jboss.org">manik@jboss.org</a><br>
>>> <a href="http://twitter.com/maniksurtani" target="_blank">twitter.com/maniksurtani</a><br>
>>><br>
>>> Platform Architect, JBoss Data Grid<br>
>>> <a href="http://red.ht/data-grid" target="_blank">http://red.ht/data-grid</a><br>
>>><br>
>>><br>
>>> _______________________________________________<br>
>>> infinispan-dev mailing list<br>
>>> <a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br>
>>> <a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br>
>><br>
>><br>
>> _______________________________________________<br>
>> infinispan-dev mailing list<br>
>> <a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br>
>> <a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br>
><br>
> --<br>
> Manik Surtani<br>
> <a href="mailto:manik@jboss.org">manik@jboss.org</a><br>
> <a href="http://twitter.com/maniksurtani" target="_blank">twitter.com/maniksurtani</a><br>
><br>
> Platform Architect, JBoss Data Grid<br>
> <a href="http://red.ht/data-grid" target="_blank">http://red.ht/data-grid</a><br>
><br>
><br>
> _______________________________________________<br>
> infinispan-dev mailing list<br>
> <a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br>
> <a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br>
<br>
<br>
_______________________________________________<br>
infinispan-dev mailing list<br>
<a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br>
</div></div></blockquote></div><br></div>