What Is Payara Embedded?

Payara

The Payara Platform contains many products and some you may not have heard of! For example, have you heard of Payara Embedded Full Profile or Payara Embedded Web Profile?

Here’s a full list of Payara Platform products:

The first three products are probably well known by most of you. Payara Server is a more traditional application server that you install, configure, and deploy Jakarta EE applications on. Payara Micro is a runtime capable of running Jakarta EE Web Profile-based applications without the need for a separate configuration step.

But what is Payara Embedded?

Payara Embedded

As you can guess from the name, it allows you to embed the Payara Server code into a Java application. With a few lines of Java code, you can start a Payara Server instance with your application and start responding to user requests. The functionality of this embedded version is the same as the standalone version. Payara Embedded is a specific packaging of Payara Server so that you can use it as a project dependency and it has some additional classes and methods to start up the Payara Server instance.

So in theory, you can also create some clusters using the Deployment Group functionality but that is not the intention of the Payara Embedded edition. In this blog, I discuss the two common use cases for Payara Embedded.

Bundle your Application

There are situations that the installation of the Payara Server and the deployment of the applications cannot be done on a central infrastructure. Sometimes it can be more reliable to have an installation in all your shops, for example, instead of a central one.

In this case, you can bundle Payara Server with the application within a single application, which makes it easier for installing it. Instead of having the three steps, installing Payara Server, configuring the environment, and deploying the application, you can do all those steps within the application containing Payara Embedded. You only need to start the application and the system is ready to respond to user requests.

Using Payara Micro for this scenario is easier, so unless you need some specifications that are only available in the Full Profile, like the SOAP support, our recommendation is to create an uber jar with Payara Micro and your application for this scenario rather than use Payara Embedded.

You can have a look at the blog Using Payara Embedded with Maven for some more details.

Integration Testing

When performing integration testing, we need to deploy the application to the server and verify the behavior of the code we have written. You can use a standalone installation of Payara Server for that but sometimes you can have issues that the cleanup is not always done correctly when there is a test failure. Other tests can fail from that point on because the environment is no longer in the state you expect it to be.

Starting Payara Server for testing can be done easier in the embedded form. You can start it up at the beginning of the test and verify the functionality. You can start a clean instance for each test and thus you will not have any issues because of an unexpected state of the environment.

Starting a Payara Embedded version can also be done using the Arquillian connector we have developed. In that case, you don’t have to code anything, you perform the necessary configuration. The Embedded instance is started, the artifact deployed to it, and tested out. You can read more about our Arquillian connector for Payara Embedded on the documentation page.

 

Comments (0)

Post a comment

Your email address will not be published. Required fields are marked *

Payara needs the contact information you provide to us to contact you about our products and services. You may unsubscribe from these communications at any time. For information on how to unsubscribe, as well as our privacy practices and commitment to protecting your privacy, please review our Legal & Privacy Policy.

Related Posts

payara qube logo 5 minutes
Payara

Payara Cloud Is Now part of Payara Qube family of Unified Platforms for Enterprise Java

Payara Cloud is becoming part of Payara Qube family of Java application deployment runtimes. This move reflects how the […]

Payara promotional graphic showing transition from Spring to Jakarta EE, including technology logos, a code icon and arrows leading from Spring to Jakarta EE. 6 minutes
Jakarta EE

From Spring Boot To Jakarta EE 11: How Payara Starter Eases The Transition

If you’ve been living in the Spring ecosystem, you’re used to fast project setup. Spring Initializr gives you a […]

Promotional graphic for a podcast episode titled “Why Open Source is the Future of Business Innovation - A conversation with Arun Gupta”. The podcast is hosted by Payara Community. The right side features a photo of the speaker, Arun Gupta, labeled as a “VP, Developer Experience at JetBrains”. The design uses dark blue and teal backgrounds with coral and fish illustrations. 2 minutes
Community

Payara Podcast – Why Open Source is the Future of Business Innovation – A Conversation with Arun Gupta

Open source is no longer a developer-only concern — it’s at the heart of how modern businesses innovate, build […]