Java Reference
In-Depth Information
We now need to select from a number of options:
1. It is a good idea to override the default name given to our session bean.
2. We need to specify the package for our session bean.
3. We need to specify the session bean type: stateless or stateful. Stateful session
beans maintain conversational state with the client (which simply means that
the values of any of their member variables are in a consistent state between
method calls). Stateless session beans don't maintain conversational state, for
this reason they perform better than stateful session beans.
4. We need to specify if our session bean will have a remote interface, which is
used for clients executing in a different JVM than our bean, a local interface,
which is meant for clients running in the same JVM as our bean, or both a
remote and a local interface.
Our example bean does not need to maintain conversational state with its clients,
therefore we should make it a stateless session bean. Its only client will be executing
in a different JVM, therefore we need to create a remote interface, and don't need to
create a local interface.
 
Search WWH ::




Custom Search