Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Controllers and Facades..

 
Lavan Adgaonkar
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.
 
Rajesh K. Ilango
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic