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

Regarding Session Facade-One SFSession Facadecan call otherSFSession Facade?(method

 
dbala subramaniam
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All
I have 2 Stateful SessionFacades
both are maintaining States ,but via First Session facade is controlling everything(State of first one =state of first one+state of second one)
means First one getting part of business state from second session facade,
so first sessionfacade calling second sessionfacade, to get state of part of business logic
In otherwords one SFSessionFacade can call other SFsession facade?
please clarify
If not what is alternate way?
because to complete business operation, firstsessionfacade is controlling everything but part of state it try to get from sessionfacade, so please clarify
Note:Both are Statefulsessionfacade, please reply
advance thanks
with regards
bb
 
Juan Rolando Prieur-Reza
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by dbala subramaniam:
I have 2 Stateful SessionFacades
both are maintaining States ,but via First Session facade is controlling everything(State of first one =state of first one+state of second one)

My humble understanding of this concept is that the application can be designed with one SFSB
that manages all state for the application. This "first" SFSB can be a Front Controller, for example, that deligates some operations
to a "second" SLSB (stateless) that acts as a Helper, Application Controller,or Business Deligate, for example. Responses from the "second" session bean would be returned to the "first" session bean and used there
to determine next state (via a state machine, which in turn could be a POJO
or another SLSB.
In conclusion, unless you have a compelling reason to use multiple SFSB's
interacting with eachother in a single "application", you should
refactor your design to use but one SFSB.
Good queston. Would someone with more insight comment on this? Thanks
 
Pamir Bahret
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your approach is ok, is the same approach from petstore 1.3.1 with only one little diference: the first statefull facade is named ejbcontroller but it is a facade
Hope this help ..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic