-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto cleanup uses encryption cleanup now #3250
- wrote implementation for encryption cleanup - schedule auto cleanup uses now also schedule encryption cleanup - added unit tests - added integration test for cipher pool data cleanup (inside existing JobScenario2IntTest)
- Loading branch information
Showing
26 changed files
with
1,544 additions
and
198 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
...hedule/src/main/java/com/mercedesbenz/sechub/domain/schedule/ScheduleShutdownService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package com.mercedesbenz.sechub.domain.schedule; | ||
|
||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
import org.springframework.beans.BeansException; | ||
import org.springframework.context.ApplicationContext; | ||
import org.springframework.context.ApplicationContextAware; | ||
import org.springframework.context.ConfigurableApplicationContext; | ||
import org.springframework.stereotype.Service; | ||
|
||
@Service | ||
public class ScheduleShutdownService implements ApplicationContextAware { | ||
|
||
private static final Logger LOG = LoggerFactory.getLogger(ScheduleShutdownService.class); | ||
|
||
private ApplicationContext context; | ||
|
||
public void shutdownApplication() { | ||
if (context instanceof ConfigurableApplicationContext) { | ||
LOG.info("Will now trigger shutdown of application context"); | ||
((ConfigurableApplicationContext) context).close(); | ||
} else { | ||
if (context == null) { | ||
LOG.error("Cannot shutdown application context because context null!"); | ||
} else { | ||
LOG.error("Cannot shutdown application context because wrong context:" + context.getClass()); | ||
} | ||
} | ||
} | ||
|
||
@Override | ||
public void setApplicationContext(ApplicationContext ctx) throws BeansException { | ||
this.context = ctx; | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.