This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Embedding kawa in a multi-threaded servlet environment (a few questions).


Eric Merritt <cyberlync@yahoo.com> wrote:
> All I need to do is create an environment, make some java objects
> available to the script and then kick off the script by name. I would
> prefer that the compiled version of the script be stored and used
> unless it changes, but I have not quite figured out how to go about
> that yet.

I would suggest an alternate style: create a Kawa module that
exposes your Java objects and then just write the script directly
using (require <MyModule>) at the top of the file.  

That way you can just compile and execute the script as you would
any JVM program:

    unix% echo '(format #t "Hello world~%")' >Foo.scm
    unix% java kawa.repl --main -C  Foo.scm
    (compiling Foo.scm)
    unix% java Foo
    Hello world


Regards,
Chris Dean



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]