Java Reference
In-Depth Information
The
Summary
page lists the session bean and the remote interface that will be
created. Click on
Finish
. A session bean and a remote business interface get created.
The Session Bean class
The session bean is a
Stateless
session bean. The global JNDI name is specified
with the
mappedName
element:
@Stateless(name = "CatalogSessionEJB", mappedName = "EJB3-SessionEJB")
public class CatalogSessionEJBBean implements CatalogSessionEJBRemote
{
}
Inject an
EntityManager
into the session bean using the dependency injection.
@PersistenceContext(unitName = "em")
EntityManager em;
Search WWH ::
Custom Search