Oracle recently announced the discontinuation of commercial versions of Glassfish. With the OpenSource version, everything will be fine and it will remain a reflex implementation of Java EE. However, it is a matter of concern that the quality of the application server itself will begin to fall without the commercial version of the same code base and, accordingly, the enterprise quality for new versions of Glassfish will be unattainable. This is especially true of cases that developers do not think about, but in which problems appear in production. The Oracle WebLogic commercial product has nothing to do with Glassfish.
Many developers need to find a Java EE7 application server, which, on the one hand, will have an OpenSource version, and on the other hand, the opportunity to purchase a commercial version on the same code base.

')
This server was
WildFly 8 , fully compatible with the Java EE 7 standard (passing Java EE TCK 100%). Red Hat will sell JBoss with commercial support if necessary. The code base for both servers is the same. In addition, Arun Gupta, perhaps the main evangelist of the Java EE platform, has moved from Oracle to RedHat and strongly advises users to switch to Wildfly. There is no reason not to believe him.
In this article, we will look at the
WildFly 8 application server in the
InfoboxCloud cloud.

general information
Wildfly is not a new product. This is the rebranding and development of JBoss AS7 / EAP6 in the area of both administration and developer API. Wildfly 8 is built using Java SE 7 and requires Java SE7 (or higher) to work. This release is 100% Java EE 7 TCK. The minimum distribution size is 14 megabytes, which is ideal for building frameworks using Wildfly. And of course, there are tools available for integrating with the main Java IDE.
Administration changes
- The ability to associate administrative users with roles and delegate only the necessary management rights.
- Use the embedded high-performance, scalable web server Undertow.io, providing blocking and non-blocking APIs based on NIO. This web server can provide more flexibility due to the composition-based architecture. With it, you can build a web server by combining small event handlers.
- Wildfly 8 supports a rich set of control commands that have been added to the Command Line Interface, such as the ability to patch a modular server base.
- All protocols in Wildfly are multiplexed into 2 ports: 8080 for applications and 9990 for management. This is done to ensure that less time administrators spend on setting up a firewall.
New Java EE 7 APIs
A very important improvement was the support of Java Enterprise API 7 (100% TCK, full support for the standard).
Some major improvements included in Wildfly:
- WebSocket 1.0 support. Before HTML5, the traditional request-response model was used in HTTP. It was necessary to constantly poll the server for changes. The WebSocket protocol represents a full duplex channel between the client and the server with no problems with connection delays. Using this technology together with other client technologies, such as JavaScript and HTML5, we can create powerful and beautiful applications in the browser.
- Java API for JSON Processing 1.0 (JSON-P). This API set enhances the capabilities of applications using JSON by defining new APIs for parsing, generating, transforming, and querying JSON documents. Therefore, you can build an object JSON model (like DOM for XML) and use it in streaming mode (as in XML with StAX).
- Batch Application API 1.0. This API was designed to standardize batch processing for Java applications. You might think of this technology for use instead of the old long-running procedures for large amounts of data, managed by shell scripts or obsolete languages (COBOL).
- Concurrency Utilites for Java EE 1.0. This is a Java SE Concurrency Utility extension (JSR-166) that provides a simple and standard API for using multithreading from JavaEE components while preserving the integrity of the container.
- There are many other interesting innovations such as JAX-RS 2.0, JMS 2.0, etc., which you can simply read in the official manual.
Installing Wildfly 8 Final in InfoboxCloud IaaS
All the examples in the article were created for the cloud servers of the Cloud Designer
InfoboxCloud .
Creating a server in InfoboxCloud
To work you need to have an account in the service
InfoboxCloud Cloud Designer (
Trial version ). Open
the control panel Cloud constructor . Go to the "Cloud Designer" section.

In this section, you see a list of your servers. Create a new one.

Choose the necessary server settings. In InfoboxCloud, you can change the CPU, RAM, disk, etc. independently of each other, creating a server that is suitable for you.

Select the OS for the server (it will be updated during the Wildfly installation process, and the latest versions of the OS templates will appear soon).

The server is ready to create. We create.

Data for access to the server will come to you by email. If necessary, the password can be changed in the server settings in the control panel of the Cloud designer.
Connect to the server via ssh.

To install Wildfly 8 Final in InfoboxCloud, just run the command (for CentOS, Ubuntu or Fedora):
wget repository.jelasticloud.com/scripts/wildfly8/linux64/wildfly-standalone && chmod +x wildfly-standalone && ./wildfly-standalone && rm -rf wildfly-standalone

Installation will take some time. The OS will be updated, the latest version of the JDK will be installed, WildFly will be installed, WildFly will be created for the application server and a service will be registered for the OS autostart.
This is not a standard command. In fact, our script is downloaded to the server and does everything automatically. If you wish, you can see the script and understand the process of manual installation of WildFly, but for a quick start, manual installation takes too much time for the user.
You can check the installation correctness by going to <ip – server address>: 8080

The address <ip – server address>: 9990 is the WildFly management console.

To use the management console, you must create a management user. For security reasons, the default password is not set.
Adding users to WildFly
In order to add a user to WildFly, you need to run
add-user.sh from the
bin directory. You can create users of applications (applications) and users to manage WildFly (management).
You can create users in non-interactive mode:
add-user.sh -m -u {username} -p {password}
After adding a management user, you can enter the management console.

CLI
WildFly includes the Command Line Interface (CLI). You can start it from the bin directory with the command:
./jboss-cli.sh
You can then connect to a local or remote WildFly instance. To connect to the local, enter the
connect
command. You can, for example, restart the WildFly server with the
restart
command. In non-interactive mode, it will look like this:
./jboss–cli.sh -c --command=restart
.
To connect to a remote WildFly instance after connect, you need to write the IP address of the server we want to manage.
Successful use of WildFly in the
InfoboxCloud cloud. In the following sections, we’ll talk about more complex Wildfly deployment scenarios and the development of Java EE 7 applications.
Posted by:
Yuri Trukhin