Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Java EE 7 Development with WildFly
Java EE 7 Development with WildFly

Java EE 7 Development with WildFly: Leverage the power of the WildFly application server from JBoss to develop modern Java EE 7 applications

eBook
AU$41.99 AU$60.99
Paperback
AU$75.99
Subscription
Free Trial
Renews at AU$24.99p/m

What do you get with a Packt Subscription?

Free for first 7 days. $24.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
Table of content icon View table of contents Preview book icon Preview Book

Java EE 7 Development with WildFly

Chapter 2. Your First Java EE Application on WildFly

This chapter will provide you with a crash course in the new application server so that you will be able to create a deployable skeleton of our first Java EE 7 application in the next chapter. More specifically, we will cover the following topics:

  • An introduction to the WildFly 8 core concepts
  • The anatomy of the WildFly 8 filesystem
  • An introduction to the available management instruments
  • Deploying your first Hello World application

WildFly 8 core concepts

Now that we have downloaded and installed WildFly 8, it is worth spending a few minutes familiarizing ourselves with some basic concepts. The architecture and most of the core ideas are taken straight from JBoss AS 7; although, there are some new mechanisms that were introduced with the newest version (for example, role-based security for the management system, reduced number of used ports, and a new patching system). Just like JBoss AS 7, WildFly can be run in two modes: the standalone mode and domain mode.

In the standalone mode, each WildFly instance is an independent process (similar to the previous JBoss AS versions, such as Version 4, Version 5, Version 6, and the standalone mode in Version 7). The standalone configuration files are located under the standalone/configuration directory of the application server.

In the domain mode, you can run multiple application servers and manage them from a central point. A domain can span multiple physical (or virtual) machines...

The WildFly 8 directory layout

The difference between standalone and domain reflects in the directory layout of the application server is shown in the following diagram:

The WildFly 8 directory layout

As you can see in the preceding diagram, the WildFly directory layout is divided into two main parts: the first one is pertinent to a standalone server mode and the other is dedicated to a domain server mode. Common to both server modes is the modules directory, which is the heart of the application server.

WildFly is based on the JBoss Modules project, which provides an implementation of a modular (nonhierarchical) class loading and an execution environment for Java. In other words, rather than a single class loader that loads all JARs into a flat class path, each library becomes a module, which only links to the exact modules it depends on and nothing more. It implements a thread safe, fast, and highly concurrent delegating class loader model, coupled with an extensible module resolution system. This combines to form a...

Managing the application server

WildFly provides three different means to configure and manage servers: a web interface, a command-line client, and a set of XML configuration files. No matter what approach you choose, the configuration is always synchronized across the different views and finally persisted to the XML files. After saving the changes using the web interface, you will instantly see an updated XML file in your server's configuration directory.

Managing WildFly 8 with the web interface

The web interface is a Google Web Toolkit (GWT) application, which can be used to manage a standalone or domain WildFly distribution. The GWT application known in JBoss AS 7 has been updated to match the new visual theme. It was also extended with new features, such as role-based security and patching support. By default, it is deployed on a localhost on the 9990 port; the property that controls the port socket binding is jboss.management.http.port, as specified in the server configuration...

Launching the web console

Now that we have added at least one user, we can launch the web console at the default address, http://<host>:9990/console (keep in mind that you have to start the server first, for example, with standalone.bat or standalone.sh).

The login screen will be prompted. Enter data into the User Name and Password fields, which we had formerly created. This is shown in the following screenshot:

Launching the web console

Once logged in, you will be redirected to the web administration main screen. The web console, when running in the standalone mode, will be divided into three main tabs: Configuration, Runtime, and Administration. This is shown in the following screenshot:

Launching the web console

The Configuration tab contains all the single subsystems that are part of a server profile. So, once you select the Configuration tab on the left frame, you can access all the subsystems and edit their configurations (in the previous screenshot, we saw the Data Sources subsystem).

The other tab named Runtime can be used for...

Deploying your first application to WildFly 8

