Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
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
€8.99 €32.99
Paperback
€41.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
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
Estimated delivery fee Deliver to Denmark

Premium delivery 7 - 10 business days

€17.95
(Includes tracking information)

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 Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Estimated delivery fee Deliver to Denmark

Premium delivery 7 - 10 business days

€17.95
(Includes tracking information)

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
€18.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
€189.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 €5 each
Feature tick icon Exclusive print discounts
€264.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 €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 125.97
Java EE 7 Development with WildFly
€41.99
WildFly Performance Tuning
€41.99
WildFly Configuration, Deployment, and Administration - Second Edition
€41.99
Total 125.97 Stars icon
Banner background image

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 the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela