protected boolean existsModulesTable(final String databaseName) throws Exception {
final boolean[] returnValue = {false};
new HibernateTxFragment(true) {
protected void txFragment(Session session) throws Exception {
Work w = new Work() {
public void execute(Connection connection) throws SQLException {
DatabaseMetaData metaData = connection.getMetaData();
ResultSet resultLowcase = metaData.getTables(null, null, installedModulesTable.toLowerCase(), null);
ResultSet resultUppercase = metaData.getTables(null, null, installedModulesTable.toUpperCase(), null);
returnValue[0] = resultLowcase.next() || resultUppercase.next();