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

Local and remote interfaces for session facade?

 
Isaac Liu
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can a session facade have both local and remote interfaces at the same time? In particular for a stateful session facade can I access both the remote and local bean that hold the same state?
In the pet store sample application, both the web server and the EJB container are assumed to be running in the same virtual machine. If the web server runs in another machine, then the ShoppingClientFacade needs a remote interface to make it accessible to the web server side. In the mean time this facade also has to be accessible by the EJBController, which resides in the EJB side. So a local interface is also needed for this facade.
The Core J2EE Pattern book only talks about remote session facade. But from a pure OO point of view it is quite reasonable to have a facade to encapsulate some components so that others (either remote or local) access these components through this facade alone.
TIA,
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your question has already answered in EJB/J2EE forum.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic