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 Component Interface

As with entity beans, a client’s view of a session bean is defined by the bean’s component interface. Remember that a remote interface must always be declared to extend EJBObject and a local interface must extend EJBLocalObject. As illustrated previously with entity beans, the remote and local interfaces are where you define the business methods you want to expose to clients of your beans. Again, these methods must be declared such that

  • No method name starts with ejb

  • All methods are declared as public

  • No method is declared as static or final

  • All remote interface methods include java.rmi.RemoteException in their throws clauses

  • All remote interface method arguments and return types must be legal RMI-IIOP types

Note ...

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