Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Mastering Java EE Development with WildFly
  • Table Of Contents Toc
  • Feedback & Rating feedback
Mastering Java EE Development with WildFly

Mastering Java EE Development with WildFly

By : Stancapiano
2.3 (3)
close
close
Mastering Java EE Development with WildFly

Mastering Java EE Development with WildFly

2.3 (3)
By: Stancapiano

Overview of this book

Packed with rich assets and APIs, Wildfly 10 allows you to create state-of-the-art Java applications. This book will help you take your understanding of Java EE to the next level by creating distributed Java applications using Wildfly. The book begins by showing how to get started with a native installation of WildFly and it ends with a cloud installation. After setting up the development environment, you will implement and work with different WildFly features, such as implementing JavaServer Pages. You will also learn how you can use clustering so that your apps can handle a high volume of data traffic. You will also work with enterprise JavaBeans, solve issues related to failover, and implement Java Message Service integration. Moving ahead, you will be working with Java Naming and Directory Interface, Java Transaction API, and use ActiveMQ for message relay and message querying. This book will also show you how you can use your existing backend JavaScript code in your application. By the end of the book, you’ll have gained the knowledge to implement the latest Wildfly features in your Java applications.
Table of Contents (20 chapters)
close
close
5
Working with Distributed Transactions
16
WildFly in Cloud

The asynchronous annotation

The simplest thing to make an EJB asynchronous is through the @Asynchronous annotation. If a client calls an EJB marked with this annotation, it must not wait for the result because all the operations of the EJB will work in asynchronous mode. Here's a sample of an asynchronous singleton EJB:

@Singleton
@Asynchronous
public class AsyncBean {
private static final Logger logger = ...

public void ignoreResult(int a, int b) {
logger.info("it's asynchronous");
// here you can add an heavy payload!
}

public Future<Integer> longProcessing(int a, int b) {
return new AsyncResult<Integer>(a * b);
}
}

In this example, we have two methods--one void and one returning a result. The ignoreResult method will be executed in a few milliseconds despite a large amount of data being loaded. All the loading will be executed in...

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech

Create a Note

Modal Close icon
You need to login to use this feature.
notes
bookmark search playlist download font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Delete Note

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Edit Note

Modal Close icon
Write a note (max 255 characters)
Cancel
Update Note

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY