Should I use Entity Beans?

Discussions

EJB design: Should I use Entity Beans?

  1. Should I use Entity Beans? (3 messages)

    I have a simple task of inserting one record per request into a table of ten columns. This code will not be used to read data from the table. Additionally The table has no primary key column. The code will always be used to insert only one row. In this situation does it make sense to use Entity beans? Or should I use session beans? If I use Entity beans should I wrap calls to it in a session bean?
  2. Should I use Entity Beans?[ Go to top ]

    From what I gather, you have a very simple system.

    Can't you just use servlets/JDBC rather than going the EJB way?
  3. Re: Should I use Entity Beans?[ Go to top ]

    In this case definitely not.
    I would write session bean that handle this task.
  4. Should I use Entity Beans?[ Go to top ]

    No!

    1. I think entity beans require that your table has a primary key.
    2. Entity Beans are big, clunky, slow, and horrible to implement.
    3. Your task is simple enough to do directly with JDBC.

    Cheers,

    Daniel.