Enterprise Java Unit 1: Java EE Fundamentals

This is a Java Enterprise Edition (Java EE) study guide or lecture notes. It covers the fundamentals of enterprise applications, Java EE architecture, servlets, and database connectivity. The material is structured for students learning enterprise Java development.

This document is a set of lecture notes or study material for a course on Enterprise Java, specifically Java Enterprise Edition (Java EE). It is intended for students or developers learning how to build large-scale enterprise applications using Java technologies.

Unit 1.1 introduces the concept of enterprise applications, their characteristics (multi-user, security, scalability, reliability), and examples like banking and hospital systems. It defines Java EE as a platform built on Java SE, listing its features, advantages, and key technologies such as Servlets, JSP, EJB, JPA, and JMS. A table shows the evolution from J2EE 1.2 to Jakarta EE, and the GlassFish server is introduced as a deployment environment.

Unit 1.2 covers system architecture types: one-tier, two-tier, three-tier (presentation, business, database layers), and N-tier. It explains the role of a Java EE server (GlassFish, TomEE, WildFly) and Java EE containers, including the Web Container (managing Servlets and JSP) and the EJB Container (managing Enterprise JavaBeans).

Unit 1.3 focuses on Java Servlets, explaining the need for dynamic web content and how Servlets handle HTTP requests. It compares Servlets to CGI, highlighting performance advantages (threads vs processes, memory usage). Unit 1.4 details the Servlet API (javax.servlet and javax.servlet.http packages), key classes (Servlet, GenericServlet, HttpServlet), and the servlet lifecycle (init, service, destroy).

Unit 1.5 covers practical steps for working with Servlets: installing JDK and GlassFish, creating a web project, writing and deploying a servlet. It introduces annotations (@WebServlet) as a modern alternative to the web.xml deployment descriptor. Unit 1.6 explains JDBC (Java Database Connectivity), its components (DriverManager, Connection, Statement, ResultSet), and the steps to connect a Java program to a database, including a code example with MySQL.