-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Initial commit including POM changes * Converted ehcache to new format * Modified .travis.yml * Jakarta import corrections, EhCache config in app YML * Fixed file upload and corrected some of the compile errors * fixed final complilation errors * Some correction for JSON, EhCache wip * Expiry order changed * Added Mail dep and commented out some cache resolver code * Updated AuditInterceptor * Fiexed merge with master * Started java21 and fixed login * Fixed the null inject and removed dep in travis * Fixed travis java version * Use proper protoc * Relaced proto extensions for optional fields * Removed some extensions from protos and updated usage * Created a separate ehcache file for session cache and more proto corrections * Fixed the cache conf file * Remove StudyType and fixed study/initiative import * Changed the proto to keep collected and protocol DTOs * Fixed travis build and image upload * Removed the remaining proto extends and updated search client files * Changed magma version * Fixed membership addition and DAR history page * Fixed CacheResource and changed logback version * Fixed charts, coverage for non-opal taxos and csv download * Added legacy upgrade and chaged joda time version * Replaced joda time with LocalDateTime * Removed the legacy upgrade and removed required membership dto * Fixed templates for using old fields * Used 'double' for JSON's proto3 'int64' problem * Removed DTO unkonwn fields * Fixed the logs API * Added a EhCache event logger; changed int64 -> double + ftl fix * Use the getFileName * Fixed Pop, DCE cache serialization and creating new contact * Changed stats type in DTO --------- Co-authored-by: Ramin Haeri Azad <rhaeri@maelstrom-reseach.org>
- Loading branch information
Showing
340 changed files
with
3,018 additions
and
2,410 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
17 changes: 17 additions & 0 deletions
17
mica-core/src/main/java/org/obiba/mica/cache/EhCacheEventLogger.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,17 @@ | ||
package org.obiba.mica.cache; | ||
|
||
import org.ehcache.event.CacheEvent; | ||
import org.ehcache.event.CacheEventListener; | ||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
|
||
public class EhCacheEventLogger implements CacheEventListener<Object, Object> { | ||
|
||
private static final Logger logger = LoggerFactory.getLogger(EhCacheEventLogger.class); | ||
|
||
@Override | ||
public void onEvent(CacheEvent cacheEvent) { | ||
logger.info("Cache event = {}, Key = {}, Old value = {}, New value = {}", cacheEvent.getType(), | ||
cacheEvent.getKey(), cacheEvent.getOldValue(), cacheEvent.getNewValue()); | ||
} | ||
} |
40 changes: 40 additions & 0 deletions
40
mica-core/src/main/java/org/obiba/mica/cache/MicaEhCacheManagerFactory.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,40 @@ | ||
//package org.obiba.mica.cache; | ||
// | ||
//import org.apache.shiro.cache.CacheException; | ||
//import org.ehcache.CacheManager; | ||
//import org.ehcache.config.builders.CacheManagerBuilder; | ||
//import org.ehcache.xml.XmlConfiguration; | ||
//import org.slf4j.Logger; | ||
//import org.slf4j.LoggerFactory; | ||
// | ||
//import java.net.MalformedURLException; | ||
//import java.net.URL; | ||
// | ||
//public class MicaEhCacheManagerFactory { | ||
// private static final Logger log = LoggerFactory.getLogger(MicaEhCacheManagerFactory.class); | ||
// | ||
// | ||
// private static final String EHCACHE_CONFIG_FILE = "ehcache.xml"; | ||
// | ||
// // Implement a EhCache 3 CacheManager to be used in Spring boot 3 application | ||
// | ||
// public CacheManager create() { | ||
// // How to use Ehcache 3 in Spring boot 3 | ||
// // https://www.ehcache.org/documentation/3.8/getting-started.html | ||
// | ||
// // https://www.ehcache.org/documentation/3.8/getting-started.html | ||
// | ||
// | ||
// | ||
// log.info("Creating EhCache Manager"); | ||
//// try { | ||
//// XmlConfiguration xmlConfiguration = new XmlConfiguration(new URL(EHCACHE_CONFIG_FILE)); | ||
//// CacheManager cacheManager = CacheManagerBuilder.newCacheManager(xmlConfiguration); | ||
//// cacheManager.init(); | ||
//// | ||
//// return cacheManager; | ||
//// } catch (MalformedURLException e) { | ||
//// throw new CacheException(e); | ||
//// } | ||
// } | ||
//} |
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
Oops, something went wrong.