Q&A

Q1:Because there are quite a few interfaces and classes that need to be developed to write an EJB, how does inheritance take place in EJBs?
A1: Inheritance in EJBs is tricky to understand because of the many classes and interfaces involved. A simple rule of thumb to be aware of is to make sure that inheritance does not change the return types of the methods in the classes or interfaces. One example is of a child EJB inheriting the remote (or local) interface and home interfaces (remote or local) of an existing EJB. In this case, the child EJB has to ensure that the return type of the create() method is invoked on the bean's home interface object.

Entity beans are a bit more restrictive in that to override an entity bean, the create() method ...

Get Sams Teach Yourself BEA WebLogic Server 7.0™ in 21 Days 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.