6.9. Session Bean TypesThere are two types of Session Beans:
There is nothing in the example that requires us to maintain state between Session Bean calls. You'll probably find that most transactions will end up being Stateless. Here are some of the differences between Stateful and Stateless Session Beans :
Due to performance reasons, Stateful Session Beans have fallen into disuse, and we recommend using Stateless Session Beans. There is really no difference in deploying a Stateful or Stateless Session Beanyou specify the Session Bean type in the ejb-jar.xml deployment descriptor. But before concerning ourselves with deployment, let's look at how to implement a Session Bean. |