clusterjsp.ear<\/a> application to your Desktop.<\/p>\n\n\n\nStep 4 <\/strong>\u2013 Next, click on the Applications<\/strong> section. You should see the following page:<\/p>\n\n\n\n <\/figure>\n\n\n\n <\/figure>\n\n\n\nStep 5<\/strong> \u2013 Here, upload the downloaded clusterjsp.ear<\/strong> file to the Packaged File to Be Uploaded to the Server location<\/strong>, provide the application name, enable the availability, set up cluster1<\/strong> as the application target and click on the OK<\/strong> button. You should see the following page:<\/p>\n\n\n\n <\/figure>\n\n\n\nStep 6<\/strong> \u2013 Now, open your web browser and open the URL http:\/\/glassfish.rosehosting.us\/clusterjsp. You should see the following page:<\/p>\n\n\n\n <\/figure>\n\n\n\nStep 7<\/strong> \u2013 Provide session attribute name, value and click on Add Session Data<\/strong>.<\/p>\n\n\n\nStep 8<\/strong> \u2013 Now, go to the Glassfish admin console and click on the Clusters > cluster1 > Instances<\/strong> tab. You should see the two cluster instance in the following page:<\/p>\n\n\n\n <\/figure>\n\n\n\nStep 9<\/strong> \u2013 Select the first instance and click on the Stop<\/strong> button to stop the instance.<\/p>\n\n\n\nStep 10 <\/strong>\u2013 Now, reload your application at http:\/\/glassfish.rosehosting.us\/clusterjsp. You should see the following page:<\/p>\n\n\n\n <\/figure>\n\n\n\nAs you can see, your application session being handle by another node and your attribute is still available.<\/p>\n\n\n\n
On the Glassfish admin console, click on the Configurations > cluster1-config > Availability Service<\/strong> to access all replication settings:<\/p>\n\n\n\n <\/figure>\n\n\n\nAs you can see, there are two replication modes (Web Container Availability and EJB Container Availability) available by default.<\/p>\n\n\n\n
<\/span>Cloning Cluster for A\/B Testing<\/span><\/h2>\n\n\n\nIn some cases, you may need to make some changes in your application settings for testing purposes or when you release a new application, it is a good idea to clone your environment and verify the newly implemented changes. This will allows you to test your application without any downtime.<\/p>\n\n\n\n
On the Glassfish node, click on the Clone Environment <\/strong>button as shown below:<\/p>\n\n\n\n <\/figure>\n\n\n\nThis will create an exact copy of your Glassfish cluster with all nodes as shown below:<\/p>\n\n\n\n <\/figure>\n\n\n\nOf course you don’t need to install all of this if you use our managed cloud PAAS hosting, in which case you an simply ask one of our system administrators to set up GlassFish & Payara Auto-Clustering: Running Java EE Highly-Available Applications in the Cloud. They are available 24\/7 and always ready to help you out. <\/p>\n\n\n\n
PS<\/strong>. If you liked this post, please share it with your friends on the social networks using the buttons below or simply leave a comment in the comments section. Thanks.<\/p>\n","protected":false},"excerpt":{"rendered":"Building a highly-available clustered infrastructure is one of the most commonly used solutions to achieve 100% uptime for your application. … <\/p>\n
Read More<\/a><\/p>\n","protected":false},"author":4,"featured_media":36430,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[1894,165,1888,1893],"yoast_head":"\nGlassfish and Payara Auto-clustering: Running Java EE Highly-available Applications In The Cloud<\/title>\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\t \n\t \n\t \n \n \n \n \n \n \n \n\t \n\t \n\t \n