3. Developing the Bean Implementation Class

This class contains all the actual implementation details of our business logic.

Example 1.3. AboutEJB.java

package nl.datraverse.workshop.ejb.beans;

import javax.ejb.*;

public class AboutEJB implements SessionBean { 1

   public void ejbCreate() {} 2
   public void ejbRemove() {}
   public void ejbActivate() {}
   public void ejbPassivate() {}
   public void setSessionContext(SessionContext ctx) {}

   public String workshopVersion() { 3
      return "1.0.0";
   }

}
1

Basically you can choose from three types of interfaces to implement: SessionBean, EntityBean, and MessageDrivenBean. Our bean is a SessionBean.

2

These methods should be implemented, but can be empty for our stateless bean.

3

The actual implementation of our business logic.