Salut a tous,
Dans mon boulot, on utilise le framework spring.
On a une classe de spring (jdkDynamicAopProxy) qui a été réecrite pour inclure nos besoins, et donc qui fait des appels aux autres classes de spring.
On vient de changer de version de spring ( je suppose qu'on est passé a la 2.5) et la, ca marche plus, car des classes de spring sont passés de public a protected, donc impossible de les appeler en dehors du package.
la partie qui pose probleme :
vu que le constructeur de la classe Reflective MethodInvocation est passé protected, on ne peut plus faire de new ReflectiveMethodInvocation
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14 // Check whether we have any advice. If we don't, we can fallback on direct // reflective invocation of the target, and avoid creating a MethodInvocation. if (chain.isEmpty()) { // We can skip creating a MethodInvocation: just invoke the target directly // Note that the final invoker must be an InvokerInterceptor so we know it does // nothing but a reflective operation on the target, and no hot swapping or fancy proxying. retVal = AopUtils.invokeJoinpointUsingReflection(target, method, args); } else { // We need to create a method invocation... invocation = new ReflectiveMethodInvocation(proxy, target, method, args, targetClass, chain); // Proceed to the joinpoint through the interceptor chain. retVal = invocation.proceed(); }
j'ai cru comprendre qu'il fallait utiliser l'interface ProxyMethodInvocation, mais je ne vois pas comment.
Des idées pour pallier a ce changement ?
Merci
mike
Partager