Oracle Coherence Simple Servlet/JSP Example

0

Oracle Coherence Example

In this article, we are going to implement Oracle Coherence with Servlet for the basic knowledge. Have you heard about the Oracle Coherence yet? If yes, then skip the introduction and move to implementation part.

You can see the comparison of Oracle coherence with Ehcache and Redis before using it.

What is Oracle Coherence?

It is a industry level in-memory caching system which backed by Oracle. It is distributed caching solution. It is use for the extreme scaling, performance increment and improve reliability.

Oracle Coherence Simple Servlet/JSP Example

Coherence Hello world with JSP

To introduce fundamental concept of oracle coherence application, we will be building simple coherence hello world standalone java application. After running this example, you will understand basics of oracle coherence and could move towards integrating in your own application.

File Structure of Project

Create maven project name: coherence-example below is final structure of the project:

"File

pom.xml

Define your cache:

Caches should be defined in cache deployment descriptor it should be refer by the name of your application. This makes easy for configuration changes without changing any application code. We will create distributed cache name product. To define distributed cache create XML file name: coherence-config.xml inside src/main/resources directory and copy paste below code:


Define and configure cluster: Create XML file name tangosol-coherence-override.xml inside src/main/resources directory and copy paste below code:


Note: You can choose any cluster name as you like and address should be chosen between multicast address which ranges from the 224.0.0.0 through 239.255.255.255. You could choose any unique number as your port. Save this file on same location where coherence-config.xml was saved.

Create Cache Service




That’s it for this project. Below is common exception occurs when configure with Coherence. If you want source code of this example then contact us at [email protected]

Note:

com.tangosol.net.RequestPolicyException: No storage-enabled nodes exist for service

If you get above exception then you’ve to change in web.xml


 

0
Summary
Oracle Coherence Simple Servlet/JSP Example
Article Name
Oracle Coherence Simple Servlet/JSP Example
Description
In this article, we are going to implement Oracle Coherence with Servlet for the basic knowledge. Have you heard about the Oracle Coherence yet?
Author
Publisher Name
DasJS
Publisher Logo