Link Details

Link 873379 thumbnail
User 938353 avatar

By eren_avsarogullari
Submitted: Nov 04 2012 / 15:11

This article shows how to process Coherence events by using Map Triggers. Map Triggers are one of the most important features of Oracle Coherence to provide a highly customized cache management system. MapTrigger represents a functional agent that allows to validate, reject or modify mutating operations against an underlying map. Also, they can prevent invalid transactions, enforce security, provide event logging and auditing, and gather statistics on data modifications. For example, we have code that is working with a NamedCache, and we want to change an entry's behavior or contents before the entry is inserted into the map. This change can be made without modifying all the existing code by enabling a map trigger. There are two ways to add Map Triggers feature to application : 1) A MapTriggerListener can be used to register a MapTrigger with a Named Cache 2) The class-factory mechanism can be used in the coherence-cache-config.xml configuration file In the following sample application, MapTrigger functionality is implemented by following the first way. A new cluster called OTV, is created and User bean is distributed by user-map NamedCache object used among two members of the cluster. Used Technologies : JDK 1.6.0_35, Spring 3.1.2, Coherence 3.7.1 and Maven 3.0.2
  • 4
  • 0
  • 261
  • 70

Add your comment

Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Upvoters (4)

Downvoters (0)

    Apache Hadoop
    Written by: Piotr Krewski
    Featured Refcardz: Top Refcardz:
    1. Play
    2. Akka
    3. Design Patterns
    4. OO JS
    5. Cont. Delivery
    1. Play
    2. Java Performance
    3. Akka
    4. REST
    5. Java