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

Ask Your Question
0

Disconnect a Java client from Gigaspaces

Hi All,

I've a simple client that connects to Gigaspaces as follows:

    UrlSpaceConfigurer urlSpaceConfigurer = new UrlSpaceConfigurer(jini://{lookup locators}/*/{spaceName});
    urlSpaceConfigurer.lookupTimeout(30 * 1000);
    GigaSpaceConfigurer gigaSpaceConfigurer = new GigaSpaceConfigurer(urlSpaceConfigurer);
    gigaSpace = gigaSpaceConfigurer.gigaSpace();

I can then use the gigaSpace object to read, write and update entries in the space which is fine and works as expected. But, I was wondering how do I disconnect my client gracefully from the space? I want to be able to connect and disconnect to different spaces over the lifespan of the client. I don't see any method call that looks obvious to let me disconnect from the space. Thanks for any help you can offer,

Regards, Adrian.

asked 2016-09-19 10:32:09 -0500

adriancooley@gmail.com gravatar image
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

Use the following, specifically the urlConfig.destroy() after disconnecting and the two static methods on shutdown

    System.out.println("calling shutdown");
    try {
        urlConfig.destroy();
        GigaSpacesRuntime.shutdown();
        LRMIManager.shutdown();
    } catch (Exception e) {
        e.printStackTrace();
    }

Regards

John

answered 2016-09-26 08:07:05 -0500

jb gravatar image

updated 2016-09-26 08:09:42 -0500

edit flag offensive delete link more
0

See:

http://www.gigaspaces.com/docs/JavaDo...

From:forum@ask.gigaspaces.org [mailto:forum@ask.gigaspaces.org]

answered 2016-09-26 17:15:13 -0500

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

Stats

Asked: 2016-09-19 10:32:09 -0500

Seen: 407 times

Last updated: Sep 26 '16