What version are you using?
Based on the information about you specific problem. I would recommend using a Stateless Session bean with bean managed transactions for your batch import. This way you can exactly control the size of the import batch. If you don't know how to use bean managed transactions I would buy the O'Reilly EJB book. As a side not, your database may the culprit here. Some databases have problems with huge ammonites of data in an uncommitted transaction.
Thanks for the reply.
I am using this version:
Is it possible to remove an entity
object without destroy the data in
Increase the max cached beans in standartjboss.xml
and increase the transaction timeout in jboss.jcml
an entity-bean and the row in the table of your db are the same. the one does not exist without the other.
This is one area where CMP won't do. I have an exact same requirement that when ejbRemove() is called on one of my EBs I want the record tagged as "deleted" but I don't want the row removed from the DB. This is an instance where you have to resort to A BMP EB.
One trick/pattern we often use is to have a history table. When an insert is done on the main table, a copy is written to the history table via a trigger. There's also a trigger on update and delete. The history table needs two extra columns, valid_from and valid_to timestamp. This is handy for auditing and data warehousing. Also, the main table is kept small, and at least with Oracle, you can have the history table in another DB, with lots of extra indicies, etc...