You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by Craig Phillips <lc...@praxiseng.com> on 2008/09/30 14:42:32 UTC
Separate JVM (bsf content)
Hi, hope all are doing well,
I hate to post this here, but I figure there may be someone out there who has some thoughts/ideas in this group...
I have a bundle and I'm attempting to set up a "script directory scanner" service; I am using BSF to execute a ruby script (or groovy or javascript et al)... So far so good... But, the terminate() is not happening (I even did a remote debug of the container and stepped through the jruby terminate() logic which was pretty much "kick out to no avail")...
For what it's worth, a stop and unload of the bundle did nothing... I had a "while true sleep print end" ruby script that simply kept running...
Anyway, I think what I want to do is change from a "bsf job management" mentality to a "separate jvm management" mentality...
I have done JNI, but I have no interest is this tract; I see ProcessBuilder for jdk1.5 and beyond and it does look nice, but I still have to specify "java.exe" which I'd like to avoid;
Ultimately, I'd like to do something to the effect of:
- jvmHandle = Runtime.getRuntime().newJVM(myMainClass);
- jvmHandle = ProcessBuilder.newJVM(myMainClass);
and subsequently, jvmHandle.terminate();
Well, it's a pipe-dream I guess... Again, apologize to post to this group... Just figured someone might have attempted similar such undertaking, especially as a bundle service... Much appreciated, L. Craig Phillips, Praxis;