Hello World EJB 3.1 Application using Netbean
This post explains developing simple Hello world application in Net Bean . It explains ease of EJB 3.1 development using annotations in you java code. Coding, deploying and using an enterprise bean never been so easy. Here we are going to develop a Stateless Session bean and going to invoke it from a Servlet. A Remote Interface for bean package demo.session; import javax.ejb.Remote; /** * @author Yogesh */ @Remote public interface HelloEJBRemote { String getMessage(); } Here @remote annotation is being used for demoting Remote Interface for EJB Module. It declares one public method which is by default business method. Bean Implantation Class - package demo.session; import javax.ejb.Stateless; /** * @author Yogesh */ @Stateless public class HelloEJB implements HelloEJBRemote { public String getMessage() { return "Hello "; } ...