The Java 2 Platform :

J2EE Technologies :

J2EE Components :

J2EE Components http://java.sun.com/j2ee/overview3.html

Java Servlets :

Java Servlets Servlets are the Java platform technology of choice for extending and enhancing web servers.
Servlets provide a component-based, platform-independent method for building web-based applications, without the performance limitations of CGI programs.
http://java.sun.com/products/servlets/index.html

Java Servlets :

Java Servlets Servlets have access to the entire family of Java APIs, including the JDBCTM API to access enterprise databases.
Servlets can also access a library of HTTP-specific calls and receive all the benefits of the mature Java language, including portability, performance, reusability, and crash protection
http://java.sun.com/products/servlets/index.html

Anatomy of a Servlet :

Anatomy of a Servlet init() – the init() function is called when the servlet is initialized by the server. This often happens on the first doGet() or doPut() call of the servlet.
destroy() – this function is called when the servlet is being destroyed by the server, typically when the server process is being stopped. http://java.sun.com/docs/books/tutorial/servlets/lifecycle/index.html

Anatomy of a Servlet :

Anatomy of a Servlet doGet() – the doGet() function is called when the servlet is called via an HTTP GET.
doPost() – the doPost() function is called when the servlet is called via an HTTP POST.
POSTs are a good way to get input from HTML forms http://java.sun.com/docs/books/tutorial/servlets/lifecycle/index.html

JSP – JavaServer Pages :

JSP – JavaServer Pages JavaServer Pages technology uses XML-like tags and scriptlets written in the Java programming language to encapsulate the logic that generates the content for the page.
Any and all formatting (HTML or XML) tags are passed directly back to the response page.
By separating the page logic from its design and display and supporting a reusable component-based design, JSP technology makes it faster and easier than ever to build web-based applications.
http://java.sun.com/products/jsp/index.html

Anatomy of an EJB :

Anatomy of an EJB Remote Interface
Methods that can be accessed by the outside world.
Extends javax.ejb.EJBObject
Remote Home Interface
Life-cycle methods (create, findByPrimaryKey)
Extends javax.ejb.EJBHome which extends java.rmi.Remote
Bean class
The class performing the actual business process
Implements an interface based on type of bean

Anatomy of an EJB :

Anatomy of an EJB EJB 2.0 New Interfaces
New Interfaces allow bean to bean method calls within the same container
Local Interface
Similar to the remote interface, but without RMI
Extends javax.ejb.EJBLocalObject
Local Home Interface
Similar to the remote home interface, but without RMI
Extends javax.ejb.EJBLocalHome

EJB – Enterprise Java Beans :

EJB – Entity Beans :

EJB – Entity Beans Entity beans are classes that map to individual entities – typically, an Entity bean references a row in a database table, providing an object representation of that database object.
For example, an entity bean could represent a customer, and changing the values in that entity bean would cause updates to that database row
Entity beans provide an abstraction layer so that working with the entity is not specific to the storage mechanism for that entity.

Entity Beans - Persistence :

Entity Beans - Persistence Container Managed Persistence (CMP)
The EJB container automatically persists the EJB objects, usually to a relational database where each type of object is represented as a table, and each instance of the object is a row in that table
Bean Managed Persistence (BMP)
The EJB container calls bean methods when it is appropriate for the bean to load, save or update data, enforcing transactions without transaction code written by the bean developer

EJB – Session Beans :

EJB – Session Beans Session beans perform work for a client application
For example, a session bean could charge a credit card for a specific transaction.

Session Beans – State :

Session Beans – State Stateful – A stateful bean maintains a conversational state with a client. The client perceives that it is only talking to one bean, and that bean maintains information between calls
Stateless – A stateless bean maintains no client information between method calls – the container can substitute beans as necessary between method calls

EJB – Session Bean Example :

