Re: Re-entrant and multi-entrant Groovy calls

2018-04-20 Thread Wolfgang Pedot
I would not expect any problems because of Groovy here, so far Groovy-Classes have behaved like Java-Classes in my projects Wolfgang Am 20.04.2018 um 17:03 schrieb Blake McBride: Yes, it is calling a static method on a Groovy class.  Is there a problem with what I am doing in term of re-entran

Re: Re-entrant and multi-entrant Groovy calls

2018-04-20 Thread Blake McBride
Yes, it is calling a static method on a Groovy class. Is there a problem with what I am doing in term of re-entrant or multi-entrant interference? Thanks. Blake On Fri, Apr 20, 2018 at 8:16 AM, Wolfgang Pedot wrote: > I dont know, your code looks like it is calling a static method on a class

Re: Re-entrant and multi-entrant Groovy calls

2018-04-20 Thread Kerridge, Jon
Hi, Not really, becasue you have just specified the groovy the crucial bit is how this is called and how data is shared / passed between between the Java and Groovy Jon Professor Jon Kerridge School of Computing Edinburgh Napier University Merchiston Campus Edinburgh EH10 5DT 0131 455 2777 j

Re: Re-entrant and multi-entrant Groovy calls

2018-04-20 Thread Wolfgang Pedot
I dont know, your code looks like it is calling a static method on a class. What I was referring to was using something like GroovyScriptEngine.createScript and reusing the returned Script-Object. Wolfgang Am 20.04.2018 um 14:32 schrieb Blake McBride: Every time I call Groovy from Java I do t

Re: Re-entrant and multi-entrant Groovy calls

2018-04-20 Thread Blake McBride
Every time I call Groovy from Java I do the following code snippets. Does this have the problem you are referring to? public void runGroovy(String fileName) { JSONObject injson = ... JSONObject outjson = ... HibernateSessionUtil hsu = ... GroovyClass gclass = loadClass(fileName,

Re: Re-entrant and multi-entrant Groovy calls

2018-04-20 Thread Kerridge, Jon
I have intermixed Groovy and JCSP easily and reliably, but not at the low-level thread level. I use two libraries JCSP (CSP for Java) which provides a process based interface that enables the construction of multiprocess applications, either on a multi-core machine or on a cluster of multi-cor

Re: Re-entrant and multi-entrant Groovy calls

2018-04-20 Thread Wolfgang Pedot
For Groovy-scripts you need to know that each instance of a script has a Binding to store variables in it and that may cause re-entrance or concurrency issues if you dont create a new script instance for each call. Wolfgang Am 20.04.2018 um 11:21 schrieb Blake McBride: Greetings, Does Groovy

Re: Re-entrant and multi-entrant Groovy calls

2018-04-20 Thread Blake McBride
Thanks. Speaking of Java alone, I understand that many Java API's are not thread safe. That's fine. However, with respect to Java alone, I can have any number of threads and so long as no thread touches the same (application) variables at the same time, I'm always safe. I understand that I must

Re: Re-entrant and multi-entrant Groovy calls

2018-04-20 Thread Jochen Theodorou
Am 20.04.2018 um 11:21 schrieb Blake McBride: Greetings, Does Groovy safely support re-entrant and multi-entrant calls?  What I mean by that is the following: Re-entrant:  on a single OS thread - my Java program calls into Groovy, then Groovy calls into my Java application, and then the Ja

Re-entrant and multi-entrant Groovy calls

2018-04-20 Thread Blake McBride
Greetings, Does Groovy safely support re-entrant and multi-entrant calls? What I mean by that is the following: Re-entrant: on a single OS thread - my Java program calls into Groovy, then Groovy calls into my Java application, and then the Java application calls back into Groovy. So the stack