GlassFish to Payara Server Migration: Hazelcast as a Coherence ActiveCache Alternative

Uncategorized

In our continuing series on alternatives for commercial Oracle GlassFish features , in this article we are looking at Hazelcast – a replacement for Oracle’s Coherence ActiveCache.

 

{{cta(‘3382707d-3c20-4768-8acd-0a5b78c43d95’)}}

 

What is it?

By default, Oracle GlassFish Server uses in-memory HTTP session state replication for high availability clusters, courtesy of Project Shoal. In more complex deployment scenarios where scalability, reliability and performance requirements are more intense, this session replication mechanism might not be enough. Oracle GlassFish can integrate with Oracle Coherence (a proprietary in-memory data grid caching solution) as a replacement for the in-memory HTTP state replication provided by Shoal. This eases the burden on the server by offloading session caching to a separate layer, enables session caching algorithms and simplifies business logic. Oracle Coherence can also be used to cache application data in addition to HTTP session storage.

 

How can it be replaced?

This feature replacement is quite easy to implement with Payara Server, thanks to Hazelcast. Hazelcast is a data grid with distributed caching capabilities similar to Oracle Coherence and it is included by default with Payara Server.

With Oracle GlassFish Server, you had to purchase a separate license for Oracle Coherence, install the product and configure the integration of the server with Coherence per deployed application; meanwhile Payara Server comes with sensible defaults out-of-the-box; you don’t need to take extra steps to install or configure Hazelcast apart from the default values provided.

 

{{cta(’14a39eeb-3961-4ef3-8e0d-e4f82ed62c15′)}}

 

Using Hazelcast to store HTTP session data in stead of the standard shoal-based mechanism is simple: configure the persistence type of the cluster in the cluster-configAvailability ServiceWeb Container Availability section and set the Persistence Type element to hazelcast:

 

admin-console-screenshot.png

 

Keep in mind that Hazelcast must be enabled first in the cluster’s configuration for this feature to work. If you want to know more about Hazelcast’s configuration and other features, we encourage you to read the official documentation.

 

You can also use Hazelcast to store session state for Stateful EJB components and use it with JCache to store your own application data. This feature is over-and-above what was available in Oracle GlassFish Server so, in this regard, the available feature set is even bigger with Payara Server!

 

If you are using a cluster or Oracle Coherence instances to work with high replication demands over a WAN (or even the cloud), you can consider switching to Payara Scales. This is a licensed edition of Payara Server that comes integrated with the Hazelcast Enterprise High Density Memory Store. This product helps not only storing session data across a WAN but also provides disaster recovery for unhealthy nodes as well.

 

That’s all for this part – the fourth blog from the ‘alternatives for commercial Oracle GlassFish features’ series will be coming soon so watch this space!  Meanwhile, you can have a look here for the other posts from this series; and if you’re considering GlassFish to Payara Server migration, make sure to check out our Migration Guide.

 

 

 

Comments (2)

Post a comment

Your email address will not be published. Required fields are marked *

Payara needs the contact information you provide to us to contact you about our products and services. You may unsubscribe from these communications at any time. For information on how to unsubscribe, as well as our privacy practices and commitment to protecting your privacy, please review our Legal & Privacy Policy.

  1. Charl Fasching
    1. Jadon Ortlepp

      Thanks for the heads up! – I have fixed the link now.

Related Posts

4 minutes
Uncategorized

Leading the Way: Payara Platform Community 7 Beta Now Fully Jakarta EE 11 Certified

We’re excited to announce that Payara Platform Community 7 Beta application server is now fully certified as Jakarta EE 11 […]

What Is a Java Application Server? A Short Guide 6 minutes
Jakarta EE

What Is a Java Application Server? A Short Guide

Enterprise Java applications power global commerce, healthcare, government and countless other industries. These systems must be scalable, secure and […]

10 minutes
Uncategorized

Java’s 30th Anniversary: A Celebration of Legacy, Evolution and Community

May 2025 marks a monumental milestone in software development: Java turns 30. The impact of this language on the […]