From the course: Java EE 7: Enterprise JavaBeans (EJB)
Unlock the full course today
Join today to access over 22,400 courses taught by industry experts or purchase this course individually.
Types of beans
- [Instructor] There are in a sense two categories of beans, and these will be the ones we'll take a look at in chapter three and four. and the message driven bean. The session bean is like a task runner, it's responsible for executing a task for a client. Like we've mentioned before, returning the inventory of our vinyl records would be a part of a session bean, whose main task is to handle all tasks related to inventory or orders. The next one is a message drive bean which basically processes messages asychnonously, which basically means the operation doesn't block the rest of the operations. It doesn't respond to client events, but to messages internal to the overall application. So if we take our record store example, let's say that our inventory's getting low. A message could be sent to message-driven bean to send a warning about the inventory levels. They don't hold a state and aren't used by the client. Simply, an event-based mechanism driven by internal messages. If this isn't…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.