You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Jun Tsai <ju...@gmail.com> on 2010/01/13 13:45:04 UTC
Maybe jdk or T5 bug about generic service interface.
hi,
I have a base interface for my service.
public interface BaseInterface<T> {
public List<T> find(T parent);
public List<T> findAll();
}
//------------- ServiceA
public interface ServiceAInterface extends BaseInterface<Member> {
@Cacheable(clazz=Member.class,cacheKey="xxx")
public List<Member> find(Member parent);
@Cacheable(clazz=Member.class,cacheKey="xxxxx")
public List<Member> findAll();
}
public class ServiceA implements ServiceAInterface{
..................
}
I use an advice to enhance the service;
If I call service.findAll(),I find the advice works fine.But if I call
service.find(parent),The advice never be called.
I debug the AspectInterceptorBuilderImpl class,I find
69 remainingMethods.addAll(Arrays.asList(serviceInterface.getMethods()));
serviceInteface.getMethods() that incluedes three method:
List findAll()
List find(com.xxx.Distirct)
List find(java.lang.Object) .
The method List findAll() and List find(com.xxx.Distirct) was enhanced.When
I call service.find(district),It will call List find(java.lang.Object)
method, the advice doesn't works.
But I think If serviceInterface.getMethods() returns two method:
List findAll()
List find(com.xxx.Distirct).
All works fine;
JDK bug or T5 bug?give me some advice.thanks.
--
regards,
Jun Tsai