This tutorial describes how to use the EJB 3.0 specification
to create, deploy, and run a simple EJB 3.0 application that increments
a counter.
This tutorial might require some optionally installable
components. If you encounter errors or cannot find user interface
options when you run the tutorial, ensure that you installed the appropriate
optional components:
- IBM® WebSphere® Application
Server, version 7.0 installed
To use this tutorial, you must have an application server installed
and configured. To verify that a server runtime environment is available,
click , expand Server, and then click
Installed
Runtimes. You can use this pane to add, remove, or edit
installed server runtime definitions.
This tutorial is divided
into several exercises that must be completed in sequence for the
tutorial to work properly. This tutorial teaches you how to use the
EJB 3.0 specification to create an EJB project that includes an EJB
bean and remote and local interfaces; you also create a web project
that includes a Servlet and a Faces JSP to deploy the application
on the server.
While completing the exercises, you will:
- Use the EJB 3.0 specification to create, deploy, and run a simple
EJB 3.0 application that increments a counter.
- Create a Java™ project, EJBCounterSample with an EJB 3.0 stateless session bean
(with both interface and implementation classes), StatelessCounterBean.java, and a JPA 1.0 entity class JPACounterEntity.java.
- Create web project (EJBCounterWeb), and with a Java Server Page (JSP) page and a utility Java class
- Create EAR application, EJBCounterSampleEAR,
containing the EJB and web projects.
Time required
This tutorial takes approximately
30 minutes to finish. If you explore other concepts related to this
tutorial, it could take longer to complete.
Skill level
Experienced
Audience
This tutorial is intended for
users who are familiar with Enterprise JavaBeans, EJB 3.0 in particular, and Java EE 5 technology.
System requirements
To complete
this tutorial, you need to have the following tools and components
installed:
- The WebSphere Application
Server v. 7.0 installed.
- A clean workspace.
Prerequisites
In order to complete this
tutorial end to end, you should be familiar with:
- Java EE 5 and Java programming
- Basic Enterprise JavaBeans (EJB) and EJB 3.0 concepts