Skip to content

Hazelcast ClientConfig with spring-session #1068

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
fplini opened this issue May 8, 2018 · 2 comments
Closed

Hazelcast ClientConfig with spring-session #1068

fplini opened this issue May 8, 2018 · 2 comments
Assignees
Labels
status: duplicate A duplicate of another issue

Comments

@fplini
Copy link

fplini commented May 8, 2018

Hi all,
I have some webapp that uses hazelcast to store the user session.
I followed this guide https://docs.spring.io/spring-session/docs/current/reference/html5/guides/java-hazelcast.html#security-spring-configuration
but here there is only the configuration for the embedded instance and not for remote (standalone) instance (ClientConfig).

How can I do that?

Thanks
Fabrizio

@vpavic vpavic self-assigned this May 14, 2018
@vpavic
Copy link
Contributor

vpavic commented Jun 13, 2018

Hi @fplini, sorry for the late response.

We've got two issues that will cover concerns you expressed here:

To reduce the amount of opened issues on the same topic, I'm going to close this one as duplicate. Please track the two issues listed above.

Having said that, with client-server topology, you should ensure that your Hazelcast server is configured as explained in the part of our reference manual that you linked to. You also need to ensure that Spring Session classes are present on the classpath (see #1101 for more details). As for the client part, it should be simple and you can use something like we do in our integration tests:

@Configuration
@EnableHazelcastHttpSession
static class HazelcastSessionConfig {
@Bean
public HazelcastInstance embeddedHazelcastClient() {
ClientConfig clientConfig = new ClientConfig();
clientConfig.getNetworkConfig().addAddress("127.0.0.1:" + PORT);
return HazelcastClient.newHazelcastClient(clientConfig);
}
}

Also see #1055.

@vpavic
Copy link
Contributor

vpavic commented Jun 13, 2018

Duplicate of #1012

@vpavic vpavic marked this as a duplicate of #1012 Jun 13, 2018
@vpavic vpavic closed this as completed Jun 13, 2018
@vpavic vpavic added the status: duplicate A duplicate of another issue label Jun 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: duplicate A duplicate of another issue
Projects
None yet
Development

No branches or pull requests

2 participants