diff options
-rwxr-xr-x | server/src/main/java/org/onap/usecaseui/server/service/impl/AlarmsHeaderServiceImpl.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/server/src/main/java/org/onap/usecaseui/server/service/impl/AlarmsHeaderServiceImpl.java b/server/src/main/java/org/onap/usecaseui/server/service/impl/AlarmsHeaderServiceImpl.java index 37de24db..3b751452 100755 --- a/server/src/main/java/org/onap/usecaseui/server/service/impl/AlarmsHeaderServiceImpl.java +++ b/server/src/main/java/org/onap/usecaseui/server/service/impl/AlarmsHeaderServiceImpl.java @@ -47,9 +47,12 @@ public class AlarmsHeaderServiceImpl implements AlarmsHeaderService { @Autowired
private SessionFactory sessionFactory;
+ private Session getSession() {
+ return sessionFactory.openSession();
+ }
public String saveAlarmsHeader(AlarmsHeader alarmsHeader) {
- try(Session session = sessionFactory.openSession();){
+ try(Session session = getSession()){
if (null == alarmsHeader) {
logger.error("AlarmsHeaderServiceImpl saveAlarmsHeader alarmsHeader is null!");
}
|