ACE-1153: Alfresco Explorer: It is impossible to change start location for the users.

- Remove read-only transactions from UserPreferencesBean


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@66110 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Pavel Yurke
2014-04-02 09:01:36 +00:00
parent 794e39df54
commit 7d3ca3cb8d

View File

@@ -26,7 +26,6 @@ import java.util.ResourceBundle;
import javax.faces.context.FacesContext;
import javax.faces.model.SelectItem;
import javax.transaction.UserTransaction;
import org.alfresco.service.cmr.ml.ContentFilterLanguagesService;
import org.alfresco.service.cmr.ml.MultilingualContentService;
@@ -114,22 +113,7 @@ public class UserPreferencesBean implements Serializable
{
if (this.contentFilterLanguage == null)
{
Locale locale = null;
UserTransaction tx = null;
try
{
FacesContext context = FacesContext.getCurrentInstance();
tx = Repository.getUserTransaction(context, true);
tx.begin();
locale = (Locale) PreferencesService.getPreferences().getValue(PREF_CONTENTFILTERLANGUAGE);
tx.commit();
}
catch (Throwable err)
{
try { if (tx != null) {tx.rollback();} } catch (Exception tex) {}
}
Locale locale = (Locale) PreferencesService.getPreferences().getValue(PREF_CONTENTFILTERLANGUAGE);
// Null means All Languages
if (locale == null)
@@ -277,22 +261,8 @@ public class UserPreferencesBean implements Serializable
*/
public String getStartLocation()
{
String location = null;
UserTransaction tx = null;
try
{
FacesContext context = FacesContext.getCurrentInstance();
tx = Repository.getUserTransaction(context, true);
tx.begin();
String location = (String)PreferencesService.getPreferences().getValue(PREF_STARTLOCATION);
location = (String)PreferencesService.getPreferences().getValue(PREF_STARTLOCATION);
tx.commit();
}
catch (Throwable err)
{
try { if (tx != null) {tx.rollback();} } catch (Exception tex) {}
}
if (location == null)
{
// default to value from client config