Creating a no-interface session bean

To create a session bean with the no-interface view, create a POJO and annotate it with the appropriate EJB annotation type and @LocalBean. For example, we can create a local stateful Student bean as follows:

import javax.ejb.LocalBean; 
import javax.ejb.Singleton; 
 
@Singleton 
@LocalBean 
public class Student { 
... 
} 

Get Java EE 8 Development with Eclipse 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.