Welcome to the new Gigaspaces XAP forum. To recover your account, please follow these instructions.

Ask Your Question
0

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}

asked 2011-07-20 13:47:38 -0600

dmimnagh gravatar image

updated 2013-08-08 09:52:00 -0600

jaissefsfex gravatar image
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0
System.exit(0);

answered 2011-07-20 13:55:47 -0600

shay hassidim gravatar image
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2011-07-20 13:47:38 -0600

Seen: 214 times

Last updated: Jul 20 '11