senderFactory1TCP.createEntityManager();
double benchmarkClusterOneThread = doTransactions(pmOneThread,
NUM_OBJECTS);
pmOneThread.close();
Duration timeThreaded = new Duration("For " + NUM_CONCURRENT +
" concurrent threads performing Adds, removes, and dletes for " +
NUM_OBJECTS + " objects.");
Thread[] concurrentThreads = new Thread[NUM_CONCURRENT];
timeThreaded.start();
for (int i = 0; i < NUM_CONCURRENT; i++) {
Worker worker = new Worker
(senderFactory1TCP.createEntityManager());
concurrentThreads[i] = new Thread(worker);
concurrentThreads[i].start();
}
// Wait for all threads to finish
for (int i = 0; i < NUM_CONCURRENT; i++) {
try {
concurrentThreads[i].join();
} catch (Exception e) {
assertTrue(false);
break;
}
}
timeThreaded.stop();
double benchmarkCluster = timeThreaded.getDurationAsSeconds();
System.out.println("For " + NUM_OBJECTS + " objects, and " +
NUM_CONCURRENT + " concurrent threads, the receiving pmf of the " +
"cluster received :" +
listenerAtReceiver.totalAddedClasses + " claases adds, " +