Confusion in designing the Web layer in a J2EE application
Hi All,
Here is my doubt regarding optimum design for the web layer in a J2EE architecture.
I'm following the mediator pattern (as it is in J2ee blue print - Pet Store application), i,e,. I'm having a mediator servlet which degates the requests to appropriate Controller classes (which are dynamically invoked using a Controller Factory). In my entire application this is the single servlet - Mediator Servlet. There is a single controller class for each subsytem of the application. All the requests get mapped to one of these controller classes.
Now people also have another thought in this regard. They think that those controller classes should be actually a set of servlets. In that case, they feel, the performance will be better as the servlets will be better managed by the servlet engine. They will take at least less time for getting loaded memory than the ordinary java classes.
Can anybody tell me which one would be the better approach or what are the relative advantages/disadvantages for both the approaches ?
Thanks in advance,
Sourav

