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

Declaring the Home Interface

The home interface for a session bean declares the methods for creating and removing session objects. You can also use a remote home interface to get a reference to the bean’s EJBMetaData or the home handle. Both the EJBMetaData and the HomeHandle interfaces were described previously in Chapter 3, “EJB Concepts.” One restriction related to a session bean’s EJBMetaData is that you can’t call the getPrimaryKeyClass method or a RuntimeException will be thrown.

Unlike entity beans, you can’t declare finder methods or home methods for a session bean. Finder methods wouldn’t make sense for a session bean because a session object’s identity is hidden from the client. When a client needs to obtain a reference to a session ...

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