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?
From what I gather, you have a very simple system.
Can't you just use servlets/JDBC rather than going the EJB way?
In this case definitely not.
I would write session bean that handle this task.
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.