My understanding of how mostly all app-servers work is that they have a separate container for web components and a separate container for
ejb component.
Now my query is lets take Local view in EJB for example . The basic semantics that Local view follows is
Call by reference ,so that makes sense that if a client needs to access a service with a local view , both the client and the service needs to be in same JVM . But now if my web component which is running on a web container need to access the ejb service running on EJB container it is compulsory for the web component to use the remote view.
So is my understanding correct that each container have their own Jvm though on a single server machine ??
Q2) Another doubt i have is that why EJB spec have stated the following rule as compulsion with local view ,
if my client (ejb) and service (ejb) and if both of them are packaged in separate EJB archive then local view is not possible . Why so ?? why both the client and the service needs to be a part of a single Ear file because in this example both client and service is an EJB so they will go in the same container and hence same JVM , so it does not matter whether it is same Ear or different Ear . Can some one clear my above 2 doubts ?
Regards,
Shroff.