Skip to content

Commit be40474

Browse files
haiko-ritensehaiko
andauthored
narrow transaction window (#492)
rethrow exception, otherwise plugin deployed event is fired. Co-authored-by: haiko van der schaaf <hvdschaaf@gmail.com>
1 parent 6c0d9bc commit be40474

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

backend/plugin/src/main/kotlin/com/ritense/plugin/autodeployment/PluginAutoDeploymentEventListener.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,13 @@ import org.springframework.core.io.support.ResourcePatternUtils
3535
import org.springframework.transaction.annotation.Transactional
3636
import java.io.IOException
3737

38-
@Transactional
3938
class PluginAutoDeploymentEventListener(
4039
private val resourceLoader: ResourceLoader,
4140
private val pluginService: PluginService,
4241
private val objectMapper: ObjectMapper,
4342
private val eventPublisher: ApplicationEventPublisher
4443
) {
4544

46-
@Transactional
4745
@Order(Ordered.LOWEST_PRECEDENCE-1)
4846
@EventListener(ApplicationReadyEvent::class)
4947
fun deployPluginConfigurations(){
@@ -55,6 +53,7 @@ class PluginAutoDeploymentEventListener(
5553
createPluginConfigurations(resource)
5654
} catch (e: Exception) {
5755
logger.error(e) { "Error while deploying plugin configuration file: '${resource.filename}'" }
56+
throw e
5857
}
5958
}
6059

0 commit comments

Comments
 (0)