how to get all sessions in jetty servlet with hazelcast session replication?












0















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










share|improve this question



























    0















    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










    share|improve this question

























      0












      0








      0








      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










      share|improve this question














      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 jetty hazelcast embedded-jetty






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 22 '18 at 10:32









      vivekIndiavivekIndia

      3719




      3719
























          2 Answers
          2






          active

          oldest

          votes


















          1














          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.






          share|improve this answer
























          • this worked for me. Thanks!

            – vivekIndia
            Nov 22 '18 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 '18 at 15:18











          • Probably this is best raised as a separate but linked question

            – Neil Stevenson
            Nov 27 '18 at 17:39











          • stackoverflow.com/questions/53534650/…

            – vivekIndia
            Nov 29 '18 at 8:34



















          0














          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.






          share|improve this answer
























          • no they are not sharing hazelcast instance. but thanks for answering the question

            – vivekIndia
            Nov 29 '18 at 7:50











          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',
          autoActivateHeartbeat: false,
          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
          });


          }
          });














          draft saved

          draft discarded


















          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









          1














          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.






          share|improve this answer
























          • this worked for me. Thanks!

            – vivekIndia
            Nov 22 '18 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 '18 at 15:18











          • Probably this is best raised as a separate but linked question

            – Neil Stevenson
            Nov 27 '18 at 17:39











          • stackoverflow.com/questions/53534650/…

            – vivekIndia
            Nov 29 '18 at 8:34
















          1














          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.






          share|improve this answer
























          • this worked for me. Thanks!

            – vivekIndia
            Nov 22 '18 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 '18 at 15:18











          • Probably this is best raised as a separate but linked question

            – Neil Stevenson
            Nov 27 '18 at 17:39











          • stackoverflow.com/questions/53534650/…

            – vivekIndia
            Nov 29 '18 at 8:34














          1












          1








          1







          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.






          share|improve this answer













          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.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 22 '18 at 10:59









          Neil StevensonNeil Stevenson

          1,432410




          1,432410













          • this worked for me. Thanks!

            – vivekIndia
            Nov 22 '18 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 '18 at 15:18











          • Probably this is best raised as a separate but linked question

            – Neil Stevenson
            Nov 27 '18 at 17:39











          • stackoverflow.com/questions/53534650/…

            – vivekIndia
            Nov 29 '18 at 8:34



















          • this worked for me. Thanks!

            – vivekIndia
            Nov 22 '18 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 '18 at 15:18











          • Probably this is best raised as a separate but linked question

            – Neil Stevenson
            Nov 27 '18 at 17:39











          • stackoverflow.com/questions/53534650/…

            – vivekIndia
            Nov 29 '18 at 8:34

















          this worked for me. Thanks!

          – vivekIndia
          Nov 22 '18 at 17:10





          this worked for me. Thanks!

          – vivekIndia
          Nov 22 '18 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 '18 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 '18 at 15:18













          Probably this is best raised as a separate but linked question

          – Neil Stevenson
          Nov 27 '18 at 17:39





          Probably this is best raised as a separate but linked question

          – Neil Stevenson
          Nov 27 '18 at 17:39













          stackoverflow.com/questions/53534650/…

          – vivekIndia
          Nov 29 '18 at 8:34





          stackoverflow.com/questions/53534650/…

          – vivekIndia
          Nov 29 '18 at 8:34













          0














          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.






          share|improve this answer
























          • no they are not sharing hazelcast instance. but thanks for answering the question

            – vivekIndia
            Nov 29 '18 at 7:50
















          0














          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.






          share|improve this answer
























          • no they are not sharing hazelcast instance. but thanks for answering the question

            – vivekIndia
            Nov 29 '18 at 7:50














          0












          0








          0







          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.






          share|improve this answer













          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.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 22 '18 at 10:59









          sertugsertug

          702510




          702510













          • no they are not sharing hazelcast instance. but thanks for answering the question

            – vivekIndia
            Nov 29 '18 at 7:50



















          • no they are not sharing hazelcast instance. but thanks for answering the question

            – vivekIndia
            Nov 29 '18 at 7:50

















          no they are not sharing hazelcast instance. but thanks for answering the question

          – vivekIndia
          Nov 29 '18 at 7:50





          no they are not sharing hazelcast instance. but thanks for answering the question

          – vivekIndia
          Nov 29 '18 at 7:50


















          draft saved

          draft discarded




















































          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.




          draft saved


          draft discarded














          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





















































          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







          Popular posts from this blog

          404 Error Contact Form 7 ajax form submitting

          How to know if a Active Directory user can login interactively

          TypeError: fit_transform() missing 1 required positional argument: 'X'