The Source for Java Technology Collaboration
User: Password:



Edgar Silva

Edgar Silva's Blog

Learning EJB 3.0, JPA and JSF with NetBeans 5.5

Posted by edgars on November 16, 2006 at 01:33 AM | Comments (5)

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
ScreenCast

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.



Comments
Comments are listed in date ascending order (oldest first) | Post Comment

  • Muito boa!

    Posted by: huntch on November 16, 2006 at 07:55 AM

  • Although he's a puto, it's a worth reading...

    Posted by: alegomes on November 16, 2006 at 10:44 PM

  • I am following your tutorial, but I am having a problem with the JSP: when you fix the tag libraries declaration into the JSP, you use
     
    
    but in my Netbeans this taglib is not available... I just download the netbeans from the project page, so I supose the versions are updated with the most recent available..

    Posted by: felipegaucho on January 07, 2007 at 08:09 AM

  • ops, something wrong with the tag pre :)) here it goes the second try:
    <%@taglib prefix="h" uri="http://java.sun.com/jsp/jstl/html" %> 
    

    Posted by: felipegaucho on January 07, 2007 at 08:11 AM

  • Felipe, make you sure you had selected GlassFish as your default Application Server into Project Properties. I guess NetBeans is missing the JAR reference declarations. Let me know about it, or send me a mail to edgar (em) edgarsilva.com.br , afaik you are Brazilian, so we can write in Portuguese using email .
    cya
    Edgar

    Posted by: edgars on January 07, 2007 at 10:52 AM



Only logged in users may post comments. Login Here.


Powered by
Movable Type 3.01D
 Feed java.net RSS Feeds