Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Jakarta EE meets AI

ivargrimstad
September 09, 2024

Jakarta EE meets AI

Most of us are not writing our own Large Language Models (LLMs). We are consuming them, and integrating them into our enterprise applications. Ang guess what? Java is the perfect language for this! You don't have to learn Python or any other language for your AI integrations.

This session will explore different options there are for Java developers and how to integrate them into your enterprise Java applications. There will be live demos using libraries and tools such as LangChain4J, Spring AI, and Jakarta EE.

ivargrimstad

September 09, 2024
Tweet

More Decks by ivargrimstad

Other Decks in Programming

Transcript

  1. Jakarta EE Meets Integrating AI in Your Enterprise Java Applications

    Ivar Grimstad
 Jakarta EE Developer Advocate Eclipse Foundation
  2. COPYRIGHT (C) 2024, ECLIPSE FOUNDATION, INC. | THIS WORK IS

    LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) 2022 2024 2020 Java 21 Embrace Records Jakarta Data CDI Centric Removals and Deprecations javax.* -> jakarta.* Jakarta EE Core Pro fi le
  3. COPYRIGHT (C) 2024, ECLIPSE FOUNDATION, INC. | THIS WORK IS

    LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) Speci fi cation Document API TCK Final Speci fi cation Compatible Implementation(s) Speci fi
  4. COPYRIGHT (C) 2022, ECLIPSE FOUNDATION, INC. | THIS WORK IS

    LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) COPYRIGHT (C) 2024, ECLIPSE FOUNDATION, INC. | THIS WORK IS LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) Jakarta EE 11
  5. RESTful Web Services 4.0 JSON Processing 2.1 JSON Binding 3.0

    Annotations 3.0 CDI Lite 4.1 Interceptors 2.2 Dependency Injection 2.0 Servlet 6.1 Pages 4.0 Expression Language 6.0 Debugging Support 2.0 Standard Tag Libraries 3.0 Faces 4.1 WebSocket 2.2 Enterprise Beans Lite 4.0 Persistence 3.2 Transactions 2.0 CDI 4.1 Authentication 3.1 Concurrency 3.1 Security 4.0 Validation 3.1 Data 1.0 Authorization 3.0 Activation 2.1 Batch 2.1 Connectors 2.1 Mail 2.1 Messaging 3.1 Enterprise Beans 4.0 Jakarta EE 11 Platform Jakarta EE 11 Web Pro fi Updated Not Updated New
  6. Jakarta EE 11 Web Pro fi le RESTful Web Services

    4.0 JSON Processing 2.1 JSON Binding 3.0 Annotations 3.0 CDI Lite 4.1 Interceptors 2.2 Dependency Injection 2.0 Servlet 6.1 Pages 4.0 Expression Language 6.0 Debugging Support 2.0 Standard Tag Libraries 3.0 Faces 4.1 WebSocket 2.2 Enterprise Beans Lite 4.0 Persistence 3.2 Transactions 2.0 CDI 4.1 Authentication 3.1 Concurrency 3.1 Security 4.0 Validation 3.1 Data 1.0 Jakarta EE 11 Core Pro fi Updated Not Updated New
  7. Jakarta EE 11 Core Pro fi le Updated Not Updated

    New RESTful Web Services 4.0 JSON Processing 2.1 JSON Binding 3.0 Annotations 3.0 CDI Lite 4.1 Interceptors 2.2 Dependency Injection 2.0
  8. Jakarta EE 11 API source level: Java SE 17 API

    binary level: Java SE 17 TCK run with: Java SE 17+21 App Developers (YOU) can use Java SE 21 features if you like !!
  9. COPYRIGHT (C) 2024, ECLIPSE FOUNDATION, INC. | THIS WORK IS

    LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) Release Cadence ~6-9 Months after the latest LTS of Java
  10. COPYRIGHT (C) 2024, ECLIPSE FOUNDATION, INC. | THIS WORK IS

    LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) March, 2024 Milestone 2 April, 2024 Milestone 3 May, 2024 Milestone 4 December, 2023 Milestone 1
  11. COPYRIGHT (C) 2024, ECLIPSE FOUNDATION, INC. | THIS WORK IS

    LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) May, 2024 Milestone 4 • Feature complete • All API jars released • For each API at least one compatible implementation (e.g. Hibernate, Mojarra) • Each compatible implementation passed standalone TCK <dependency> <groupId>jakarta.platform</groupId> <artifactId>jakarta.jakartaee-api</artifactId> <version>11.0.0-M4</version> <scope>provided</scope> </dependency>
  12. COPYRIGHT (C) 2024, ECLIPSE FOUNDATION, INC. | THIS WORK IS

    LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) Q3, 2024
  13. COPYRIGHT (C) 2024, ECLIPSE FOUNDATION, INC. | THIS WORK IS

    LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) Cross-Cutting Concerns
  14. COPYRIGHT (C) 2024, ECLIPSE FOUNDATION, INC. | THIS WORK IS

    LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) Removed Replaced by CDI Managed Beans 2.0
  15. COPYRIGHT (C) 2024, ECLIPSE FOUNDATION, INC. | THIS WORK IS

    LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) Optional Features Jakarta EE Platform Jakarta EE Web Pro fi le Jakarta EE Core Pro fi le Jakarta XML Binding 4.0 Jakarta SOAP with Attachments 4.0 Jakarta XML Web Service 4.0
  16. COPYRIGHT (C) 2024, ECLIPSE FOUNDATION, INC. | THIS WORK IS

    LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) Removed SecurityManager JEP 411: Deprecate the Security Manager for Removal
  17. COPYRIGHT (C) 2024, ECLIPSE FOUNDATION, INC. | THIS WORK IS

    LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) Embrace Java Records
  18. COPYRIGHT (C) 2022, ECLIPSE FOUNDATION, INC. | THIS WORK IS

    LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) COPYRIGHT (C) 2024, ECLIPSE FOUNDATION, INC. | THIS WORK IS LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0)
  19. Authorization 3.0 Activation 2.1 Batch 2.1 Connectors 2.1 Mail 2.1

    Messaging 3.1 Enterprise Beans 4.0 RESTful Web Services 4.0 JSON Processing 2.1 JSON Binding 3.0 Annotations 3.0 CDI Lite 4.1 Interceptors 2.2 Dependency Injection 2.0 Servlet 6.1 Pages 4.0 Expression Language 6.0 Debugging Support 2.0 Standard Tag Libraries 3.0 Faces 4.1 WebSocket 2.2 Enterprise Beans Lite 4.0 Persistence 3.2 Transactions 2.0 CDI 4.1 Authentication 3.1 Concurrency 3.1 Security 4.0 Validation 3.1 Jakarta EE 11 Platform Updated Not Updated New Data 1.0
  20. COPYRIGHT (C) 2024, ECLIPSE FOUNDATION, INC. | THIS WORK IS

    LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) Jakarta RESTful Web Services 4.0 https://jakarta.ee/speci fi cations/restful-ws/4.0/
  21. COPYRIGHT (C) 2024, ECLIPSE FOUNDATION, INC. | THIS WORK IS

    LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) • Remove Jakarta XML Binding dependency • Remove ManagedBean support • Mentally prepare to deprecate native component model
  22. COPYRIGHT (C) 2024, ECLIPSE FOUNDATION, INC. | THIS WORK IS

    LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) • Convenience method for checking header value lists • Add getMatchedResourceTemplate method to UriInfo • Add JSON Merge Patch constant
  23. Authorization 3.0 Activation 2.1 Batch 2.1 Connectors 2.1 Mail 2.1

    Messaging 3.1 Enterprise Beans 4.0 RESTful Web Services 4.0 JSON Processing 2.1 JSON Binding 3.0 Annotations 3.0 CDI Lite 4.1 Interceptors 2.2 Dependency Injection 2.0 Servlet 6.1 Pages 4.0 Expression Language 6.0 Debugging Support 2.0 Standard Tag Libraries 3.0 Faces 4.1 WebSocket 2.2 Enterprise Beans Lite 4.0 Persistence 3.2 Transactions 2.0 CDI 4.1 Authentication 3.1 Concurrency 3.1 Security 4.0 Validation 3.1 Jakarta EE 11 Platform Updated Not Updated New Data 1.0
  24. COPYRIGHT (C) 2024, ECLIPSE FOUNDATION, INC. | THIS WORK IS

    LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) Jakarta Contexts and Dependency Injection 4.1 https://jakarta.ee/speci fi cations/cdi/4.1/
  25. COPYRIGHT (C) 2024, ECLIPSE FOUNDATION, INC. | THIS WORK IS

    LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) Support Records and Sealed Types Deprecate Expression Language SPI @Priority on producers
  26. COPYRIGHT (C) 2024, ECLIPSE FOUNDATION, INC. | THIS WORK IS

    LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) Move Integration Requirements CDI Platform
  27. Authorization 3.0 Activation 2.1 Batch 2.1 Connectors 2.1 Mail 2.1

    Messaging 3.1 Enterprise Beans 4.0 RESTful Web Services 4.0 JSON Processing 2.1 JSON Binding 3.0 Annotations 3.0 CDI Lite 4.1 Interceptors 2.2 Dependency Injection 2.0 Servlet 6.1 Pages 4.0 Expression Language 6.0 Debugging Support 2.0 Standard Tag Libraries 3.0 Faces 4.1 WebSocket 2.2 Enterprise Beans Lite 4.0 Persistence 3.2 Transactions 2.0 CDI 4.1 Authentication 3.1 Concurrency 3.1 Security 4.0 Validation 3.1 Jakarta EE 11 Platform Updated Not Updated New Data 1.0
  28. COPYRIGHT (C) 2022, ECLIPSE FOUNDATION, INC. | THIS WORK IS

    LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) Jakarta JSON Binding 3.0 https://jakarta.ee/speci fi cations/jsonb
  29. Authorization 3.0 Activation 2.1 Batch 2.1 Connectors 2.1 Mail 2.1

    Messaging 3.1 Enterprise Beans 4.0 RESTful Web Services 4.0 JSON Processing 2.1 JSON Binding 3.0 Annotations 3.0 CDI Lite 4.1 Interceptors 2.2 Dependency Injection 2.0 Servlet 6.1 Pages 4.0 Expression Language 6.0 Debugging Support 2.0 Standard Tag Libraries 3.0 Faces 4.1 WebSocket 2.2 Enterprise Beans Lite 4.0 Persistence 3.2 Transactions 2.0 CDI 4.1 Authentication 3.1 Concurrency 3.1 Security 4.0 Validation 3.1 Jakarta EE 11 Platform Updated Not Updated New Data 1.0
  30. COPYRIGHT (C) 2024, ECLIPSE FOUNDATION, INC. | THIS WORK IS

    LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) Jakarta Data 1.0 Standardizes the repository pattern for data access https://jakarta.ee/speci fi cations/data/1.0/ NEW in Jakarta EE 11
  31. COPYRIGHT (C) 2024, ECLIPSE FOUNDATION, INC. | THIS WORK IS

    LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) Jakarta Data Query Language (JDQL) https://github.com/jakartaee/data/blob/main/spec/src/antlr/JDQL.g4
  32. COPYRIGHT (C) 2024, ECLIPSE FOUNDATION, INC. | THIS WORK IS

    LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) Demo
  33. COPYRIGHT (C) 2024, ECLIPSE FOUNDATION, INC. | THIS WORK IS

    LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) An Opportunity Jakarta Data implementation
  34. COPYRIGHT (C) 2022, ECLIPSE FOUNDATION, INC. | THIS WORK IS

    LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) COPYRIGHT (C) 2024, ECLIPSE FOUNDATION, INC. | THIS WORK IS LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) and Jakarta EE
  35. COPYRIGHT (C) 2024, ECLIPSE FOUNDATION, INC. | THIS WORK IS

    LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) Demo
  36. COPYRIGHT (C) 2024, ECLIPSE FOUNDATION, INC. | THIS WORK IS

    LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0)
  37. COPYRIGHT (C) 2024, ECLIPSE FOUNDATION, INC. | THIS WORK IS

    LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0)
  38. COPYRIGHT (C) 2024, ECLIPSE FOUNDATION, INC. | THIS WORK IS

    LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0)
  39. COPYRIGHT (C) 2024, ECLIPSE FOUNDATION, INC. | THIS WORK IS

    LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) https://docs.langchain4j.dev
  40. COPYRIGHT (C) 2024, ECLIPSE FOUNDATION, INC. | THIS WORK IS

    LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) What if I really like
  41. COPYRIGHT (C) 2024, ECLIPSE FOUNDATION, INC. | THIS WORK IS

    LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0)
  42. COPYRIGHT (C) 2022, ECLIPSE FOUNDATION, INC. | THIS WORK IS

    LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) Summary
  43. Jakarta EE 10 Platform Updated Not Updated New Authorization 2.1

    Activation 2.1 Batch 2.1 Connectors 2.1 Mail 2.1 Messaging 3.1 Enterprise Beans 4.0 RESTful Web Services 3.1 JSON Processing 2.1 JSON Binding 3.0 Annotations 2.1 CDI Lite 4.0 Interceptors 2.1 Dependency Injection 2.0 Servlet 6.0 Server Pages 3.1 Expression Language 5.0 Debugging Support 2.0 Standard Tag Libraries 3.0 Faces 4.0 WebSocket 2.1 Enterprise Beans Lite 4.0 Persistence 3.1 Transactions 2.0 Managed Beans 2.0 CDI 4.0 Authentication 3.0 Concurrency 3.0 Security 3.0 Bean Validation 3.0
  44. Authorization 3.0 Activation 2.1 Batch 2.1 Connectors 2.1 Mail 2.1

    Messaging 3.1 Enterprise Beans 4.0 RESTful Web Services 4.0 JSON Processing 2.1 JSON Binding 3.0 Annotations 3.0 CDI Lite 4.1 Interceptors 2.2 Dependency Injection 2.0 Servlet 6.1 Pages 4.0 Expression Language 6.0 Debugging Support 2.0 Standard Tag Libraries 3.0 Faces 4.1 WebSocket 2.2 Enterprise Beans Lite 4.0 Persistence 3.2 Transactions 2.0 CDI 4.1 Authentication 3.1 Concurrency 3.1 Security 4.0 Validation 3.1 Jakarta EE 11 Platform Updated Not Updated New Data 1.0 Under Developm ent
  45. COPYRIGHT (C) 2024, ECLIPSE FOUNDATION, INC. | THIS WORK IS

    LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) 2022 2024 2020 Java 21 Embrace Records Jakarta Data CDI Centric Removals and Deprecations javax.* -> jakarta.* Jakarta EE Core Pro fi le
  46. Jakarta EE 11 API source level: Java SE 17 API

    binary level: Java SE 17 TCK run with: Java SE 17+21 App Developers (YOU) can use Java SE 21 features if you like !!
  47. COPYRIGHT (C) 2024, ECLIPSE FOUNDATION, INC. | THIS WORK IS

    LICENSED UNDER A CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE (CC BY 4.0) +