Is it possible to cleanly shutdown and restart Embedded GlassFish within
the same VM?
This is what I'm doing:
GlassFish glassFish = GlassFishRuntime.bootstrap().newGlassFish(gfProps);
glassFish.start();
glassFish.stop();
Now after calling glassFish.stop(), I still see a number of threads
running, e.g. with name "deployment-jar-scanner", "transaction-manager"
and some others.
What's the proper way to stop these threads and free all resources
allocated by GlassFish?
(Tested with GlassFish 3.1.2.)
Best regards,
Harald