Do I need EJB? Advice please

Discussions

EJB design: Do I need EJB? Advice please

  1. Do I need EJB? Advice please (3 messages)

    If client only need to read from database, action beside 'select' are only preform in server side. Do I still need EJB ?

    I do need object presistence and caching to provide better respone time to client and parallel access.

    Any other suitable method?

    Thx

    Threaded Messages (3)

  2. Do I need EJB? Advice please[ Go to top ]

    If client only need to read from database, action beside 'select' are only preform in server side. Do I still need EJB ?I do need object presistence and caching to provide better respone time to client and parallel access.Any other suitable method?Thx
    Hi
    You can use EJB to boost the performance in a way by using Stateless Session bean . If client just want to read from Database then use SLSB and JDBC call combination which is more faster.
    If you also want to use persistance then Entity beans are suitable.You need to go for a application server for doing all this.
    You also have options like Hibernate and other persistance frameworks. Well,I never worked on them so can not comment on these.
    Thanks
    Amit
  3. re: Do I need EJB? Advice please[ Go to top ]

    Thank for you help!
    However, I do want to ask somemore, ^^

    The program will download posts from news server and save to local DB. However, it will proces and transform the data before send out to client upon request.

    But once the DB has store the content, it maybe serve to a large number of client over a long period, so I think caching is a must.

    If I need many read but less write, NO transaction, same DB content will server to many client over a long period, and data NEED heavy process and transform before send to client

    Will Entity Bean still good for me??

    ps. I am thinking if I use Entity Bean, respone time maybe very long if database hasn't cache the data, so the very first client will suffer. However once the DB have cache the data and persist it to Entity Bean, following client will have a normal (or even very wel) respond time.

    and using bean instead of JBDC is more flexible and scalable in the long run

    any comments???

    Regards
  4. OR Mapping tool with SLSB[ Go to top ]

    IMHO, you don't need entity beans at all. I'd use an OR mapping tool (read Hibernate, Cayenne, JDO...) and stateless beans to do the work. Even better, you don't need SLSB. You can use Spring, Spring MVC for your UI and Spring support for Hibernate et al for persistence.