Beginning Jakarta EE - Enterprise Edition for Java From Novice to Professional. [1st ed.] 978-1484250785

Build Java-based enterprise applications using the open source Eclipse Jakarta EE platform. This feature-packed book tea

3,574 510 6MB

English Pages 454 Year 2019

Report DMCA / Copyright

DOWNLOAD FILE

Beginning Jakarta EE - Enterprise Edition for Java From Novice to Professional. [1st ed.]
 978-1484250785

Table of contents :
Table of Contents......Page 5
About the Author......Page 13
About the Technical Reviewer......Page 14
Introduction......Page 15
Chapter 1: Java Development, Enterprise Needs......Page 19
Standardized Specifications......Page 20
Multi-tiered Applications......Page 24
Jakarta EE Servers and Licensing......Page 26
Excursion to Microservices......Page 27
Jakarta EE Applications and the Cloud......Page 28
Exercise 2......Page 29
The Java Standard Edition JSE 8......Page 30
Exercise 3......Page 31
Chapter 2: Getting a Jakarta EE Server to Work......Page 32
Getting and Installing Glassfish......Page 33
Glassfish Shell Administration......Page 35
General Options......Page 36
Setting and Changing the Admin-Password......Page 37
Administering the Built-In Database......Page 38
Glassfish GUI Administration......Page 39
Glassfish REST Interface Administration......Page 40
Installing Eclipse for Jakarta EE Development......Page 43
Your First Jakarta EE Application......Page 48
The Julian Calendar Back End......Page 49
The Julian Calendar Front End......Page 56
Summing Up: The Julian Day Calendar......Page 66
Servlets and JSF Pages......Page 69
Preparing the JSF Application......Page 71
The Household Accounting JSF Application......Page 74
About JavaBean Classes......Page 80
Expression Language in JSF Pages......Page 82
Value and Method Expressions......Page 83
Accessing Objects from JSF Pages......Page 85
Implicit Objects......Page 89
Literals......Page 91
Operators in Expressions......Page 92
Using Collections Inside Expressions......Page 93
Lambda Expressions......Page 94
Localized Resources......Page 95
JSF Tag Libraries......Page 98
Standard HTML RenderKit Tags......Page 99
HTML Header Elements......Page 101
HTML Text Input and Output......Page 102
HTML Selectables......Page 104
Exercise 4......Page 107
HTML Buttons and Links......Page 108
HTML File Upload......Page 110
HTML Grouping......Page 111
HTML Tables......Page 112
Repetition and Conditional Branching......Page 114
General Purpose Core Tags......Page 115
Validator Core Tags......Page 117
Converter Core Tags......Page 122
Selection Items Core Tags......Page 126
Listener Core Tags......Page 130
AJAX Core Tags......Page 133
Other Core Tags......Page 139
The Pass-Through Namespace......Page 140
Navigation Between Pages......Page 141
More Injection......Page 143
Overview of the JSF Page Flow......Page 145
Exercise 8......Page 148
A RESTful Server Inside Jakarta EE......Page 149
Single-Page Web Applications......Page 153
About REST......Page 156
About JSON......Page 158
Exercise 1......Page 159
Including Page Assets......Page 160
Adding Input to the REST Controller......Page 161
Adding Front-end Logic......Page 164
Data-centric Operations with SPAs......Page 166
Exercise 2......Page 179
Abstracting Away Database Access with JPA......Page 180
Setting Up a SQL Database......Page 181
Adding EclipseLink as ORM......Page 184
Adding Data Access Objects......Page 186
Adding Entities......Page 191
Adding Relations......Page 194
Exercise 3......Page 197
Types of Session EJBs......Page 200
Defining EJBs......Page 201
Accessing EJBs......Page 205
EJB Projects......Page 209
Adding Dependencies to the Server......Page 211
Creating EARs......Page 212
Asynchronous EJB Invocation......Page 213
Timer EJBs......Page 215
SOAP Web Services......Page 218
Exercise 1......Page 225
Application Startup Activities......Page 229
XML Processing......Page 231
DOM: In-Memory Representation of a Complete XML Document......Page 232
StAX: Streaming Pull Parsing......Page 235
SAX: Event-Based Push Parsing......Page 239
Messaging Paradigms......Page 241
Setting Up a Messaging Provider......Page 242
Creating Queues and Topics......Page 243
Submitting and Receiving Messages......Page 244
Managing the Messaging Provider......Page 248
Chapter 10: Maintaining State Consistency with JTA Transactions......Page 252
Local and Distributed Transactions......Page 253
The ACID Paradigm......Page 254
Transaction Managers......Page 255
Container-Managed Transactions......Page 258
Bean-Managed Transactions......Page 261
Observing Transaction for Stateful EJBs......Page 263
Transaction Monitoring......Page 264
Securing the ASADMIN Tool......Page 269
Securing the Web Administrator Console......Page 272
Securing the Administrative REST Service......Page 273
Securing the Database Access......Page 274
Securing the JMS Messaging......Page 275
Securing Web Applications......Page 277
Importing SSL Certificates for Web Applications......Page 291
Preparing EJB Security......Page 297
Exercise 2......Page 298
Declarative EJB Security......Page 302
Exercise 3......Page 304
Role Mimic: Propagating Roles......Page 305
The Eclipse Plugin’s Deployment Process......Page 307
Using Deployment Archives......Page 309
Web Application Archives......Page 310
Creating WARs with Maven......Page 314
Enterprise Application Archives......Page 317
Creating EARs with Maven......Page 321
Deploying Applications from Directories......Page 325
System Streams......Page 328
JDK Logging in Glassfish......Page 329
Adding Logging Output to the Console......Page 330
Using the Standard Logging API for Your Own Projects......Page 331
Logging Levels......Page 332
The Logger Hierarchy and Thresholds......Page 333
The Logging Configuration......Page 334
Using JDK Standard Logging for Other Servers......Page 336
Adding Log4j Logging to Your Application......Page 337
Adding Log4j Server-Wide......Page 338
Changing the Logging Format......Page 341
Adding Log4j to Jakarta EE Web Applications......Page 343
Adding Log4j to Jakarta EE EAR Applications......Page 345
Using Log4j in the Coding......Page 348
Exercise 2......Page 349
Monitoring over the Admin Console......Page 350
Advanced Monitoring......Page 353
Using REST to Access Monitoring Data......Page 355
Exercise 1......Page 357
Glassfish’s JMX Interface......Page 358
A JMX GUI Client......Page 360
Adding Glassfish Monitoring to JMX......Page 363
Implementing Custom JMX Modules......Page 364
Exercise 2......Page 368
HTML Tag Attribute Classes......Page 369
HTML Top-Level Tags......Page 374
HTML Header Elements......Page 375
HTML Form......Page 377
HTML Text Input and Output......Page 379
HTML Selectables......Page 385
HTML Images......Page 393
HTML Buttons and Links......Page 394
HTML File Upload......Page 401
HTML Grouping......Page 402
HTML Tables......Page 403
Chapter 4......Page 409
Chapter 5......Page 417
Chapter 6......Page 418
Chapter 7......Page 426
Chapter 8......Page 433
Chapter 9......Page 434
Chapter 11......Page 440
Chapter 12......Page 441
Chapter 13......Page 442
Chapter 14......Page 444
Index......Page 447

Polecaj historie