NCache 4.4 - Online Documentation

Registering Classes for Portable Data Sharing

 
There are situations when applications form the same/different platforms are interested to share cached data among them. For this purpose, dynamic data sharing can be used. It shares the data between various versions of an object, either from the same platforms or different platforms at runtime.  Classes for portable data sharing can be registered in following ways:
 
Using NCache Manager
 
  • Click on the cache name in Cache Explorer to open cache settings
  • Go to the Data Sharing tab.
  • Click the Add Shared Types button.
 
 
  • Select Data Sharing Classes dialog will open. Specify the name of data sharing type.
 
 
  • Click Browse to browse for required assembly (.exe, .dll or .jar file).
 
 
  • Selected Assembly and all its classes will appear in Loaded Classes section. Select the required class and add it in List of selected Classes section using Add Class button.
 
 
  • Repeat step 5 and 6 to select jar file and Java class.
 
 
  • Click OK after adding classes of .NET and Java. The opened wizard will close and selected classes of both platforms will appear in Shared Types section under your given data type name.
 
 
  • Now map the attributes of both platforms classes. Click on the added data share type ‘Customer’, all of its attributes will be listed in Common Attributes section.
 
 
  • Click on a class listed under ‘Customer’ data type. Its attributes will be listed down in Selected Class Attributes section.
 
 
  • A drop down will appear in the Selected Class Attributes section in front of each attribute of common attributes list. If .NET class is selected, select the required Java attribute of the Java class to map it against .NET attribute. Data types of attributes to be mapped should be same or compatible. The compatible .NET and Java data types mapping tables are given below:
 
 
 
  • Map all the attributes using the drop down list.
 
 
  • Right click the cache in Cache Explorer and select Apply Configuration option.
 
 
See Also