Pattern for routing web client's (Servlet) request to Controller(POJO) of Swingclient
Joined: Jul 21, 2003
What would be a good pattern or approach for letting the web client's Servlet access the same controller(POJO) that the application client (Swing) is using?
For example, the web client will user JSP and Servlet.
Application client (Swing) will use Swing and some other controller (not a Servlet).
These are the only two differences between web and application client.
Beyond that, both the web client and application client can use the same set of classes.
I want to route the Servlet of the web client to the controller (POJO) that the Swing client is using. I want to do it so that the design is seamless, no matter which client (waeb or application) is being used.
What would be a good pattern or approach to route the web client's Servlet to the controller (POJO) of the application client?
Joined: May 06, 2007
Hi Sam, why don't you connect your SWING client to EJB / business tier directly?
Joined: May 08, 2007
I would use something like a business delegate object ( like your controller), which wraps the EJB layer objects.
Both JSP/Servlet and Swing will use these business delegate objects to communicate with remote EJB objects.