Skip to content

Commit

Permalink
PI-1822 Remove DeliusConnectionProvider
Browse files Browse the repository at this point in the history
This appears to have stopped working recently, so I've re-enabled setting the client id via a logon trigger instead: ministryofjustice/hmpps-delius-pipelines#783
  • Loading branch information
marcus-bcl committed Jan 22, 2024
1 parent e1bde40 commit 102812f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 125 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
package uk.gov.justice.digital.hmpps.audit.service

import org.springframework.context.annotation.Condition
import org.springframework.context.annotation.ConditionContext
import org.springframework.context.annotation.Conditional
import org.springframework.core.type.AnnotatedTypeMetadata
import org.springframework.jdbc.core.JdbcTemplate
import org.springframework.stereotype.Service
import org.springframework.transaction.support.TransactionSynchronization
import org.springframework.transaction.support.TransactionSynchronizationManager
import uk.gov.justice.digital.hmpps.audit.config.OracleCondition

@Service
class OptimisationTables(private val optimisationTablesRebuild: OptimisationTablesRebuild?) {
Expand All @@ -25,3 +27,10 @@ class OptimisationTablesRebuild(private val jdbcTemplate: JdbcTemplate) {
})
}
}

class OracleCondition : Condition {
override fun matches(context: ConditionContext, metadata: AnnotatedTypeMetadata): Boolean {
val url = context.environment.getProperty("spring.datasource.url")
return url?.startsWith("jdbc:oracle") ?: false && !context.environment.acceptsProfiles { it.test("oracle") }
}
}

This file was deleted.

This file was deleted.

0 comments on commit 102812f

Please sign in to comment.