Michael Kublin has uploaded a new change for review.

Change subject: core: Removing annotattion Singelton from GlusterUtils and 
ClusterUtils
......................................................................

core: Removing annotattion Singelton from GlusterUtils and ClusterUtils

The following annotattion is used in order to point that a following class is 
bean
and is singelton, the following classes did not used as beans, that's why 
annottation was removed

Change-Id: I18234409bf136701ca83058601ebdda4eaf9e1f3
Signed-off-by: Michael Kublin <mkub...@redhat.com>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/utils/ClusterUtils.java
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/utils/GlusterUtils.java
2 files changed, 2 insertions(+), 14 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/25/8425/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/utils/ClusterUtils.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/utils/ClusterUtils.java
index c0c9e6a..66376cb 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/utils/ClusterUtils.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/utils/ClusterUtils.java
@@ -2,8 +2,6 @@
 
 import java.util.List;
 
-import javax.ejb.Singleton;
-
 import org.ovirt.engine.core.common.businessentities.VDS;
 import org.ovirt.engine.core.common.businessentities.VDSStatus;
 import org.ovirt.engine.core.compat.Guid;
@@ -11,15 +9,11 @@
 import org.ovirt.engine.core.dao.VdsDAO;
 import org.ovirt.engine.core.utils.RandomUtils;
 
-@Singleton
 public class ClusterUtils {
 
-    private static ClusterUtils instance = null;
+    private static ClusterUtils instance = new ClusterUtils();
 
     public static ClusterUtils getInstance() {
-        if(instance == null) {
-            instance = new ClusterUtils();
-        }
         return instance;
     }
 
diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/utils/GlusterUtils.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/utils/GlusterUtils.java
index c27d248..81958e2 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/utils/GlusterUtils.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/utils/GlusterUtils.java
@@ -1,19 +1,13 @@
 package org.ovirt.engine.core.bll.utils;
 
-import javax.ejb.Singleton;
-
 import org.ovirt.engine.core.compat.Guid;
 import org.ovirt.engine.core.dal.dbbroker.DbFacade;
 import org.ovirt.engine.core.dao.gluster.GlusterBrickDao;
 
-@Singleton
 public class GlusterUtils {
-    private static GlusterUtils instance = null;
+    private static GlusterUtils instance = new GlusterUtils();
 
     public static GlusterUtils getInstance() {
-        if (instance == null) {
-            instance = new GlusterUtils();
-        }
         return instance;
     }
 


--
To view, visit http://gerrit.ovirt.org/8425
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I18234409bf136701ca83058601ebdda4eaf9e1f3
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Michael Kublin <mkub...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to