Skip Headers
Oracle® Fusion Middleware Using ActiveCache
11g Release 1 (10.3.4)

Part Number E16517-02
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
View PDF

4 Accessing and Retrieving Relational Data

TopLink Grid marries the standardization and simplicity of application development using the Java Persistence API (JPA) with the scalability and distributed processing power of Oracle's Coherence Data Grid. Developers can leverage their investment in JPA and take advantage of the scalability of Coherence. Standard JPA applications interact directly with their primary data store, typically a relational database, but with ActiveCache, TopLink Grid developers can choose to store some or all of their domain model in the Coherence data grid.

Using TopLink Grid with Application Server-Scoped Coherence Clusters

If you are using TopLink Grid to store JPA Entities in Coherence caches, follow these steps:

  1. Follow the instructions in Configuring Application Server-Scoped Coherence Clusters to include coherence.jar and active-cache.jar in the system classpath.

  2. Edit your WebLogic Server system classpath to include toplink-grid.jar in the system classpath.

Using TopLink Grid with EAR-Scoped Coherence Clusters

If you are using TopLink Grid to store JPA Entities in Coherence caches, follow these steps:

  1. Follow the instructions in Configuring EAR-Scoped Coherence Clusters to deploy the coherence.jar and active-cache.jar files as shared libraries.

  2. Use either of the following methods to deploy toplink-grid.jar as a shared library.

    • Use the WebLogic Server Administration Console or the command line to deploy toplink-grid.jar as a shared library.

      java weblogic.Deployer -username <> -password <> -adminurl <> -deploy toplink-grid.jar -name toplink-grid -library -targets <>
      

      If you deploy toplink-grid.jar as a shared library, refer to it in the weblogic-application.xml file as a library-ref. Example 4-1 illustrates the toplink-grid.jar referenced in the weblogic-application.xml file.

      Example 4-1 Reference to toplink-grid.jar in the weblogic-application.xml File

      <weblogic-application>
      ...
        <library-ref>
          <library-name>coherence</library-name>
        </library-ref>
         ...
        <library-ref>
          <library-name>active-cache</library-name>
        </library-ref>
        <library-ref>
          <library-name>toplink-grid</library-name>
        </library-ref>
      ...
      </weblogic-application>
      
    • Copy toplink-grid.jar to the application EAR's APP-INF/lib folder. However, the preferred way is to deploy it as a shared library.

Using TopLink Grid with WAR-Scoped Coherence Clusters

If you are using TopLink Grid to store JPA Entities in Coherence caches, follow these steps:

  1. Follow the instructions in Configuring WAR-Scoped Coherence Clusters to deploy the coherence.jar and active-cache.jar files.

  2. Use the WebLogic Server Administration Console or the command line to deploy toplink-grid.jar. The following is a sample command line:

    java weblogic.Deployer -username <> -password <> -adminurl <> -deploy toplink-grid.jar -name toplink-grid -library -targets <>
    
  3. Import toplink-grid.jar as an optional package in the manifest.mf file of each module that will be using Coherence. As an alternative, you can copy it to each of the application WAR's WEB-INF/lib directories.

    Example 4-2 illustrates a sample manifest file.

    Example 4-2 Manifest File with coherence, active-cache, and toplink-grid

    Manifest-Version: 1.0
    Extension-List: coherence active-cache toplink-grid
    coherence-Extension-Name: coherence
    active-cache-Extension-Name: active-cache
    toplink-grid-Extension-Name: toplink-grid