Skip to content
Snippets Groups Projects
Commit ceeb0279 authored by srosse's avatar srosse
Browse files

OO-1184: cache the named group (it's always the same 9 ones), load the...

OO-1184: cache the named group (it's always the same 9 ones), load the extensions right after startup
parent ea44dd1f
No related branches found
No related tags found
No related merge requests found
......@@ -858,6 +858,7 @@ public class BaseSecurityManager extends BasicManager implements BaseSecurity {
List<SecurityGroup> group = this.dbInstance.getCurrentEntityManager()
.createQuery(sb.toString(), SecurityGroup.class)
.setParameter("groupName", securityGroupName)
.setHint("org.hibernate.cacheable", Boolean.TRUE)
.getResultList();
int size = group.size();
......
......@@ -38,6 +38,7 @@ import org.olat.core.dispatcher.Dispatcher;
import org.olat.core.dispatcher.DispatcherModule;
import org.olat.core.dispatcher.mapper.GlobalMapperRegistry;
import org.olat.core.dispatcher.mapper.MapperDispatcher;
import org.olat.core.extensions.ExtManager;
import org.olat.core.helpers.Settings;
import org.olat.core.logging.OLog;
import org.olat.core.logging.Tracing;
......@@ -116,6 +117,9 @@ public class OpenOLATServlet extends HttpServlet {
legacyContext += "/";
}
}
//preload extensions
ExtManager.getInstance().getExtensions();
}
@Override
......
......@@ -824,11 +824,11 @@ public class I18nManager extends BasicManager {
}
//
// 2) Try to load from classpath
String fileName = (locale == null ? METADATA_FILENAME : buildI18nFilename(locale));
String relPath = bundleName.replace('.', '/') + "/" + I18N_DIRNAME + "/" + fileName;
// No "/" at the beginning of the resource! since the
// resource will not be found within jars
if (is == null) {
String fileName = (locale == null ? METADATA_FILENAME : buildI18nFilename(locale));
String relPath = bundleName.replace('.', '/') + "/" + I18N_DIRNAME + "/" + fileName;
ClassLoader classLoader = this.getClass().getClassLoader();
is = classLoader.getResourceAsStream(relPath);
if (logDebug && is != null) logDebug("loading LocalStrings from classpath relpath::" + relPath, null);
......
......@@ -3,7 +3,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean id="courseLayoutHelper" class="org.olat.course.config.ui.courselayout.CourseLayoutHelper" depends-on="courseModule">
<property name="logoMaxHeight" value="100"/>
......@@ -16,11 +16,11 @@
<bean id="courseConfigManager" class="org.olat.course.config.ui.courselayout.CustomConfigManager" depends-on="courseModule">
<property name="availableLayoutElements">
<list>
<bean class="org.olat.course.config.ui.courselayout.elements.TextLE" lazy-init="true"/>
<bean class="org.olat.course.config.ui.courselayout.elements.HeaderLE" lazy-init="true"/>
<bean class="org.olat.course.config.ui.courselayout.elements.LinkLE" lazy-init="true"/>
<bean class="org.olat.course.config.ui.courselayout.elements.MenuLE" lazy-init="true"/>
<bean class="org.olat.course.config.ui.courselayout.elements.ToolboxLE" lazy-init="true"/>
<bean class="org.olat.course.config.ui.courselayout.elements.TextLE" />
<bean class="org.olat.course.config.ui.courselayout.elements.HeaderLE" />
<bean class="org.olat.course.config.ui.courselayout.elements.LinkLE" />
<bean class="org.olat.course.config.ui.courselayout.elements.MenuLE" />
<bean class="org.olat.course.config.ui.courselayout.elements.ToolboxLE" />
</list>
</property>
<property name="availableLayoutAttributes">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment