A QUESTION ON J2EE DESIGN PATTERN!!!!

Discussions

EJB programming & troubleshooting: A QUESTION ON J2EE DESIGN PATTERN!!!!

  1. A QUESTION ON J2EE DESIGN PATTERN!!!! (5 messages)

    Hi All J2EE Gurus,

    Can anybody comment on how feasible would it be upon using a simple JAVA BEAN component in stead of a session EJB for the famous SESSION FACADE design pattern.

    Thanx and Regards,
    Pratap
  2. The session bean is the facade. You can call other beans or entity beans directly, but you will incur a big performance hit going remotely to multiple components.

    Mike
  3. Hi Mike,
    Thnx for yr prompt response.But I didn't get yr comments.
    Let me put my query in some different way.
    Here it goes.....
    Basically, the session facade pattern makes use of a session bean to call those related Entity Beans in the application.
    Now if I will say I will call those EJBs from a simple java Bean component maintaining the scop as "SESSION" in the JSP page then what would happen?
    Can you/anybody tell the pros n cons of this?

    Regards,
    Pratap
  4. U wont be able to take advantage of EJB's declarative transaction management, security etc etc
  5. A QUESTION ON J2EE DESIGN PATTERN!!!![ Go to top ]

    Hi
    There are several factors which made us to use session facade rather simple Java Bean.
    Briefly..
    By using Sessoin facade we can use certain services that your container gives, such as Trasaction Management,security and other.It is easy to call a bean from another bean when both are running under one evnironment.Structural wise also session and entity bean having some similarities.By using this factor session facades used process the business needs.

    I guess you got an Idea by now
    -hari
  6. A QUESTION ON J2EE DESIGN PATTERN!!!![ Go to top ]

    Javabean is not server side service, if you were to use javabean as a facade to call entity bean or connect to databse, you will have a big performance issue. It is just like calling entity bean from client. Get the idea?