You will not be able to use JDBC batching
for insert statements only. Updates and deletes are batchable on MySQL and MariaDB even when using the IDENTITY generator.
I run some tests to compare if it's worth to use the table generator and take advantage of insert batching, but the truth is that it's still slower than IDENTITY. The table generator uses row-level locking, and even if you use the
pooled optimizer, the row-level locking and the fact that you require a separate transaction will impact performance, especially when increasing concurrency.
All in all, use IDENTITY even if the inserts are not batched.