This week's book giveaway is in the Web Services forum.
We're giving away four copies of Microservices in Action and have Morgan Bruce & Paulo A. Pereira on-line!
See this thread for details.
Win a copy of Microservices in Action this week in the Web Services forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

Part 2 design question  RSS feed

Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am working on my part 2 assignment. I have a question about the interaction between components, and I was wondering if any rancher could help.

For my part 2 project, I plan to use an application controller to control the commands to the various EJB components I have. This would not be a program if the application is a pure web application (as I would use a servlet as the application controller and use a business delegate to call the EJBs).

However, since for part 2, we would also need to have the system work with a java application, I am just wondering how I could reuse the application controller for both the web application (servlet) and the java application?

In other words, what is a good technology that I could use for the application controller so that both a servlet and a java application can use it?

Thanks in advance!
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would go for two different application controllers one for Web application and another one for Swing client application.

Web application - Servlet as an application controller

Swing application - Plain Java as an application controller.

For a web applivation, servlet is one of the best way to implement application controller. If you want to reuse that servlet for Swing application, then all the swing client request should go thro' web server, which I would prefer not to do. So servlet is not my choice for a common application controller.

You can use Plain Java as an application controller for both clients. But you need to some how filter and neutralize the request before making the call to plain java application controller. Which makes it difficult.

So, if you implement two different application controller, they are simple and effective.

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!