JBoss EAP Quickstarts

repository·8.0.x·Indexed 21 days ago

https://github.com/jboss-developer/jboss-eap-quickstarts

A collection of quickstart examples for JBoss Enterprise Application Platform (EAP) and WildFly. These working references help developers implement Jakarta EE technologies, including CDI, JPA, EJB, and JAX-RS. The collection includes specific demonstrations such as Container Managed Transactions (CMT) using @jakarta.ejb.TransactionAttribute for XA transaction control across databases and JMS queues.

Tokens
61.7K
Snippets
217
Records
320
Agent score
70%

What's inside jboss-eap-quickstarts

  1. Overview of the websocket-hello quickstart

    8.0.x

    The websocket-hello quickstart is a beginner-level demonstration of a WebSocket-enabled application in JBoss EAP. It showcases how to implement WebSocket functionality using CDI (Contexts and Dependency Injection) and JSF (JavaServer Faces).

    Key components include:

    • A JavaScript-enabled WebSocket HTML client.
    • A WebSocket server endpoint that uses annotations to handle WebSocket events.
    • A jboss-web.xml configuration file used to enable WebSockets for the application.

    WebSockets are implemented in the undertow subsystem of the JBoss EAP server configuration. This quickstart uses default settings, so no manual server configuration changes are required.

  2. Overview of the servlet-security quickstart

    8.0.x

    The servlet-security quickstart demonstrates how to use Jakarta EE declarative security to control access to Servlets in JBoss EAP.

    It implements security through three main layers:

    1. Web Application: Uses @ServletSecurity and @HttpConstraint annotations, a security domain reference in WEB-INF/jboss-web.xml, and a BASIC authentication configuration in WEB-INF/web.xml.
    2. Application Server: Configures a security domain in the elytron subsystem using a JDBC security realm, and maps it to the web application via the undertow subsystem.
    3. Database: Uses a JDBC realm to authenticate users and authorize roles.

    Pre-configured Users (defined in src/main/resources/import.sql):

    • Authorized User: quickstartUser / quickstartPwd1! (Role: quickstarts)
    • Unauthorized User: guest / guestPwd1! (Role: notauthorized)
  3. Overview of the kitchensink quickstart

    8.0.x

    The kitchensink quickstart is a deployable Maven 3 project that demonstrates how to build a compliant Jakarta EE application. It serves as an assortment of technologies, including CDI, JSF, JPA, EJB, JAX-RS, and Bean Validation. It also includes a persistence unit and sample code for database access and transactions.

    Note on Production Use:

    • H2 Database: This quickstart uses the H2 database included with the product. It is a lightweight example datasource and should NOT be used in a production environment.
    • Datasource Configuration: It uses *-ds.xml files for convenience. These are deprecated; for production, use the Management CLI or Management Console to configure datasources.
  4. Overview of websocket-hello quickstart

    8.0.x

    The websocket-hello quickstart demonstrates how to create a simple WebSocket-enabled application. It includes:

    • A JavaScript-enabled WebSocket HTML client.
    • A WebSocket server endpoint using annotations to interact with WebSocket events.
    • A jboss-web.xml file configured to enable WebSockets.

    WebSockets are part of the Jakarta EE specification and are implemented in the server's undertow subsystem. This quickstart uses default settings, so no manual server configuration changes are required for deployment.

  5. Overview of the todo-backend quickstart

    8.0.x

    The todo-backend quickstart demonstrates how to implement a backend that exposes a JAX-RS HTTP API to manage a list of ToDos, with persistence provided by JPA and a PostgreSQL database.

    It supports multiple deployment modes:

    • Bootable Jar: For local development and cloud deployment, provisioning the application server and required feature packs (like postgresql-datasource) into a single executable jar.
    • S2I (Source-to-Image): For cloud deployment using builder and runtime images.
    • OpenShift/Helm: Deployment on OpenShift using Helm charts to manage the application and its dependencies (like PostgreSQL).
  6. Overview of ee-security Jakarta EE Security Quickstart

    8.0.x

    The ee-security quickstart demonstrates how to implement Jakarta EE security within JBoss EAP. It features a simple HTTP servlet secured by a custom HttpAuthenticationMechanism, which in turn utilizes a custom IdentityStore for authentication.

    Key Details:

    • Hardcoded Credentials: The quickstart is configured to work with the user quickstartUser and password quickstartPwd1!.
    • Technologies used: Jakarta EE Security, Servlet, and CDI.
  7. Replaceable Variables in Quickstart READMEs

    8.0.x

    When reading the generated README.html or README.adoc files within individual quickstart directories, you will encounter placeholder variables that must be manually replaced with your local environment paths:

    • __WILDFLY_HOME__ (or __JBOSS_HOME__ depending on the product version): Replace this with the actual path to your WildFly or JBoss EAP server installation.
    • __QUICKSTART_HOME__: Replace this with the absolute path to the root directory of the quickstarts repository.