Java Reference
In-Depth Information
Creating a session bean
One of the best practices in, developing an entity bean is to wrap it in a session bean
for a client. The entity bean is not directly accessed by a client. To create a session bean
select the
EJB3Model
project and select
File
|
New
. In the
New Gallery
window,
select
Categories
|
Business Tier
|
EJB and Items
|
Session EJB
. Click on
OK
.
Specify the
EJB Name
as
CatalogTestSessionEJB
. Select
Session Type
as
Stateless
and
Transaction Type
as
Container
. We have selected the stateless session bean
because stateless session beans are less resource-intensive due to the lack of the
overhead to keep the state of a unique client-bean session. Select the default mapped
name (
EJB3-SessionEJB
).
Search WWH ::
Custom Search