Lesson 2.3: Creating an enterprise data grid application

[Version 8.6 and later]To create an enterprise data grid application in which both Java™ and .NET clients can update the same data grid, you must make your classes compatible. In the getting started sample applications, the .NET sample application has aliases to match the Java defaults.

Procedure

Add class alias and field alias attributes to your .NET application.
You can add the class alias to the .NET application, the Java application or both. The .NET sample has aliases that match the Java defaults, therefore the Java application does not need an alias. The TestKey.cs and TestValue.cs files are in the net_client_home/sample/SimpleClient directory.
Figure 1. Class alias attribute in the TestKey.cs file
[ClassAlias( "com.ibm.websphere.xs.sample.gettingstarted.model.TestKey" )]
Figure 2. Class alias attribute in the TestValue.cs file
[ClassAlias( "com.ibm.websphere.xs.sample.gettingstarted.model.TestValue" )]
Related concepts[Version 8.6 and later]ClassAlias and FieldAlias annotations[Version 8.6 and later]Use ClassAlias and FieldAlias annotations to enable sharing of data grid data between classes. You can either share data between two Java classes or a Java and a .NET class.Related tasks[Version 8.6 and later]Defining ClassAlias and FieldAlias annotations to correlate Java and .NET classes[Version 8.6 and later]Use ClassAlias and FieldAlias annotations to enable sharing of data grid data between your Java and .NET classes.

Lesson checkpoint

You added class attributes to the .NET getting started application. As a result you can interoperate with the Java getting started application, creating an enterprise data grid.