My question is: Why should I do EAR files ? Because I'm able to add ejb classes in simple war and it works. I added
import javax.ejb.Stateless;
@Stateless
public class HelloWorldBean {
/**
* Default constructor.
*/
public HelloWorldBean() {
// TODO Auto-generated constructor stub
}
public String hello() {
// TODO Auto-generated method stub
return "Hello World";
}
}
and it's ok. It works. So I don't understand why should I add this class to the jar and create EAR package. Please explain me more details.