Skip to main content

Learning EJB 3.0, JPA and JSF with NetBeans 5.5

Posted by edgars on November 16, 2006 at 1:33 AM PST

Hi Folks,
Well, so much time without post anything here, I've been quite busy these last months, but now I have a couple of time to share with you how to learn and develop an Application using: NetBeans 5.5, JSF, EJB and JPA.

First of all, I will assume that you had installed the folowing software:

- NetBeans 5.5 (final version)
- GlassFish or Sun Java System Application Server 9

With that software, we are able to continue this tutorial. In this post you will see part I and Part II

Part I

You will need some concepts to understand this tutorial, that's why I am providing basics words about the technologies we are using here.

Introduction to JSF

Java Server Faces has a new version, the JSF 2.0, result of JSR 252,basically this technology is the standard choice when you think about Web Development using Java. Even you can others, such as Tapestry, Wicket or any other, JSF belongs the standard as member of Java EE 5.

Please see more detailed informations about JSF here.

Introduction to JPA

Inside of EJB 3.0 specification, under JSR 220. The Java Persistence API draws upon the best ideas from persistence technologies such as Hibernate, TopLink, and JDO. Customers now no longer face the choice between incompatible non-standard persistence models for object/relational mapping. In addition, the Java Persistence API is usable both within Java SE environments as well as within Java EE, allowing many more developers to take advantage of a standard persistence API.

See more detailed informations here.

Introduction to EJB 3.0

EJB 3.0 brings the simplicity to JEE developer, such as we can see in older frameworks, however EJB is a standard, also definied in JSR 220, such as JPA. There are good new stuffs on EJB 3.0, my preferred feature is the EJB Interpectors, that can act as Aspects(AOP) inside my enterprise beans context.

See more detailed informations here.

Use Case Development: Maitain Manufacturer

This Use Case is responsable for create, delete, update and list a Manufacturer, using:

- A JSP using JSF tags as web client side tier.
- A BackingBeans which invokes a Stateless Session Bean
- A Stateless Session Bean as a Façade which calls the persitence Tier.
- Persitence Tier using JPA
- The entire UseCase will be deployed at GlassFish.

NetBeans 5.5 : Configuring GlassFish in NetBeans 5.5
See ScreenCast

Here you will discover how to integrate Glassfish or Sun Java System App Server 9 with NetBeans 5.5.

NetBeans 5.5 : Creating the Enterprise Project (EJB Tier and WebTier)
See ScreenCast

NetBeans 5.5 : Creating the Entity Class
See ScreenCast

NetBeans 5.5 : Creating the Session Façade for Entity Class
See ScreenCast

NetBeans 5.5 - Testing our First Deployment on Sun Java Systema Application Server 9

NetBeans 5.5 : Creating Java Server Pages for Listing
See ScreenCast

NetBeans 5.5 : Creating the BackingBean to invoke SLSB Façade and listing Data on JSP Page
See ScreenCast

Part II - Editing and JSF related Issues

NetBeans 5.5 : Creating Form for Edit Manufacturer
See ScreenCast

NetBeans 5.5 : We will show you how to add relationship funcionality using NetBeans, JSF, JPA and EJB.

I hope you can enjoy it, and I would like to say thanks to my friend Leandro, your laptop was really useful, because there's not a FREE software as Wink for MacOS =), but I am trying ViewletBuilder and others.

Related Topics >>