HANDLING EJB?

Discussions

EJB design: HANDLING EJB?

  1. HANDLING EJB? (2 messages)

    Hi javagurus,
    I am using MVC architecture in my application where I call so many EJBs from the servlet through a thin interface of command classes. So my uestion is apart from CMP entity bean , shall I need to have some other data centric classes(say DAO) for the other type of EJBs to act upon DataBase.
    or i could directly work upon database from withing the EJB objects directly.

    so my flow will be like

    JSP-->Servlet-->command class-->session facade --->Entity Bean--->return to servlet--->JSP with response.


    OR

    JSP-->Servlet-->command class-->session facade --->Entity Bean--->DAO classes ----> return to servlet--->JSP with
    response.

    which one sounds better if high performance is required..
    I am working upon millions of record...


    Another thing what will be in the session that carries data to the JSP page..


    Server is IBM Websphere5.0
    DBase-->IBM AS 400 with DB2/400

    Plz answer...
    Pratap

    Threaded Messages (2)

  2. Re: HANDLING EJB?[ Go to top ]

    I would go for the first one:
    >
    > JSP-->Servlet-->command class-->session facade --->Entity Bean--->return to servlet--->JSP with response.
    >

    If you want to use Entity Beans you should use the CMP instead of BMP and then DAO. Otherwise leave the Entity Bean layer out.

    Barri
  3. Re: HANDLING EJB?[ Go to top ]

    Well thnx for yr suggestion.May be that's the good option so far..
    One thing more can u plz share with me..how to put the data into session.Is it the EJB Objects references(EJB Remote Interface refrence) which I could get in my web files and then bean object then data to JSP files..

    Regards,
    Pratap