if (!(aSource instanceof MutableDataSource)) {
throw new IllegalArgumentException("Cannot use Empire with a non-mutable Data source");
}
if (isUseEmpireTransactions() && !(aSource instanceof SupportsTransactions)) {
aSource = new TransactionalDataSource((MutableDataSource) aSource);
}
aSource.connect();
return new EntityManagerImpl( (MutableDataSource) aSource);