Tell it which is the Home interface, and which is the Component interface

Now, you have to do the same thing you did for the bean class, but with the two interfaces. You’ll notice that there are two different places where you can select interfaces—Local and Remote. This bean is remote (which means it’s a Java RMI remote service, but we’ll get into that in the next chapter), so we’re using only the bottom section, for Remote interfaces. Just leave the Local interfaces section alone.

The strange part is that this screen uses the term Remote Interface rather than Remote Component Interface. That’s just a bad interface design in the deploytool. (It’s actually an artifact of the previous version of EJB, when there were only remote interfaces. Local interfaces are new to EJB 2.0), but we have to live with it.

Click the Remote Home Interface drop-down menu

Select headfirst.AdviceHome

Click the Remote Interface drop-down menu

Select headfirst.Advice

image with no caption

Get Head First EJB 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.