Posts

Showing posts with the label CDI

Usage of CDI in Oracle ADF - Part III - CDI Events

Image
Hi, I will bring some serie of posts about CDI usage within Oracle ADF: Usage of CDI in Oracle ADF - Part I - Introduction. Usage of CDI in Oracle ADF - Part II - Enabling and using CDI. Usage of CDI in Oracle ADF - Part III - CDI Events In this post I want to introduce an example of the usage of CDI Events (Synchronous and Asynchronous) to enhance your Oracle ADF Skills. The example contains the CDI Events Synchronous and Asynchronous implementation. However, as commented in previous posts , WebLogic 12.2.1.3 is shipped with CDI 1.0 which is not compatible with Asynchronous Events introduced in 2.0 ). https://github.com/DanielMerchan/adf The application is based on a Pokemon Battle where attacking takes a period of time before it completes the attack. Each Pokemon Attack is an Event which is processed Synchronous or Asynchronus depending on the attack selected. Which are the important parts in the example? In the example you can find: PokemonAttack.java : T...

Usage of CDI in Oracle ADF - Part II - Enabling and using CDI

Image
Hi, I will bring some serie of posts about CDI usage within Oracle ADF: Usage of CDI in Oracle ADF - Part I - Introduction. Usage of CDI in Oracle ADF - Part II - Enabling and using CDI. Usage of CDI in Oracle ADF - Part III - CDI Events - Synchronous Previously I have introduced Usage of CDI in Oracle ADF - Part I - Introduction. what are CDI Beans in Java EE 8 and why are them so important in Java Web Development. Now, we are going to setup our ADF Project to be able to use CDI Beans. How do I enable CDI in an ADF Application? Important Update: Do not include CDI 2.0 or other Java Enterprise dependencies of higher versions that are shipped with Oracle WebLogic Server. E.g.: Oracle WebLogic 12.2.1.3 is CDI 1.1. compatible If you are using Maven or the classic JDeveloper Library manageemnt then add the Context and Dependency Injection library to your pom.xml Also, you can add manually the CDI dependency as following: com.oracle.adf.library ...

Usage of CDI in Oracle ADF - Part I - Introduction

Hi, I will bring some serie of posts about CDI usage within Oracle ADF: Usage of CDI in Oracle ADF - Part I - Introduction. Usage of CDI in Oracle ADF - Part II - Enabling and using CDI. Usage of CDI in Oracle ADF - Part III - CDI Events - Synchronous In this series of post I will bring a common topic around development in Oracle ADF 12cR2 for Java EE / Jakarta EE developers who has been using also JSF 2.3. Some history on JSF and Managed Beans Looooong time ago... JSF as other frameworks introduced a way on how the objects are created, injected and used without the need of making explicit new in our code for memory optimisation etc... In JSF, JSF Managed Beans are defined in the faces-config.xml and managed by the JSF Framework. Remember that Annotations for JSF Managed Beans were introduced in JSF 2.0 allowing us to declare the JSF Managed Beans within the class itself instead of registering in a faces config file. Note: The JSF annotations are located under javax.fa...