Starting a new project and would like to know the pros and cons of packaging EJB in a WAR vs EAR.
Will JNDI still works when EJBs are in the WAR? efficiency? etc.?
So far this is what I got.
EJB in WAR
pros:
Simpler to develop and deploy
You can expose Session Bean methods as REST service with @Path annotation. See here
cons:
JNDI lookup is not supported, so I believe you cannot do RMI from another application client
As arjan pointed out it lacks modularity in design.