Java Reference
In-Depth Information
<property name=""
value="Oracle10g" />
<property name="javax.persistence.jtaDataSource"
value="java:/app/jdbc/jdbc/OracleDBConnectionDS" />
Creating a session bean
One of the best practices of developing an entity bean is to wrap it in a session
bean for a client to reduce the number of remote calls as we discussed in Chapter 5
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 CatalogSessionEJB . Select Session Type as Stateless and
Transaction Type as Container . A Stateless session bean does not incur the overhead
of keeping the state of a unique client-bean session that a Stateful session bean
does. Select the default mapped name ( EJB3-JSF-EJB3Model-CatalogSessionEJB ).
The Generate Session Fa├žade Methods checkbox is selected by default. The Entity
implementation is JPA Entities by default. The persistence unit is em . Click on Next .
Search WWH ::

Custom Search