[JBoss Seam] - Re: Calling a method when a Session scope starts?
by SmokingAPipe
That's what I ended up doing, and it works beautifully. It's a lot more elegant than writing a filter. No filter, and with about 5 lines of code, I can check a database and set a cookie. It does create a new object with every request, but it's a lightweight object so I don't think that matters.
I haven't found any docs that give a good description of what you can do in the pages.xml file, but obviously this part of it is pretty cool.
I assume that these components could do other stuff like do redirects. The ultimate in cool is if they could do effectively a JSP include, so I could use it for my SEO needs, and hide parameters within URLs (ie, map /blog-5885.seam to /blog-entry.jsp, and use the 5885 to set a parameter in it). I'm guess that's possible but I have no idea how, because as I said, there are no docs for what you can do in the pages.xml file.
I still have no idea how Seam figures out whether it creates an instance of a component for a given page or not. It seems like it is buggy, because I can create components with scope of EVENT, and they are not always accessible within a page. I don't get it.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3966386#3966386
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3966386
19 years, 8 months
[JBossCache] - Re: Eviction Policy problem cache clear
by alximik
I have the same problem.
When the last node in FQN is a String everything is fine. But when the last node in FQN is an Integer the cache is not cleared.
| treeCache.put(new Fqn(new Object[]{"a", "b", Integer.valueOf(1).toString()}), "key2", "value2");//The data will be cleared
|
| treeCache.put(new Fqn(new Object[]{"a", "b", Integer.valueOf(1)}), "key2", "value2");//The data will not be cleared
The logs are the same in both cases
| 2006-08-21 10:52:02,692 TRACE [org.jboss.cache.eviction.LRUAlgorithm] Node /a/b/1 should be evicted because of max age
| 2006-08-21 10:52:02,692 TRACE [org.jboss.cache.eviction.BaseEvictionAlgorithm] Attempting to evict cache node with fqn of /a/b/1
| 2006-08-21 10:52:02,692 TRACE [org.jboss.cache.interceptors.TxInterceptor] (null) call on method [_evict(/a/b/1)]
| 2006-08-21 10:52:02,692 TRACE [org.jboss.cache.interceptors.PessimisticLockInterceptor] PessimisticLockInterceptor invoked for method _evict(/a/b/1)
| 2006-08-21 10:52:02,692 TRACE [org.jboss.cache.interceptors.PessimisticLockInterceptor] Attempting to lock node /a/b/1 for owner Thread[Timer-5,5,jboss]
| 2006-08-21 10:52:02,692 TRACE [org.jboss.cache.Node] acquiring RL: fqn=/a, caller=Thread[Timer-5,5,jboss], lock=<unlocked>
| 2006-08-21 10:52:02,692 TRACE [org.jboss.cache.Node] acquired RL: fqn=/a, caller=Thread[Timer-5,5,jboss], lock=read owners=[Thread[Timer-5,5,jboss]]
| 2006-08-21 10:52:02,692 TRACE [org.jboss.cache.Node] acquiring RL: fqn=/a/b, caller=Thread[Timer-5,5,jboss], lock=<unlocked>
| 2006-08-21 10:52:02,692 TRACE [org.jboss.cache.Node] acquired RL: fqn=/a/b, caller=Thread[Timer-5,5,jboss], lock=read owners=[Thread[Timer-5,5,jboss]]
| 2006-08-21 10:52:02,692 TRACE [org.jboss.cache.Node] acquiring WL: fqn=/a/b/1, caller=Thread[Timer-5,5,jboss], lock=<unlocked>
| 2006-08-21 10:52:02,692 TRACE [org.jboss.cache.Node] acquired WL: fqn=/a/b/1, caller=Thread[Timer-5,5,jboss], lock=write owner=Thread[Timer-5,5,jboss]
| 2006-08-21 10:52:02,692 TRACE [org.jboss.cache.interceptors.CallInterceptor] Invoking method _evict(/a/b/1) on cache.
| 2006-08-21 10:52:02,692 TRACE [org.jboss.cache.TreeCache] _evict(/a/b/1)
| 2006-08-21 10:52:02,692 TRACE [org.jboss.cache.TreeCache] _remove(null, "/a/b/1")
| 2006-08-21 10:52:02,692 TRACE [org.jboss.cache.AbstractNode] removed child 1
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3966381#3966381
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3966381
19 years, 8 months