Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring 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 ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Controllers and Facades..

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Consider this scenario:

I have a stateful session facade that acts as the workflow manager to do the reservation. It invokes another stateless session bean as part of the workflow, like PaymentProcessor.

Now, I have the following questions:

1. Since PaymentProcessor marshalls all processes related to payment can that be logically considered as another facade in the system? (I guess so )

2. If there's been a controller-BD-SFSF(the workflow manager), then can there be another controller-BD-Paymentprocessor for the other facade.. The question here is, since the SFSB which acts as the workflow manager, invokes payment facade to do some processing, based on the payment's verification, it would then proceed to persist itinerary data. Here, the control lies with the SF facade. In that case, the controller for the SF facade would suffice ?

I am worried whether it is leaning more towards a single controller-facade design, as it might become bulky.

Appreciate all help.

Thanks.
 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
PaymentProcessor(Stateless Session Bean) can also be a facade. What if there is a requirement where you need find the Price to be paid for the service outside the Reservation Use Case. Here you can directly call the PaymentProcesor directly instead of coming thr. Reservation Workflow.

Your requirements may not require PaymentProcessor to be a facade now. But I would go in favour of making PaymentProcessor a facade if the application as a growing one.
 
I promise I will be the best, most loyal friend ever! All for this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic