My Account Log in

3 options

Developing middleware in Java EE 8 : build robust middleware solutions using the latest technologies and trends / Mahmoud Abdalla.

EBSCOhost Academic eBook Collection (North America) Available online

View online

Ebook Central Academic Complete Available online

View online

O'Reilly Online Learning: Academic/Public Library Edition Available online

View online
Format:
Book
Author/Creator:
Abdalla, Mahmoud, author.
Language:
English
Subjects (All):
Java (Computer program language).
Computer software--Development.
Computer software.
Physical Description:
1 online resource (247 pages) : illustrations
Edition:
1st edition
Other Title:
Developing middleware in Java Enterprise Edition eight
Place of Publication:
Birmingham, England ; Mumbai : Packt, 2018.
System Details:
text file
Summary:
Use Java features such as JAX-RS, EJBs, and JPAs to build powerful middleware for newer architectures such as the cloud About This Book Explore EJBs to build middleware solutions for enterprise and distributed applications Understand middleware designs such as event-based and message-driven web services Learn to design and maintain large-scale systems and vendor disputes Who This Book Is For Enterprise architects, designers, developers, and programmers who are interested in learning how to build robust middleware solutions for enterprise software will find this book useful. Prior knowledge of Java EE is essential What You Will Learn Implement the latest Java EE 8 APIs and manage dependencies with CDI 2.0 Perform CRUD operations and access databases with JPA 2.1 Use bean validation API 2.0 to validate data Develop business logic with EJB 3.2 Incorporate the REST architecture and RESTful API design patterns Perform serialization and deserialization on JSON documents using JSON-B Utilize JMS for messaging and queuing models and securing applications Test applications using JUnit and Mockito and deploy them using Docker In Detail Middleware is the infrastructure in software based applications that enables businesses to solve problems, operate more efficiently, and make money. As the use of middleware extends beyond a single application, the importance of having it written by experts increases substantially. This book will help you become an expert in developing middleware for a variety of applications. The book starts off by exploring the latest Java EE 8 APIs with newer features and managing dependencies with CDI 2.0. You will learn to implement object-to-relational mapping using JPA 2.1 and validate data using bean validation. You will also work with different types of EJB to develop business logic, and with design RESTful APIs by utilizing different HTTP methods and activating JAX-RS features in enterprise applications. You will learn to secure your middleware with Java Security 1.0 and implement various authentication techniques, such as OAuth authentication. In the concluding chapters, you will use various test technologies, such as JUnit and Mockito, to test applications, and Docker to deploy your enterprise applications. By the end of the book, you will be proficient in developing robust, effective, and distributed middleware for your business. Style and approach Learn how to design and implement professional enterprise middleware solutions...
Contents:
Cover
Title Page
Copyright and Credits
Dedication
Packt Upsell
Contributors
Table of Contents
Preface
Chapter 1: Delving into Java EE 8
What is Java EE?
Enterprise applications
Java EE architecture
Chapter roadmap
Contexts and dependency injection
Data persistence
Data validation
Enterprise JavaBeans
RESTful services
JSON processing
Messaging
Mailing
WebSockets
Security
Required software
IDE
Application server
Build tool
Relational database system
Book project
Goodbye Java EE, welcome Jakarta EE!
Summary
Chapter 2: Dependency Injection Using CDI 2.0
What's new in CDI 2.0?
Creating your first CDI bean
First CDI bean
Providing alternative implementations to your bean
Using qualifiers
Specifying a bean scope
Injecting beans
Direct field injection
Bean constructor parameter injection
Initializer method parameter injection
Using producers
Scope of producer methods
Injection into the producer methods
Using interceptors
Interceptor types
Using events
Chapter 3: Accessing the Database with JPA 2.1
What's new in JPA 2.2?
Architecture
Writing your first JPA application
Step 1: Creating a data source
Step 2: Creating a persistence unit
Step 3: Creating an entity class
Step 4: Creating a data access object
Entities
Entity mapping
Primary keys
Table mapping
Column mapping
Date and time mapping
Ignoring properties
Composite primary keys
Embedded objects
Performing CRUD operations
Managed versus detached entities
Inserting a new record
Retrieving an existing record
Updating an existing record
Deleting a record
Detaching an entity
Mapping entity relationships
Many-to-one relationships
Many-to-many relationships.
Bidirectional relationships
Cascading
Map collections of primitives
JPA query language
Basic syntax
Query parameters
Named parameters
Positional parameters
Query examples
Selecting entities
Ordering entities
Limiting records
Selecting entities with clauses
Selecting entities with projection
Eliminating duplicates
Entity navigation
Update entities
DELETE entities
Using native SQL queries
Named queries
Criteria queries
Mapping inheritance
Single table strategy
Joined table strategy
Table per class strategy
Comparing strategies
Polymorphic queries
Chapter 4: Validating Data with Bean Validation 2.0
What's new in Bean Validation 2.0?
First validation example
First approach - programmatic validation
Second approach - auto validation
Injecting the validator object
Graph validation
List of available constraints
Validating parameters and return values
Defining a custom constraint
Associating messages with attributes
Adding more constraints
Chapter 5: Exposing Web Services with JAX-RS 2.1
What are web services?
RESTful versus SOAP services
SOAP services
Understanding HTTP
Basics
HTTP request
HTTP response
Writing your first REST service
Writing a resource class
Configuring a project for Jersey
Testing your web services
Postman as a test tool
Handling HTTP methods
Sub-resources
Receiving parameters
Matrix parameters
Path parameters
Form parameters
Header parameters
Providing default values
Bean parameters
Using context objects
Handling JSON
Enabling Moxy
Returning JSON
Consuming JSON
Custom responses
Uploading files
Handling exceptions
Declaring custom web application exceptions.
Mapping existing exceptions
Server-sent events
Chapter 6: Manipulating JSON with JSON-B 1.0
Why JSON?
Mapping objects
Mapping collections
Formatting output
Customizing property names
Customizing naming strategies
Customizing property ordering
Handling nulls
Formatting dates and numbers
Using binary
Chapter 7: Communicating with Different Systems with JMS 2.0
Message-Oriented Middleware
Java Messaging System (JMS)
JMS provider
JMS clients
Messages
Administered objects
Messaging styles
Point-to-point style
Publish-subscribe
First JMS application
Creating administered objects
Creating a destination
Creating a connection factory
Creating the producer
Creating the consumer
Using JMS resources with annotations
Creating connection factories
Creating destinations
Injecting connection factories
Injecting destinations
Putting them all together
Message-Driven Beans
Creating a message-driven bean
Sending and receiving messages
Text messages
Map messages
Object messages
Chapter 8: Sending Mails with JavaMail 1.6
Explaining mail protocols
POP3 and IMAP
SMTP
Sending an email
Sending an HTML email message
Setting To, CC, and BCC fields
Sending an email with attachments
Chapter 9: Securing an Application with Java Security 1.0
Terminology
Authentication mechanism
Caller
Caller principal
Identity store
Basic login example
Creating a web page to protect
Mentioning who's allowed to access the web page
Defining users and associated roles in a database
Mapping security configuration to the user database
Identity stores
Database identity store
LDAP identity store
Custom identity store.
Creating a custom identity store class
Creating an HTTP authentication mechanism
Security context
Authentication mechanisms
Basic authentication
Form authentication
Chapter 10: Making Interactive Applications with WebSockets 1.1
Understanding WebSockets
How does WebSockets work?
Creating an endpoint
Creating a client web page
Lifecycle events
Accepting path parameters
Maintaining user state
Using encoders
Seat-booking application
Designing and implementing the backend
Designing and implementing the frontend
Other Books You May Enjoy
Index.
Notes:
Description based on print version record.
ISBN:
9781788392228
1788392221
OCLC:
1044940403

The Penn Libraries is committed to describing library materials using current, accurate, and responsible language. If you discover outdated or inaccurate language, please fill out this feedback form to report it and suggest alternative language.

My Account

Shelf Request an item Bookmarks Fines and fees Settings

Guides

Using the Library Catalog Using Articles+ Library Account