the "batch update" is good for performance, but
very difficult (read: impossible) to implement.
Why? You have to track the open Statement object
(to call .addBatch()) and have to execute() it
before you do the next SELECT in the same transaction.
At that point, any failure in the batched
Statement can't be handed back to "the right place",
so most usefull error handling (e.g. checking for a
DuplicateKeyException) won't work as expected.
=> without a semantic change in a future
EJB spec, i think that batch updates are not
possible within an EJB Container, at least not
as long it conforms to the EJB spec.
There are places where I will use batch updates in the future. For example, relation table inserts and deletes can easily be batched. It may be possible to general creates or deletes, but updates would be difficult.