aspose file tools*
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes Pattern for routing web client's (Servlet) request to Controller(POJO) of Swingclient Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "Pattern for routing web client Watch "Pattern for routing web client New topic
Author

Pattern for routing web client's (Servlet) request to Controller(POJO) of Swingclient

Sam Gehouse
Ranch Hand

Joined: Jul 21, 2003
Posts: 281
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?
Francesco Bianchi
Greenhorn

Joined: May 06, 2007
Posts: 5
Hi Sam,
why don't you connect your SWING client to EJB / business tier directly?
MC Mohan
Greenhorn

Joined: May 08, 2007
Posts: 2
Sam,

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.

-Mohan
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Pattern for routing web client's (Servlet) request to Controller(POJO) of Swingclient