Thursday, February 14, 2013

Oracle Coherence Integration and ADF BC Programmatic VO

Based on blog reader request for my previous post - Data Access Optimization in ADF with Oracle Coherence, I will describe sample application where Oracle Coherence caching functionality is integrated directly into ADF BC. This gives couple of benefits - single Model structure implementation with ADF BC for Coherence based data sources and non Coherence. ADF BC Data Control runtime performance is better comparing to POJO Data Control.

Here you can download sample application - ADFCoherenceApp_v2.zip. Application implements Employee serializable class optimized for Coherence caching - based on Coherence PortableObject:


This class is supported with Coherence POF for optimized serialization:


Sample application contains POF configuration for Employees class:


Main configuration file for Coherence contains reference related to POF configuration:


Coherence cache is constructed only one time per all user sessions from ADF BC AM prepareSession() method. This method is invoked by ADF BC framework automatically, during AM preparation and before any data is shown on UI - perfect place to populate Coherence cache:


Data from Coherence cache is displayed on ADF Faces UI through programmatic ADF BC VO. See another sample for ADF BC programmatic VO here - Fusion Middleware 11g Security - Retrieve Security Groups from ADF 11g. Rows for this programmatic VO are populated from Coherence cache, already initialized in overriden prepareSession() method:


Every attribute for each row is populated from the cache:


Application is started - Coherence cache is populated during AM initialization:


Data is loaded on ADF Faces UI from Coherence cache through programmatic ADF BC VO:


4 comments:

Dave Felcey said...

Hi Andrejus,

A very interesting post.

Dave

Andrejus Baranovskis said...

Thanks Dave.

I already did JMeter performance test and will post results in the next blog. VO based on Coherence cache performs faster than regular SQL based VO, as expected.

Andrejus

Anonymous said...

Hi Andrejus,
Very useful post indeed! But, I am wondering how it will work with WLS/ADF 12c. Coherence 12c is built-in and is initialized when Weblogic comes up, so will your POF configuration and serializable classes get picked up from web application?

Thanks,
Prasad

Andrejus Baranovskis said...

Hi,

I'm also wondering about it..., would be interesting to test.

Regards,
Andrejus