Build an application from scratch: JEE 7, Java 8 and Wildfly

Learn Java EE 7, Java 8, Wildfly and more by building an application from scratch.
3.5 (95 ratings) Instead of using a simple lifetime average, Udemy calculates a
course's star rating by considering a number of different factors
such as the number of ratings, the age of ratings, and the
likelihood of fraudulent ratings.
1,398 students enrolled
$40
Take This Course
  • Lectures 86
  • Contents Video: 15 hours
  • Skill Level Intermediate Level
  • Languages English
  • Includes Lifetime access
    30 day money back guarantee!
    Available on iOS and Android
    Certificate of Completion
Wishlisted Wishlist

How taking a course works

Discover

Find online courses made by experts from around the world.

Learn

Take your courses with you and learn anywhere, anytime.

Master

Learn and practice real-world skills and achieve your goals.

About This Course

Published 3/2015 English

Course Description

This project based course will lead you step-by-step throughout the development of a Java application from the scratch. If you have already felt frustrated by reading a lot of tutorials and not realizing how to put together all these technologies, I guarantee you will not have this feeling here, as we will be coding together a whole application, passing through the project creation, coding, writing unit and integration tests, creating the database, configuring the application server, deploying the application and performing real tests!

This course will cover a lot of Java technologies that will be used in practice while we create our project, including:

  • Java EE 7: JPA 2.1, Bean Validation 1.1, JMS 2.0, EJB 3.2, CDI 1.1, JAX-RS 2.0, security.
  • Java 8: Lambda expressions, Date and Time API, streams and more.
  • Libraries such as Gson, JUnit, Mockito and Hamcrest.
  • Arquillian for integration tests.
  • Wildfly 8 (former JBoss) as Application Server.
  • PostgreSQL for production and HSQLDB/H2 for unit and integration tests.
  • Maven.
  • Eclipse IDE (this is a Maven project, so you can use other IDE).
  • Postman Chrome extension to test all our REST endpoints.


This course is not only about technologies, but also about best practices, such as writing automated tests (both unit and integration) for most of the code, refactoring, OOP (object-oriented programming) and much more.

Who is this course for:

  • Honestly, for every Java developer that wants to see how to create a real enterprise application using state-of-the-art technologies and best practices. Seriously! However, if you are beginner in the Java world, you will need to explore more the details of some technologies, as this course in really hands on.

If you are still unsure about enrolling in this course, watch the first free videos so you can get more details about the architecture, technologies and requirements about the project that will be created throughout this course.

What are the requirements?

  • Some Java/JavaEE knowledge.

What am I going to get from this course?

  • Create a Java enterprise application from scratch.
  • Work and combine a variety of Java EE technologies.
  • Create automated (unit and integration) tests.
  • Understand some new Java 8 features and see them working in practice.
  • Work with Wildfly/JBoss.
  • Use maven as build tool.

What is the target audience?

  • This course is meant for students who already have some knowledge about Java/Java EE. It can be somewhat difficult for Java Beginners.

What you get with this course?

Not for you? No problem.
30 day money back guarantee.

Forever yours.
Lifetime access.

Learn on the go.
Desktop, iOS and Android.

Get rewarded.
Certificate of completion.

Curriculum

Section 1: Training introduction
03:21

This lecture will give you a basic overview of this training, touching points related about how it will be conducted and technologies used.

03:45

You will now have the opportunity to get more details about the requirements of the project that will be built during this course.

07:14

Summary of the technologies approached throughout this training and that will be used to create our project.

02:41

General idea of the architecture of the project.

06:06

In this lecture you will see how the project will be built in terms of methodologies.

Section 2: Introduction to some of the technologies used in this training
00:55

All the lectures of this section will provide you a basic overview of each of one of these technologies, going through some of their characteristics and a few examples.

07:18

In this video we will provide an overview about EJBs and what they are, how they are configured and some of its features. You will also see some basic examples of Stateless and Singleton beans.

04:23

In this lecture we will see what JPA is and some of its characteristics. You will also see a simple example of an Entity.

03:43

In this video, we will talk about CDI and some of its characteristics and features.

04:39

This video will provide you and overview of JAX-RS, going though its characteristics, features and a basic example of creating a web service and a client for it using JAX-RS.

04:27

Let's see in this video an overview about JMS and its characteristics, features and a basic example of sending and receiving a message to/from a queue.

03:55

In this video we will see what Arquillian is and understand more about its main goal and go through some of its features.

07:00

This lecture will give you and overview about Wildfly, some of its characteristics and folder structure.

Section 3: Category Management
02:48

This video will give you an overview of what is going to be covered in this section, as well as some basic requirements for this feature.

