O'Reilly logo

Special Edition Using Enterprise JavaBeans™ 2.0 by Brian Keeton, Chuck Cavaness

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Implementing a Session Bean

Now that you’ve seen how to declare the component and home interfaces for a session bean, the next step is to look at implementing the bean class itself. What’s important here is to understand the methods you’re required to implement, how the container manages the life cycle of a session bean, and how to access other EJBs and resources, such as a database, from a session bean’s methods.

The SessionBean Interface

All session beans must implement the SessionBean interface, which extends EnterpriseBean just like the EntityBean interface does. Remember that EnterpriseBean is simply a marker interface, so it doesn’t add any methods to the set that your session beans have to implement. The container uses the methods declared ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required