In order to test launch our first application, we will create a HelloWorld web project using Eclipse. The main part will be a servlet class, used to generate HTML markup. So, launch Eclipse and choose to create a new web project by navigating to File | New | Dynamic Web Project. This is shown in the following screenshot:

Deploying your first application to WildFly 8

Choose a name for your application and check the Use default location box if you want to create your project within the same location of your Eclipse workspace. If you have correctly configured a new WildFly server in Eclipse, you should see the WildFly 8.0 Runtime option selected by default, and Target Runtime and Default Configuration for WildFly 8.0 Runtime preselected in the Configuration box.

Select 3.1 as the Dynamic web module version, which makes development easy by using the Servlet 3.1 specifications, and also leave the EAR membership and Add project to working sets checkboxes unselected.

Click on Finish to continue.

Now...

WildFly 8 core concepts


Now that we have downloaded and installed WildFly 8, it is worth spending a few minutes familiarizing ourselves with some basic concepts. The architecture and most of the core ideas are taken straight from JBoss AS 7; although, there are some new mechanisms that were introduced with the newest version (for example, role-based security for the management system, reduced number of used ports, and a new patching system). Just like JBoss AS 7, WildFly can be run in two modes: the standalone mode and domain mode.

In the standalone mode, each WildFly instance is an independent process (similar to the previous JBoss AS versions, such as Version 4, Version 5, Version 6, and the standalone mode in Version 7). The standalone configuration files are located under the standalone/configuration directory of the application server.

In the domain mode, you can run multiple application servers and manage them from a central point. A domain can span multiple physical (or virtual) machines...

Left arrow icon Right arrow icon

Description

If you are a Java developer who wants to learn about Java EE, this is the book for you. It's also ideal for developers who already have experience with the Java EE platform but would like to learn more about the new Java EE 7 features by analyzing fully functional sample applications using the new application server WildFly.

What you will learn

  • Design reliable and efficient applications based on Enterprise Java Beans and Context and Dependency Injection
  • Set up and manage your own WildFly application server for different development scenarios
  • Store your data without binding yourself to a specific database provider using the Java Persistence API
  • Create messagebased applications using Java Messaging System and integrate thirdparty systems into them using Java Connector Architecture
  • Distribute and secure your enterprise applications by using builtin mechanisms from WildFly and Java EE 7
  • Decide between using SOAP and JAXRS web services to create your external API
  • Discover the new side of web applications by exploring WebSockets and their usage scenarios
  • Test your application using a real environment with Arquillian

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Dec 31, 2014
Length: 434 pages
Edition : 1st
Language : English
ISBN-13 : 9781782171980
Vendor :
Red Hat
Languages :
Tools :

What do you get with a Packt Subscription?

Free for first 7 days. $24.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details

Publication date : Dec 31, 2014
Length: 434 pages
Edition : 1st
Language : English
ISBN-13 : 9781782171980
Vendor :
Red Hat
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
AU$24.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
AU$249.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just AU$5 each
Feature tick icon Exclusive print discounts
AU$349.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just AU$5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total AU$ 227.97
Java EE 7 Development with WildFly
AU$75.99
WildFly Performance Tuning
AU$75.99
WildFly Configuration, Deployment, and Administration - Second Edition
AU$75.99
Total AU$ 227.97 Stars icon

Table of Contents

15 Chapters
1. Getting Started with WildFly Chevron down icon Chevron up icon
2. Your First Java EE Application on WildFly Chevron down icon Chevron up icon
3. Introducing Java EE 7 – EJBs Chevron down icon Chevron up icon
4. Learning Context and Dependency Injection Chevron down icon Chevron up icon
5. Combining Persistence with CDI Chevron down icon Chevron up icon
6. Developing Applications with JBoss JMS Provider Chevron down icon Chevron up icon
7. Adding Web Services to Your Applications Chevron down icon Chevron up icon
8. Adding WebSockets Chevron down icon Chevron up icon
9. Managing the Application Server Chevron down icon Chevron up icon
10. Securing WildFly Applications Chevron down icon Chevron up icon
11. Clustering WildFly Applications Chevron down icon Chevron up icon
12. Long-term Tasks' Execution Chevron down icon Chevron up icon
13. Testing Your Applications Chevron down icon Chevron up icon
A. Rapid Development Using JBoss Forge Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.6
(7 Ratings)
5 star 71.4%
4 star 14.3%
3 star 14.3%
2 star 0%
1 star 0%
Filter icon Filter
Top Reviews

