if ( maxRuntimes != null && maxRuntimes.intValue() == 1 ) {
return new SharedRackApplicationFactory(factory);
}
else {
return config.isSerialInitialization() ?
new SerialPoolingRackApplicationFactory(factory) :
new PoolingRackApplicationFactory(factory) ;
}
}