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 ...

Get Special Edition Using Enterprise JavaBeans™ 2.0 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.