Skip to content

AnthonyDurussel/ejb-multi-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ejb-multi-server: EJB Communication Across Servers example for Dynatrace

The ejb-multi-server project provide an example of Remote EJB Calls made from standalone client to Widlfly Server version 17.0.0

What is it?

The ejb-multi-server quickstart demonstrates communication between applications deployed to different {productNameFull} servers. Each application is deployed as an EAR and contains a simple EJB bean. The only function of each bean is to log the invocation.

This example consists of the following Maven projects, each with a shared parent:

Project Description

app-main

An application that can be called by the client. It can also call the different sub-applications.

app-one

app-two

These simple applications contain one or two EJB. The EJB simply logs a statement on a method call and returns a text.

client

This project builds the standalone client and executes it.

The root pom.xml builds each of the subprojects in an appropriate order.

Start with a Clean Server Install

It is important to start with a clean version of Wildfly server version 17.0.0. Make sure you unzip or install a fresh Wildlfy instance

to start the server run the following command:

For Linux/Mac User

$ __{jbossHomeName}__/bin/standalone.sh

For Windows user

$ __{jbossHomeName}__/bin/standalone.bat

Build and Deploy the Quickstart

  1. Make sure you have started the wildfly server successfully as described above.

  2. Open a terminal and navigate to the root directory of this quickstart.

  3. Type this command to build the artifacts.

    $ mvn clean install

    You should see BUILD SUCCESS at the end of the build SUCCESS messages for each component.

  4. In the same terminal, deploy the applications using the following command.

    $ mvn wildlfy:deploy

    This deploys the app-*.war files to the server.

Access the Remote Client Application

This example shows how to invoke an EJB from a remote standalone application.

  1. Make sure that the deployments are successful as described above.

  2. Navigate to the quickstart client/ subdirectory.

  3. Type this command to run the application:

    $ mvn exec:java

    The client will output the result from the server

    If you monitor these calls with Dynatrace you should be able to see the EJB call made on AppOne and AppTwo but the one made on AppOneRp which use ejb-jar.xml to expose the EJB to wildfly server.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages