Discussions

EJB design: EJB Design Forum

  1. EJB Design Forum (6 messages)

    Hi All
        Can any one explain what is the main difference between Session Facade and Message Facade?. I had gone thru some materials. But i did'nt get the correct difference.

    thanx,
      Suresh Babu

    Threaded Messages (6)

  2. EJB Design Forum[ Go to top ]

    The main difference is that in session facade the entity beans are wrapped by session bean while in the message facade the entity beans are wrapped by message driven bean.
  3. EJB Design Forum[ Go to top ]

    Hi Mohit,
        Thanx for your reply. I want more difference about the usages of session facade and message facade

    thanx,
       Suresh Babu
  4. EJB Design Forum[ Go to top ]

    I disagree with Mohit. I don't think a session facade is defined as a components which wraps entity beans. Facades are unified interfaces to a complex system or sub-system. That system may include, but is not limited to, entity beans.

    The difference between session facades and message facades is the same as the difference between session beans and message beans. When you want a synchronous invocation and return value use a session facade. When you want an asynchronous invocation and can live with a possible delay in the processing of the request, use a message facade. Just pick up any EJB book and read about where to use MDBs and where to use SBs. I don't see how the fact that these MDBs and SBs provide a unified interface to a complex sub-system should make a difference.

    Gal
  5. EJB Design Form[ Go to top ]

    Hi Gal,
         Thanx for your reply.

    thanx,
      Sur
  6. "Message facade comes over few of the drawback of session facade.Using session facade,the problems related to performance,coupling and maintainability can be resolved.But problems it is bit time consuming b.coz of synchronization.Session bean takes one request from one client.Clent will block whole process untill the whole process is completed.This problem is resolved by message driven beans.Using message driven beans by adding the capability to execute use cases in asynchronous,fault tolerant manner.
    Seesion beans run in synchronized manner and MDB run in asynchronise manner.This difference will make it clear the differnce between Session facade and Message facade.Is it clear,If it doen't help plese revert back. "
  7. EJB Design Forum[ Go to top ]

    Hi Madhavi,
        Thanx for your reply,

    thanx,
       Sur.