*
* @param session the session
* @param threadId the thread id of the creating thread
*/
private void createCustomer(Session session, String threadId) {
Customer customer = session.newInstance(Customer.class);
int id = getNextCustomerId();
customer.setId(id);
customer.setName("Customer number " + id + " thread " + threadId);
customer.setMagic(id * 10000);
session.makePersistent(customer); // autocommit for this
addCustomer(customer);
}