Java Reference
In-Depth Information
A.1.2. <enterprise-beans>
The <enterprise-beans> tag is used to define EJBs in an EJB-JAR module. You can
use <session> or <message-driven> subtags to define session or message-driven
beans.
<session>
The <session> tag is used to define a session bean:
<ejb-jar...>
<enterprise-beans>
<session>...</session>
</enterprise-beans>
</ejb-jar>
The corresponding annotation is @Session . Table A.1 describes the tags to configure
<session> .
Table A.1. Tags to configure <session>
Tag name
Description
A logical name for the session bean. Property "name" of
@Stateless or @Stateful annotation.
ejb-name
A vendor-specific name for the bean. Property "mapped-
Name" of the @Stateless or @Stateful annotation.
mapped-name
remote
Remote interface for the EJB: @Remote.
local
Local interface of the EJB: @Local.
Web service endpoint interface for the EJB. Applies only to
stateless beans: @WebService.
service-endpoint
ejb-class
Fully qualified name of the bean class.
session-type
Type of session bean: @Stateless @Stateful @Singleton.
The amount of time a stateful bean can be idle before eli-
gible for cleanup by the container: @StatefulTimeout.
stateful-timeout
The callback method for programmatically created timers:
@Timeout.
timeout-method
An EJB timer. Created by the container on deployment.
Callbacks made to the timeout-method.
timer
init-on-startup
Singleton bean should be created at deployment: @Startup.
Specifies concurrency for singleton and stateful beans. May
be either Bean or Container: @Concurrency-Management.
concurrency-management-type
Configures the container managed concurrency for a meth-
od.
concurrent-method
 
Search WWH ::




Custom Search