Working with caches
A JBoss Datagrid can be accessed in two ways. In the following section, we will explore cache management with Jboss datagrid in both Library and Client-Server topologies.
Library mode in Java SE
In Java SE, Infinispan can be used as a simple jar
dependency in your project. Some applications in the BeosBank landscape may want to keep the results of the MoneyTransfer
GetById
operation in an Infinispan/JBoss Data Grid cache to improve their performance.
How can this be implemented using JBoss Datagrid? While calling the web service, applications can receive output similar to the following:
<?xmlversion="1.0"encoding="UTF-8"?> <MoneyTransferStream> <moneytransfer> <amountExcludingFees>1500</amountExcludingFees> <amountExcludingFeesInReceiverCurrency>750000</amountExcludingFeesInReceiverCurrency> <amountIncludingFees/> <creditCardNumber>1111-2222-3333-4444</creditCardNumber> <fees>25.00</fees> <id>3<...