Fixed tests failing in ResourceServiceTest.
FEA: ItEr65S06BugFixing
This commit is contained in:
parent
24ae2c1a20
commit
db06347370
3 changed files with 13 additions and 2 deletions
|
|
@ -39,7 +39,6 @@ public class ConfigurationDAO extends GenericDAOHibernate<Configuration, Long>
|
|||
implements IConfigurationDAO {
|
||||
|
||||
@Override
|
||||
@Transactional(readOnly = true)
|
||||
public Configuration getConfiguration() {
|
||||
List<Configuration> list = list(Configuration.class);
|
||||
if (list.isEmpty()) {
|
||||
|
|
@ -48,4 +47,10 @@ public class ConfigurationDAO extends GenericDAOHibernate<Configuration, Long>
|
|||
return list.get(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(readOnly = true)
|
||||
public Configuration getConfigurationWithReadOnlyTransaction() {
|
||||
return getConfiguration();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,4 +34,9 @@ public interface IConfigurationDAO extends IGenericDAO<Configuration, Long> {
|
|||
*/
|
||||
Configuration getConfiguration();
|
||||
|
||||
/**
|
||||
* @return The application configuration open a read-only transaction.
|
||||
*/
|
||||
Configuration getConfigurationWithReadOnlyTransaction();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -469,7 +469,8 @@ public class CustomMenuController extends Div implements IMenuItemsRegister {
|
|||
}
|
||||
|
||||
public boolean isScenariosVisible() {
|
||||
return Registry.getConfigurationDAO().getConfiguration()
|
||||
return Registry.getConfigurationDAO()
|
||||
.getConfigurationWithReadOnlyTransaction()
|
||||
.isScenariosVisible();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue