Java Code Examples for org.springframework.boot.jdbc.EmbeddedDatabaseConnection#isEmbedded()

The following examples show how to use org.springframework.boot.jdbc.EmbeddedDatabaseConnection#isEmbedded() . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
@Override
public void release(Organization organization) {
	entityManagerFactoryService.removeEntityManagerFactory(organization);
	EntityManager em = EntityManagerFactoryUtils.getTransactionalEntityManager(emf);
	if (!EmbeddedDatabaseConnection.isEmbedded(properties.determineDriverClassName())) {
		em.createNativeQuery("drop database " + organization.getId()).executeUpdate();
	}
	
}
 
Example 2
public String getDefaultDdlAuto(DataSource dataSource) {
	if (!EmbeddedDatabaseConnection.isEmbedded(dataSource)) {
		return "none";
	}
	SchemaManagement schemaManagement = getSchemaManagement(dataSource);
	if (SchemaManagement.MANAGED.equals(schemaManagement)) {
		return "none";
	}
	return "create-drop";

}