Home » Tag Archives: CDI

Tag Archives: CDI

Native CDI Qualifiers: @Any and @Default

java-interview-questions-answers

Let’s take a look at the out-of-the-box qualifiers in CDI There are three qualifiers declared by the CDI specification – @Any, @Default, @New @Any: Think of it as an omnipresent qualifier. It’s there even if its not ;-) @Default: As the name suggests, this qualifier treated as a default when none other qualifiers have been specific. The only exception to ...

Read More »

A look on CDI 2.0 EDR1

java-interview-questions-answers

CDI is one of the best additions to Java EE of the recent. This opinion is widely shared amongst users and integrators. CDI 1.2, the current version, was released in April, 2014. Now in mid-2015, we face the early draft review of the CDI 2.0 spec. CDI 2.0 will run on Java 8 and higher. The final release is scheduled ...

Read More »

Using JPA And CDI Beans With Camel on WildFly

jboss-wildfly-logo

I didn’t really plan for it, but with a conference free month, I had the chance to dig around a little more and show you even more of the Camel on WildFly magic, that the WildFly-Camel subsystem provides. The Business Background The demo is derived from one on JBoss Demo-Central by Christina Lin. She demonstrates the use of File and JDBC ...

Read More »

CDI & EJB: Sending asynchronous mail on transaction success

java-interview-questions-answers

Hello again! :) This time I’ve chosen a common task that most of the time, in my opinion, is done the wrong way: sending e-mails. Not that people can’t figure out how e-mail APIs work, such as JavaMail or Apache’s commons-email. What I usually see as a problem is that they underestimate the need to make the sending mail routine ...

Read More »

Simplifying JAX-RS caching with CDI

java-interview-questions-answers

This post explains (via a simple example) how you can use CDI Producers to make it a little easier to leverage cache control semantics in your RESTful services The Cache-Control header was added in HTTP 1.1 as a much needed improvement over the Expires header available in HTTP 1.0. RESTful web services can make use of this header in order ...

Read More »

Playing with Weld-Probe – See All of your CDI Aspects in One Place

java-interview-questions-answers

Weld 3.0.0.Alpha4 was released, while I’ve been sitting in a conference room at DevConf.CZ. More or less next to Jozef Hartinger ( @jozefhartinger) who told me about the new awesome features of this latest release a few minutes before in a shared break. There is one particular feature, that really caught my attention which is the new Weld Probe mechanism.     What ...

Read More »

Integrating CDI and WebSockets

java-interview-questions-answers

Thought of experimenting with a simple Java EE 7 prototype application involving JAX-RS (REST), WebSockets and CDI. Note: Don’t want this to be a spoiler – but this post mainly talks about an issue which I faced while trying to use web sockets and REST using CDI as a ‘glue’ (in a Java EE app). The integration did not materialize, ...

Read More »

Java EE Interceptors

java-interview-questions-answers

History I think it’s important to take a look at the evolution of Interceptors in Java EE because of the simple fact that it started as an EJB-specific item and later evolved into a separate spec which is now open for extension by other Java EE specifications. Version 1.0 Interceptors were first introduced in EJB 3.0 (part of Java EE ...

Read More »

Want to take your Java skills to the next level?

Grab our programming books for FREE!

Here are some of the eBooks you will get:

  • Advanced Java Guide
  • Java Design Patterns
  • JMeter Tutorial
  • Java 8 Features Tutorial
  • JUnit Tutorial
  • JSF Programming Cookbook
  • Java Concurrency Essentials