09:32

In this class we will define the coding standards for our project and configure Eclipse to obey to them. We will also create the initial Maven project.

18:36

In this lecture, we will create our first JPA entity: Category. We will also start the implementation of the CategoryRepository and to write unit tests for this class, which involves setting up the in memory database and creating the data source.

06:56

In this video, we will refactor the common code from our test case to some helper classes and then use Java 8 to make the code even cleaner.

16:12

In this class we will finish the implementation of CategoryRepository as well as its test cases.

17:46

Now that we have finished our CategoryRepository, we will start creating the CategoryServices and its unit test cases. We will get into creating mocks with Mockito and how to use bean validation and exceptions to validate the input.

14:02

In this lecture, we will be finishing the implementation of CategoryService and its related test cases.

15:23

In this video we will create the new module library-resource, that will hold our REST interfaces. We will also create some helper code and unit tests. Besides, we will see how to use Mockito with annotations. And that is not all, JAX-RS, Json and Gson will also be covered. To finish, we will create our first test case for this class.

18:28

In this video, we will:

  • Start the implementation of CategoryResource class.
  • Create the class CategoryJSONConverter using Gson.
  • Create helper classes used by our REST endpoints.
20:05

Now that we have the helper classes, we will finish the implementation and test cases for all scenarios for the add operation.

14:43

At this point, we will be able to complete the implementation and test cases for all operations for CategoryResource.

18:56

In this video, we will start to create the infrastructure needed to support our integration tests:

  • Define 2 profiles in Maven, 1 for default compilation/unit test execution and one that will also run the integration tests.
  • Configure Maven to unpack Wildfly to the target folder and configure it.
  • Add JAX-RS, EJB and CDI annotations to our classes.
  • Create a basic JAX-RS Client that will allow us to access our REST endpoints.
17:08

In this lecture, we will:

  • Add our first integration test.
  • Configure Wildfly to be used in the integration tests.
  • Use Shrinkwratp to create the deployment package, with all required files.
  • Create the first test case.
13:49

During this video, we will see how to convert RuntimeExceptions in application exceptions. We will also create some helper classes and add more test cases.

12:17

In this lecture, we will solve the issue around cleaning database before running each integration test using a REST interface and EJB. Then we will see how to load data to create the test case for the findAll() operation.

08:56

Now that our feature is ready, we will create two more projects with maven: library-resource-war.war and library.ear. Then we will create the database and the table for category feature.

11:24

To finish this section, we will:

  • Configure Wildfly to add the PostreSQL JDBC Driver and create the datasource.
  • Deploy application.
  • Test Category REST interfaces with postman.
Section 4: Author management
01:53

In this lecture we will see what is going to be created in this section, some technologies used and requirements for Author management.

12:59

In this video we will:

  • Create Author entity.
  • Create AuthorRepository.
  • Create some unit tests.
  • Start to work with real pagination by creating some basic classes.
15:26

Now that we have the basic classes for pagination, we will implement and create tests for the findByFilter() operation.

12:03

At this point, we have some duplicated code in the Repository classes that can be extracted to a common class. The same is valid for our test code, so we will also refactor them. During this process, you will see how our tests can give us safety to make these changes.

10:48

In this lecture we will create the service layer and its unit tests. Again we will be refactoring some code.

15:32

Let's now implement the REST endpoints along with its unit tests. We will also refactor the JSON converter code using generics and see how Java 8 can help us in defining a common interace.

17:18

In this video we will complete the AuthorResource and its tests. We will also see how to extract the filter parameters from URL using JAX-RS API. And to finish, we will refactor some code to create JSON with list of results and pagination.

11:37

In this lecture, we will write the integration tests for this feature.

04:33

To finish this section, we will create the table for author management feature, deploy our application in the Wildfly and test this new feature with Postman.

Section 5: User management
03:10

In this lecture, you will have the chance to know the topics covered in this section, as well as the requirements for User Management feature.

17:45

Let's now create the User abstract class and its implementations Customer and Employee using JPA and its inheritance support. We will also start to work in the UserRepository and its test cases.

16:44

In this lecture we will add a few more test cases to our repository layer and refactor findByFilter() method to GenericRepository.

17:08

In this video we will star to work in the service layer and then add a custom ArgumentMatcher in Mockito to improve our tests' accuracy.

12:11

In this this video we will be finishing the implementation of UserServices along with its unit tests.

18:15

In this lecture, we will create the REST endpoints and a few test cases. We will also start to use security in the REST endpoints.

17:54

Let's now continue with the implementation of user REST endpoints and unit tests and some refactoring.

14:59

In this lecture we will configure security in our application and in Wildfly, for testing purposes.

