[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-3940) JbossPojoCacheProvider get method implementation error
by Hakan Uygun (JIRA)
JbossPojoCacheProvider get method implementation error
------------------------------------------------------
Key: JBSEAM-3940
URL: https://jira.jboss.org/jira/browse/JBSEAM-3940
Project: Seam
Issue Type: Bug
Components: Core
Affects Versions: 2.1.1.GA
Environment: JBoss 4.2.3.GA
Reporter: Hakan Uygun
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);
}
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 10 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-3950) Interceptor sort order: log a warning if around or within clause contains bad InterceptorType
by Julien Kronegg (JIRA)
Interceptor sort order: log a warning if around or within clause contains bad InterceptorType
---------------------------------------------------------------------------------------------
Key: JBSEAM-3950
URL: https://jira.jboss.org/jira/browse/JBSEAM-3950
Project: Seam
Issue Type: Feature Request
Components: Core
Affects Versions: 2.1.1.GA
Environment: Seam Trunk source code http://fisheye.jboss.org/browse/Seam/trunk/src/main/org/jboss/seam/Compon...
Reporter: Julien Kronegg
Priority: Minor
In the Component class, Interceptors are separated between client-side and server-side interceptors by mean of the @Interceptor's InterceptorType type property (see Component.addInterceptor(Interceptor)).
The Interceptor's around and within properties allows to define the sort order (see also Component.newSort(List)).
Problem:
Since the client-side and server-side Interceptors are stored in two different lists, and since client-side interceptors are prioritary over server-side Interceptors, the programmer may write around/within clause that are ignored. For example, he may want to put a server-side Interceptor around a client-side Interceptor.
In the current Component code, these cases are simply ignored.
Solution:
In case of bad server-side / client-side mix in the Interceptor annotation definition, the newSort(List) method should raise a warning.
Proposition:
- insert after line 1020:
if (interceptorAnn.type()==InterceptorType.SERVER && cl.getAnnotation(Interceptor.class).type()==InterceptorType.CLIENT )
log.warn("Interceptor "+clazz.getName()+": a server-side Interceptor cannot be around the client-side Interceptor "+cl.getName()+" since client-side Interceptors are always prioritary");
- insert after line 1025:
if (interceptorAnn.type()==InterceptorType.CLIENT && cl.getAnnotation(Interceptor.class).type()==InterceptorType.SERVER)
log.warn("Interceptor "+clazz.getName()+": a client-side Interceptor cannot be within the server-side Interceptor "+cl.getName()+" since client-side Interceptors are always prioritary");
Pros:
- programmer friendly
Cons:
- sorting takes (a bit) more time
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 10 months