Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing stop function in JRuby main #2774

Closed
torsten-liermann opened this issue Mar 29, 2015 · 1 comment
Closed

Missing stop function in JRuby main #2774

torsten-liermann opened this issue Mar 29, 2015 · 1 comment
Milestone

Comments

@torsten-liermann
Copy link

Hi, (sorry, no english)

when starting from my java code a jruby application (like logstash) via instantiating org.jruby.Main and call run(....), I'm missing the part stop(). Is there a clean way to stop the "Main", to, for example, redeploy the enclosing application trouble-free (terminating jruby child thread and so on)?

Thanks, Torsten!

@headius
Copy link
Member

headius commented Mar 29, 2015

No applications should be using Main to launch JRuby instances, unless they're actually running JRuby as the only application on that JVM. Running through Main only does teardown on completion and does JVM-damaging things like taking over stdio and doing hard process exits.

If you want to have an embedded JRuby, we strongly recommend the use of ScriptingContainer. If you must go deeper with your integration, use Ruby.newInstance methods to get your own JRuby runtime. See the wiki for examples of embedding JRuby.

Have fun!

@headius headius closed this as completed Mar 29, 2015
@headius headius added this to the Won't Fix milestone Mar 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants