or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

docs

dependency-injection.mdejb.mdenterprise-services.mdindex.mdjson-processing.mdmessaging.mdpersistence.mdrest-services.mdsecurity.mdtransactions.mdvalidation.mdweb-services.mdweb-technologies.mdxml-binding.md
tile.json

tessl/maven-javax--javaee-api

Complete Java Enterprise Edition 8 specification APIs providing all standardized enterprise application development interfaces

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
mavenpkg:maven/javax/javaee-api@8.0.x

To install, run

npx @tessl/cli install tessl/maven-javax--javaee-api@8.0.0

index.mddocs/

Java EE API

Java EE API is the complete Java Enterprise Edition 8 specification implementation providing all standardized enterprise application development interfaces in a single unified library. It combines Web Profile APIs with additional Full Profile enterprise technologies, enabling developers to build comprehensive enterprise applications with standardized APIs for web services, persistence, messaging, security, and transaction management.

Package Information

  • Package Name: javaee-api
  • Package Type: Maven
  • Language: Java
  • Installation: Add to your pom.xml:
<dependency>
    <groupId>javax</groupId>
    <artifactId>javaee-api</artifactId>
    <version>8.0.1</version>
    <scope>provided</scope>
</dependency>

Core Imports

Java EE APIs are accessed through their respective package namespaces:

// Servlet API
import javax.servlet.*;
import javax.servlet.http.*;

// Enterprise JavaBeans
import javax.ejb.*;

// Java Persistence API
import javax.persistence.*;

// JAX-RS (RESTful Web Services)
import javax.ws.rs.*;

// CDI (Contexts and Dependency Injection)
import javax.enterprise.context.*;
import javax.inject.*;

// JSON Processing and Binding
import javax.json.*;
import javax.json.bind.*;

// Web Services (JAX-WS)
import javax.jws.*;
import javax.xml.ws.*;

// XML Binding (JAXB)
import javax.xml.bind.*;
import javax.xml.bind.annotation.*;

Basic Usage

// Basic servlet example
@WebServlet("/hello")
public class HelloServlet extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) 
            throws ServletException, IOException {
        response.getWriter().println("Hello, Java EE!");
    }
}

// JAX-RS REST endpoint
@Path("/api/users")
@ApplicationScoped
public class UserResource {
    
    @Inject
    private UserService userService;
    
    @GET
    @Produces(MediaType.APPLICATION_JSON)
    public List<User> getUsers() {
        return userService.findAll();
    }
}

// JPA Entity
@Entity
@Table(name = "users")
public class User {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;
    
    @Column(nullable = false)
    private String name;
    
    // getters and setters
}

Architecture

Java EE 8 API is organized into two main profiles:

  • Web Profile: Core APIs for web application development (Servlet, JSP, JSF, JAX-RS, JPA, CDI, etc.)
  • Full Profile: Web Profile + additional enterprise APIs (JMS, JavaMail, JCA, Batch, etc.)

The API provides standardized interfaces that are implemented by Java EE application servers like GlassFish, WildFly, WebLogic, and WebSphere.

Capabilities

Web Technologies

Web layer APIs for building user interfaces and handling HTTP requests including servlets, JSP, JSF, and WebSocket support.

// Servlet API
public abstract class HttpServlet extends GenericServlet;
public interface HttpServletRequest extends ServletRequest;
public interface HttpServletResponse extends ServletResponse;

// JSF API  
public abstract class UIComponent implements StateHolder;
public abstract class FacesContext;

// WebSocket API
@ServerEndpoint(value="/websocket")
public class WebSocketEndpoint;

Web Technologies

RESTful Web Services

JAX-RS API for building RESTful web services with annotation-driven development and comprehensive client API.

@Target({ElementType.TYPE, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@HttpMethod("GET")
public @interface GET;

public interface Response;
public abstract class Application;

RESTful Web Services

Enterprise JavaBeans

EJB API for developing enterprise business components with transaction management, security, and lifecycle support.

@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
public @interface Stateless;

@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)  
public @interface Stateful;

public interface EJBContext;

Enterprise JavaBeans

Java Persistence

JPA API for object-relational mapping, entity management, and database operations with JPQL query language.

@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
public @interface Entity;

public interface EntityManager;
public interface Query;
public interface TypedQuery<X>;

Java Persistence

Dependency Injection

CDI and javax.inject APIs for dependency injection, contextual lifecycle management, events, and interceptors.

@Target({ElementType.TYPE, ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
public @interface Inject;

public interface BeanManager;
public interface Instance<T>;

Dependency Injection

JSON Processing

JSON-P and JSON-B APIs for parsing, generating, and binding JSON data with streaming and object mapping support.

public interface JsonReader extends Closeable;
public interface JsonWriter extends Closeable;
public final class Json;

// JSON Binding
public interface Jsonb extends AutoCloseable;
public final class JsonbBuilder;

JSON Processing

Messaging

JMS API for asynchronous messaging with support for queues, topics, and message-driven beans.

public interface ConnectionFactory;
public interface Connection extends AutoCloseable;
public interface Session extends Runnable, AutoCloseable;
public interface MessageProducer extends AutoCloseable;
public interface MessageConsumer extends AutoCloseable;

Messaging

Transaction Management

JTA API for declarative and programmatic transaction management with XA resource coordination.

public interface UserTransaction;
public interface TransactionManager;
public interface Transaction;

Transaction Management

Security

Security APIs including JACC authorization, JASPIC authentication, and Java EE Security for identity management.

// JACC
public abstract class Policy;
public interface PolicyContext;

// Java EE Security
public interface IdentityStore;
public interface HttpAuthenticationMechanism;

Security

Validation

Bean Validation API for validating JavaBeans using constraint annotations and validation groups.

public interface Validator;
public interface ValidatorFactory;

@Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER, ElementType.ANNOTATION_TYPE})
@Retention(RetentionPolicy.RUNTIME)
public @interface NotNull;

Validation

Web Services

JAX-WS API for building SOAP-based web services with annotation-driven development, comprehensive client support, and WSDL generation.

@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
public @interface WebService {
    String name() default "";
    String targetNamespace() default "";
    String serviceName() default "";
    String portName() default "";
    String wsdlLocation() default "";
    String endpointInterface() default "";
}

public class Service {
    public static Service create(URL wsdlDocumentLocation, QName serviceName);
    public <T> T getPort(QName portName, Class<T> serviceEndpointInterface);
    public <T> Dispatch<T> createDispatch(QName portName, Class<T> type, Service.Mode mode);
}

Web Services

XML Binding

JAXB API for binding Java objects to XML representations with annotation-driven marshalling and unmarshalling support.

public abstract class JAXBContext {
    public static JAXBContext newInstance(String contextPath) throws JAXBException;
    public static JAXBContext newInstance(Class... classesToBeBound) throws JAXBException;
    public abstract Marshaller createMarshaller() throws JAXBException;
    public abstract Unmarshaller createUnmarshaller() throws JAXBException;
}

@Target({ElementType.TYPE, ElementType.PACKAGE})
@Retention(RetentionPolicy.RUNTIME)
public @interface XmlRootElement {
    String name() default "##default";
    String namespace() default "##default";
}

XML Binding

Enterprise Services

Additional enterprise APIs including JavaMail, JCA connectors, batch processing, and concurrency utilities.

// JavaMail
public abstract class Message implements Part;
public abstract class Transport;

// Batch Processing
public interface JobOperator;
public interface StepContext;

// Concurrency
public interface ManagedExecutorService extends ExecutorService;

Enterprise Services