Home » Tag Archives: Java EE6

Tag Archives: Java EE6

Java EE EJB Interceptors tutorial and example

java-interview-questions-answers

In this example we are going to see how to use Interceptors in an EJB and test it using a simple Web Application. 1. Introduction Interceptors are used, as the name suggests, when you want to intercept calls to EJB methods. If you declare an Interceptor for a Bean, every time a method of that Bean is invoked, it will ...

Read More »

Java EE CDI programmatic dependency disambiguation example – Injection Point inspection

java-interview-questions-answers

In this tutorial we shall see how we can avoid programmatic dependency disambiguation when injecting Java EE CDI beans. We have already shown in the Jave EE dependency disambiguation example how to avoid dependency disambiguation in CDI beans. Here we shall show you how to avoid dependency disambiguation in a dynamic way. We will achieve this by inspecting the injection ...

Read More »

Java EE CDI dependency disambiguation example

java-logo

In this tutorial we shall show you how to avoid dependency disambiguation in CDI beans. In CDI we can achieve dependency injection for multiple implementations of an interface to different clients in an application. The problem of dependency disambiguation is how a client can call a specific implementation among different ones, without any errors occurring. To see how we can ...

Read More »

Java EE CDI Dependency Injection (@Inject) tutorial

java-interview-questions-answers

In this tutorial we shall show you how to achieve Dependency Injection in CDI managed Beans. In particular, we shall make use of the @Inject annotation provided by the CDI API to inject a CDI bean to another bean. In this way the bean can be used in an application, such as a JavaServer Faces application. CDI provides several ways ...

Read More »

Secure Web Application in Java EE6 using LDAP

java-interview-questions-answers

In our previous article we have explained on how to protect the data while it is in transit through Transport Layer Security (TLS)/Secured Socket Layer (SSL). Now let us try to understand how to apply security mechanism for a JEE 6 based web application using LDAP server for authentication. Objective: •    Configure a LDAP realm in the JEE Application Server ...

Read More »

Asynchronous CDI Events

java-logo

Few days ago, during our regular code review, one of my colleagues raised a question what would happen — and if it’s even possible — when a CDI Observer (so a method with parameter annotated @Observes) would be invoked multiple times at the same time for different event instances. In other words, after producing few events, is it possible that ...

Read More »

Java EE CDI Disposer methods example

java-logo

This is a tutorial of CDI Disposer methods. In CDI, since a Producer method generates an object that can then be injected in an application, the Disposer method is used so that the object is removed when its work is completed. A Disposer method is always matched to a Producer method. An example of the Disposer method use is when ...

Read More »

Java EE CDI Producer methods tutorial

java-interview-questions-answers

This is a tutorial of CDI Producer methods. In CDI, a Producer method generates an object that can then be injected. Producer methods can be used when we want to inject an object that is not itself a bean, when the concrete type of the object to be injected may vary at runtime, or when the object requires some custom ...

Read More »

Integrating Bean Validation with JAX-RS in Java EE 6

java-interview-questions-answers

JavaBeans Validation (Bean Validation) is a new validation model available as part of Java EE 6 platform. The Bean Validation model is supported by constraints in the form of annotations placed on a field, method, or class of a JavaBeans component, such as a managed bean. Several built-in constraints are available in the javax.validation.constraints package. The Java EE 6 Tutorial ...

Read More »
Want to take your Java Skills to the next level?
Grab our programming books for FREE!
  • Save time by leveraging our field-tested solutions to common problems.
  • The books cover a wide range of topics, from JPA and JUnit, to JMeter and Android.
  • Each book comes as a standalone guide (with source code provided), so that you use it as reference.
Last Step ...

Where should we send the free eBooks?

Good Work!
To download the books, please verify your email address by following the instructions found on the email we just sent you.