How to shut down client with embedded space?
How do I clean up an embedded space so that my client can exit? Currently Gigaspaces is creating a bunch of non-daemon threads so the application will never exit.
Here's a simple example that never exits:
import org.openspaces.core.GigaSpace; import org.openspaces.core.GigaSpaceConfigurer; import org.openspaces.core.space.UrlSpaceConfigurer;
import com.j_spaces.core.IJSpace;
public class TestGS {
public static void main(String[] args) {
UrlSpaceConfigurer spaceConfigurer =
new UrlSpaceConfigurer("/./JUST_KILL_ME?groups=DUMP");
IJSpace space = spaceConfigurer.space();
GigaSpace gigaSpace = new GigaSpaceConfigurer(space).gigaSpace();
gigaSpace.write(new Object());
gigaSpace.clear(new Object());
gigaSpace.clean();
System.out.println("Exiting...");
}
}
{quote}This thread was imported from the previous forum. For your reference, the original is [available here|http://forum.openspaces.org/thread.jspa?threadID=3712]{quote}