Run your bean through the deploytool verifier
You already know your bean classes compile, but just because it compiles doesn’t mean it follows bean law. The verifier takes your jar and runs it through a bunch of tests to see if it meets the minimum requirements for deployment. As you learn more about the EJB spec, you’ll see that the verifier is testing your bean’s code (and the deployment descriptor) to see if it complies with the spec. For example, a stateless session bean’s home interface must have a no-arg create() method declared, and nothing else. And the bean class must have methods that match those declared in the component interface. And if the component interface is remote, it must declare that each method throws RemoteException. Don’t worry about remembering these examples; it’s just to give you an idea of the kinds of things the verifier does.
Click on the Ejb1 icon (the little jar) to highlight it
Choose Tools ▸ Verifier...
Cross your fingers

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access