I configured my Persistence.xml to use batch-writing, but performance is horribly slow for +-15000 list update. Now, when i check into generated SQL, i found that Eclipselink is creating one batch for one query, its like :

I think this is because i set a new parent property (card) to existing children.

I also try to play with reversing the parent - child relationship (cardholder->card instead of card->cardholder). Batch insert is correct after i reverse the relationship in entity and database, but still Eclipselink would query the database (SELECT * from card where cardholder.id = ?), so for 15000 record i got 15000 select statement. Better than above, but still very very slow.

Is there any mistake i made in setting up batch-writing? Thank you very much.

I can't tell as it may have just been excluded from the information provided, but how is the newCard becoming managed in the EntityManager context?
Additional info that will help are how and when you are writing out the changes, and what version is being used. you get the same problem on the latest EclipseLink nightly build if you are on an older version?

Its hard to tell without the full log on set to log everything, but my guess is that this is occuring because the commit order is processing the Cardholder objects first. For each it encounters, it discovers a new Card that must be inserted before the update can occur. If that is the case, the descriptor processing can be ordered so that Card inserts are processed first. This can be changed by setting constraint dependencies on the ClassDescriptor (via a customizer) - this should already be done because of the ManyToOne mapping, but means that your model probably has a circular reference involved that requires the CardHolders to be inserted first.

i call em.persist(Card) for every card in there before the transaction end (in an CMT SLSB).

Yes, after i re-check, it seems that card and cardholder has circular reference. (card has ManyToOne relationship with cardholder, and vice versa). I think this is a design mistake, but lets suppose i can not change the DB design, is there something i could do to tell Eclipselink to process the Cards insert firs?