@Override
	protected void initialize() throws DataAccessException {
		super.initialize();
		if (enabled) {
			String platform;
			try {
				platform = DatabaseType.fromMetaData(dataSource).toString().toLowerCase();
				if ("hsql".equals(platform))
					platform = "hsqldb";
				if ("postgres".equals(platform))
					platform = "postgresql";
				if ("oracle".equals(platform))
					platform = "oracle10g";
				ResourceDatabasePopulator populator = new ResourceDatabasePopulator();
				populator.addScript(resourceLoader.getResource(REGISTRY_SCHEMA_LOCATION.replace("@@platform@@",
						platform)));
				populator.setContinueOnError(true);
				DatabasePopulatorUtils.execute(populator, dataSource);
			}
			catch (MetaDataAccessException e) {
				// @PostConstruct is not supposed to throw checked exceptions
				throw new DataRetrievalFailureException("Could not retrieve ", e);
			}
		}
	}
A {@link BatchDatabaseInitializer} for XD batch datasource.

@author Ilayaperumal Gopinathan
spring-xd-batch/src/main/java/org/springframework/xd/batch/XdBatchDatabaseInitializer.java