Filter reviews by




Swerts Dec 21, 2018
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Easy to read, this book is very helpful for those who have a previous knowledge of Java language, and wants to start developing a complete enterprise application.
Amazon Verified review Amazon
Nikolas Jan 22, 2018
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Ich habe das Buch als Hilfestellung zu einem Studienprojekt gekauft und als ich auf meine Kosten gekommen bin, war noch viel Buch übrig!Allerdings behandelt das Buch nicht die aktuelle Version von Wildfly, sondern 8.0. In meinem Fall war es aber die Richtige.Es wäre vielleicht noch anzumerken, dass das Buch ziemlich schlecht gebunden ist; bei meinem Exemplar fingen schon nach 10 Tagen an, einzelne Seite herunterzufallen. Ich habe den Kauf trotzdem nicht bereut.
Amazon Verified review Amazon
Nubye Oct 25, 2016
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I recommend it. Be carefull dont lost yourself when read Java implentations (1st chapters), they are enabled capabilites on Java EE.
Amazon Verified review Amazon
Lorenzo Bettini Feb 27, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This book not only explains the features of Wildfly: it also introduces J2EE main concepts and it does so in all the chapters. Indeed each chapter starts with a description of the functionality, and then proceeds with an example of such functionality.I had never used J2EE technlogies before, and this book surely helped me started with web application development with J2EE and Wildfly.What I appreciated most is the chapter on testing; it's only unfortunate that it comes really too late in the book (it's the last chapter); I would have preferred to see that chapter quite early in the book, and then see tests in all the chapters.I found the chapter about "Securing Wildfly Applications" a little bit confusing in many parts... I had the overall pictures but it probably tries to give too many details in the space of a single chapter, and most of such details are rather confusing.All in all, I think this is a nice book and I suggest it to anyone who's willing to start developing with Wildfly.
Amazon Verified review Amazon
joedayz Mar 15, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Nice Introduction about JAVA EE 7 APIs.Starts with the installation of tools in the chapter 01.Ideal for have a successful experience with the source code of each chapter.The chapter 2 explains how to use the wildfly web console and command line interface, configure anddeploy your applications. That's is a crash course of wildfly administration that sometimes appears in other book.Good idea for me.I enjoy find a book that explains step by step some topic. The creation of the lab using EJBs and Maven is amazing.CDI is not a easy topic. The explanation is simple and enables to understand the dependency injection in a JAVA EE 7 context.Configure and use Richfaces permit to understand how to use a MVC framework like JSF.The book continues with the Persistency and how to configure JPA, reverse engineered, use producers, servicesand controllers. Thats pretty cool for have the whole figure.The chapter 6 is my favorite because you can learn to use messaging with wildfly or external message brokers likeactivemq and hornetQ.If you are interestd in learn to configure and createweb services SOAP and REST the chapter 7 explains with granular detail these topics.If you are tired of see the chat demo with websockets. That's a great demo aboutpush notification of seats free or busy.Finally if you want to administrate your wildfly like a boss and monitor the health of it. The chapternine will be very util for you, because if you are a good programmer, you must to do control of your Java EE stack.I love PicketBox thanks to it chapter. Put secure to your applications of a easy way.I didn't find a chapter about Clustering in other books. This is a topic that many beginners doesn't know.For this reason, I enjoyed this chapter and learned new features.Create Batch applications is fundamental for long tasks in the enterprise world. Very nice tofind this lab in the chapter 12.I used Junit long time ago, but the testing chapter about arquillian shows me a great way for dointegral test. No more mocks.Finally the appendix about Jboss Forge similar to ROO but with focus to JAVA EE 7. Pretty cool.In general, I recommend this book if you think to develop Java EE applications seriously.Regards from PERU JUG.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.