Author: christian.bauer(a)jboss.com
Date: 2009-04-14 11:46:11 -0400 (Tue, 14 Apr 2009)
New Revision: 10399
Added:
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/UserLogin.java
Removed:
trunk/examples/wiki/src/etc/gwtmodules/
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/dao/WikiManagedPersistenceContext.java
Modified:
trunk/examples/wiki/src/etc/WEB-INF/components.xml
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/Authenticator.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/CommentQuery.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DirectoryBrowser.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/Menu.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/WikiRequestResolver.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/WikiSecurityEvents.java
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/BlogDirectory.java
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/ForumQuery.java
Log:
JBSEAM-4099, simplify wiki login procedure
Modified: trunk/examples/wiki/src/etc/WEB-INF/components.xml
===================================================================
--- trunk/examples/wiki/src/etc/WEB-INF/components.xml 2009-04-14 15:34:07 UTC (rev
10398)
+++ trunk/examples/wiki/src/etc/WEB-INF/components.xml 2009-04-14 15:46:11 UTC (rev
10399)
@@ -31,6 +31,16 @@
persistence-unit-jndi-name="java:/entityManagerFactories/wiki">
</persistence:managed-persistence-context>
+ <persistence:managed-persistence-context
+ name="restrictedEntityManager"
+ auto-create="true"
+ entity-manager-factory="#{wikiEntityManagerFactory}"
+ persistence-unit-jndi-name="java:/entityManagerFactories/wiki">
+ <persistence:filters>
+ <value>#{accessLevelFilter}</value>
+ </persistence:filters>
+ </persistence:managed-persistence-context>
+
<persistence:filter name="accessLevelFilter">
<persistence:name>accessLevelFilter</persistence:name>
<persistence:parameters>
@@ -39,13 +49,6 @@
</persistence:parameters>
</persistence:filter>
- <component name="restrictedEntityManager" auto-create="true"
scope="CONVERSATION"
-
class="org.jboss.seam.wiki.core.dao.WikiManagedPersistenceContext">
- <property
name="entityManagerFactory">#{wikiEntityManagerFactory}</property>
- <property
name="persistenceUnitJndiName">java:/entityManagerFactories/wiki</property>
- <property
name="filters"><value>#{accessLevelFilter}</value></property>
- </component>
-
<!-- JSF entity instance from/to string converters for select lists -->
<ui:entity-converter name="entityConverter"
@@ -106,9 +109,6 @@
<value>default</value>
<value>sfwkorg</value>
<value>inrelationto</value>
- <!--
- <value>openremote</value>
- -->
</property>
</component>
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/Authenticator.java
===================================================================
---
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/Authenticator.java 2009-04-14
15:34:07 UTC (rev 10398)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/Authenticator.java 2009-04-14
15:46:11 UTC (rev 10399)
@@ -7,10 +7,8 @@
package org.jboss.seam.wiki.core.action;
import org.jboss.seam.Component;
-import org.jboss.seam.web.ServletContexts;
import org.jboss.seam.annotations.*;
import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.core.Events;
import org.jboss.seam.log.Log;
import org.jboss.seam.security.Identity;
import org.jboss.seam.security.Credentials;
@@ -24,7 +22,6 @@
import org.jboss.seam.wiki.core.model.Role;
import org.jboss.seam.wiki.util.Hash;
import org.jboss.seam.wiki.util.WikiUtil;
-import org.jboss.seam.wiki.WikiInit;
import org.jboss.seam.wiki.preferences.Preferences;
import javax.servlet.http.HttpServletRequest;
@@ -33,8 +30,6 @@
@Name("authenticator")
public class Authenticator {
- protected final static String REGULAR_SESSION_MAX_INACTIVE_SECONDS =
"regularSessionMaxInactiveInterval";
-
@Logger
Log log;
@@ -67,7 +62,6 @@
User user = getUserForCredentials(username, password);
if (user == null) return false;
setRolesAndAccessLevels(user);
- Events.instance().raiseEvent("User.loggedInBasicHttp", user);
return true;
}
@@ -83,7 +77,6 @@
user.setPreviousLastLoginOn(user.getLastLoginOn());
user.setLastLoginOn(new Date());
- Events.instance().raiseEvent("User.loggedIn", user);
return true;
}
@@ -109,6 +102,10 @@
if (role.getAccessLevel() > bestRole.getAccessLevel()) bestRole = role;
}
+ if (user.getMemberHome() != null && user.getMemberHome().getName() !=
null) {
+ log.debug("initializing users member home instance before detaching
currentUser into HTTP session");
+ }
+
// Outject current user and access level
Contexts.getSessionContext().set("currentUser", user);
Contexts.getSessionContext().set("currentAccessLevel",
bestRole.getAccessLevel());
@@ -184,31 +181,4 @@
return "loggedOut";
}
- @Observer("org.jboss.seam.security.loginSuccessful")
- public void extendSessionTime() {
- // Store the regular session timeout value, so we can set it back later on
logout
- int regularSessionTimeout =
ServletContexts.getInstance().getRequest().getSession().getMaxInactiveInterval();
- Contexts.getSessionContext().set(REGULAR_SESSION_MAX_INACTIVE_SECONDS,
regularSessionTimeout);
- WikiInit init = (WikiInit)Component.getInstance(WikiInit.class);
- if (init.getAuthenticatedSessionTimeoutMinutes() != 0) {
- log.debug("setting timeout of authenticated user session to minutes:
" + init.getAuthenticatedSessionTimeoutMinutes());
-
ServletContexts.getInstance().getRequest().getSession().setMaxInactiveInterval(
- init.getAuthenticatedSessionTimeoutMinutes()*60
- );
- }
- }
-
- @Observer("org.jboss.seam.security.loggedOut")
- public void resetSessionTime() {
- // Don't rely on that, do a null check - this should never be null but
sometimes it is... *sigh*
- Object o =
Contexts.getSessionContext().get(REGULAR_SESSION_MAX_INACTIVE_SECONDS);
- if (o != null) {
- int regularSessionTimeout = (Integer) o;
- log.debug("resetting timeout of user session after logout to minutes:
" + regularSessionTimeout/60);
-
ServletContexts.getInstance().getRequest().getSession().setMaxInactiveInterval(regularSessionTimeout);
- } else {
- // Safety, reset to a low value, 10 minutes
-
ServletContexts.getInstance().getRequest().getSession().setMaxInactiveInterval(600);
- }
- }
}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/CommentQuery.java
===================================================================
---
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/CommentQuery.java 2009-04-14
15:34:07 UTC (rev 10398)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/CommentQuery.java 2009-04-14
15:46:11 UTC (rev 10399)
@@ -43,7 +43,6 @@
}
@Observer(value = {
- "PersistenceContext.filterReset",
"PreferenceComponent.refresh.commentsPreferences",
"Comment.commentListRefresh"
}, create = false)
Modified:
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DirectoryBrowser.java
===================================================================
---
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DirectoryBrowser.java 2009-04-14
15:34:07 UTC (rev 10398)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DirectoryBrowser.java 2009-04-14
15:46:11 UTC (rev 10399)
@@ -206,13 +206,13 @@
refreshChildNodes();
}
- @Observer(value = {"PersistenceContext.filterReset",
"Node.removed"}, create = false)
+ @Observer(value = {"Node.removed"}, create = false)
public void loadTree() {
WikiDirectory wikiRoot = (WikiDirectory)
Component.getInstance("wikiRoot");
treeRoot = wikiNodeDAO.findWikiDirectoryTree(wikiRoot);
}
- @Observer(value = {"PersistenceContext.filterReset",
"Node.removed", "Pager.pageChanged"}, create = false)
+ @Observer(value = {"Node.removed", "Pager.pageChanged"}, create =
false)
public void refreshChildNodes() {
log.debug("refreshing child nodes of current directory: " +
getInstance());
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/Menu.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/Menu.java 2009-04-14
15:34:07 UTC (rev 10398)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/Menu.java 2009-04-14
15:46:11 UTC (rev 10399)
@@ -8,6 +8,7 @@
import org.jboss.seam.ScopeType;
import org.jboss.seam.Component;
+import org.jboss.seam.security.Identity;
import org.jboss.seam.annotations.*;
import org.jboss.seam.log.Log;
import org.jboss.seam.wiki.core.action.prefs.WikiPreferences;
@@ -22,8 +23,6 @@
/**
* Holds the nodes that are displayed in the site menu
*
- * TODO: Caches the menu in the session, better would be a page fragment cache.
- *
* @author Christian Bauer
*/
@Name("menu")
@@ -47,18 +46,6 @@
return root;
}
- @Observer(value = { "Node.updated", "Node.removed",
"PersistenceContext.filterReset" }, create = false)
- public void refreshRoot() {
- log.debug("Loading menu items tree");
- WikiPreferences wikiPreferences =
Preferences.instance().get(WikiPreferences.class);
- root = WikiNodeDAO.instance().findMenuItemTree(
- (WikiDirectory)Component.getInstance("wikiRoot"),
- wikiPreferences.getMainMenuDepth(),
- wikiPreferences.getMainMenuLevels(),
- wikiPreferences.isMainMenuShowAdminOnly()
- );
- }
-
public String getCacheRegion() {
return CACHE_REGION;
}
@@ -67,9 +54,22 @@
return CACHE_KEY + currentAccessLevel;
}
- @Observer(value = { "Node.updated", "Node.removed"})
+ // Logout invalidates the session context, so we don't need to refresh
afterwards
+ @Observer(value = { "Node.updated", "Node.removed",
Identity.EVENT_LOGIN_SUCCESSFUL})
public void invalidateCache() {
+ log.debug("invaliding menu items tree cache");
PageFragmentCache.instance().removeAll(CACHE_REGION);
+ root = null;
}
+ private void refreshRoot() {
+ log.debug("Loading menu items tree");
+ WikiPreferences wikiPreferences =
Preferences.instance().get(WikiPreferences.class);
+ root = WikiNodeDAO.instance().findMenuItemTree(
+ (WikiDirectory)Component.getInstance("wikiRoot"),
+ wikiPreferences.getMainMenuDepth(),
+ wikiPreferences.getMainMenuLevels(),
+ wikiPreferences.isMainMenuShowAdminOnly()
+ );
+ }
}
Added: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/UserLogin.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/UserLogin.java
(rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/UserLogin.java 2009-04-14
15:46:11 UTC (rev 10399)
@@ -0,0 +1,91 @@
+package org.jboss.seam.wiki.core.action;
+
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Logger;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Observer;
+import org.jboss.seam.core.Manager;
+import org.jboss.seam.core.Conversation;
+import org.jboss.seam.log.Log;
+import org.jboss.seam.wiki.core.model.WikiDocument;
+import org.jboss.seam.wiki.core.ui.WikiURLRenderer;
+import org.jboss.seam.wiki.WikiInit;
+import org.jboss.seam.Component;
+import org.jboss.seam.security.Identity;
+import org.jboss.seam.contexts.Contexts;
+import org.jboss.seam.web.ServletContexts;
+
+/**
+ * Decides what to do (redirect) after a user logs in successfully.
+ * <p>
+ * This is a stateful component and therefore different than
<tt>WikiSecurityEvents</tt>.
+ * </p>
+ *
+ * @author Christian Bauer
+ */
+@Name("userLogin")
+public class UserLogin {
+
+ protected final static String REGULAR_SESSION_MAX_INACTIVE_SECONDS =
"regularSessionMaxInactiveInterval";
+
+ @Logger
+ Log log;
+
+ @In(create = false, required = false)
+ DocumentHome documentHome;
+
+ @In
+ WikiURLRenderer wikiURLRenderer;
+
+ String redirectURL;
+
+ @Observer(Identity.EVENT_LOGIN_SUCCESSFUL)
+ public void onLogin() {
+
+ // Store the regular session timeout value, so we can set it back later on
logout
+ int regularSessionTimeout =
ServletContexts.getInstance().getRequest().getSession().getMaxInactiveInterval();
+ Contexts.getSessionContext().set(REGULAR_SESSION_MAX_INACTIVE_SECONDS,
regularSessionTimeout);
+ WikiInit init = (WikiInit)Component.getInstance(WikiInit.class);
+ if (init.getAuthenticatedSessionTimeoutMinutes() != 0) {
+ log.debug("setting timeout of authenticated user session to minutes:
" + init.getAuthenticatedSessionTimeoutMinutes());
+
ServletContexts.getInstance().getRequest().getSession().setMaxInactiveInterval(
+ init.getAuthenticatedSessionTimeoutMinutes()*60
+ );
+ }
+
+ // Prepare redirect stuff
+ if (documentHome != null && documentHome.isManaged()) {
+ redirectURL = wikiURLRenderer.renderURL(documentHome.getInstance());
+ } else {
+ redirectURL =
wikiURLRenderer.renderURL((WikiDocument)Component.getInstance("wikiStart"));
+ }
+
+ log.debug("preparing URL for redirect after successful login: " +
redirectURL);
+
+ log.debug("destroying all conversations after successful login");
+ Manager.instance().killAllOtherConversations();
+
+ // Finally, end the current one after we are done with documentHome
+ Conversation.instance().endBeforeRedirect();
+ }
+
+ @Observer(Identity.EVENT_LOGGED_OUT)
+ public void onLogout() {
+ Object o =
Contexts.getSessionContext().get(REGULAR_SESSION_MAX_INACTIVE_SECONDS);
+ // Don't rely on that, do a null check - this should never be null but
sometimes it is... *sigh*
+ if (o != null) {
+ int regularSessionTimeout = (Integer) o;
+ log.debug("resetting timeout of user session after logout to minutes:
" + regularSessionTimeout/60);
+
ServletContexts.getInstance().getRequest().getSession().setMaxInactiveInterval(regularSessionTimeout);
+ } else {
+ // Safety, reset to a low value, 10 minutes
+ // TODO: That value is actually configured in web.xml, how do we get it
here?
+
ServletContexts.getInstance().getRequest().getSession().setMaxInactiveInterval(600);
+ }
+ }
+
+ public String getLoginRedirectURL() {
+ log.debug("obtaining redirect URL: " + redirectURL);
+ return redirectURL;
+ }
+}
Modified:
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/WikiRequestResolver.java
===================================================================
---
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/WikiRequestResolver.java 2009-04-14
15:34:07 UTC (rev 10398)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/WikiRequestResolver.java 2009-04-14
15:46:11 UTC (rev 10399)
@@ -69,6 +69,10 @@
@AutoCreate
public class WikiRequestResolver {
+ public static final String SESSION_MSG = "lacewiki.Session.Message";
+ public static final String SESSION_MSG_SEVERITY =
"lacewiki.Session.MessageSeverity";
+ public static final String SESSION_MSG_DATA =
"lacewiki.Session.MessageData";
+
@Logger
static Log log;
@@ -76,6 +80,7 @@
protected WikiNodeDAO wikiNodeDAO;
protected Long nodeId;
+
public Long getNodeId() { return nodeId; }
public void setNodeId(Long nodeId) { this.nodeId = nodeId; }
@@ -119,6 +124,28 @@
StatusMessages.instance().addFromResourceBundle(msgSeverity,
getMessageKey());
}
+ // Queue a message if requested in the session (for message passing across
conversations)
+ String msgKey = (String)Contexts.getSessionContext().get(SESSION_MSG);
+ if (msgKey != null) {
+ log.debug("session contained message: " + msgKey);
+
+ StatusMessage.Severity msgSeverity = StatusMessage.Severity.INFO;
+ StatusMessage.Severity sessionMessageSeverity =
+
(StatusMessage.Severity)Contexts.getSessionContext().get(SESSION_MSG_SEVERITY);
+ if (sessionMessageSeverity != null) {
+ msgSeverity = sessionMessageSeverity;
+ }
+ Object msgData = Contexts.getSessionContext().get(SESSION_MSG_DATA);
+ if (msgData != null) {
+ StatusMessages.instance().addFromResourceBundle(msgSeverity, msgKey,
msgData);
+ } else {
+ StatusMessages.instance().addFromResourceBundle(msgSeverity, msgKey);
+ }
+ Contexts.getSessionContext().remove(SESSION_MSG);
+ Contexts.getSessionContext().remove(SESSION_MSG_SEVERITY);
+ Contexts.getSessionContext().remove(SESSION_MSG_DATA);
+ }
+
// Have we been called with a nodeId request parameter, must be a document
if (nodeId != null) {
log.debug("trying to resolve node id: " + nodeId);
Deleted:
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/dao/WikiManagedPersistenceContext.java
===================================================================
---
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/dao/WikiManagedPersistenceContext.java 2009-04-14
15:34:07 UTC (rev 10398)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/dao/WikiManagedPersistenceContext.java 2009-04-14
15:46:11 UTC (rev 10399)
@@ -1,47 +0,0 @@
-package org.jboss.seam.wiki.core.dao;
-
-import org.jboss.seam.persistence.ManagedPersistenceContext;
-import org.jboss.seam.persistence.Filter;
-import org.jboss.seam.persistence.PersistenceProvider;
-import org.jboss.seam.annotations.Observer;
-import org.jboss.seam.annotations.Logger;
-import org.jboss.seam.log.Log;
-import org.jboss.seam.core.Events;
-
-/**
- * Forces re-evaluation of filter parameter for managed persistence contexts.
- * <p>
- * This is called after a user logs in, so that the
<tt>#{currentAccessLevel}</tt>
- * filter argument is evaluated again, <i>on the already open</i> persistence
context
- * (which has the filter argument from before login). See the filter definition in
- * components.xml.
- * <p>
- * The risk with re-setting filters on an existing persistence context is that things
- * might be cached already that should be filtered out. Now, in our case that works
- * fine because a login always means that the current user gains privileges and
- * raises his/her access level, i.e. sees a superset of the data he has seen before.
- *
- * @author Christian Bauer
- */
-public class WikiManagedPersistenceContext extends ManagedPersistenceContext {
-
- @Logger
- Log log;
-
- @Observer(value = {"User.loggedIn", "User.loggedInBasicHttp"},
create = false)
- public void resetFilter() {
- try {
-
- log.debug("Resetting persistence context filters");
- PersistenceProvider persistenceProvider = PersistenceProvider.instance();
- for (Filter f : getFilters()) {
- if (f.isFilterEnabled()) {
- persistenceProvider.enableFilter(f, getEntityManager());
- }
- }
- } catch (Exception ex) {
- throw new RuntimeException(ex);
- }
- Events.instance().raiseEvent("PersistenceContext.filterReset");
- }
-}
Modified:
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/WikiSecurityEvents.java
===================================================================
---
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/WikiSecurityEvents.java 2009-04-14
15:34:07 UTC (rev 10398)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/WikiSecurityEvents.java 2009-04-14
15:46:11 UTC (rev 10399)
@@ -9,12 +9,17 @@
import org.jboss.seam.annotations.Install;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Startup;
+import org.jboss.seam.annotations.Observer;
import org.jboss.seam.annotations.intercept.BypassInterceptors;
import org.jboss.seam.international.StatusMessage;
import org.jboss.seam.security.FacesSecurityEvents;
+import org.jboss.seam.security.Identity;
+import org.jboss.seam.contexts.Contexts;
+import org.jboss.seam.wiki.core.action.WikiRequestResolver;
/**
* Overrides the "login failed" message and turns it into a WARN (we don't
want INFO here).
+ * Transports "login successful" message across conversations (in the session)
for redirect-after-login.
*
* @author Christian Bauer
*/
@@ -28,4 +33,23 @@
public StatusMessage.Severity getLoginFailedMessageSeverity() {
return StatusMessage.Severity.WARN;
}
+
+ @Override
+ @Observer(Identity.EVENT_LOGIN_SUCCESSFUL)
+ public void addLoginSuccessfulMessage() {
+
+ Contexts.getSessionContext().set(
+ WikiRequestResolver.SESSION_MSG, getLoginSuccessfulMessageKey()
+ );
+
+ Contexts.getSessionContext().set(
+ WikiRequestResolver.SESSION_MSG_SEVERITY,
getLoginSuccessfulMessageSeverity()
+ );
+
+ Contexts.getSessionContext().set(
+ WikiRequestResolver.SESSION_MSG_DATA,
Identity.instance().getCredentials().getUsername()
+ );
+
+ }
+
}
Modified:
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/BlogDirectory.java
===================================================================
---
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/BlogDirectory.java 2009-04-14
15:34:07 UTC (rev 10398)
+++
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/BlogDirectory.java 2009-04-14
15:46:11 UTC (rev 10399)
@@ -97,7 +97,6 @@
return blogEntries;
}
- @Observer(value = {"PersistenceContext.filterReset"}, create = false)
public void loadBlogEntries() {
if (pager == null) throw new IllegalStateException("Need to call
getBlogEntries(currentMacro) first!");
@@ -141,7 +140,6 @@
return archivedEntries;
}
- @Observer(value = {"PersistenceContext.filterReset"}, create = false)
public void loadArchivedEntries() {
log.debug("loading blog entries and counting/aggregating them by year and
month");
archivedEntries =
@@ -164,7 +162,6 @@
private Map<Date, List<BlogEntry>> recentBlogEntries;
@Factory(value = "recentBlogEntries")
- @Observer(value = {"PersistenceContext.filterReset"}, create = false)
public void loadRecentBlogEntries() {
// TODO: This is supposed to use the currentMacro parameter to get the INSTANCE
prefs value... how?
BlogPreferences prefs = Preferences.instance().get(BlogPreferences.class);
Modified: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/ForumQuery.java
===================================================================
---
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/ForumQuery.java 2009-04-14
15:34:07 UTC (rev 10398)
+++
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/ForumQuery.java 2009-04-14
15:46:11 UTC (rev 10399)
@@ -63,7 +63,7 @@
return forumsAvailable;
}
- @Observer(value = {"Forum.forumListRefresh",
"PersistenceContext.filterReset"}, create = false)
+ @Observer(value = {"Forum.forumListRefresh"}, create = false)
public void loadForumsAvailability() {
// The whole point of this is so that we can use it as a cheaper query in the
mess that is the rendered="true/false"
// attribute evaluation in JSF. It is called completely randomly, at any phase in
the request, on any component in
@@ -77,7 +77,7 @@
return forums;
}
- @Observer(value = {"Forum.forumListRefresh",
"PersistenceContext.filterReset"}, create = false)
+ @Observer(value = {"Forum.forumListRefresh"}, create = false)
public void loadForums() {
log.debug("loading forums");
Map<Long, ForumInfo> forumInfo = forumDAO.findForums(currentDirectory);
@@ -154,7 +154,7 @@
topics.addAll(topicInfo.values());
}
- @Observer(value = {"Forum.topicListRefresh",
"PersistenceContext.filterReset"}, create = false)
+ @Observer(value = {"Forum.topicListRefresh"}, create = false)
public void refreshTopics() {
countTopics();
loadTopics();