how to get all sessions in jetty servlet with hazelcast session replication?
up vote
0
down vote
favorite
my application is based on embedded-jetty with session replication using hazelcast.
In a periodic job We would like to have all sessions currently active to process/send them to another microservice
session
add a comment |
up vote
0
down vote
favorite
my application is based on embedded-jetty with session replication using hazelcast.
In a periodic job We would like to have all sessions currently active to process/send them to another microservice
session
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
my application is based on embedded-jetty with session replication using hazelcast.
In a periodic job We would like to have all sessions currently active to process/send them to another microservice
session
my application is based on embedded-jetty with session replication using hazelcast.
In a periodic job We would like to have all sessions currently active to process/send them to another microservice
session
session
asked Nov 22 at 10:32
vivekIndia
3719
3719
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
up vote
1
down vote
accepted
Sessions are stored in an IMap
You can set the name for this with the map-name property for the web filter.
So if this parameter is set the same across all web applications, you'll find all the sessions in the one IMap.
If it makes sense for your use-case, you could store the sessions for one application in one IMap and for other applications in another IMap. They don't have to be all together, though usually that's easiest.
this worked for me. Thanks!
– vivekIndia
Nov 22 at 17:10
I have another scenario where i want to invalidate the HttpSessions from this job. Since IMap contains SessionData and not HttpSession how to invalidate them through hazelcast?
– vivekIndia
Nov 26 at 15:18
Probably this is best raised as a separate but linked question
– Neil Stevenson
Nov 27 at 17:39
stackoverflow.com/questions/53534650/…
– vivekIndia
Nov 29 at 8:34
add a comment |
up vote
0
down vote
Is that microservice also using hazelcast embedded? If so it can form a cluster with your application's hazelcast instance hence data automatically will be shared. Please note that all hazelcast instances should be within the same LAN to get the best performance and stability out of your cluster.
If microservice is in a remote network, than Hazelcast offers WAN Replication to replicate your data to a 2nd cluster. Please remember that this is an enterprise offering though.
no they are not sharing hazelcast instance. but thanks for answering the question
– vivekIndia
Nov 29 at 7:50
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53428941%2fhow-to-get-all-sessions-in-jetty-servlet-with-hazelcast-session-replication%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
Sessions are stored in an IMap
You can set the name for this with the map-name property for the web filter.
So if this parameter is set the same across all web applications, you'll find all the sessions in the one IMap.
If it makes sense for your use-case, you could store the sessions for one application in one IMap and for other applications in another IMap. They don't have to be all together, though usually that's easiest.
this worked for me. Thanks!
– vivekIndia
Nov 22 at 17:10
I have another scenario where i want to invalidate the HttpSessions from this job. Since IMap contains SessionData and not HttpSession how to invalidate them through hazelcast?
– vivekIndia
Nov 26 at 15:18
Probably this is best raised as a separate but linked question
– Neil Stevenson
Nov 27 at 17:39
stackoverflow.com/questions/53534650/…
– vivekIndia
Nov 29 at 8:34
add a comment |
up vote
1
down vote
accepted
Sessions are stored in an IMap
You can set the name for this with the map-name property for the web filter.
So if this parameter is set the same across all web applications, you'll find all the sessions in the one IMap.
If it makes sense for your use-case, you could store the sessions for one application in one IMap and for other applications in another IMap. They don't have to be all together, though usually that's easiest.
this worked for me. Thanks!
– vivekIndia
Nov 22 at 17:10
I have another scenario where i want to invalidate the HttpSessions from this job. Since IMap contains SessionData and not HttpSession how to invalidate them through hazelcast?
– vivekIndia
Nov 26 at 15:18
Probably this is best raised as a separate but linked question
– Neil Stevenson
Nov 27 at 17:39
stackoverflow.com/questions/53534650/…
– vivekIndia
Nov 29 at 8:34
add a comment |
up vote
1
down vote
accepted
up vote
1
down vote
accepted
Sessions are stored in an IMap
You can set the name for this with the map-name property for the web filter.
So if this parameter is set the same across all web applications, you'll find all the sessions in the one IMap.
If it makes sense for your use-case, you could store the sessions for one application in one IMap and for other applications in another IMap. They don't have to be all together, though usually that's easiest.
Sessions are stored in an IMap
You can set the name for this with the map-name property for the web filter.
So if this parameter is set the same across all web applications, you'll find all the sessions in the one IMap.
If it makes sense for your use-case, you could store the sessions for one application in one IMap and for other applications in another IMap. They don't have to be all together, though usually that's easiest.
answered Nov 22 at 10:59
Neil Stevenson
1,377310
1,377310
this worked for me. Thanks!
– vivekIndia
Nov 22 at 17:10
I have another scenario where i want to invalidate the HttpSessions from this job. Since IMap contains SessionData and not HttpSession how to invalidate them through hazelcast?
– vivekIndia
Nov 26 at 15:18
Probably this is best raised as a separate but linked question
– Neil Stevenson
Nov 27 at 17:39
stackoverflow.com/questions/53534650/…
– vivekIndia
Nov 29 at 8:34
add a comment |
this worked for me. Thanks!
– vivekIndia
Nov 22 at 17:10
I have another scenario where i want to invalidate the HttpSessions from this job. Since IMap contains SessionData and not HttpSession how to invalidate them through hazelcast?
– vivekIndia
Nov 26 at 15:18
Probably this is best raised as a separate but linked question
– Neil Stevenson
Nov 27 at 17:39
stackoverflow.com/questions/53534650/…
– vivekIndia
Nov 29 at 8:34
this worked for me. Thanks!
– vivekIndia
Nov 22 at 17:10
this worked for me. Thanks!
– vivekIndia
Nov 22 at 17:10
I have another scenario where i want to invalidate the HttpSessions from this job. Since IMap contains SessionData and not HttpSession how to invalidate them through hazelcast?
– vivekIndia
Nov 26 at 15:18
I have another scenario where i want to invalidate the HttpSessions from this job. Since IMap contains SessionData and not HttpSession how to invalidate them through hazelcast?
– vivekIndia
Nov 26 at 15:18
Probably this is best raised as a separate but linked question
– Neil Stevenson
Nov 27 at 17:39
Probably this is best raised as a separate but linked question
– Neil Stevenson
Nov 27 at 17:39
stackoverflow.com/questions/53534650/…
– vivekIndia
Nov 29 at 8:34
stackoverflow.com/questions/53534650/…
– vivekIndia
Nov 29 at 8:34
add a comment |
up vote
0
down vote
Is that microservice also using hazelcast embedded? If so it can form a cluster with your application's hazelcast instance hence data automatically will be shared. Please note that all hazelcast instances should be within the same LAN to get the best performance and stability out of your cluster.
If microservice is in a remote network, than Hazelcast offers WAN Replication to replicate your data to a 2nd cluster. Please remember that this is an enterprise offering though.
no they are not sharing hazelcast instance. but thanks for answering the question
– vivekIndia
Nov 29 at 7:50
add a comment |
up vote
0
down vote
Is that microservice also using hazelcast embedded? If so it can form a cluster with your application's hazelcast instance hence data automatically will be shared. Please note that all hazelcast instances should be within the same LAN to get the best performance and stability out of your cluster.
If microservice is in a remote network, than Hazelcast offers WAN Replication to replicate your data to a 2nd cluster. Please remember that this is an enterprise offering though.
no they are not sharing hazelcast instance. but thanks for answering the question
– vivekIndia
Nov 29 at 7:50
add a comment |
up vote
0
down vote
up vote
0
down vote
Is that microservice also using hazelcast embedded? If so it can form a cluster with your application's hazelcast instance hence data automatically will be shared. Please note that all hazelcast instances should be within the same LAN to get the best performance and stability out of your cluster.
If microservice is in a remote network, than Hazelcast offers WAN Replication to replicate your data to a 2nd cluster. Please remember that this is an enterprise offering though.
Is that microservice also using hazelcast embedded? If so it can form a cluster with your application's hazelcast instance hence data automatically will be shared. Please note that all hazelcast instances should be within the same LAN to get the best performance and stability out of your cluster.
If microservice is in a remote network, than Hazelcast offers WAN Replication to replicate your data to a 2nd cluster. Please remember that this is an enterprise offering though.
answered Nov 22 at 10:59
sertug
702510
702510
no they are not sharing hazelcast instance. but thanks for answering the question
– vivekIndia
Nov 29 at 7:50
add a comment |
no they are not sharing hazelcast instance. but thanks for answering the question
– vivekIndia
Nov 29 at 7:50
no they are not sharing hazelcast instance. but thanks for answering the question
– vivekIndia
Nov 29 at 7:50
no they are not sharing hazelcast instance. but thanks for answering the question
– vivekIndia
Nov 29 at 7:50
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53428941%2fhow-to-get-all-sessions-in-jetty-servlet-with-hazelcast-session-replication%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown