Revision: 4128
Author: seba.wagner
Date: Mon Aug 29 12:03:45 2011
Log: Adding static variable as check
http://code.google.com/p/openmeetings/source/detail?r=4128
Modified:
/branches/dev/injection/src/app/org/openmeetings/app/data/basic/Configurationmanagement.java
/branches/dev/injection/src/app/org/openmeetings/app/remote/red5/ScopeApplicationAdapter.java
/branches/dev/injection/src/app/org/openmeetings/servlet/outputhandler/DefaultIndex.java
=======================================
---
/branches/dev/injection/src/app/org/openmeetings/app/data/basic/Configurationmanagement.java
Mon Aug 29 08:34:37 2011
+++
/branches/dev/injection/src/app/org/openmeetings/app/data/basic/Configurationmanagement.java
Mon Aug 29 12:03:45 2011
@@ -33,28 +33,12 @@
@PersistenceContext
private EntityManager em;
-
- private UsersDaoImpl usersDao;
- private AuthLevelmanagement authLevelManagement;
-
- private static int autowiredComplete = 0;
-
- public static boolean autowiredComplete() {
- return autowiredComplete > 1;
- }
-
+
@Autowired
- public void setUsersDao(UsersDaoImpl usersDao) {
- autowiredComplete ++;
- this.usersDao = usersDao;
- }
-
+ private UsersDaoImpl usersDao;
@Autowired
- public void setAuthLevelmanagement(AuthLevelmanagement
authLevelmanagement) {
- autowiredComplete ++;
- this.authLevelManagement = authLevelmanagement;
- }
-
+ private AuthLevelmanagement authLevelManagement;
+
public Configuration getConfKey(long user_level, String CONF_KEY) {
try {
if (authLevelManagement.checkUserLevel(user_level)) {
@@ -97,8 +81,8 @@
log.debug("getConfByConfigurationId4: " +
configuration);
if (configuration != null &&
configuration.getUser_id() != null) {
- configuration.setUsers(usersDao.getUser(
-
configuration.getUser_id()));
+
configuration.setUsers(usersDao.getUser(configuration
+ .getUser_id()));
}
return configuration;
} else {
@@ -169,7 +153,7 @@
@SuppressWarnings("unchecked")
List<Long> ll = query.getResultList();
log.debug("selectMaxFromConfigurations" + ll.get(0));
- return (Long) ll.get(0);
+ return ll.get(0);
} catch (Exception ex2) {
log.error("[selectMaxFromConfigurations] ", ex2);
}
=======================================
---
/branches/dev/injection/src/app/org/openmeetings/app/remote/red5/ScopeApplicationAdapter.java
Sun Aug 14 11:04:04 2011
+++
/branches/dev/injection/src/app/org/openmeetings/app/remote/red5/ScopeApplicationAdapter.java
Mon Aug 29 12:03:45 2011
@@ -101,6 +101,8 @@
private static long broadCastCounter = 0;
+ public static boolean initComplete = false;
+
public synchronized void resultReceived(IPendingServiceCall arg0) {
// TODO Auto-generated method stub
}
@@ -146,6 +148,8 @@
log.debug("scopeName :: " + scopeName);
}
+
+ ScopeApplicationAdapter.initComplete = true;
//
OpenXGHttpClient.getInstance().openSIPgUserCreateTest();
// OpenXGWrapperClient.getInstance().testConnection();
=======================================
---
/branches/dev/injection/src/app/org/openmeetings/servlet/outputhandler/DefaultIndex.java
Mon Aug 29 08:34:37 2011
+++
/branches/dev/injection/src/app/org/openmeetings/servlet/outputhandler/DefaultIndex.java
Mon Aug 29 12:03:45 2011
@@ -24,11 +24,9 @@
private Configurationmanagement getConfigurationmanagement() {
try {
- if (Configurationmanagement.autowiredComplete()) {
- ApplicationContext context =
WebApplicationContextUtils
-
.getWebApplicationContext(getServletContext());
- return (Configurationmanagement)
context.getBean("cfgManagement");
- }
+ ApplicationContext context = WebApplicationContextUtils
+
.getWebApplicationContext(getServletContext());
+ return (Configurationmanagement)
context.getBean("cfgManagement");
} catch (Exception err) {
log.error("[getConfigurationmanagement]", err);
}
@@ -41,8 +39,10 @@
try {
- if (getConfigurationmanagement() == null) {
- return
getVelocityView().getVelocityEngine().getTemplate("booting.vm");
+ if (getConfigurationmanagement() == null
+ ||
!ScopeApplicationAdapter.initComplete) {
+ return
getVelocityView().getVelocityEngine().getTemplate(
+ "booting.vm");
}
String template = "sip_template.vm";
@@ -138,8 +138,8 @@
// Load params from URL and set into wrapper code
if (httpServletRequest.getParameterMap() != null) {
for (@SuppressWarnings("unchecked")
- Iterator<String> iter = httpServletRequest
-
.getParameterMap().keySet().iterator(); iter.hasNext();) {
+ Iterator<String> iter =
httpServletRequest.getParameterMap()
+ .keySet().iterator();
iter.hasNext();) {
String paramKey = iter.next();
SWF_FLASHVARS += paramKey
+ "="
--
You received this message because you are subscribed to the Google Groups
"OpenMeetings developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/openmeetings-dev?hl=en.