CDI


Do we need to Giftwrap Shrinkwrap?

I’ve been working on a bit of a framework to make it easier to write test archives for Arquillian based on Shrinkwrap. This post is a summary of the work so far and hopefully with some feedback, specifically on where ShrinkWrap is going, I can determine whether to polish it up and release it or just use it internally until the features are available elsewhere.
Read More »

CDI Conversations part 2

This article will look at using the Conversation scope defined in JSR 299 (Java Contexts and Dependency Injection), and released as part of Java EE 6. For now, we’ll stick to non-data driven examples as we explore the ins and outs of the Conversation scope. We’ll finish up by creating a workspace manager so we can list all the active conversations and switch between them.
Read More »

JSF Basics

This is a brief tutorial that takes a quick look at some of the very basics of JSF, how we define pages and hook them up to server side objects. Rather than cover the fundamentals of starting a new JSF application, I’m going to start from one of the Knappsack archetypes which can provide you with a JEE 6 application ready to roll. In this case, we are going to start with a servlet based example so you can run it using the embedded servlet containers.
Read More »

Conversational CRUD in Java EE 6

This tutorial will demonstrate a pattern for creating CRUD applications in JSF and Java EE 6. While this is not the only way of implementing this mechanism, it does promote re-use and can give you essentially zero code CRUD pages requiring just the view code. The goal is to provide a single structure that provides the particular feature of being both stateless or conversational where we might want a conversational edit page and a stateless view page. This pattern is based on the EntityHome pattern that was used in JBoss Seam and carries over well to Java EE 6 with CDI. This is something I use all the time to make view/edit pages really quickly and unlike most of the automatic scaffolding in other frameworks, doesn’t need re-writing to go into production.
Read More »

Demo Application Using JSF, JPA, CDI with Jetty

The previous version of the Knappsack Maven Archetypes included archetypes for creating projects using JSF, JPA, CDI and Bean Validation that can run in a servlet container such as Jetty or Tomcat. In order to put it through its paces I decided to create a little test social bookmarking application that lets users create accounts, and when logged in, add bookmarks and tag them. Users that are not logged in can view the bookmarks and filter them by user or tag, and the results are paginated.
Read More »

CDI Conversations Part 1

This is the first in a series of articles looking at the conversation scope introduced in CDI as part of Java EE 6. We’ll start by looking at existing scopes and how they introduce limitations for developers and how CDI conversations get around these limitations.
Read More »

Try Java EE 6 without the commitment

The latest version of the Knappsack Maven Archetypes now supports creating Java EE 6 applications for servlet containers. These projects includes configuration for core Java EE 6 technologies such as JSF, CDI, JPA and Bean Validation and can be run from the command line using the embedded Jetty and Tomcat servlet containers.

Also with this latest release, all the archetypes are available in the Central Maven Repository which means you can dive straight in and create a new Maven project using these archetypes :
Read More »