Java EE 6 Development using the Maven Embedded GlassFish Plugin

Today we’re going to take a look at the Maven Embedded GlassFish Plugin and how it allows us quick creation of GlassFish server instances in no time and Java EE 6 application deployment. Figure 1. GlassFish + Maven With a few lines of configuration in your Maven’s pom.xml we’ve got a running GlassFish instance and are able to redeploy our application fast by pressing enter in our console. In the following tutorial we’re going to build a Java EE 6 Web Application with a stateless session bean and a web servlet and finally deploy – and redeploy the application using the Maven GlassFish Plugin. ...

September 20, 2011 · 5 min · 978 words · Micha Kops

Java EE 6, GlassFish and the Interceptor API

Aspect oriented programming and the definition of cross-cutting-concerns is made easy in Java EE 6 using interceptors. In the following tutorial we’re going to take a look at the different possibilities to apply interceptors to your EJBs at class or method level and how to setup a GlassFish instance to run the examples. Prerequisites We don’t need much for the following tutorial – just a JDK, Maven and GlassFish… Java Development Kit 6 GlassFish 3.1 Maven 3 ...

August 17, 2011 · 8 min · 1619 words · Micha Kops

Message Driven Beans in Java EE 6

Message Driven Beans are no new concept due to the fact that they exist since EJB 2.0 but in Java EE 6 and the EJB 3.0 specification it is even more fun to use them. In this tutorial we’re going to take a look at the specification and create an example application that transfers some objects via the Java Message Service to a Message-Driven Bean deployed on a GlassFish application server. ...

June 5, 2011 · 12 min · 2430 words · Micha Kops

Creating a sample Java EE 6 Blog Application with JPA, EJB, CDI, JSF and Primefaces on GlassFish

Java EE 6 is out and it indeed offers an interesting stack of technologies. So in today’s tutorial we are going to build a small sample web application that builds on this stack using Enterprise JavaBeans, Java Persistence API, Bean Validation, CDI and finally Java Server Faces and PrimeFaces. The application we’re going to develop is a simple blog app that allows us to create new articles, list them and – finally delete them. We’re also covering some additional topics like JSF navigation, i18n, Ajax-enabled components and the deployment on the GlassFish application server. ...

February 8, 2011 · 17 min · 3575 words · Micha Kops

Enterprise Java Bean EJB 3.1 Testing using Maven and embedded Glassfish

Are you playing around with the shiny new 3.1 EJB API? Using Maven for your Java projects? Need an easy way to write and execute tests for your EJBs that depends on an Java Application Server? No problem using Maven Archetypes, the Maven EJB Plugin and the GlassFish embedded Application Container.. Prerequisites For the following tutorial we’re going to need an installation of Maven and of course – the Java Development Kit! ...

January 1, 2011 · 5 min · 969 words · Micha Kops

Java Server Faces/JSF 2 Tutorial – Step 1: Project setup, Maven and the first Facelet

In this short tutorial we are going to build a Java Server Faces Web-Application using JSF2.0, Facelets, Maven and Hibernate as ORM Mapper. The goals for this first step are: Setting up the project structure using Maven, defining a frame template/decorator and a registration facelet, creating a managed bean and mapping it’s values to the facelet, adding some basic validation, displaying validation errors and finally adding a navigation structure. In step2 of this tutorial we are going to add persistence using Hibernate, add some security, create a custom UI component and add some AJAX. ...

June 5, 2010 · 9 min · 1841 words · Micha Kops