This content has been marked as final.
Show 7 replies
-
1. Re: PojoCache doesn't work with Seam 2.1.0CR1
pmuir Oct 12, 2008 9:36 PM (in response to tazman)read the migration guide.
-
2. Re: PojoCache doesn't work with Seam 2.1.0CR1
tazman Oct 12, 2008 10:30 PM (in response to tazman)I'm copying from the seam21migration.txt:
The use <s:cache /> is unchanged, but you can no longer inject the pojoCache component. Instead you should configure JBoss POJO cache as your cache provider in components.xml: <cache:jboss-pojo-cache-provider /> and inject it using @In CacheProvider<PojoCache> cacheProvider; The CacheProvider provides a Map like interface, and the getDelegate() method can be used to retrieve the underling cache.
I followed the migration guide while moving on Seam 2.1.0CR1. What am I doing wrong?
Tom
-
3. Re: PojoCache doesn't work with Seam 2.1.0CR1
pmuir Oct 13, 2008 11:58 AM (in response to tazman)Sorry, I was half asleep last night. If you can provide an example to reproduce and open a JIRA issue, we can take a look.
-
4. Re: PojoCache doesn't work with Seam 2.1.0CR1
tazman Oct 14, 2008 4:42 PM (in response to tazman)Pete, I didn't open a JIRA issue because the following works:
Set<User> userList = (Set<User>) cacheProvider.getDelegate().get("app", "userList");
Tom
-
5. Re: PojoCache doesn't work with Seam 2.1.0CR1
pmuir Oct 14, 2008 6:53 PM (in response to tazman)Please still file an issue - obviously doing it through the Seam interface should work!
-
6. Re: PojoCache doesn't work with Seam 2.1.0CR1
troy.sellers Jan 8, 2009 3:53 AM (in response to tazman)Did this get listed as a bug?
I have posted with the same problem using SEAM 2.1.1.GA.Couldn't find this in JIRA.
-
7. Re: PojoCache doesn't work with Seam 2.1.0CR1
haky Feb 7, 2009 5:08 PM (in response to tazman)Hi,
I think JbossPojoCacheProvider get method implementation is wrong. Region parameter ignored and return Node instance :
public Object get(String region, String key)
{
try
{
return cache.get(getFqn(key));
}
catch (CacheException e)
{
throw new IllegalStateException(String.format("Cache throw exception when trying to get %s from region %s.", key, region), e);
}
}
It shoul be like JbossCacheProvider get method :
public Object get(String region, String key)
{
try
{
Node node = cache.get(getFqn(region));
if (node != null)
{
return node.get(key);
}
else
{
return null;
}
}
catch (CacheException e)
{
throw new IllegalStateException(String.format("Cache throw exception when trying to get %s from region %s.", key, region), e);
}
}
I'll also open a jira issue