Creating an RPC Converter
Some types of classes require special handling by the RPC Adapter. For that purpose, we can create an RPC Converter.
For example, the getTransTime method of the Transaction entity class returns a java.util.Date, but the JSON result is an OpenJPA subclass named org.apache.openjpa.util.java$util$Date$proxy.
To create an RPC Converter, do these steps:
| Open the RPC Adapter Configuration Editor.
|
| Expand RPC Adapter Æ Converters, and click Add.
|
| In the Add Item dialog, select Converter (the only choice), and click OK.
|
| Select the new empty entry, and in the Details pane (Figure | 9-13), enter:
|
Bean: org.apache.openjpa.util.java$util$Date$proxy
|
Converter: com.ibm.websphere.rpcadapter.converters.util.Date
|
Figure 19-13 RPC Adapter: Converter Details
| Save and close the editor.
|