05:23

In this video we will change our REST client to add an authentication filter.

10:59

In this video we will finish the implementation of integration tests for user management.

07:03

Now, we we will update the existing features (Category and Author) to both add security and update their integration tests.

11:21

To complete this section, we will create the tables related to user, configure Wildfly for security and run manual tests using Postman.

Section 6: Book Management
01:59

This lecture will give you an overview of what will be covered in this section and also the requirements for Book Management.

15:39

In this video, we will define the Book entity and its relationships. We will also create the Repository Class and its unit tests, looking into how to manage dependencies to other entities.

06:53

During this lecture, we will be finishing the implementation of the BookRepository class and its unit tests.

15:28

In this lecture we will work in the implementation and tests of our service layer, also looking into how to validate dependencies.

15:44

In this video we will implement the REST endpoints and unit tests.

15:16

We will start now to create the integration tests and see how we can manage the dependencies required to create and update a book.

08:50

In this lecture we will finish the implementation of the integration tests.

05:31

To finish this section, we will create the tables related to book management and test our application using Postman.

Section 7: Order management
03:16

In this lecture, you will have the chance to know the topics covered in this section, as well as the requirements for Order management feature.

15:27

In this lecture, we will define the Order entity and its relationships. We will also use embedded entities.

11:45

In this video, we will start to implement the OrderRepository.

09:08

Let's now finish the implementation of OrderRepository and its test cases.

14:53

In this lecture, we will start the implementation of the service layer, applying the business rules and coding some test cases.

19:02

In this video, we will finish the implementation of the service layer along with its test cases.

15:23

During this video, we will be implementing the order REST endpoints and its test cases.

08:24

During this video, we will be implementing the order REST endpoints to comply with the test cases created in the previous lecture.

01:02

We had an issue with the Comparator in the previous lecture and now you will have the chance to understand and fix it.

18:58

In this video, we will implement the integration tests for the order REST endpoints.

06:10

In this lecture we will be refactoring 2 points in our code:

  • Understand eager x lazy initialization of relationships in JPA and change that for Order.
  • Extract findByPropertyNameAndValue() to a common class.
06:34

To complete this section, we will create the tables related to the order management and test our application.

Section 8: Auditing the system
02:13

This lecture will provide you an overview of what will explored within this section.

04:36

In this video, we will create both entity and repository with its unit tests for the log audit feature.

12:34

In this video we will create an annotation and add it to the service layer classes. We will also create and EJB interceptor reponsible for processing this annotation.

08:39

In this lecture, we will implement the REST web services and its unit tests.

16:35

Let's now create integration tests for log audit feature and change integration tests for author, category and book features to consider the log audit feature.

03:12

To finish this section, we will create the table for log audit and test this feature using Postman.

Section 9: Order expiration
02:07

In this lecture, we will see what will be covered within this section.

09:06

In this video, we will create a properties file to hold the number of days for and order to be expired and a CDI bean responsible for reading this file. We will also see how to use a singleton EJB with timer and PostConstruct annotation.

15:31

Let's now test our feature by creating some integration tests. These test cases will be executed in the container rather than in the client (like we did in the previous sections) and we will also see how to use InSequence annotation in Arquillian tests.

15:34

Now that our feature is working, we will create our own annotation to inject properties automatically in the OrderExpiratorJob using CDI annotations. We will also improve our Shrinkwrap usage to not inform the dependencies version.

04:14

To finish this section, we will see how to change log level in Wildfly and we will also test the order expiration feature.

Section 10: Miscellaneous and conclusion
08:43

In this video, you will see how to use CDI specification to send and receive events.

09:36

During this lecture, you will be guided through the process of configuring a JMS queue in Wildfly and how to send and receive events using that queue.

10:33

In this lecture, you will see an AngularJS application interacting with our REST web services. Then you will see how we can tackle CORS (Cross Origin Resource Sharing) with JAX-RS filters. And to perform manual tests, you will learn how to declare static resources in Wildfly and how to start 2 Wildfly instances in the same machine.

01:27

In this video, we will be concluding this course.

Students Who Viewed This Course Also Viewed

  • Loading
  • Loading
  • Loading

Instructor Biography

Luciano Molinari, Software engineer/architect

My name is Luciano Davoglio Molinari, I have over 8 years of experience in software development and architecture, especially with Java, and have worked in a variety of projects and industries. I currently have the following Java certifications: SCJP, SCWCD, SCBCD and SCEA/OCMJEA.

All this gives me enough idea and knowledge of what companies look in their Java professionals. And that is the main goal with my courses, teach you Java based on real scenarios, always focusing on technologies highly demanded by the market.

Ready to start learning?
Take This Course