Deploying Party Microservice on J2EE

This section explains how to deploy the Party microservice on the J2EE. To do so, you need to perform the following tasks:

Deployment Artefacts

The folder structure of Party Microservice is available as a single release bundle, ms-party-package-j2ee-<release number>.zip.

After extracting the build, the zip file will contain a .ear file named ms-party-package-j2ee-<release number>.ear. The .ear file can be deployed on the J2EE compliant application server.

Deploying Party Microservice on J2EE Compliant Application Server

Prerequisites

You must set up the following before deploying Party Microservice on J2EE Compliant Application Server:

As a one time setup, execute setup.bat/setup.sh in the cql folder to create database, collections, and reference data(master data) are loaded into the Mongo Server for the Party microservice.

  • For Windows : setup.bat
  • For Linux : setup.sh

To deploy the Party microservice on a J2EE Compliant Application Server, follow these steps.

  1. To create the database and collections in the Mongo server for Party microservice, run the DB scripts in the cql folder.
  2. Open the EAR file by using the archive readers.
  3. In all the WAR files, go to \ms-party-package-j2ee.ear\xxxx.war\WEB-INF\classes\properties\ and update the following properties:

    api.properties

    MONGODB_CONNECTIONSTR=mongodb://localhost:27017,localhost:27018,localhost:27019
    temn.msf.stream.kafka.bootstrap.servers=localhost:9092

    commandIngester.properties

    MONGODB_CONNECTIONSTR=mongodb://localhost:27017,localhost:27018,localhost:27019
    temn.msf.schema.registry.url=http://schema-registry:8081
    temn.msf.stream.kafka.bootstrap.servers=localhost:9092
    PropertyDescription
    MONGODB_CONNECTIONSTRIt notifies the connection string of Mongo server to the API server.
    temn.msf.schema.registry.url=http://schema-registry:8081It points to the schema registry of kafka. You can use an IP address or localhost to point to it.
    temn.msf.stream.kafka.bootstrap.servers=kafka:29092It connects to the bootstrap server URL. You can use either IP address with port or kafka:29092 to connect the URL.
  4. Enable JWT Authentication in api.properties.
  5. Deploy the J2EE artefact (.ear) in an application server.
    • For JBoss, download the artefact to the jboss/standalone/deployments folder.
    • For WebLogic, go to the http://localhost:9001/console URL. Based on the URL configured while installing the server, and using the Install button, deploy the artefact.
  6. After the WAR file is deployed, check the APIs in the package.

    The structure of the URL of APIs is as follows.

    Base Path: http://<IP_ADDRESS>:<PORT>/<context-root>/api/<version>/

    For example, http://localhost:9089/ms-party-api/api/v1.0.0/

    The resource path of the endpoint is available in the swagger document of the respective APIs.

    A sample endpoint of the party could be http://localhost:9089/ms-party-api/api/v1.0.0/party/parties.


Bookmark Name Actions
Feedback
x