Does PyJNIus allow you to avoid repeatedly launching JVM?

102 views
Skip to first unread message

Clint

unread,
Feb 4, 2015, 11:34:07 AM2/4/15
to pyjni...@googlegroups.com
If I use PyJNIus to invoke Java code repeatedly over the "life" of my python application, is the JVM launched only once?

For example, if I instantiate a Java class in my Python web app and repeatedly invoke its Java-based methods for separate web requests, is the JVM launched multiple times or only once?

Thanks

Gabriel Pettier

unread,
Feb 4, 2015, 12:02:33 PM2/4/15
to pyjni...@googlegroups.com
I didn't try this specific use case, but only one JVM should be
instantiated at least for each python process, and any modern python web
framework should avoid spawning a python process for each request, what
I'm not sure, is if you configure multiple worker processes, if you have
one JVM for each, or only one, total, but I'm pretty sure you won't have
one for every request on your web App, unless you are using very old
technology, like apache mod_python.
> --
> You received this message because you are subscribed to the Google Groups "PyJNIus development ML" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to pyjnius-dev...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages