Jboss Admin Tutorial: Overview of Java Enterprise Edition

NewCircle's JBoss Administration Tutorial

Laurent Tonon


1. Overview of Java Enterprise Edition

1.1. What is Java EE?

  • Java EE is an open and standard-based platform for developing, deploying, and managing multi-tier, web-enabled, server-centric, and component-based enterprise applications
  • As a super-set of Java SE, Java EE adds additional specifications, libraries, documentation, and tools.
[Note]Note

Java EE stands for Java Enterprise Edition Java SE stands for Java Standard Edition In addition to Java SE and Java EE Sun released an edition of Java for mobile and resource-constrained devices like cellular phones and PDAs called Java ME (Java Mobile Edition). Before Java 5, these versions were called J2EE, J2SE and J2ME.

1.2. Open and Standard-based

  • Single specification, multiple competing implementations
  • Implementations available as both OSS/free and high-end commercial
  • Vast community resources: books, tutorials, guides, examples, etc.
  • Large developer pool
  • Application portability

Some of Java EE Application Servers available on the market today:

  • Apache Tomcat (Servlet/JSP container only)
  • ATG Dynamo
  • BEA WebLogic
  • Borland Enterprise Server
  • Caucho Resin (Servlet/JSP container only)
  • Fujitsu Software Interstage
  • Hitachi Cosminexus
  • IBM Websphere
  • JBoss AS
  • Mort Bay Consulting Jetty (Servlet/JSP container only)
  • Macromedia JRun Server
  • Novell exteNd
  • ObjectWeb JOnAS
  • Oracle Application Server 10g
  • Pramati Server
  • SAP AG Web Application Server
  • Sun Java System Application Server
  • Sybase EAServer
  • TmaxSoft JEUS
  • Together Teamlösungen EDV-Dienstleistungen GmbH. in cooperation with ObjectWeb Enhydra Server
  • Trifork Enterprise Application Server

1.3. Multi-tier

  • OO framework for integrating together:

    • Clients (e.g. web browsers)
    • Access and presentation components
    • Business components (e.g. ecommerce business logic)
    • Data-stores (e.g. RDBMS)
    • Legacy systems (e.g. order fulfillment)
  • System-level separation of concerns

Figure 1. Multi-tier Architecture

../common/images/javaee_architecture.png


  • Client Tier usually consists of thin clients like web browsers and it makes the request into the Web Tier over HTTP.
  • Client Tier (B2B) is a set of external applications that makes requests into the Business Tier through Web Services over SOAP or directly through Java’s RMI.
  • Web Tier is usually implemented with Servlets, JSPs, and simple JavaBeans, based on the Model-View-Controller design pattern.
  • Business Tier is composed of EJBs and/or plain old Java objects (POJOs).
  • Data Access Tier is either managed by the applications (e.g. BMP, DAO), O/R mapping tools (e.g. Hibernate), or through Container Managed Persistence (CMP).
  • Connector/Messaging Tier allows asynchronous access to legacy systems or other external systems.
  • Legacy/External Tier consists of enterprise information systems.
  • Data Tier is usually composed of RDBMS and/or LDAP Directory Servers.

1.4. Web-Enabled

  • Thanks to Servlet/JSP technology, Java EE applications are automatically web-enabled:

    • Efficient, Java/OO, Easy, I18N, MVC
  • Complete support for web-services

    • Clients
    • End-points

1.5. Server Centric

  • Java EE apps run within a Java EE application server that provides all middle-tier services.
  • Thin (web-based) clients
  • Support for rich clients through RMI, Web Services, etc.

    • The design of such clients is beyond the scope of Java EE

1.6. Component-Based Distributed Architecture

../common/images/javaee_distributed_architecture.png

Java EE applications and services are built out of components that can run in a single or multiple (distributed) Java EE Application Server instances.

1.7. Enterprise Applications

  • Java EE applications are made up of:

    • Presentation logic
    • Business logic
    • Data access logic and model
  • Java EE facilitates separation of concerns

The goal of Java EE is to significantly reduce the cost, time, and complexity of developing and managing multi-tier enterprise applications.

1.8. Java EE Contents

  • Java SE: JVM, Tools, Libraries, Docs
  • Expanded API, Specifications, Tools, Docs
  • Reference development and deployment platform (production-quality) from Sun
  • Compatibility Test Suite
  • Java EE Blueprints
  • Sample code
  • Java EE Brand

1.8.1. Java EE 5 APIs and Technologies :

  • Java SE 5
  • Web Services 1.1, JSR-109
  • Java API for XML-Based RPC (JAX-RPC) 1.1, JSR-101
  • Java API for XML Messaging (JAXM), JSR-67
  • Java API for XML Registries (JAXR) 1.0, JSR-93
  • SOAP with Attachments API for Java (SAAJ) 1.2, JSR-67
  • Management API, JSR-77
  • Deployment API, JSR-88
  • Authorization SPI, JSR-115
  • Java Network Launch Protocol (JNLP), JSR-56
  • J2EE Connector Architecture (JCA) 1.5, JSR-112
  • JavaServer Pages (JSP) 2.1, JSR-245
  • JavaServer Faces (JSF) 1.0, JSR-127
  • JavaServer Pages Standard Tag Library (JSTL) 1.1, JSR-52
  • Java Servlet 2.5, JSR-154
  • Enterprise Java Beans (EJB) 3.0, JSR-220
  • Java Messaging Service (JMS) 1.1, JSR-914
  • Java Management Extensions (JMX) 1.1, JSR-3
  • Java Transaction API (JTA) 1.0.1, JSR-907
  • Java Mail 1.3. JSR-919
  • JavaBeans Activation Framework (JAF) 1.1, JSR-925
  • Java Authentication and Authorization Service (JAAS) 1.0
  • Java Naming and Directory Interface (JNDI) 1.2.1
  • Java Authorization Contract for Containers (JACC) 1.0, JSR-115

1.9. Java EE Services

  • Java EE Application Server handles:

    • Concurrency, Scalability, Availability
    • Security
    • Persistence, Transactions
    • Life-Cycle Management
  • Application Components focus on:

    • Presentation
    • Business Logic

Table of Contents

