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

Migration

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

Image promoting a Payara blog with an illustration of a document with checkmarks and a magnifying glass. 5 minutes
Jakarta EE

Why Jakarta EE Standards Make Legacy App Modernization Simple

Legacy Java applications built on enterprise standards don’t have to be roadblocks to modernization. When applications follow established specifications […]

JBoss ELS Decoded 5 minutes
Jakarta EE

JBoss ELS Decoded: What Extended Lifecycle Support Really Means for Your Java Applications​

If your Java EE 8 applications run on Red Hat JBoss Enterprise Application Platform (EAP) 7, you can’t afford […]

Application Modernization 11 minutes
Migration

Legacy Application Modernization Best Practices

Modernizing legacy applications might sound like a dry, box-ticking IT initiative, but let’s be real: for most dev teams, […]