EJB 3.0 introduced annotations which makes programmer's job easier. Following an an example of stateless session bean.
Java Code:
import javax.ejb.Stateless;
@Stateless
public class HelloWorld implements HelloWorld {
public void greeting(String pName){
System.out.println("Hello " + pName);
}
}