When True Cache is configured, applications must decide whether to query data from True Cache or the primary database. There are two ways to do this:

The JDBC method is illustrated by the application code in the diagram.

  1. The client application creates a logical connection to connect to the primary database application service called SALES by using the connection's useTrueCacheDriverConnection parameter.
  2. The application flags the logical connection as setReadOnly(true) or setReadOnly(false) to direct SQL statements to True Cache or the primary database, respectively. For each logical connection, the JDBC Thin driver internally maintains two physical connections: one to the primary database and one to True Cache. Both connections were associated when the database application service SALES was created.