Wednesday, August 13, 2008

Creating Stateless & Stateful Session Beans - EJB 3.0 Java Development

When it comes to development, there are really three different types of components you can develop, namely, a Session Bean, an Entity Bean, and a Message Driven Bean.

As you could probably guess, Message Driven beans interact with a messaging system, reading messages off of a topic or a queue. Entity Beans represent data, and as you might expect, Entity Beans interact with some type of data storage facility, which is usually, but not exclusively limited to, a JDBC database. Session Beans on the other hand are much simpler. Session EJBs don't need to interact with a messaging system or a database. Session beans are simply components that contain Java code and business logic, and as such, they have no real dependency on any external infrastructure other than the EJB container in which they are deployed.

In light of the fact that they do not need a configured message queue, or a full database installation, in order to be developed, tested and deployed, Session Bean EJBs are definitely the best place to start when tackling the EJB 3.0 specification, and that's exactly what we're going to do right now - look at how to develop EJB 3.0 Session Beans.

No comments: