@SuppressWarnings({ "unchecked", "rawtypes" })
private static EbeanServer createServer(String name, DataSource dataSource)
{
EbeanServer result = null;
ServerConfig cfg = new ServerConfig();
cfg.loadFromProperties();
cfg.setName(name);
cfg.setClasses((List) Play.classloader.getAllClasses());
cfg.setDataSource(new EbeanDataSourceWrapper(dataSource));
cfg.setRegister("default".equals(name));
cfg.setDefaultServer("default".equals(name));