4.5. Deploy Web Applications on WebLogic Server (Remote Client-Server Mode)

Red Hat JBoss Data Grid supports the WebLogic 12c application server in Remote Client-Server mode. The following procedure describes how to deploy web applications on a WebLogic server.

Procedure 4.2. Deploying Web Applications on a WebLogic Server

  1. Configure JBoss Data Grid in Remote Client-Server mode, define cache, cache container, and endpoint configuration. After configuration, start JBoss Data Grid to confirm that the Hot Rod endpoint is listening on the configured port. For information about configuring JBoss Data Grid in Remote Client-Server, see Chapter 6, Run Red Hat JBoss Data Grid in Remote Client-Server Mode.
  2. Create a web application and add the infinispan-client-hotrod library as a dependency if Maven is used.
  3. Create a weblogic.xml deployment descriptor with the following elements in it:
    <?xml version="1.0" encoding="UTF-8"?>
    <weblogic-web-app
            xmlns="http://www.bea.com/ns/weblogic/90"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:schemaLocation="http://www.bea.com/ns/weblogic/90 http://www.bea.com/ns/weblogic/90/weblogic-web-app.xsd">
        <container-descriptor>
            <prefer-web-inf-classes>true</prefer-web-inf-classes>
        </container-descriptor>
    </weblogic-web-app>

    Note

    The prefer-web-inf-classes class indicates that the libraries and classes in the WEB-INF/lib folder are preferred over the default libraries bundled in the WebLogic server. For example, the commons-pool.jar file in the WebLogic server has version 1.4 and is automatically loaded by the classloader, however the Hot Rod client uses a newer version of this library.
  4. Add deployment descriptor file in the WEB-INF folder.
  5. Ensure that the infinispan-client-hotrod dependency is added to the pom.xml file, then use a Maven plugin to create a web archive. These dependencies ensure that the required libraries (infinispan-commons, infinispan-client-hotrod, commons-pool, jboss-logging, and jboss-marshalling-osgi) are included.
    Alternatively, create the web archive manually and add all the required libraries.
  6. Deploy the application in the WebLogic server and verify that the Hot Rod client embedded inside the web application connects to the remote JBoss Data Grid server.