On 23 December 2014 at 12:07, Felix Schumacher
<[email protected]> wrote:
> Am 23.12.2014 um 10:57 schrieb sebb:
>>
>> On 23 December 2014 at 09:17, Lorenzo Fundaró <[email protected]>
>> wrote:
>>>
>>> Ok,
>>>
>>> I will have to investigate a bit about the current state of Scala
>>> implementation of JSR223 interface. AFAIK it's already implemented since
>>> Scala 2.11.
>>
>> To support JSR223 scripting means Scala must provide a class that
>> implements the interface javax.script.ScriptEngine.
>>
>> To support compilation as well as run-time interpretation, the class
>> must also implement the interface javax.script.Compilable.
>
> I have tested a simple ScriptEngine with scala 2.11.4 and it appears to
> implement Compilable.
>
>  ScriptEngine scalaEngine = new
> ScriptEngineManager().getEngineByName("scala");
>  if (scalaEngine instanceof Compilable) {
>        System.out.println("OK");
>  }
>
> prints out "OK".

Thanks!

So long as the Compilable.compile(Reader script) method actually works
(*), this should allow scripts to be processed much more efficiently.

(*) BeanShell implements compilable but throws Error: unimplemented -
which is very unhelpful!

>>
>>
>>> I will give it a try, although it's still not very clear how I
>>> would do this with Jmeter, I think I am missing some core concepts here
>>> with JSR233.
>>> I will really appreciate it If you can give me some lights of where I
>>> should focus my research.
>>>
>>> Thank you.
>>>
>>>
>>> Lorenzo Fundaró García
>>>
>>> On Mon, Dec 22, 2014 at 5:25 PM, UBIK LOAD PACK Support <
>>> [email protected]> wrote:
>>>>
>>>> Hello,
>>>> This is already possible through JSR223 Family.
>>>> But last time we tried it, as JSR223 Engine didn't seem to support
>>>> Compilation (as Groovy does) performance were just awful making it
>>>> unusable.
>>>>
>>>> Maybe this has changed , tests are welcome.
>>>> I compilation is still not supported, maybe you could open a feature
>>>> request on the scala project.
>>>>
>>>>
>>>> Regards
>>>> @ubikloadpack
>>>>
>>>> On Mon, Dec 22, 2014 at 5:20 PM, Lorenzo Fundaró
>>>> <[email protected]
>>>> wrote:
>>>>
>>>>> Hello guys,
>>>>>
>>>>> I would like to know if we have a plan to introduce a
>>>>> sampler/{pre,post}-processor using Scala Language.
>>>>> Would this make sense ? If so, I would be really interested on
>>>>
>>>> implementing
>>>>>
>>>>> it.
>>>>>
>>>>> Cheers  !
>>>>>
>>>>> Lorenzo Fundaró García
>>>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to