Overview: Deploy applications to middleware servers (JBoss EAP, WildFly, Tomcat) with the IntelliJ IDE extension
In this lesson, you will learn how to use Server Connector tooling for IntelliJ to deploy applications to multiple application servers.
What you need to know
In order to get full benefit from taking this lesson, you need to know the basics of writing Java-based, Java Enterprise Edition (JEE) web applications.
What you’ll be doing
In this lesson, you will:
- Learn about the Server Connector tool for IntelliJ.
- Install the Server Connector tool.
- Use the Server Connector tool to start, stop, and deploy to your chosen application server.
- Learn how to trace and debug changes to your application.
- Discover other Server Connector tool functionalities.
How long will it take?
The entire path will take about 30 minutes.
What is a Runtime Server Protocol?
The idea of Language Server Protocol (LSP) has become increasingly important in recent years. Rather than create unique implementations to support a given programming language in each integrated development environment (IDE), developers can now design standalone applications with well-defined APIs and communication protocols to provide language support to any client anywhere.
Developers write these APIs and protocols for each IDE once, then provide a thin layer of LSP protocol to convert these results into information the IDE’s language support system can understand, like syntax highlighting and code completion.
Similar to the idea of an LSP, a Runtime Server Protocol (RSP) is an external process that provides support for locating and deploying runtime APIs and protocols to multiple application servers.
Rather than create WildFly or Apache Tomcat runtime support multiple times, middleware developers can now write the runtime support once, then provide a thin layer of RSP in any editor that communicates with the same background process.
How does the RSP work?
The RSP Server Connector tooling is driven by the RSP Servers view. The tool comes with an awareness of two different RSP servers:
- A Community Server Connector for use with application servers such as Apache Felix, Karaf, Tomcat, Glassfish, Jetty, and Websphere Liberty.
- An official Red Hat Server Connector with support primarily for WildFly and Red Hat Enterprise Application Platform (EAP).
The plug-in does not offer these two RSP servers, but shows you how to install them.
After you install a given RSP, you can interact with it. For example, you can ask the RSP to:
- Download or locate existing application servers.
- Start and stop those servers.
- Edit the server configurations.
- Add or remove deployments.
Install the IDE extension
Here are the steps to install Server Connector tooling for IntelliJ:
- Enter <Ctrl+Alt+S> (or <Command+Option+S on MacOS) to open the IDE settings.
Select Plug-ins, then search for Server Connector by Red Hat (Figure 1).
Once installed, the RSP Servers section will appear on the left of your workbench. Select Red Hat Server Connector (Figure 2).
Figure 2: Access the RSP Servers view and select Red Hat Server Connector.
RSP Installation
To fetch and install an RSP:
Select the name of your chosen RSP, then Download / Update RSP (Figure 3). This will fetch the RSP’s newest version of this and put it in a hidden folder in your home directory (~/.rsp/) where you store and share your configuration data.
Figure 3: Select the name of your chosen RSP, then Download / Update RSP. - Right-click the RSP again. It is now enabled for selection. This action will spin up the RSP as a background process.
Once started, you will see the RSP is now marked STARTED (Figure 4). Note: The status will be CONNECTED if you start the RSP outside of IntelliJ.
Figure 4: A RSP Server Connector in started mode If you started the RSP from IntelliJ, a terminal will appear with output from the RSP (Figure 5). The terminal can inform you of critical errors.
Figure 5: A server connector’s output after starting.