1. Overview of Java Enterprise Edition
1.1. What is Java EE?
1.2. Open and Standard-based
1.3. Multi-tier
1.4. Web-Enabled
1.5. Server Centric
1.6. Component-Based Distributed Architecture
1.7. Enterprise Applications
1.8. Java EE Contents
1.9. Java EE Services
2. Overview of JBoss Application Server
2.1. JBoss Organization
2.2. JBoss AS Background
2.3. Highlights of JBoss AS
2.4. What is new in JBoss AS 5?
2.5. JBoss AS Architecture
2.6. JBoss Microcontainer Layer
2.7. Services Layer
2.8. Aspect Layer
2.9. Application Layer
2.10. JBoss AS Services
2.11. JBoss AS Requirements
3. Installing JBoss AS
3.1. Getting and Installing Java
3.2. Configuring Java
3.3. Getting JBoss AS
3.4. Installing JBoss AS 5
4. JBoss Directory Structure
4.1. JBoss AS Directory Structure
4.2. The bin Directory
4.3. The client Directory
4.4. The common directory
4.5. The docs Directory
4.6. The lib Directory
4.7. The server Directory
4.8. The server Configuration Sets
4.9. The default/conf Directory
4.10. The default/data Directory
4.11. The default/deploy Directory
4.12. The default/deployers Directory
4.13. The default/lib Directory
4.14. The default/log Directory
4.15. The default/tmp Directory
4.16. The default/work Directory
5. Controlling the Life-Cycle of JBoss AS
5.1. Starting JBoss AS
5.2. Verifying JBoss AS Startup
5.3. Stopping JBoss AS
5.4. Starting From a Remote Server
6. Deployments on JBoss
6.1. Java EE Deployment Lifecycle
6.2. Deployment Descriptors
6.3. Deployment on JBoss AS
6.4. Deployers on JBoss AS
6.5. Deployment Dependencies
6.6. Hot vs. Cold Deployment
6.7. Bootstrapping JBoss
6.8. Lab: Deployment
7. Web Application Administration
7.1. Web Technologies
7.2. CGI vs. Servlets/JSPs
7.3. Tomcat Web Container
7.4. Tomcat’s server.xml
7.5. Tomcat’s web.xml
7.6. Defining and Mapping Servlets
7.7. Defining and Mapping Filters
7.8. Session Configuration
7.9. Welcome File List
7.10. Error Documents
7.11. Serving Static Content
7.12. Virtual Hosting with Tomcat
7.13. Web Access Logging
7.14. Lab: Tomcat
8. JNDI Administration
8.1. Java Naming and Directory Interface
8.2. JNDI in Java EE
8.3. JNDI on JBoss
8.4. Lab: JNDI View
9. Javamail Administration
9.1. What is JavaMail?
9.2. Configuring JavaMail Service
9.3. Lab: Mail
10. JMS Administration
10.1. JMS Overview
10.2. JMS in Java EE
10.3. When is JMS Used
10.4. JMS Architecture
10.5. JMS Messaging Domains
10.6. JMS Message Consumption
10.7. JMS on JBoss Configuration
10.8. Configure JMS connection factories
10.9. Configure JMS destinations
10.10. Advanded JBoss Messaging
10.11. JBoss Messaging bridge
10.12. Persistence service configuration
10.13. Lab: JMS
11. Enterprise Java Beans Administration
11.1. Introduction to EJB 3.0
11.2. EJB 3.0 Components
11.3. EJB Container
11.4. Benefits of EJB Technology
11.5. Drawbacks of EJBs
11.6. Session Beans
11.7. Interceptors
11.8. Entity Beans
11.9. Message-Driven Bean
11.10. Session Beans Client Interfaces
11.11. Stateless Session Beans Life Cycle
11.12. Stateful Session Beans Life Cycle
11.13. Message-Driven Beans Life Cycle
11.14. Configuring the EJB container
11.15. Stateful Session Bean Configuration
11.16. Lab: Stateless Session Bean
12. Web Services and JBoss
12.1. Web Services Overview
12.2. Service Oriented Architecture
12.3. Web Services With JAX-WS
12.4. Web Services on JBoss
12.5. JBoss Web Services Tools
12.6. Lab: Web Services
13. JMX Administration
13.1. What is JMX?
13.2. Why JMX?
13.3. JMX Architecture
13.4. JMX on JBoss AS
13.5. JMX Console
13.6. Web Console
13.7. Twiddle Tool
13.8. JBoss AS Administration Console
13.9. Lab: JMX Print Service
13.10. JBoss Monitoring
13.11. Snapshot and Web Console
13.12. Monitoring with JConsole
13.13. Scheduling on JBoss
13.14. Lab: Monitoring
14. Class Loading on JBoss
14.1. Class Namespace Isolation
14.2. Java Class Runtime Identity
14.3. Class Loading in Java EE
14.4. Class Loading On JBoss
14.5. The Class Loader
14.6. Default Class Search Order
14.7. Scoping Classes
14.8. Scoped Class Search Order
14.9. App-specific Log4J Config
14.10. Problems With Class Loading
14.11. Lab: Class Loading
15. Database Integration on JBoss
15.1. Steps Involved
15.2. Resource Requirement
15.3. Install JDBC Drivers
15.4. Define a RDBMS DBCP Resource
15.5. Map our Resource
15.6. Using our DataSource (RDBMS DBCP)
15.7. Hypersonic Database
15.8. Detecting Connection Leaks
15.9. Lab: Database Connectivity
16. Security on JBoss
16.1. Securing Applications
16.2. Filtering Clients by Source
16.3. Authentication & Authorization
16.4. Requiring A&A
16.5. Plain-Text Login Module
16.6. Database Login Module
16.7. FORM-based Login
16.8. Configuring JBoss AS for SSL
16.9. Creating SSL Certificates
16.10. Configure SSL Connector
16.11. Testing SSL Configuration
16.12. Requiring SSL in Apps
16.13. Lab: Application Security
16.14. Securing JMS destinations
16.15. Securing JBoss AS
16.16. JBoss AS System User
16.17. File System Security
16.18. Securing JMX Invoker
16.19. Securing JBoss Applications
16.20. Securing Hypersonic DB
16.21. Java Security Manager
16.22. Running Behind a Firewall
16.23. Lab: JBoss Security
17. Tuning JBoss
17.1. JVM Tuning
17.2. Tomcat Tuning
17.3. RMI Tuning
17.4. Log4J Tuning
17.5. Tuning Other Services
17.6. JMS Tuning
17.7. Slimming JBoss
18. High Availability and Scalability on JBoss
18.1. Requirements
18.2. Clustering: General understanding
18.3. Clustering and JBoss
18.4. Simple Web Architecture
18.5. External Load Balancer Architecture
18.6. Smart Proxy Architecture
18.7. General configuration for the following examples
18.8. Fronting with a Web Server
18.9. Fronting with Apache HTTPD
18.10. Installing mod_jk
18.11. Configuring mod_jk
18.12. Simple Load Balancing
18.13. Enabling Sticky Sessions
18.14. Clustered Session Replication
18.15. Clustering Single Sign-On
18.16. Clustering with HA-JNDI
18.17. HA-JNDI Client Configuration
18.18. Clustering with HA-JMS
18.19. Clustering with Stateless Session Beans
18.20. Clustering with Stateful Session Beans
18.21. Lab: Clustering