aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main/java/com/juick/service/MessagesServiceImpl.java
diff options
context:
space:
mode:
Diffstat (limited to 'juick-server/src/main/java/com/juick/service/MessagesServiceImpl.java')
-rw-r--r--juick-server/src/main/java/com/juick/service/MessagesServiceImpl.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/juick-server/src/main/java/com/juick/service/MessagesServiceImpl.java b/juick-server/src/main/java/com/juick/service/MessagesServiceImpl.java
index 5c2701eb..a19878d9 100644
--- a/juick-server/src/main/java/com/juick/service/MessagesServiceImpl.java
+++ b/juick-server/src/main/java/com/juick/service/MessagesServiceImpl.java
@@ -767,4 +767,10 @@ public class MessagesServiceImpl extends BaseJdbcService implements MessagesServ
return reply;
}, -hours);
}
+
+ @Transactional(readOnly = true)
+ @Override
+ public boolean isReadonly() {
+ return getJdbcTemplate().queryForObject("SELECT @@global.read_only", Integer.class) > 0;
+ }
}