* Check for a tuning property and run the tuner preDeploy.
*/
protected void updateTunerPreDeploy(Map m, ClassLoader loader) {
String tuning = (String)EntityManagerFactoryProvider.getConfigPropertyLogDebug(PersistenceUnitProperties.TUNING, m, this.session);
if (tuning != null) {
SessionTuner tuner = null;
if (tuning.equalsIgnoreCase("Safe")) {
tuner = new SafeModeTuner();
} else if (tuning.equalsIgnoreCase("Standard")) {
tuner = new StandardTuner();
} else {
if (tuning.equalsIgnoreCase("ExaLogic")) {
tuning = "oracle.toplink.exalogic.tuning.ExaLogicTuner";
}
Class tunerClass = findClassForProperty(tuning, PersistenceUnitProperties.TUNING, loader);
try {
tuner = (SessionTuner)tunerClass.newInstance();
} catch (Exception invalid) {
this.session.handleException(EntityManagerSetupException.failedToInstantiateProperty(tuning, PersistenceUnitProperties.TUNING, invalid));
}
}
getDatabaseSession().setTuner(tuner);
tuner.tunePreDeploy(m);
}
}