Hi everybody,

I have a question regarding transaction:

I have a service that parses a big file and creates products from it. > 100.000 
products

If I do a TransactionUtil.commit() after each product, do I have to add a 
TransactionUtil.begin() for the next loop?

- Service starts and creates a transaction
- Product 1 --> commit
- Product 2 --> commit

or should I disable the service transaction via use-transaction="N"

- Service starts - no transaction
- begin --> Product 1 --> commit
- begin --> Product 2 --> commit

The goal is to reduce memory consumption.

Best regards,
Ingo

Reply via email to