Book Image

Java EE 5 Development with NetBeans 6

Book Image

Java EE 5 Development with NetBeans 6

Overview of this book

Table of Contents (17 chapters)
Java EE 5 Development with NetBeans 6
Credits
About the Author
About the Reviewers
Preface
Identifying Performance Issues with NetBeans Profiler

Creating a Session Bean in NetBeans


Session Beans can be created in two types of NetBeans projects: Enterprise Application or EJB Module. EJB Module projects can contain only EJBs, whereas Enterprise Application project can contain EJBs along with their clients, which can be web applications or "standalone" Java applications.

When deploying enterprise applications to the GlassFish application server included with NetBeans, it is possible to deploy standalone clients as part of the application to the application server. These standalone clients are then available via Java Web Start (http://java.sun.com/products/javawebstart/). This feature also allows us to easily access more EJBs from the client code by using annotations, since with "true" standalone clients executing outside the application server require JNDI lookups to obtain a reference to the EJB.

As creating an Enterprise Application project results in a simpler programming model, that is the type of project we will use for this example...