EJB – Session Bean Example package org.jboss.docs.interest;
import javax.ejb.EJBObject;
import java.rmi.RemoteException;
/** This interface defines the `Remote' interface for the `Interest' EJB. Its single method is the only method exposed to the outside world. The class InterestBean implements the method. */
public interface Interest extends EJBObject
{
/** Calculates the compound interest on the sum `principle', with interest rate per period `rate' over `periods' time periods. This method also prints a message to standard output; this is picked up by the EJB server and logged. In this way we can demonstrate that the method is actually being executed on the server, rather than the client. */
public double calculateCompoundInterest(double principle, double rate, double periods) throws RemoteException;
}

EJB – Message Beans :

EJB – Message Beans Message beans are classes that receive asynchronous notification from a Java Message Service server
For example, a message bean could be activated when vendor sends a purchase order to a JMS queue.

JMS – Java Message Service :

JMS – Java Message Service Enterprise messaging provides a reliable, flexible service for the asynchronous exchange of critical business data and events throughout an enterprise. The JMS API adds to this a common API and provider framework that enables the development of portable, message based applications in the Java programming language.
http://java.sun.com/products/jms/index.html

JMS – Java Message Service :

JMS – Java Message Service JMS Queue JMS Topic

JMS – Java Message Service :

JMS – Java Message Service The JMS API in the J2EE 1.3 platform has the following new features:
A new kind of enterprise bean, the message-driven bean, enables the asynchronous consumption of messages.
Message sends and receives can participate in Java Transaction API (JTA) transactions.
http://java.sun.com/products/jms/index.html

JDBC – Data Access API :

JDBC – Data Access API JDBCTM technology is an API that lets you access virtually any tabular data source from the JavaTM programming language.
Cross-DBMS connectivity to a wide range of SQL databases
Access to other tabular data sources, such as spreadsheets or flat files.
http://java.sun.com/products/jdbc/index.html

JNDI – Java Naming and Directory Interface :

JNDI – Java Naming and Directory Interface JNDI is an API specified in Javatm that provides naming and directory functionality to applications written in Java. It is designed especially for Java by using Java's object model.
Using JNDI, Java applications can store and retrieve named Java objects of any type.
JNDI provides methods for performing standard directory operations, such as associating attributes with objects and searching for objects using their attributes.
JNDI allows Java applications to take advantage of information in a variety of existing naming and directory services, such as LDAP, NDS, DNS, and NIS(YP), and allows Java applications to coexist with legacy applications and systems.
http://java.sun.com/products/jndi/overview.html

JTA / JTS – Transactions :

JTA / JTS – Transactions The Java Transaction API (JTA) and the Java Transaction Service (JTS) allow J2EE application servers to take the burden of transaction management off of the component developer.
Developers can define the transactional properties of Enterprise JavaBeansTM technology based components during design or deployment using declarative statements in the deployment descriptor.
The application server takes over the transaction management responsibilities.
http://java.sun.com/j2ee/transactions.html

JAAS – Java Authentication and Authorization Service :

JAAS – Java Authentication and Authorization Service Authentication of users, to reliably and securely determine who is currently executing Java code, regardless of whether the code is running as an application, an applet, a bean, or a servlet; and
Authorization of users to ensure they have the access control rights (permissions) required to do the actions performed.
Sample authentication modules using:
JavaTM Naming and Directory Interface (JNDI)
Unix Operating Environment
Windows NT
Kerberos
Keystore
http://java.sun.com/products/jaas/index.html

XML :

XML J2EE 1.3 includes JAXP 1.1 support, as well as Servlet Filters and XML JSPTM documents.
The JavaTM API for XML Processing ("JAXP") supports processing of XML documents using DOM, SAX, and XSLT.
The portability and extensibility of both XML and Java make them the ideal choice for the flexibility and wide availability requirements of this new web.
http://java.sun.com/xml/index.html
http://java.sun.com/xml/jaxp/index.html

J2EE Development Tools :

J2EE Development Tools Major IDEs support J2EE in some form
Wizards for EJB / Servlets
Custom editors for JSP
Deployment descriptor support
Deployment support for application servers
Embedded servers for testing within IDE